Commit graph

366 commits

Author SHA1 Message Date
Ying Wang
63d94fa305 Build from source or prebuilt
With this change, you can easily switch between building from source
code and prebuilt.
Set LOCAL_PREBUILT_MODULE_FILE to the path of the prebuilt file,
relative to the top of the source tree, in the usual module definition.
The prebuilt will be used unless any of the followings satisfied:
1) ANDROID_BUILD_FROM_SOURCE is "true", which disable prebuilt globally;
2) The module name is in ANDROID_NO_PREBUILT_MODULES;
3) The LOCAL_PATH is prefixed by any of ANDROID_NO_PREBUILT_PATHS.
A developer can set ANDROID_NO_PREBUILT_MODULES or
ANDROID_NO_PREBUILT_PATHS to build only his own module(s) from source,
while build other modules from prebuilts.
You can set ANDROID_BUILD_FROM_SOURCE to true to build everything from
source.
Those variables can be set with shell environmental variable or in your
buildspec.mk.

Sometimes module B is able to be built from source only if module A is
also
built from source, for example, if B is the test apk of A.
In that case, you can use the macro include-if-build-from-source to
include B's Android.mk only if A is built from source too, or
if-build-from-source to conditionally include the definition of module
B,
if their module definitions are in the same Android.mk.

Support host-executable-hook and host-shared-library-hook.

Change-Id: Icab7cf028c87eaba0dd7efc2a7749fd6f32b44e4
2012-12-14 14:48:00 -08:00
Andrew Hsieh
60a34ed501 am fc76f0eb: am 2ea957a3: Merge "Revise checks for MacOSX to build emulator"
* commit 'fc76f0eb17c606eb6df639d7a6c2f4ef2f3e09f1':
  Revise checks for MacOSX to build emulator
2012-11-09 11:12:42 -08:00
Andrew Hsieh
fc76f0eb17 am 2ea957a3: Merge "Revise checks for MacOSX to build emulator"
* commit '2ea957a373018ba6773c621065164256f0d84078':
  Revise checks for MacOSX to build emulator
2012-11-09 10:28:36 -08:00
Andrew Hsieh
1dcca61869 Revise checks for MacOSX to build emulator
1. Check $(HOST_CC) instead of gcc for llvm-gcc.
2. Remvoe Mac SDK 10.4 check because emulator uses
   the same SDK version as the rest of framework

Change-Id: I4071fd45dc09a18c5341ad79e6a85e61df060fb4
2012-11-09 02:06:33 -08:00
Ying Wang
92cd50c416 Remove nonexistent modules from PRODUCT_PACKAGES
and revert back to fatal error if sdk has nonexistent modules.

Change-Id: Ic7185128b0253b3591592b4167ea1e26cee1aa84
2012-10-31 11:55:53 -07:00
Ying Wang
84da5c55dd Filter out the overridden packages before doing required module expansion.
Bug: 6900954
Change-Id: Ib0f57dc4bfc341ec7166429a5bb71bfc5e28d271
2012-10-26 14:17:06 -07:00
Mike Lockwood
0cbacc4b21 am 86e2fd92: am daf5e22d: Add new embedded target for a super minimal android build
* commit '86e2fd9215faaffed47ab0373b2955d9a1892113':
  Add new embedded target for a super minimal android build
2012-10-26 08:47:40 -07:00
Mike Lockwood
86e2fd9215 am daf5e22d: Add new embedded target for a super minimal android build
* commit 'daf5e22dbac03e174e22c8209ed97c44c3a2a2c9':
  Add new embedded target for a super minimal android build
2012-10-26 08:45:36 -07:00
Mike Lockwood
daf5e22dba Add new embedded target for a super minimal android build
Remove obsolete BUILD_TINY_ANDROID

Change-Id: Ic0f3a5b3250ea80529f5099653068f118a13b12e
2012-10-25 15:28:37 -07:00
Kenny Root
a7fa6a4607 resolved conflicts for merge of 37868329 to master
Change-Id: I437f42a7197d1716b4783749f2b27e19c8721395
2012-10-16 17:41:33 -07:00
Kenny Root
37868329b2 am 2e0d1af7: Merge changes I58d43128,Ie34c958f
* commit '2e0d1af767f64996f47de2a84b685ddcfa02e686':
  Remove HAVE_SELINUX guards, part 2
  Remove HAVE_SELINUX guard
