Makefile: make convenience targets like "make icu" work for external/

Change-Id: I6cf2e6bd1c52412339ec6bab98b3f1b28cef1032
This commit is contained in:
Michael Stahl 2013-10-23 16:33:50 +02:00
parent 5486fd99e1
commit dddff6e51d

View file

@ -77,13 +77,13 @@ define gbuild_module_rules
.PHONY: $(1) $(1).all $(1).build $(1).check $(1).clean $(1).showdeliverables $(1).subsequentcheck
$(1): bootstrap fetch
cd $(SRCDIR)/$(1) && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS)
cd $(SRCDIR)/$(2) && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS)
$(1).build $(1).check $(1).clean $(1).showdeliverables:
cd $(SRCDIR)/$(1) && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
cd $(SRCDIR)/$(2) && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
$(1).subsequentcheck:
cd $(SRCDIR)/$(1) && $(GNUMAKE) -j $(CHECK_PARALLELISM) $(GMAKE_OPTIONS) subsequentcheck
cd $(SRCDIR)/$(2) && $(GNUMAKE) -j $(CHECK_PARALLELISM) $(GMAKE_OPTIONS) subsequentcheck
$(1).all: bootstrap fetch
$(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1))
@ -91,10 +91,10 @@ $(1).all: bootstrap fetch
endef
define gbuild_modules_rules
$(foreach m,$(1),$(call gbuild_module_rules,$(m)))
$(foreach m,$(1),$(call gbuild_module_rules,$(notdir $(m)),$(m)))
endef
gbuild_modules := $(filter-out Module%,$(subst /, ,$(subst $(SRCDIR)/,,$(wildcard $(SRCDIR)/*/Module_*.mk))))
gbuild_modules := $(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk $(SRCDIR)/external/*/Module_*.mk)))
$(eval $(call gbuild_modules_rules,$(gbuild_modules)))