Commit graph

410 commits

Author SHA1 Message Date
Wei Wang
79056db4e0 Support Android.bp in mgrep
This patch enabled Android.bp in mgrep result

Bug: 32313127
Test: mgrep
Change-Id: Ie3171a10ab54322bfc3844d1f629c783286ec212
2016-10-20 14:31:05 -07:00
Colin Cross
127fceae06 Walk up tree to find makefiles in mma
Call findmakefile in mma to walk up the tree to find the nearest
makefile.  Fixes mma in subdirectories of directories that have
Android.mk or Android.bp files.

Change-Id: I6fa509171699071fc34a2a75dd7e191d4ddca31a
2016-09-01 15:35:57 -07:00
Colin Cross
4bfae06e71 Canonicalize mmm path
Canonicalize the mmm path relative to the top level before creating the
MODULES-IN-dir target.  Fixes cd frameworks/base; mmm -j .

Test: cd frameworks/base; mmm -j
Change-Id: If7bc321e8a87b76121f876bf4bc296b0f9b80578
2016-08-31 22:00:03 -07:00
Dan Willemsen
9fc9cac0ac Merge "Fix GET-INSTALL-PATH to work with Soong"
am: 6b9aa6938d

Change-Id: I9f433cb383846ec6ccb8e39be4b30110d60d54fd
2016-08-15 21:17:33 +00:00
Dan Willemsen
53e3899222 Fix GET-INSTALL-PATH to work with Soong
This was printing all of the Soong modules in addition to the modules
defined in the ONE_SHOT_MAKEFILE. So replicate what we did with
MODULES-IN-* with GET-INSTALL-PATH-IN-* and update all the users.

Bug: 30191725
Change-Id: Ib1e4bf00f64d7a3e8cd91f44eaf1ff82fdfbf162
2016-08-12 05:10:51 +00:00
Colin Cross
6f8244b62d Merge "Fix mm and mmm in Android.bp directories" am: 8ed91b6624
am: 323396993c

* commit '323396993c6651b4b98974df9e9d53118f27a840':
  Fix mm and mmm in Android.bp directories

Change-Id: I95d6bde7a0ea72b47779f1a5b0577ff423524b6f
2016-05-27 00:29:14 +00:00
Colin Cross
8642525726 Fix mm and mmm in Android.bp directories
mm and mmm were not parsing out/soong/Android.mk, so they were ignoring
all modules defined in an Android.bp file.  Always include
out/soong/Android.mk when ONE_SHOT_MAKEFILE is set, and convert the mm
and mmm functions to build MODULES-IN-$DIR instead of all_modules so
that only the subset of modules defined in out/soong/Android.mk for the
requested directory are built.

Bug: 28986194
Change-Id: I6e1ff8cacfc668a4154a0d5937450db840bb7a6b
2016-05-26 15:56:21 -07:00
Vishwath Mohan
9cdb6f1a31 Merge "Double quote some statements for zsh compatibility" am: 576fd3ebb9
am: 29c2c4db19

* commit '29c2c4db19c6c9f152a1c48aee368a3439cd195f':
  Double quote some statements for zsh compatibility

Change-Id: Id02db06a190370d18e3b7828a453cd16948d77c1
2016-05-23 22:29:50 +00:00
Vishwath Mohan
7d35f001e1 Double quote some statements for zsh compatibility
Two eval commands did not enclose their arguments in double quotes, and
this broke compatibility on zsh - preventing lunch from running to
completion. This CL adds the double quotes and fixes the issue.

Change-Id: I5ed884b455e2e61182f6c29fb807ed92372af039
2016-05-19 12:38:16 -07:00
Keun Soo Yim
46a259651f resolve merge conflicts of 72b82dc to nyc-dev-plus-aosp
Change-Id: I6e62226774584154ad1a802594e386fe7942504b
2016-04-25 15:27:21 -07:00
Keun Soo Yim
3d4847525f build rule change for VTS (vendor test suite)'s metadata files
Change-Id: I76b81529a97b672e08632703d2f6a2777ee8811e
2016-04-25 13:06:57 -07:00
Marie Janssen
32ec50a1f1 make croot slightly more useful
Have croot take an argument of a directory to end up in,
so we can jump around the tree even faster.

