Commit graph

107 commits

Author SHA1 Message Date
Guang Zhu
155afe393f enhancement for building app with emma code coverage
* global filter to avoid applying instrumentation on emma classes
* remove local variable information at dex step instead of compile time

Change-Id: If04c27bc717f34816077a98ead9ceb0dbcbb0d2f
2010-04-20 13:38:49 -07:00
Ying Wang
8c254825a0 Support to override instr target package in inherit-package
http://b/issue?id=2451361
With this CL, you can inherit a testing package to test a inheriting package.
Note: we change the meaning of $(5), so we need to change any existing calls
to inherit-package in other projects.

Change-Id: I673155d1b8b6006953d14e1ab87066536ebd1e54
2010-03-16 17:08:58 -07:00
Ying Wang
c61d5932d3 Don't force localization for package tagged as tests.
Change-Id: I612598443371fc388cf08ddde7ebdd1d3dec9c7e
2010-03-10 16:02:42 -08:00
Doug Zongker
abfbbe2e1d allow EventLog tag numbers to be auto-assigned
With this change, you can specify "?" in place of a tag number in a
.logtags file and the build system will assign numbers to these tags.
(The numbers used shouldn't matter since we translate them back to tag
names whenever the logs are read back.)

This is pretty straightforward to do:

- make merge-event-log-tags.py assign numbers to any tags that specify
  "?"

- make the generated java files depend on the merged output

- make java-event-log-tags.py read both the original .logtags and the
  merged output, and fill in tag numbers for any "?" using the merged
  version.

Change-Id: Icc6ccd705db461d570fc929922a830aa6deaca48
2010-02-16 14:32:08 -08:00
Ying Wang
3b2bdf1033 Fix and enable proguard on packages. 2010-02-11 13:41:10 -08:00
Patrick Scott
9825256577 Put private includes before system includes.
This change allows modules to insert different include paths before the system
include paths. STLPort uses this to find system include files that have the same
name.
2010-02-08 18:57:03 -05:00
Jeff Hamilton
bb67d21337 Get LOCAL_MANIFEST_PACKAGE_NAME working.
Change-Id: Ieafbf2596252ee3a2fe5d1ad433e8863fbf84601
2010-02-05 23:57:34 -06:00
Brian Carlstrom
f184a0f26d Add support for LOCAL_JAVACFLAGS
The Dalvik core libraries team would like to start making warnings
errors in certain packages by definition LOCAL_JAVACFLAGS. This will
allow easier debuging of warnings in other packages by supplying
"-Xlint:..."  options.
2010-02-05 15:57:07 -08:00
Joe Onorato
899e62a841 Add an inherit-package macro to the build system.
This lets you use the source code from one apk to build a new one
with a new module name, a new android package name and optionally,
a new certificate.

To use this, in a makefile, add this:

$(call inherit-package, \
    packages/apps/Music/Android.mk, \
    Music, \
    MusicFork, \
    my_cert, \
    com.example.music)

You don't need the LOCAL_PATH and CLEAR_VARS stuff.  It will override
only the packages that are defined in the makefile name you give, but
if other modules of other types are defined, you will get an error
saying that it's defined twice.  In that case, you need to move the
duplicate library (for example a .so) out into a different makefile.

A LOCAL_OVERRIDES_PACKAGES entry is automatically created for the
forked app.
2010-02-05 10:16:57 -08:00
Doug Zongker
14833605d2 add UnmountAll function to OTA script; support radio images w/path
Three unrelated changes:

- change the add-radio-file makefile function to support adding files
  with paths.  (The path part of the pathname is stripped off.)

- add an UnmountAll function to the OTA script generation code, so
  that we can explicitly unmount everything we've mounted (in addition
  to doing it automatically at the end of the script).

- add the updater API version to the info object passed to
  device-specific code.

Change-Id: Ia62b15403c1cc8fce8d9910f291450c8077e49f4
2010-02-03 09:21:22 -08:00
Bjorn Bringert
a89c990e31 Add all-logtags-files-under macro
Change-Id: Icb4c7e1bb2dfa4df71f07cb022c92e95a9115019
2010-02-02 20:44:13 +00:00
Jean-Baptiste Queru
75127b769e Remove special-handling of the restricted tag.
Nobody is using it any more, and it'd be too easy to
make a build system change that wouldn't properly handle it.

Change-Id: Ia61232ff944c34c46932c1885b2b0ec1b479566b
2010-01-11 09:40:39 -08:00
Jean-Baptiste Queru
0a3cfdc853 Add all-html-files-under
This allows to run droiddoc on only a specific set of subdirectories
instead of using all subdirectories.