2012-10-16 17:34:42 -07:00
Kenny Root
92ca0197ed Remove HAVE_SELINUX guards, part 2
Change-Id: I58d43128447ef3be0f70ff2479af2e61fe4c5849
2012-10-16 13:43:08 -07:00
Elliott Hughes
2d17b1aba6 resolved conflicts for merge of 01b2aaaa to jb-mr1-dev-plus-aosp
Change-Id: I66481eb8b269775716f79e42e9d89c2ebbd45288
2012-10-03 12:13:38 -07:00
Ying Wang
e37c3dc3f6 Build only modules required by the current product.
Don't build modules_to_check by default.
Instead add "checkbuild" to the command line as a build goal, if you
want to build everything.
We can use the "checkbuild" goal to make sure some build targets on the
build server still build everything.

(cherry-pick of 5a88269ad6ed44fb163f96847954faac21292567.)

Bug: 7253452
Change-Id: I21eb93f3cb430c9531fe41a2f5d7b445c09938b9
2012-10-03 10:27:31 -07:00
Ying Wang
d0244b395a Remove build variant "tests"
Bug: 5368571
Now we have a phony target "tests" instead.
The target can be built in any other build variant (eg userdebug).
For example, "make PRODUCT-full-userdebug tests dist" will build and
put the *-test-* zip file in the dist dir.
The "tests" target will include all modules tagged as "tests" in
addition to other modules in specific target out directories.

Change-Id: I8383097380d8e6846c3e2107d6dd5f68788cfc39
2012-10-01 10:18:40 -07:00
Ying Wang
5a88269ad6 Build only modules required by the current product.
Don't build modules_to_check by default.
Instead add "checkbuild" to the command line as a build goal, if you
want to build everything.
We can use the "checkbuild" goal to make sure some build targets on the
build server still build everything.

Bug: 7253452
Change-Id: I84b62116131e85d1f32d58a424cdfd9d51fa9755
2012-09-28 15:04:27 -07:00
Ying Wang
b301817223 Don't install all host modules by default.
Instead we should explicitly set up the dependency, if the module will
be used in the build process; Use LOCAL_MODULE_TAGS with eng, debug or
tests if the module is for testing; or add to PRODUCT_PACKAGES if it's
required by a product.

Change-Id: I326e97df6630dee4acc6582ce6cef2dec8289155
2012-09-24 18:17:26 -07:00
Benoit Goby
4b0c7230e6 am a52d50a2: am 063d0c5d: Merge "Add openssl to TINY_ANDROID build" into jb-mr1-dev
* commit 'a52d50a235d07229ade4595e0551c1b0409c23be':
  Add openssl to TINY_ANDROID build
2012-09-12 17:03:31 -07:00
Benoit Goby
bc2406e64c Add openssl to TINY_ANDROID build
adb depends on it

Change-Id: I79f23315142b45bc7f9a2685fa2b9865b22396ad
2012-09-11 17:25:05 -07:00
Ying Wang
dceb47f2e2 am 4084c112: am 2d39468b: Merge "Filter out the overridden packages before doing required module expansion." into jb-mr1-dev
* commit '4084c112e5d073bd0d6875c45939ed7fba62ed14':
  Filter out the overridden packages before doing required module expansion.
2012-08-24 09:55:05 -07:00
Ying Wang
489458fa31 Filter out the overridden packages before doing required module expansion.
Bug: 6900954
Change-Id: Ib0f57dc4bfc341ec7166429a5bb71bfc5e28d271
2012-08-23 15:08:34 -07:00
Ying Wang
3ea0a81c2b am d19511a6: am c3a4cfe9: Merge "Support EMMA_INSTRUMENT in both full and unbundled builds." into jb-mr1-dev
* commit 'd19511a6657efc7f1a7e544df04f076223f8fe65':
  Support EMMA_INSTRUMENT in both full and unbundled builds.