Change-Id: Ieb6a8d47fee0412006a11192b29ed44604961312
2016-04-22 16:25:29 -07:00
Chih-Hung Hsieh
a9a55c7c7e Call clang-tidy based on WITH_TIDY* variables.
* Call clang-tidy before every C/C++ compilation if
  (1) clang-tidy is found at $(PATH_TO_CLANG_TIDY)
  (2) $(my_clang) is true
  (3) LOCAL_TIDY is 1 or true, or
      LOCAL_TIDY is undefined and WITH_TIDY is 1 or true.
* clang-tidy is called with -checks=$(my_tidy_checks),
  which has default '-*,google*,-google-readability*'
  and can be overwritten by WITH_TIDY_CHECKS.
* LOCAL_TIDY_CHECKS is appended to $(my_tidy_checks)
* Extra flags are passed to clang-tidy through
  WITH_TIDY_FLAGS or LOCAL_TIDY_FLAGS.
* To quickly find and fix clang-tidy warnings, set $(WITH_TIDY_ONLY)
  to 1 or true to skip compilation of C/C++ files.
* Add a PHONY tidy_only target,
  which includes all $(cpp_objects) and $(c_objects).
* The 'mm' and 'mmm' functions are changed to call make with
  the 'tidy_only' target when WITH_TIDY_ONLY is true or 1.
  In that case, only clang-tidy is called for C and C++ files.

Bug: http://b/27779618
Change-Id: I8adcfff217d68af49849b79aacee7d7654cafb1b
2016-04-21 12:31:13 -07:00
Elliott Hughes
910a355947 Use ulimit -p rather than prlimit.
Neither is standard, but ulimit is toybox and therefore a bit more
regular and at least has help text.

Change-Id: Id7ba9adc9ca256b821d8060506010abef30dee28
2016-03-07 14:05:22 -08:00
Ying Wang
ac9092730e Small fixes.
Change-Id: Ia949ed0bc93edb78d0b029f3bd3dd584e9a00dc8
(cherry-pick from commit f0cb397a9e)
2016-03-04 14:02:25 -08:00
Ying Wang
7dfdb843b2 Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759

(cherry picked from commit 08800fd905)

Change-Id: I862a0ec3c1aae97c552054dacec133e857042edf
2016-03-04 14:02:03 -08:00
Ying Wang
f0cb397a9e Small fixes.
Change-Id: Ia949ed0bc93edb78d0b029f3bd3dd584e9a00dc8
2016-03-04 13:56:23 -08:00
Ying Wang
08800fd905 Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759
Change-Id: I24e88598f6fab598ef26518885fd5e86e71a772d
2016-03-04 11:01:57 -08:00
Chih-Hung Hsieh
42d5c292d9 Use new clang scan-build script.
The actual clang compiler called for static analysis is decided
by build/core/binary.mk, not the one given to --use-analyzer.

BUG: 13287788
Change-Id: I58105c20b56ce17ddf329a275c750d14284d1e25
2016-02-24 19:18:45 -08:00
Neil Fuller
fcf7c81a7f Revert "Revert "Make OpenJDK 8 the default""
Reapply the JDK 8 switch in internal builds.

This reverts commit 85bddfdedf.
2016-01-25 17:35:57 +00:00
Neil Fuller
1f495b865e Revert "Revert "Make OpenJDK 8 the default""
Reapply the switch to JDK 8 on aosp/master.

This reverts commit 85bddfdedf.

Change-Id: If2e8733ba78b007d37914c0512cd6be1bd4c1e69
2016-01-25 17:12:41 +00:00
Neil Fuller
85bddfdedf Revert "Make OpenJDK 8 the default"
Temporary revert to help out Brillo folks.
It will be resubmitted tomorrow.

This reverts commit 4495f6afb8.

Change-Id: Id378c7d3a6e72e9be50f9404b19d5763568987a5
2016-01-25 17:04:14 +00:00
Neil Fuller
4495f6afb8 Make OpenJDK 8 the default
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true

And run envsetup.sh/lunch again.

Bug: 25786468
Change-Id: I8e00591a24d13e3b8b6baaafe0fdff6536c58770
2016-01-25 10:19:25 +00:00
Neil Fuller
8f354bc8c2 Merge "Use sensible default locations for Java" 2015-11-20 10:16:17 +00:00
Neil Fuller
91e012cd99 Use sensible default locations for Java
Use sensible default locations for Java based on
the EXPERIMENTAL_USE_JAVA8 flag.

