From 0188414bc634798fa429be627cdb697daee68966 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Tue, 20 Jul 2010 16:18:16 -0700 Subject: [PATCH] add phony target "all_modules" and use it as make goal for "mm"/"mmm" So that mm/mmm don't depend on phony target "files", which brings in unwanted files for apps-only build. Also allow "dist" for mmm. Bug: http://b/issue?id=2811503 Change-Id: I2c0794aebd1d171d8a0f44eb8cda67855704d6bd --- core/main.mk | 6 ++++-- envsetup.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/main.mk b/core/main.mk index 0b4ca38fd..11f234e57 100644 --- a/core/main.mk +++ b/core/main.mk @@ -282,7 +282,6 @@ ifneq ($(filter dalvik.gc.type-precise,$(PRODUCT_TAGS)),) ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.dexopt-flags=m=y endif -ifeq (,$(TARGET_BUILD_APPS)) # Install an apns-conf.xml file if one's not already being installed. ifeq (,$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES))) PRODUCT_COPY_FILES += \ @@ -303,7 +302,6 @@ ifneq ($(filter eng tests,$(TARGET_BUILD_VARIANT)),) endif endif endif -endif # !TARGET_BUILD_APPS ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android @@ -747,6 +745,10 @@ endif # TARGET_BUILD_APPS .PHONY: droid tests tests: droidcore +# phony target that include any targets in $(ALL_MODULES) +.PHONY: all_modules +all_modules: $(ALL_MODULES) + .PHONY: docs docs: $(ALL_DOCS) diff --git a/envsetup.sh b/envsetup.sh index 21a66c13e..4d5bbc35e 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -636,7 +636,7 @@ function mm() elif [ ! "$M" ]; then echo "Couldn't locate a makefile from the current directory." else - ONE_SHOT_MAKEFILE=$M make -C $T files $@ + ONE_SHOT_MAKEFILE=$M make -C $T all_modules $@ fi fi } @@ -668,13 +668,15 @@ function mmm() ARGS="$ARGS snod" elif [ "$DIR" = showcommands ]; then ARGS="$ARGS showcommands" + elif [ "$DIR" = dist ]; then + ARGS="$ARGS dist" else echo "No Android.mk in $DIR." return 1 fi fi done - ONE_SHOT_MAKEFILE="$MAKEFILE" make -C $T $DASH_ARGS files $ARGS + ONE_SHOT_MAKEFILE="$MAKEFILE" make -C $T $DASH_ARGS all_modules $ARGS else echo "Couldn't locate the top of the tree. Try setting TOP." fi