From 938afd97860e7672501b801a21ca8b46bdf7e56b Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Sun, 10 Mar 2013 20:03:28 -0700 Subject: [PATCH] Back out 7f12ca5e6d0a (bug 750303) on suspicion of breaking l10n builds --- browser/app/Makefile.in | 11 ++-- browser/locales/Makefile.in | 4 +- config/Makefile.in | 9 ++-- config/makefiles/autotargets.mk | 31 ++++-------- config/makefiles/test/check-autotargets.mk | 50 ++++--------------- config/makefiles/test/check-export-targets.mk | 14 +----- ipc/chromium/Makefile.in | 8 +-- js/src/config/makefiles/autotargets.mk | 31 ++++-------- webapprt/Makefile.in | 4 +- 9 files changed, 47 insertions(+), 115 deletions(-) diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index e275f0fcab8..bba59abe217 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -103,11 +103,6 @@ endif PROGRAMS_DEST = $(DIST)/bin -GENERATED_DIRS_libs = \ - $(dist_dest)/Contents/MacOS \ - $(dist_dest)/Contents/Resources/$(AB).lproj \ - $(NULL) - include $(topsrcdir)/config/rules.mk ifeq ($(OS_ARCH),WINNT) #{ @@ -179,9 +174,13 @@ endif MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/config/buildid) +libs-preqs = \ + $(call mkdir_deps,$(dist_dest)/Contents/MacOS) \ + $(call mkdir_deps,$(dist_dest)/Contents/Resources/$(AB).lproj) \ + $(NULL) .PHONY: repackage -libs repackage:: $(PROGRAM) +libs repackage:: $(PROGRAM) $(libs-preqs) rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents $(dist_dest) --exclude English.lproj rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(dist_dest)/Contents/Resources/$(AB).lproj sed -e "s/%APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" -e "s/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/" -e "s/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(dist_dest)/Contents/Info.plist diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in index 0643d7025fb..cfaa3db3f33 100644 --- a/browser/locales/Makefile.in +++ b/browser/locales/Makefile.in @@ -90,8 +90,6 @@ else DIST_SUBDIRS = $(DIST_SUBDIR) endif -GENERATED_DIRS_libs = $(DIST)/bin - include $(topsrcdir)/config/rules.mk include $(topsrcdir)/toolkit/locales/l10n.mk @@ -210,7 +208,7 @@ installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-% ifdef MOZ_UPDATER # Note that we want updater.ini to be in the top directory, not the browser/ # subdirectory, because that's where the updater is installed and runs. -libs:: $(call MERGE_FILE,updater/updater.ini) +libs:: $(call MERGE_FILE,updater/updater.ini) $(call mkdir_deps,$(DIST)/bin) ifeq ($(OS_ARCH),WINNT) cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini | \ sed -e "s/^InfoText=/Info=/" -e "s/^TitleText=/Title=/" | \ diff --git a/config/Makefile.in b/config/Makefile.in index d3447ec092c..5f6e8b15396 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -67,10 +67,6 @@ INSTALL_TARGETS += HEADERS PYTHON_UNIT_TESTS := $(wildcard $(srcdir)/tests/unit-*.py) -ifdef WRAP_SYSTEM_INCLUDES - GENERATED_DIRS_export += system_wrappers -endif - include $(topsrcdir)/config/rules.mk HOST_CFLAGS += -DUNICODE -D_UNICODE @@ -92,8 +88,11 @@ else endif ifdef WRAP_SYSTEM_INCLUDES +export-preqs = \ + $(call mkdir_deps,system_wrappers) \ + $(NULL) -export:: +export:: $(export-preqs) $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \ -DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \ -DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \ diff --git a/config/makefiles/autotargets.mk b/config/makefiles/autotargets.mk index be83874f9ad..f8f0238612c 100644 --- a/config/makefiles/autotargets.mk +++ b/config/makefiles/autotargets.mk @@ -48,17 +48,8 @@ slash_strip = \ # Extract directory path from a dependency file. mkdir_stem =$(foreach val,$(getargv),$(subst /.mkdir.done,$(NULL),$(val))) -# Function can be called by other functions to expand un-expanded make vars. -# := functionality in call(able) function form -expand = $(eval func-expand-$(1) := $($(1)))$(func-expand-$(1)) - ## Generate timestamp file for threadsafe directory creation -mkdir_deps = \ - $(strip \ - $(foreach var,$(getargv),\ - $(foreach dir,$(call expand,var),\ - $(call slash_strip,$(call expand,dir)/.mkdir.done) \ - ))) +mkdir_deps =$(foreach dir,$(getargv),$(call slash_strip,$(dir)/.mkdir.done)) ####################### ##---] TARGETS [---## @@ -82,23 +73,21 @@ INCLUDED_AUTOTARGETS_MK = 1 endif #} -########################################################################### -## GENERATED_DIR(_\S+)? directory deps -## GENERATED_DIRS_{export,lib,tools} = foo # target specific deps -########################################################################### -GENERATED_DIRS += $(foreach tgt,$(MAKECMDGOALS),$(value GENERATED_DIRS_$(tgt))) -GENERATED_DIRS := $(call expand,GENERATED_DIRS) -GENERATED_DIRS := $(strip $(sort $(GENERATED_DIRS))) -GARBAGE_DIRS += $(GENERATED_DIRS) - -# directory deps are timestamp based to only create when needed -AUTO_DEPS += $(if $(value GENERATED_DIRS),$(call mkdir_deps,GENERATED_DIRS)) +## Accumulate deps and cleanup +ifneq (,$(GENERATED_DIRS)) + GENERATED_DIRS := $(strip $(sort $(GENERATED_DIRS))) + tmpauto :=$(call mkdir_deps,GENERATED_DIRS) + GENERATED_DIRS_DEPS +=$(tmpauto) + GARBAGE_DIRS +=$(GENERATED_DIRS) +endif ################################################################# # One ring/dep to rule them all: # config/rules.mk::all target is available by default # Add $(AUTO_DEPS) as an explicit target dependency when needed. ################################################################# + +AUTO_DEPS +=$(GENERATED_DIRS_DEPS) AUTO_DEPS := $(strip $(sort $(AUTO_DEPS))) # Complain loudly if deps have not loaded so getargv != $(NULL) diff --git a/config/makefiles/test/check-autotargets.mk b/config/makefiles/test/check-autotargets.mk index 76d2c53898e..c103f1d02db 100644 --- a/config/makefiles/test/check-autotargets.mk +++ b/config/makefiles/test/check-autotargets.mk @@ -9,58 +9,28 @@ ifdef VERBOSE endif space=$(null) $(null) +GENERATED_DIRS = bogus # test data -testD1 = test-dir-1 -testD2 = test-dir-2 -testD3 = test-dir-3 -testD4 = test-dir-4 - -# Append goals to force var expansion -MAKECMDGOALS := $(MAKECMDGOALS) libs tools - -#dir-var = test-dir-1 -GENERATED_DIRS = test-dir-1 # test data -GENERATED_DIRS_libs = $(testD2) -GENERATED_DIRS_tools = test-dir-3 $(testD4) - - -########################################################################### -# undefine directive not supported by older make versions but needed here -# to force a re-include/re-eval for testing. Unit test should be non-fatal -# unless hacking on makefiles. -########################################################################### - -undefine_supported=no -$(eval undefine undefine_supported) -undefine_supported ?= yes - -ifeq (yes,$(undefine_supported)) - # Clear defs to re-include for testing - undefine USE_AUTOTARGETS_MK - undefine INCLUDED_AUTOTARGETS_MK -else - $(info ===========================================================================) - $(warning $(MAKE)[$(MAKE_VERSION)]: makefile directive 'undefined' not supported, disabling test) - $(info ===========================================================================) -endif - +undefine USE_AUTOTARGETS_MK +undefine INCLUDED_AUTOTARGETS_MK include $(topsrcdir)/config/makefiles/autotargets.mk ifndef INCLUDED_AUTOTARGETS_MK - $(error autotargets.mk was not included) + $(error autotargets.mk was not included endif $(call requiredfunction,mkdir_deps) # Verify test data populated makefile vars correctly -vars = AUTO_DEPS GARBAGE_DIRS GENERATED_DIRS_tools +vars = AUTO_DEPS GARBAGE_DIRS GENERATED_DIRS_DEPS $(foreach var,$(vars),$(call errorIfEmpty,$(var))) -# Verify target dirs were expanded into GENERATED_DIRS -$(foreach path,$(testD1) $(testD2) $(testD3) $(testD4),\ - $(if $(findstring $(path),$(AUTO_DEPS))\ - ,,$(error AUTO_DEPS missing path $(path)))) +# Data should also be valid +ifneq (bogus,$(findstring bogus,$(AUTO_DEPS))) + $(error AUTO_DEPS=[$(AUTO_DEPS)] is not set correctly) +endif + # relpath path := foo/bar.c diff --git a/config/makefiles/test/check-export-targets.mk b/config/makefiles/test/check-export-targets.mk index 8c7dceff32e..c248c9b023c 100644 --- a/config/makefiles/test/check-export-targets.mk +++ b/config/makefiles/test/check-export-targets.mk @@ -13,25 +13,13 @@ checkup = \ check-final-lib-link-list \ $(NULL) -undefine_supported=no -$(eval undefine undefine_supported) -undefine_supported ?= yes - - checkup: $(checkup) # LIBRARY_NAME = foo# real_data: xptcmd EXPORT_LIBRARY = foo# real_data: ../.. - -ifeq (yes,$(undefine_supported)) - undefine IS_COMPONENT -else - $(info ===========================================================================) - $(warning $(MAKE)[$(MAKE_VERSION)]: makefile directive 'undefined' not supported, disabling test) - $(info ===========================================================================) -endif +undefine IS_COMPONENT test-data = $(CURDIR)/check-export-targets-test-data FINAL_LINK_LIBS = $(test-data) diff --git a/ipc/chromium/Makefile.in b/ipc/chromium/Makefile.in index 1abdb03301d..f666685f93d 100644 --- a/ipc/chromium/Makefile.in +++ b/ipc/chromium/Makefile.in @@ -320,13 +320,15 @@ endif # } OS_CXXFLAGS += $(TK_CFLAGS) -GENERATED_DIRS_export := $(DIST)/third_party/libevent - include $(topsrcdir)/config/rules.mk ifdef MOZ_NATIVE_LIBEVENT # { -export:: +export-preqs = \ + $(call mkdir_deps,$(DIST)/third_party/libevent) \ + $(NULL) + +export:: $(export-preqs) echo "#include " > $(DIST)/third_party/libevent/event.h endif # } diff --git a/js/src/config/makefiles/autotargets.mk b/js/src/config/makefiles/autotargets.mk index be83874f9ad..f8f0238612c 100644 --- a/js/src/config/makefiles/autotargets.mk +++ b/js/src/config/makefiles/autotargets.mk @@ -48,17 +48,8 @@ slash_strip = \ # Extract directory path from a dependency file. mkdir_stem =$(foreach val,$(getargv),$(subst /.mkdir.done,$(NULL),$(val))) -# Function can be called by other functions to expand un-expanded make vars. -# := functionality in call(able) function form -expand = $(eval func-expand-$(1) := $($(1)))$(func-expand-$(1)) - ## Generate timestamp file for threadsafe directory creation -mkdir_deps = \ - $(strip \ - $(foreach var,$(getargv),\ - $(foreach dir,$(call expand,var),\ - $(call slash_strip,$(call expand,dir)/.mkdir.done) \ - ))) +mkdir_deps =$(foreach dir,$(getargv),$(call slash_strip,$(dir)/.mkdir.done)) ####################### ##---] TARGETS [---## @@ -82,23 +73,21 @@ INCLUDED_AUTOTARGETS_MK = 1 endif #} -########################################################################### -## GENERATED_DIR(_\S+)? directory deps -## GENERATED_DIRS_{export,lib,tools} = foo # target specific deps -########################################################################### -GENERATED_DIRS += $(foreach tgt,$(MAKECMDGOALS),$(value GENERATED_DIRS_$(tgt))) -GENERATED_DIRS := $(call expand,GENERATED_DIRS) -GENERATED_DIRS := $(strip $(sort $(GENERATED_DIRS))) -GARBAGE_DIRS += $(GENERATED_DIRS) - -# directory deps are timestamp based to only create when needed -AUTO_DEPS += $(if $(value GENERATED_DIRS),$(call mkdir_deps,GENERATED_DIRS)) +## Accumulate deps and cleanup +ifneq (,$(GENERATED_DIRS)) + GENERATED_DIRS := $(strip $(sort $(GENERATED_DIRS))) + tmpauto :=$(call mkdir_deps,GENERATED_DIRS) + GENERATED_DIRS_DEPS +=$(tmpauto) + GARBAGE_DIRS +=$(GENERATED_DIRS) +endif ################################################################# # One ring/dep to rule them all: # config/rules.mk::all target is available by default # Add $(AUTO_DEPS) as an explicit target dependency when needed. ################################################################# + +AUTO_DEPS +=$(GENERATED_DIRS_DEPS) AUTO_DEPS := $(strip $(sort $(AUTO_DEPS))) # Complain loudly if deps have not loaded so getargv != $(NULL) diff --git a/webapprt/Makefile.in b/webapprt/Makefile.in index 76f72e87ba0..c4b3c2bb178 100644 --- a/webapprt/Makefile.in +++ b/webapprt/Makefile.in @@ -32,8 +32,6 @@ EXTRA_JS_MODULES = \ PREF_JS_EXPORTS = $(srcdir)/prefs.js \ $(NULL) -GENERATED_DIRS_libs = $(FINAL_TARGET) - include $(topsrcdir)/config/rules.mk ifdef MOZ_DEBUG @@ -44,7 +42,7 @@ ifdef MOZILLA_OFFICIAL DEFINES += -DMOZILLA_OFFICIAL endif -libs:: +libs:: $(call mkdir_deps,$(FINAL_TARGET)) $(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/chrome.manifest "resource webapprt ./" GRE_MILESTONE := $(shell tail -n 1 $(topsrcdir)/config/milestone.txt 2>/dev/null || tail -1 $(topsrcdir)/config/milestone.txt)