Bug: 25786468
Change-Id: I7ec035b5329785efc41b3f971d5e3ae202293576
2015-11-19 16:41:36 +00:00
Marie Janssen
4afc2c0f6f envsetup: fix for provision to work on zsh
The -p option means something else on zsh and breaks this function.

Bug: None
Change-Id: Ie0ba8119e34c616f5b8f931806063d6b1d3d893e
2015-11-10 10:41:15 -08:00
Gaurav Shah
881ec090c4 Merge "build: Add support for defining products in /product"
am: acb8a7c1f8

* commit 'acb8a7c1f8cacaf136edba1a25d64467d352a432':
  build: Add support for defining products in /product
2015-11-02 22:27:08 +00:00
Lee Campbell
455f6f458d build: Add support for defining products in /product
The build will now search for AndroidProducts.mk in /product

BUG: 22030305

Change-Id: I2d067d95d0c8dc1341a55167f9ac7f6926e04ce3
2015-11-02 14:17:47 -08:00
Mike Frysinger
2bd3f6e12c Merge "use find -exec ... + everywhere"
am: 6ff6e9552c

* commit '6ff6e9552c90d091adf4e3f686d2922585d8060f':
  use `find -exec ... +` everywhere
2015-10-22 19:44:08 +00:00
Mike Frysinger
5e47973204 use find -exec ... + everywhere
This is more efficient as find itself can handle correctly passing
arguments down to the command, and this is in POSIX.  The current
versions of OS X also support this form.

BUG=None
TEST=mgrep still works

Change-Id: Ie570867609113868daaf068658c4f7e6f4ae42fa
2015-10-22 09:50:59 -04:00
Roland Levillain
fef5ba8ec7 Merge "Typos in envsetup.sh."
am: 8503cfb49c

* commit '8503cfb49c797bffa2568cffaab483071230fef0':
  Typos in envsetup.sh.
2015-10-20 21:44:10 +00:00
Roland Levillain
39341924db Typos in envsetup.sh.
Change-Id: I31cc811e1352b9c924bdf164561f334b032d6f5c
2015-10-20 12:51:06 +01:00
Ying Wang
3a6ad87039 Merge "envsetup: Show error when supplied dir isn\'t present with mmm"
am: 475054a16a

* commit '475054a16ad57b184fa476c093cf1ce8e9ec3e15':
  envsetup: Show error when supplied dir isn't present with mmm
2015-10-19 23:21:46 +00:00
Abhinav1997
a72a6e7c72 envsetup: Show error when supplied dir isn't present with mmm
When a directory isn't present with mmm, don't show "No Android.mk present", rather show that the directory isn't present

Change-Id: I7259a60012c6f30c470daa60d5a5097d01ffc4c7
Signed-off-by: Abhinav1997 <abhinav.jhanwar.august2@gmail.com>
2015-10-19 22:38:42 +02:00
Brian Carlstrom
10abe69478 am b43cf696: am 848b8e9d: am fa2ce3b3: am f73f79f1: Merge "Use /filelist when OUT_DIR is set" into mnc-dev
* commit 'b43cf69672c72c025f0fe764d49ec950e3b57b81':
  Use $OUT_DIR/filelist when OUT_DIR is set
2015-10-04 20:05:54 +00:00
Brian Carlstrom
f2257427d9 Use $OUT_DIR/filelist when OUT_DIR is set
Change-Id: Iadf3f05e752d71371d3d74e670ade3e937b1cd92
2015-09-30 20:36:15 -07:00
David Zeuthen
2fb9d0904f am 0238e879: Merge "envsetup.sh: Add \'provision\' function."
* commit '0238e879893bbbbab4e75b0fd1355c43547ca31e':
  envsetup.sh: Add 'provision' function.
2015-09-30 21:51:55 +00:00
David Zeuthen
1b126ffedc envsetup.sh: Add 'provision' function.
This will run ${ANDROID_PRODUCT_OUT}/provision-device which in turn can
run fastboot (and other vendor-specific bits, if needed) to repartition
the device and reflash all partitions with known versions. Options
passed to the 'provision' command will be passed on to said script which
is expected to pass them on to fastboot.

Since this is a rather destructive operation involving data loss etc.,
user confirmation is required. This confirmation can be bypassed using
the option --no-confirmation.