2012-08-22 15:27:37 -07:00
Ying Wang
af4800c8a6 Support EMMA_INSTRUMENT in both full and unbundled builds.
Bug: 6987838
- With this change, use "EMMA_INSTRUMENT=true" to enable emma in full or
  unbundled build.
- You don't need to add "LOCAL_STATIC_JAVA_LIBRARIES += emma" any more for
  unbundled apps.
- Now a single var LOCAL_EMMA_INSTRUMENT replaces the previous
  LOCAL_NO_EMMA_INSTRUMENT and LOCAL_NO_EMMA_COMPILE.
- By default, if EMMA_INSTRUMENT is true, emma is enabled for only
  non-test apps.
- A new global var EMMA_INSTRUMENT_STATIC. It enables EMMA_INSTRUMENT
  and builds emma into apk/jar as static library, instead of using emma
  as part of shared library core.jar.

Change-Id: I0aa219e83074879ececc159b5b07c39eb07ccc00
2012-08-22 12:11:01 -07:00
Joe Onorato
769239f299 resolved conflicts for merge of 34539244 to master
Change-Id: I55b5c4aea999ff3fb5ceaabfe5d658a296f3d971
2012-08-17 02:51:45 -07:00
Joe Onorato
c5fbef5413 resolved conflicts for merge of fab83a3d to jb-mr1-dev
Change-Id: I97aff2be317fd10b68d933e65259ec48bd5ff6a1
2012-08-17 01:26:41 -07:00
Joe Onorato
0ee86a7429 Another error to warning
Change-Id: Ifbad63e3eb37d087d88a39e102b4239f305d0ee3
2012-08-17 01:12:27 -07:00
Joe Onorato
cea08a5220 resolved conflicts for merge of 5836d3b3 to jb-mr1-dev
Change-Id: If3d84a7439717ccf7723b3f79e934d73abbb3fea
2012-08-17 00:09:27 -07:00
Joe Onorato
8d0847e924 build system changes for jb-aah-dev merge
Change-Id: I29e27505a0d9f7cc2932f725bfe1c83d804388bc
2012-08-16 22:45:56 -07:00
Joe Onorato
e213944da4 Fail when a non-vendor product references a vendor module.
Change-Id: Ia5ca233e9b11f64b72074f65899d3041cf955c4c
2012-08-16 22:45:56 -07:00
Joe Onorato
6a185e453d Remove support for user tags in the build system.
It is not forbidden to say LOCAL_MODULE_TAGS := user,
and if you don't say LOCAL_MODULE_TAGS, it now defaults
to optional.

Change-Id: I0a0b200bb6f1c7bf1fe3a89cdc8f69678617526c
2012-08-16 22:45:56 -07:00
Joe Onorato
f93f5be23e Dump the user tagged modules.
Change-Id: I623821df3e48b358a6b898ccb13750f7dc54ddcf
2012-08-16 22:45:56 -07:00
Joe Onorato
918ee311f5 Don't give the user tag to host modules automatically.
Change-Id: I12d0a84786e5bf2224efd8684526b6097e6105d7
2012-08-16 22:45:55 -07:00
Joe Onorato
10649c632d Add a phony "nothing" goal that reads the makefiles but doesn't try to build anything.
Change-Id: Idac551e5c796321e993b94761f5cbf5b55c1a994
2012-08-16 22:45:55 -07:00
Joe Onorato
26ead966d7 build system changes for jb-aah-dev merge
Change-Id: I29e27505a0d9f7cc2932f725bfe1c83d804388bc
2012-08-16 22:36:41 -07:00
Joe Onorato
75493610b3 Fail when a non-vendor product references a vendor module.
Change-Id: Ia5ca233e9b11f64b72074f65899d3041cf955c4c
2012-08-16 22:36:41 -07:00
Joe Onorato
529302d912 Remove support for user tags in the build system.
It is not forbidden to say LOCAL_MODULE_TAGS := user,
and if you don't say LOCAL_MODULE_TAGS, it now defaults
to optional.

Change-Id: I0a0b200bb6f1c7bf1fe3a89cdc8f69678617526c
2012-08-16 22:36:41 -07:00
Joe Onorato
d23c3235fa Dump the user tagged modules.
Change-Id: I623821df3e48b358a6b898ccb13750f7dc54ddcf
2012-08-16 22:36:40 -07:00
Joe Onorato
f85cb7c936 Don't give the user tag to host modules automatically.
Change-Id: I12d0a84786e5bf2224efd8684526b6097e6105d7
2012-08-16 22:36:40 -07:00
Joe Onorato
d6b1d628be Add a phony "nothing" goal that reads the makefiles but doesn't try to build anything.
Change-Id: Idac551e5c796321e993b94761f5cbf5b55c1a994
2012-08-16 22:36:40 -07:00
Ying Wang
bc415dd5eb Support to build emmap_mata.zip in unbundled builds.
Bug: 6987838
Change-Id: Id6c81b08c4859442b7d52054ed5f278575719d1a
2012-08-16 10:10:11 -07:00
Ying Wang
da19eafc42 Support to build emmap_mata.zip in unbundled builds.
Bug: 6987838
Change-Id: Id6c81b08c4859442b7d52054ed5f278575719d1a
2012-08-15 12:22:44 -07:00
Ying Wang
7023f6179d Fix build.
Set BUILD_EMULATOR to true when HOST_OS is linux.
Disable the emulator package target if BUILD_EMULATOR is not true.

Change-Id: I8987c0a091622baa0e861b451e635c4ddb148b29
2012-07-27 09:57:36 -07:00
Ying Wang
7d8c535c1f Fix build.
Set BUILD_EMULATOR to true when HOST_OS is linux.
Disable the emulator package target if BUILD_EMULATOR is not true.

Change-Id: I8987c0a091622baa0e861b451e635c4ddb148b29
2012-07-26 15:12:21 -07:00
Joe Onorato
2dd9902cf9 am 4ae631f4: am c11b5efa: Merge "Should have been included in 74e883d1415f68dc52a7e679cd1ea1f486b8d8bb"
* commit '4ae631f4560d383c28767641bb7e9e47ab175c7f':
  Should have been included in 74e883d141
2012-07-25 22:24:02 -07:00
Joe Onorato
42f0127a06 am e3adc7fd: am c22da7d7: Merge "Don\'t try to build the emulator on Mac OS if the right tools aren\'t installed."
* commit 'e3adc7fdcc04b7382d6818c5157c0a06eaf8c48f':
  Don't try to build the emulator on Mac OS if the right tools aren't installed.
2012-07-25 22:24:00 -07:00
Joe Onorato
e35a445f2f Should have been included in 74e883d141
Change-Id: Ia0d06a89d0efd36c877e51b0adb45ae7bb3e5480
2012-07-25 17:55:03 -07:00
Joe Onorato
74e883d141 Don't try to build the emulator on Mac OS if the right tools aren't installed.
Change-Id: I3cd2f82f9ee64174bddbb12a18ca8fcf23bdcebd
2012-07-25 15:01:22 -07:00
Ying Wang
594165c17b am 9ffe27e0: am 9e38d6bf: Merge "This property is set when HAVE_SELINUX:=true during build."
* commit '9ffe27e013c84e036d5e38b02edf3ca12f7405a8':
  This property is set when HAVE_SELINUX:=true during build.
2012-07-03 12:20:50 -07:00
Ying Wang
9ffe27e013 am 9e38d6bf: Merge "This property is set when HAVE_SELINUX:=true during build."
* commit '9e38d6bf1bf78a00d8f4288e6444be358a70a692':
  This property is set when HAVE_SELINUX:=true during build.
2012-07-03 12:16:03 -07:00
William Roberts
9d8a51f537 This property is set when HAVE_SELINUX:=true during build.
This will provide a convenient method for determing build
configuration when in the Java layer. For instance, this will
be used in change id I69529fb7a3adfe31eccb16d79740fc4952ff5e68
to determine if the Settings app should display the SE Linux
status.

Change-Id: Idc8dff020aaac41649eac64f5fa8e311dabbc51f
2012-07-03 11:05:03 -07:00