Back out 7f12ca5e6d0a (bug 750303) on suspicion of breaking l10n builds

This commit is contained in:
Phil Ringnalda 2013-03-10 20:03:28 -07:00
parent a46b4afce3
commit 938afd9786
9 changed files with 47 additions and 115 deletions

View File

@ -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

View File

@ -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=/" | \

View File

@ -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) \

View File

@ -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)

View File

@ -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

View File

@ -13,25 +13,13 @@ checkup = \
check-final-lib-link-list \
$(NULL)
undefine_supported=no
$(eval undefine undefine_supported)
undefine_supported ?= yes
checkup: $(checkup)
# <CHECK: final-lib-link-list>
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)

View File

@ -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 <event.h>" > $(DIST)/third_party/libevent/event.h
endif # }

View File

@ -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)

View File

@ -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)