Change-Id: Iec5667f2f5070b95d2eb70ad1b2984909ae4184c
2015-09-30 17:18:22 -04:00
Ying Wang
945bc2f288 am 92facb1f: Merge "Substitue "/" with "-" in the MODULES-IN phony goal names."
* commit '92facb1fed26492746aca267df51b6082286521c':
  Substitue "/" with "-" in the MODULES-IN phony goal names.
2015-09-24 23:59:29 +00:00
Ying Wang
61cd884a11 Substitue "/" with "-" in the MODULES-IN phony goal names.
This avoids Ninja's path canonicalization on those goal names.
Without this, Ninja complains about duplicate rules for
MODULES-IN/a/b/.. and MODULES-IN/a.

Bug: 24309760
Change-Id: Id3aa9da5d3887a2cd1426cbb5fdf35659c65805e
2015-09-24 16:24:42 -07:00
Ying Wang
2f9f1fb32f resolved conflicts for 964f06b1 to stage-aosp-master
Change-Id: I0cebad2e440ec7d605afafac893352f06ca2f419
2015-09-23 19:31:44 -07:00
Ying Wang
caeaa08f9d Re-implement mma/mmma using make goals.
Previously we use command line variable BUILD_MODULES_IN_PATHS which
causes kati to regenerate build.ninja if any variable value changes.

TODO: Remove the old rules of BUILD_MODULES_IN_PATHS in
build/core/main.mk and ninja.mk once users have re-sourced envsetup.sh.
Probably in a few weeks.

Caveat: With this change, if a user sources the new envsetup.sh, mma/mmma
won't work in old branches from the same shell.

Bug: 24309760
Change-Id: I212e82aeebaaa2bd4114e2066f1995da8886b5e2
2015-09-23 16:31:02 -07:00
Dan Albert
2afd720936 am 86e1aa1a: Merge "Move python-adb to development/python-packages."
* commit '86e1aa1a1d3593861f3a127e337fbdb8d965ee4f':
  Move python-adb to development/python-packages.
2015-09-21 17:34:25 +00:00
Dan Albert
f5caa3d3ba Move python-adb to development/python-packages.
Nothing else was being imported from system/core yet, and a path under
development makes more sense for this.

Bug: http://b/22881740
Change-Id: Ib0beb02137805b3e382535514a2bc067b7fd1d33
2015-09-18 13:40:26 -07:00
Ying Wang
1dd4dfbfd7 am 6eb3d977: Merge "Remove legacy kernel build toolchain PATH setup in envsetup.sh"
* commit '6eb3d977c5a8b7612058f1a55e648f8200de2b8f':
  Remove legacy kernel build toolchain PATH setup in envsetup.sh
2015-09-15 23:09:38 +00:00
Ying Wang
750396dd30 Remove legacy kernel build toolchain PATH setup in envsetup.sh
We used to rely on envsetup.sh to set up PATH before doing kernel build.
Now we have new kernel build process.
Also the variable doesn't work any more as we don't have corresponding arm-eabi
toolchain for the latest arm-linux-androideabi toolchain.

Change-Id: I99443fdc58e94f57f4f1f7e88da6dd127f3b2fac
2015-09-14 19:32:50 -07:00
Dan Albert
8405451f90 am 4982ef9d: am 010f652e: Merge "Add system/core to the PYTHONPATH."
* commit '4982ef9d76d4ca7189e56377a4032d8fe68fd994':
  Add system/core to the PYTHONPATH.
2015-07-31 22:31:58 +00:00
Dan Albert
515ab1e2d1 Add system/core to the PYTHONPATH.
There's an adb Python interface now, and system/core needs to be in
the PYTHONPATH for `import adb` to find it.

Change-Id: I712767a2ba96cb017ce5857dc367e4cacf2ec51f
2015-07-31 13:38:47 -07:00
Nick Kralevich
41da3d1209 am abbf8eeb: am a521a37d: Merge "mgrep: add output to environment commands"
* commit 'abbf8eeb674b1a9d9b8ac1cc8744f03144c3968c':
  mgrep: add output to environment commands
2015-07-15 21:27:43 +00:00
William Roberts
23a298b190 mgrep: add output to environment commands
Change-Id: I7a97e00c7ef5ac179333303d89511c2f72cbd100
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2015-07-13 09:29:52 -07:00