aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing Wang <wangying@android.com>2015-11-02 19:46:53 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-11-02 19:46:53 +0000
commit888f30aa448370206a49ff7df940e134b8ff7017 (patch)
treec4b8c691788aab087061a5d420322dac4b618eff
parent49d8c5196eb690fc987673c27cb61087c5886be4 (diff)
parent67132baa4d11917030c5156f507a50110c4cd935 (diff)
downloadbuild-888f30aa448370206a49ff7df940e134b8ff7017.tar.gz
Merge "Fix "make product-graph" and "make dump-products"."
-rw-r--r--core/Makefile2
-rw-r--r--core/main.mk3
-rw-r--r--core/product-graph.mk (renamed from core/tasks/product-graph.mk)2
-rw-r--r--core/product_config.mk14
4 files changed, 18 insertions, 3 deletions
diff --git a/core/Makefile b/core/Makefile
index d94318de71..4aa77be098 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1971,6 +1971,8 @@ include $(sort $(wildcard $(BUILD_SYSTEM)/tasks/*.mk))
-include $(sort $(wildcard device/*/*/build/tasks/*.mk))
endif
+include $(BUILD_SYSTEM)/product-graph.mk
+
# -----------------------------------------------------------------
# Create SDK repository packages. Must be done after tasks/* since
# we need the addon rules defined.
diff --git a/core/main.mk b/core/main.mk
index 15b3c27149..7901bd82f9 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -80,7 +80,8 @@ dont_bother_goals := clean clobber dataclean installclean \
vendorimage-nodeps \
ramdisk-nodeps \
bootimage-nodeps \
- recoveryimage-nodeps
+ recoveryimage-nodeps \
+ product-graph dump-products
ifneq ($(filter $(dont_bother_goals), $(MAKECMDGOALS)),)
dont_bother := true
diff --git a/core/tasks/product-graph.mk b/core/product-graph.mk
index db2cf71378..36e903723a 100644
--- a/core/tasks/product-graph.mk
+++ b/core/product-graph.mk
@@ -34,7 +34,7 @@ define all-products-inner
endef
-this_makefile := build/core/tasks/product-graph.mk
+this_makefile := build/core/product-graph.mk
products_svg := $(OUT_DIR)/products.svg
products_pdf := $(OUT_DIR)/products.pdf
diff --git a/core/product_config.mk b/core/product_config.mk
index 5240ae7bd2..ad3b518629 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -213,7 +213,19 @@ _cpm_word2 :=
current_product_makefile := $(strip $(current_product_makefile))
all_product_makefiles := $(strip $(all_product_makefiles))
-ifneq (,$(filter product-graph dump-products, $(MAKECMDGOALS)))
+load_all_product_makefiles :=
+ifneq (,$(filter product-graph, $(MAKECMDGOALS)))
+ifeq ($(ANDROID_PRODUCT_GRAPH),--all)
+load_all_product_makefiles := true
+endif
+endif
+ifneq (,$(filter dump-products,$(MAKECMDGOALS)))
+ifeq ($(ANDROID_DUMP_PRODUCTS),all)
+load_all_product_makefiles := true
+endif
+endif
+
+ifeq ($(load_all_product_makefiles),true)
# Import all product makefiles.
$(call import-products, $(all_product_makefiles))
else