Change-Id: I6b5daa31f6ce6801705a5c87bd05ea0e4e8c5d88
2009-12-18 09:02:13 -08:00
Doug Zongker
0d5eb0b7e4 am af830d39: am 485847e4: Merge change I6f85805b into eclair-mr2
Merge commit 'af830d3999ac1670b92207f6c1201d297913b9a9'

* commit 'af830d3999ac1670b92207f6c1201d297913b9a9':
  break up event-log-tags; generate java source files with constants
2009-12-04 04:31:16 -08:00
Doug Zongker
9bd4962af8 break up event-log-tags; generate java source files with constants
Construct the /system/etc/event-log-tags file by unioning together any
*.logtags files included in LOCAL_SRC_FILES throughout the system (with
appropriate error checking for dup tag numbers, etc.)

For java packages, generate a java source file from the logtags file for
that package that contains static integer constants for each tag name.
2009-12-03 16:47:52 -08:00
Dan Bornstein
6581feda85 Only put .o files into static libraries when building for the host.
In particular don't put the symbol indices from included .a files into
them. I didn't change the equivalent device rule ala the "if it ain't
broke" rule of thumb.

Change-Id: I064ac356a6f48f93fca2cd08a8408ca835f8f9a4
2009-10-22 13:14:41 -07:00
Dan Bornstein
3d02eacbde It's not safe to use the TARGET ar when building a HOST .a (natch).
Change-Id: If9e851fe3306993fb49210952d81ab36cb78c807
2009-10-21 11:12:56 -07:00
Doug Zongker
5e98e6f05c use aapt to build jar files instead of the system zip (DO NOT MERGE)
By using 'aapt add' instead of whatever 'zip' utility happens to be
installed on the machine, we get files that are imgdiff-friendly,
which makes for smaller incremental OTAs.

(This is a cherry-pick of a change already submitted to eclair-mr2;
the change was approved for mr1.)
2009-10-19 17:05:46 -07:00
Dan Bornstein
6bffc91c5d Make the host static library build rule know about
LOCAL_WHOLE_STATIC_LIBRARIES.

While I was in the territory, I reordered a few lines to be more
consistent with nearby code/files.

Change-Id: Ie9809f065e32ca748ae4539dd785980ff496c2d2
2009-10-15 16:28:56 -07:00
Doug Zongker
9e4374be2c use aapt to build jar files instead of the system zip
By using 'aapt add' instead of whatever 'zip' utility happens to be
installed on the machine, we get files that are imgdiff-friendly,
which makes for smaller incremental OTAs.
2009-10-09 12:14:03 -07:00
Sriram Raman
5bbd2294e9 For Ying Wang:
Fix "argument list too long" build error bug.
2009-10-07 16:27:38 -07:00
Dave Bort
b392641d9b Make $(my-dir) fail if it's called after including $(CLEAR_VARS) 2009-09-23 12:58:20 -07:00
Doug Zongker
93d9ff44ce increase reserved blocks from 5 to 8
Our yaffs filesystems reserve 5 blocks, use 1 for a checkpoint, and
may use 1 or 2 more for caching.  Take these all into account when
computing the max image size.
2009-09-14 17:46:41 -07:00
Joe Onorato
2daa2b3b05 Add the ability to turn on proguard for java targets, and to call aapt
to generate a rules file for proguard for stuff from the manifest and
other resources that need to be kept.
2009-08-30 13:43:00 -07:00
Doug Zongker
fbc039e9b9 am 4ac1ba61: fix typo in bash expression
Merge commit '4ac1ba61075190fa9ced594c85285beff6293184' into eclair

* commit '4ac1ba61075190fa9ced594c85285beff6293184':
  fix typo in bash expression
2009-08-26 11:41:13 -07:00
Doug Zongker
ed96e88850 resolved conflicts for merge of 6dd2ae02 to eclair 2009-08-26 09:37:07 -07:00
Doug Zongker
4ac1ba6107 fix typo in bash expression
Fortunately the error doesn't change the value of the expression
(since undefined variables are treated as 0 inside "$((...))").
2009-08-25 20:38:50 -07:00
Doug Zongker
6dd2ae02c1 turn down allowed image size
yaffs appears to reserve 5 blocks on the partition for itself.
Account for this when computing the maximum allowable image size.
2009-08-25 18:05:02 -07:00
Raphael
f6ff4c5acf Windows: Fix platform build. 2009-08-19 11:32:15 -07:00
Dianne Hackborn
a37bdef67a am 6929fb57: Merge change 20880 into donut
Merge commit '6929fb57a5afb90606feb8c35c8c2cda170adfe4'

* commit '6929fb57a5afb90606feb8c35c8c2cda170adfe4':
  Fix issue #2048267: Run zipalign on all prebuilts
2009-08-12 12:05:27 -07:00
Dianne Hackborn
9c0c4b7a58 Fix issue #2048267: Run zipalign on all prebuilts 2009-08-11 19:41:51 -07:00
Doug Zongker
8510a1e0d7 use *_PARTITION_SIZE instead of *_MAX_SIZE
Make BoardConfig.mk store the size of the partition rather than the
maximum size of the image that can be flashed there, because the
function used to do the conversion isn't available when BoardConfig.mk
is read any more.
2009-08-10 09:03:16 -07:00
Android (Google) Code Review
80f820ca1a am 01bf5684: Merge change 20313 into donut
Merge commit '01bf5684b448623d7eb054b6d717bb77af05de33'

* commit '01bf5684b448623d7eb054b6d717bb77af05de33':
  add feature to strip "# comment" lines from prebuilt files
2009-08-06 16:35:50 -07:00
Doug Zongker
1046d20624 add feature to strip "# comment" lines from prebuilt files
Change things so that when $(LOCAL_PREBUILT_STRIP_COMMENTS) is
nonempty, we copy the source file using sed to strip out all the "#
line"-style comments and blank lines, saving considerable system image
space in the case of some wifi configurations.

Bug: 2036961
2009-08-06 14:39:43 -07:00
Joe Onorato
dc1a728fb8 Rewrite findleaves.sh in python
This cuts the make startup time by about 30 seconds.  Python is faster
than bash in this case, and also we can now supply multiple directories
to prune, and skip the .repo directory, which is, uh, big.

This is from my mac laptop:

$ time build/tools/findleaves.sh --prune="./out" . Android.mk > /dev/null

real    0m29.186s
user    0m0.550s
sys 0m5.897s

$ time build/tools/findleaves.py --prune="./out" . Android.mk > /dev/null

real    0m4.701s
user    0m0.645s
sys 0m1.294s

$ time build/tools/findleaves.py --prune="./out" --prune="./.repo" . Android.mk > /dev/null
real    0m0.176s
user    0m0.094s
sys 0m0.080s
2009-08-06 12:09:21 -07:00
Joe Onorato
f2bce89880 am e334d255: Speed up the full build.
Merge commit 'e334d255dc8f85d610f4d0339227a0b985494811'

* commit 'e334d255dc8f85d610f4d0339227a0b985494811':
  Speed up the full build.
2009-07-17 17:13:08 -07:00
Joe Onorato
e334d255dc Speed up the full build.
Now, by default, instead of fully building everything,
we skip dexing the modules that aren't going to be included
in the current build.

This will slow down some of the incremental builds (like tests),
but it improves the regular eng build from 27.5 minutes on my
Mac Pro to 25 minutes.  That's not as much of an improvement
as I had hoped for, but it's still better.

There is also a change in here that puts the java-source-list
file which is used to get around limited command line lengths
in the proper directory.  Before this change, it was an
accident that the directory for that file existed!
2009-07-17 16:48:15 -04:00
Doug Zongker
b17199ee41 am 742fa575: fix problems with new image size calculations
Merge commit '742fa575d09272f1e06616fc208a1e08830c8f82'

* commit '742fa575d09272f1e06616fc208a1e08830c8f82':
  fix problems with new image size calculations
2009-07-08 13:52:20 -07:00
Doug Zongker
742fa575d0 fix problems with new image size calculations
The build servers have GNU coreutils 5.93, where stat does not output
a newline.  Ubuntu hardy has GNU coreutils 6.10, where it does.
Lacking a newline messes up the summing of the sizes.  Fix
get-file-size to remove the newline if present, and make the total
calculation in assert-max-file-size more robust.

Also, if the image was too big, it was not actually making the build
fail (because /bin/false was not the last thing called).  Fix that so
it does.
2009-07-08 12:09:04 -07:00
Doug Zongker
97f696cdaa am 4647f12a: fix image size tests
Merge commit '4647f12a4ff9dc54247184f17ff3de1cc423f213'

* commit '4647f12a4ff9dc54247184f17ff3de1cc423f213':
  fix image size tests
2009-07-07 16:43:16 -07:00
Doug Zongker
4647f12a4f fix image size tests
There are currently two errors in the way we test the size of built
images against the size of the partition on the hardware:

- the limits in BoardConfig.mk are set with the data size only, but
  images contain an extra 64 bytes per 2048-byte page.  This means we
  think the partition is about 1/32 smaller than it really is.

- when we deliver a build via OTA, the system partition ends up with
  one more file than when it's flashed via fastboot.  That file is a
  copy of the recovery image.  In order to be able to OTA a build, we
  need to make sure the system partition has enough room for all the
  system files plus the recovery image as well.

For the kila system partition, these errors are roughly the same order
of magnitude -- about 2MB, one in the "safe" direction, one in the
"unsafe" direction.  This change fixes both to give us a more accurate
notion of how close we are to the limit.

Make the build emit a warning (but not fail) when the size is within
32kb of the limit.

Also, include the values of the partition size limits in an info file
in the target-files package, so post-processing tools can use them
without parsing the BoardConfig.mk file.
2009-07-02 12:21:43 -07:00
Doug Zongker
e01100c7ac generalize the definition of a "radio image"
Non-HTC devices may have multiple files constituting their "radio
image".  Generalize the INSTALLED_RADIOIMAGE_TARGET variable a bit:
initially define it as empty, then let AndroidBoard.mk files add to
it.  Provide a convenience function add-radio-image for them to call
to add files.  Put all those files into the target_files zip for use
in OTA and fastboot package construction.

Note that for HTC devices, this changes the name of the radio image in
the target_files zip:  instead of "RADIO/image" it will be
"RADIO/radio.img".  Tools that use the target_files zip will need to
be changed.
2009-06-22 17:46:19 -07:00
Joe Onorato
483d92412f Put the java source file list files somewhere where they don't
conflict with the .class files that are getting zipped up, and
delete them when we're done with them.
2009-06-18 13:16:52 -07:00
Sriram Raman
f1a55f8bfb Fix the usual build hanging issue by using -o (overwrite without prompting) option with unzip
This should fix the common problem when googlelogin-client and google-framework are both included
2009-06-09 15:08:29 -07:00
Dima Zavin
46e9beca50 core: Add support for static libraries to include other whole static libs.
Currently, if LOCAL_WHOLE_STATIC_LIBRARIES is specified, its values is
ignored. This patch addresses this limitation and works as follows:
For every whole lib specified, it extracts the archive into a sub-directory
under the target lib's intermediate, and then seeds the initial target
archive with all the members.

Signed-off-by: Dima Zavin <dima@android.com>
2009-05-27 20:14:55 -07:00
David 'Digit' Turner
5dbb529de9 Allow the build system to build Objective-C sources.
This is needed to move our modified SDL sources under external/qemu/distrib.
As per joeo's request, this change also enables target Objective-C compilation, letting it error at build time.
2009-05-20 11:29:15 +02:00
Dianne Hackborn
9bd5404a9d Use new aapt feature to add default version info to .apks. 2009-05-18 12:41:45 -07:00
Joe Onorato
64d85d0d82 AI 145618: am: CL 145333 Cloned from CL 144759 by 'g4 patch'.
Original change by joeo@abreu on 2009/04/06 19:54:13.
  Implement SDK add-ons in the build system.
  - Add an option to use the standard javadoc doclet instead
  of droiddoc, since droiddocs non-sdk templates aren't
  ready for prime time.
  - Add the notion of a stubs for a library.  It's only
  implemented for java libraries, but when we do native
  libraries in the NDK or sdk-addons, it will work there too.
  Original author: joeo
  Merged from: //branches/cupcake/...

Automated import of CL 145618
2009-04-09 19:31:12 -07:00
The Android Open Source Project
88b607994a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
05806d7af6 auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
094268cf8c auto import from //depot/cupcake/@132589 2009-03-03 14:03:52 -08:00
The Android Open Source Project
a9b2249753 auto import from //depot/cupcake/@137055 2009-03-02 22:54:15 -08:00
The Android Open Source Project
ed18741e07 auto import from //branches/cupcake/...@127101 2009-01-20 14:03:55 -08:00
The Android Open Source Project
66339ad5ce auto import from //branches/cupcake/...@126645 2009-01-15 16:12:07 -08:00
The Android Open Source Project
4f85cc54b3 auto import from //branches/cupcake/...@125939 2009-01-09 17:50:54 -08:00
The Android Open Source Project
dcc08f073b Code drop from //branches/cupcake/...@124589 2008-12-17 18:03:49 -08:00
The Android Open Source Project
b6c1cf6de7 Initial Contribution 2008-10-21 07:00:00 -07:00