зеркало из https://github.com/mozilla/gecko-dev.git
Bug 466486 - Don't use a subshell to recurse over DIRS when DIRS is empty (try #2) r=ted
This commit is contained in:
Родитель
c3720738b1
Коммит
8bded86e48
30
Makefile.in
30
Makefile.in
|
@ -42,15 +42,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
default alldep all::
|
||||
$(RM) -rf $(DIST)/sdk
|
||||
$(RM) -rf $(DIST)/include
|
||||
$(RM) -rf $(DIST)/private
|
||||
$(RM) -rf $(DIST)/public
|
||||
$(RM) -rf $(DIST)/bin/components
|
||||
$(RM) -rf _tests
|
||||
default::
|
||||
|
||||
TIERS += base
|
||||
|
||||
|
@ -67,11 +59,6 @@ ifdef MOZ_MEMORY
|
|||
tier_base_dirs += memory/jemalloc
|
||||
endif
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
# Additional makefile targets to call automated test suites
|
||||
include $(topsrcdir)/testing/testsuite-targets.mk
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
|
||||
|
||||
TIERS += testharness
|
||||
|
@ -81,6 +68,8 @@ ifdef ENABLE_TESTS
|
|||
tier_testharness_dirs += tools/test-harness
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
GARBAGE_DIRS += dist _javagen _profile _tests staticlib
|
||||
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
|
||||
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
|
||||
|
@ -88,12 +77,25 @@ DIST_GARBAGE = config.cache config.log config.status config-defs.h \
|
|||
netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
|
||||
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
|
||||
|
||||
default alldep all::
|
||||
$(RM) -rf $(DIST)/sdk
|
||||
$(RM) -rf $(DIST)/include
|
||||
$(RM) -rf $(DIST)/private
|
||||
$(RM) -rf $(DIST)/public
|
||||
$(RM) -rf $(DIST)/bin/components
|
||||
$(RM) -rf _tests
|
||||
|
||||
# Build pseudo-external modules first when export is explicitly called
|
||||
export::
|
||||
$(RM) -rf $(DIST)/sdk
|
||||
$(MAKE) -C config export
|
||||
$(MAKE) tier_nspr
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
# Additional makefile targets to call automated test suites
|
||||
include $(topsrcdir)/testing/testsuite-targets.mk
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# After we build tier toolkit, go back and build the tools from previous dirs
|
||||
|
|
|
@ -44,12 +44,16 @@ include $(topsrcdir)/config/config.mk
|
|||
|
||||
DIRS = base components locales themes fuel app
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifdef MOZ_INSTALLER
|
||||
DIRS += installer/windows
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifdef MOZ_INSTALLER
|
||||
DIRS += installer/windows
|
||||
|
||||
ifdef MOZ_BRANDING_DIRECTORY
|
||||
DEFINES += -DOFFICIAL_BRANDING=1
|
||||
endif
|
||||
|
|
|
@ -856,3 +856,8 @@ JAVAC_FLAGS += -source 1.4
|
|||
ifdef MOZ_DEBUG
|
||||
JAVAC_FLAGS += -g
|
||||
endif
|
||||
|
||||
ifdef TIERS
|
||||
DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_dirs))
|
||||
STATIC_DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_staticdirs))
|
||||
endif
|
||||
|
|
|
@ -465,22 +465,30 @@ UPDATE_TITLE_libs = sed -e "s!Y!libs in $(shell $(BUILD_TOOLS)/print-depth-path.
|
|||
UPDATE_TITLE_tools = sed -e "s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR)/config/xterm.str;
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(DIRS)))
|
||||
LOOP_OVER_DIRS = \
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
||||
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||
endif
|
||||
|
||||
# we only use this for the makefiles target and other stuff that doesn't matter
|
||||
ifneq (,$(strip $(PARALLEL_DIRS)))
|
||||
LOOP_OVER_PARALLEL_DIRS = \
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
||||
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(STATIC_DIRS)))
|
||||
LOOP_OVER_STATIC_DIRS = \
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
||||
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(TOOL_DIRS)))
|
||||
LOOP_OVER_TOOL_DIRS = \
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||
endif
|
||||
|
||||
ifdef PARALLEL_DIRS
|
||||
# create a bunch of fake targets for order-only processing
|
||||
|
@ -709,10 +717,6 @@ SUBMAKEFILES += $(addsuffix /Makefile, $(DIRS) $(TOOL_DIRS) $(PARALLEL_DIRS))
|
|||
# default rule before including rules.mk
|
||||
ifndef SUPPRESS_DEFAULT_RULES
|
||||
ifdef TIERS
|
||||
|
||||
DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_dirs))
|
||||
STATIC_DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_staticdirs))
|
||||
|
||||
default all alldep::
|
||||
$(EXIT_ON_ERROR) \
|
||||
$(foreach tier,$(TIERS),$(MAKE) tier_$(tier); ) true
|
||||
|
@ -720,8 +724,9 @@ default all alldep::
|
|||
else
|
||||
|
||||
default all::
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir); ) true
|
||||
ifneq (,$(strip $(STATIC_DIRS)))
|
||||
$(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir); )
|
||||
endif
|
||||
$(MAKE) export
|
||||
$(MAKE) libs
|
||||
$(MAKE) tools
|
||||
|
@ -823,9 +828,9 @@ endif
|
|||
|
||||
tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
||||
+$(LOOP_OVER_DIRS)
|
||||
ifdef TOOL_DIRS
|
||||
ifneq (,$(strip $(TOOL_DIRS)))
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; ) true
|
||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; )
|
||||
endif
|
||||
|
||||
#
|
||||
|
@ -2170,7 +2175,7 @@ TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
|||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
echo-variable-%:
|
||||
@echo $($*)
|
||||
@echo "$($*)"
|
||||
|
||||
echo-tiers:
|
||||
@echo $(TIERS)
|
||||
|
|
|
@ -856,3 +856,8 @@ JAVAC_FLAGS += -source 1.4
|
|||
ifdef MOZ_DEBUG
|
||||
JAVAC_FLAGS += -g
|
||||
endif
|
||||
|
||||
ifdef TIERS
|
||||
DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_dirs))
|
||||
STATIC_DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_staticdirs))
|
||||
endif
|
||||
|
|
|
@ -465,22 +465,30 @@ UPDATE_TITLE_libs = sed -e "s!Y!libs in $(shell $(BUILD_TOOLS)/print-depth-path.
|
|||
UPDATE_TITLE_tools = sed -e "s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR)/config/xterm.str;
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(DIRS)))
|
||||
LOOP_OVER_DIRS = \
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
||||
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||
endif
|
||||
|
||||
# we only use this for the makefiles target and other stuff that doesn't matter
|
||||
ifneq (,$(strip $(PARALLEL_DIRS)))
|
||||
LOOP_OVER_PARALLEL_DIRS = \
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
||||
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(STATIC_DIRS)))
|
||||
LOOP_OVER_STATIC_DIRS = \
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
||||
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(TOOL_DIRS)))
|
||||
LOOP_OVER_TOOL_DIRS = \
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
|
||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; )
|
||||
endif
|
||||
|
||||
ifdef PARALLEL_DIRS
|
||||
# create a bunch of fake targets for order-only processing
|
||||
|
@ -709,10 +717,6 @@ SUBMAKEFILES += $(addsuffix /Makefile, $(DIRS) $(TOOL_DIRS) $(PARALLEL_DIRS))
|
|||
# default rule before including rules.mk
|
||||
ifndef SUPPRESS_DEFAULT_RULES
|
||||
ifdef TIERS
|
||||
|
||||
DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_dirs))
|
||||
STATIC_DIRS += $(foreach tier,$(TIERS),$(tier_$(tier)_staticdirs))
|
||||
|
||||
default all alldep::
|
||||
$(EXIT_ON_ERROR) \
|
||||
$(foreach tier,$(TIERS),$(MAKE) tier_$(tier); ) true
|
||||
|
@ -720,8 +724,9 @@ default all alldep::
|
|||
else
|
||||
|
||||
default all::
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir); ) true
|
||||
ifneq (,$(strip $(STATIC_DIRS)))
|
||||
$(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir); )
|
||||
endif
|
||||
$(MAKE) export
|
||||
$(MAKE) libs
|
||||
$(MAKE) tools
|
||||
|
@ -823,9 +828,9 @@ endif
|
|||
|
||||
tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
||||
+$(LOOP_OVER_DIRS)
|
||||
ifdef TOOL_DIRS
|
||||
ifneq (,$(strip $(TOOL_DIRS)))
|
||||
@$(EXIT_ON_ERROR) \
|
||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; ) true
|
||||
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; )
|
||||
endif
|
||||
|
||||
#
|
||||
|
@ -2170,7 +2175,7 @@ TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
|||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
echo-variable-%:
|
||||
@echo $($*)
|
||||
@echo "$($*)"
|
||||
|
||||
echo-tiers:
|
||||
@echo $(TIERS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче