Bug 463824, Introduce GLOBAL_DEPS to build system

r=ted, a1.9.1=beltzner [js bits rs=sdwilsh]
This commit is contained in:
Justin Wood 2008-11-27 18:26:44 -08:00
Родитель 01cd0bba16
Коммит a0179962f0
12 изменённых файлов: 41 добавлений и 38 удалений

Просмотреть файл

@ -269,7 +269,7 @@ endif
ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
$(MOZ_APP_NAME):: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
$(MOZ_APP_NAME):: mozilla.in $(GLOBAL_DEPS)
cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" > $@
chmod +x $@

Просмотреть файл

@ -143,7 +143,7 @@ GARBAGE += \
ifndef CROSS_COMPILE
ifdef USE_ELF_DYNSTR_GC
elf-dynstr-gc: elf-dynstr-gc.c Makefile Makefile.in
elf-dynstr-gc: elf-dynstr-gc.c $(GLOBAL_DEPS)
$(CC) $(COMPILE_CFLAGS) $(GLIB_CFLAGS) -o $@ $< $(LDFLAGS) $(GLIB_LIBS)
endif
endif

Просмотреть файл

@ -747,6 +747,9 @@ LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(LIBS))
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS))
DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))
# Dependancies which, if modified, should cause everything to rebuild
GLOBAL_DEPS += Makefile Makefile.in $(DEPTH)/config/autoconf.mk
##############################################
ifdef PARALLEL_DIRS
libs:: $(PARALLEL_DIRS_libs)
@ -890,7 +893,7 @@ alltags:
# PROGRAM = Foo
# creates OBJS, links with LIBS to create Foo
#
$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) Makefile Makefile.in
$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS)
ifeq (WINCE,$(OS_ARCH))
$(LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
else
@ -928,7 +931,7 @@ ifdef BEOS_PROGRAM_RESOURCE
endif
endif # BeOS
$(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in
$(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
ifeq (WINCE,$(OS_ARCH))
$(HOST_LD) -NOLOGO -OUT:$@ $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
else
@ -957,7 +960,7 @@ endif
# SIMPLE_PROGRAMS = Foo Bar
# creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
#
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
ifeq (WINCE,$(OS_ARCH))
$(LD) -nologo -entry:main -out:$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
else
@ -985,7 +988,7 @@ ifdef MOZ_POST_PROGRAM_COMMAND
$(MOZ_POST_PROGRAM_COMMAND) $@
endif
$(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in
$(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
ifeq (WINCE,$(OS_ARCH))
$(HOST_LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
else
@ -1051,7 +1054,7 @@ ifdef DTRACE_PROBE_OBJ
EXTRA_DEPS += $(DTRACE_PROBE_OBJ)
endif
$(LIBRARY): $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) Makefile Makefile.in
$(LIBRARY): $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
rm -f $@
ifneq (,$(GNU_LD)$(filter-out OS2 WINNT WINCE, $(OS_ARCH)))
ifdef SHARED_LIBRARY_LIBS
@ -1125,7 +1128,7 @@ endif
# symlinks back to the originals. The symlinks are a no-op for stabs debugging,
# so no need to conditionalize on OS version or debugging format.
$(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) Makefile Makefile.in
$(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) $(GLOBAL_DEPS)
ifndef INCREMENTAL_LINKER
rm -f $@
endif
@ -1252,62 +1255,62 @@ endif
endif
# Rules for building native targets must come first because of the host_ prefix
host_%.$(OBJ_SUFFIX): %.c Makefile Makefile.in
host_%.$(OBJ_SUFFIX): %.c $(GLOBAL_DEPS)
$(REPORT_BUILD)
$(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
host_%.$(OBJ_SUFFIX): %.cpp Makefile Makefile.in
host_%.$(OBJ_SUFFIX): %.cpp $(GLOBAL_DEPS)
$(REPORT_BUILD)
$(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
host_%.$(OBJ_SUFFIX): %.cc Makefile Makefile.in
host_%.$(OBJ_SUFFIX): %.cc $(GLOBAL_DEPS)
$(REPORT_BUILD)
$(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
host_%.$(OBJ_SUFFIX): %.m Makefile Makefile.in
host_%.$(OBJ_SUFFIX): %.m $(GLOBAL_DEPS)
$(REPORT_BUILD)
$(ELOG) $(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CFLAGS) $(HOST_CMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
host_%.$(OBJ_SUFFIX): %.mm Makefile Makefile.in
host_%.$(OBJ_SUFFIX): %.mm $(GLOBAL_DEPS)
$(REPORT_BUILD)
$(ELOG) $(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
%: %.c Makefile Makefile.in
%: %.c $(GLOBAL_DEPS)
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CC)
$(ELOG) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTOPTION)$@ $(_VPATH_SRCS)
%.$(OBJ_SUFFIX): %.c Makefile Makefile.in
%.$(OBJ_SUFFIX): %.c $(GLOBAL_DEPS)
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CC)
$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
moc_%.cpp: %.h Makefile Makefile.in
moc_%.cpp: %.h $(GLOBAL_DEPS)
$(MOC) $< $(OUTOPTION)$@
ifdef ASFILES
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
# a '-c' flag.
%.$(OBJ_SUFFIX): %.$(ASM_SUFFIX) Makefile Makefile.in
%.$(OBJ_SUFFIX): %.$(ASM_SUFFIX) $(GLOBAL_DEPS)
$(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
endif
%.$(OBJ_SUFFIX): %.S Makefile Makefile.in
%.$(OBJ_SUFFIX): %.S $(GLOBAL_DEPS)
$(AS) -o $@ $(ASFLAGS) -c $<
%: %.cpp Makefile Makefile.in
%: %.cpp $(GLOBAL_DEPS)
@$(MAKE_DEPS_AUTO_CXX)
$(CCC) $(OUTOPTION)$@ $(CXXFLAGS) $(_VPATH_SRCS) $(LDFLAGS)
#
# Please keep the next two rules in sync.
#
%.$(OBJ_SUFFIX): %.cc Makefile Makefile.in
%.$(OBJ_SUFFIX): %.cc $(GLOBAL_DEPS)
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
%.$(OBJ_SUFFIX): %.cpp Makefile Makefile.in
%.$(OBJ_SUFFIX): %.cpp $(GLOBAL_DEPS)
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CXX)
ifdef STRICT_CPLUSPLUS_SUFFIX
@ -1318,12 +1321,12 @@ else
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
endif #STRICT_CPLUSPLUS_SUFFIX
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.mm Makefile Makefile.in
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.mm $(GLOBAL_DEPS)
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $(_VPATH_SRCS)
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m Makefile Makefile.in
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m $(GLOBAL_DEPS)
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CC)
$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $(_VPATH_SRCS)
@ -1431,11 +1434,11 @@ _JAVA_DIR = _java
$(_JAVA_DIR)::
$(NSINSTALL) -D $@
$(_JAVA_DIR)/%.class: %.java Makefile Makefile.in $(_JAVA_DIR)
$(_JAVA_DIR)/%.class: %.java $(GLOBAL_DEPS) $(_JAVA_DIR)
$(CYGWIN_WRAPPER) $(JAVAC) $(JAVAC_FLAGS) -classpath $(_JAVA_CLASSPATH) \
-sourcepath $(_JAVA_SOURCEPATH) -d $(_JAVA_DIR) $(_VPATH_SRCS)
$(JAVA_LIBRARY): $(addprefix $(_JAVA_DIR)/,$(JAVA_SRCS:.java=.class)) Makefile Makefile.in
$(JAVA_LIBRARY): $(addprefix $(_JAVA_DIR)/,$(JAVA_SRCS:.java=.class)) $(GLOBAL_DEPS)
$(JAR) cf $@ -C $(_JAVA_DIR) .
GARBAGE_DIRS += $(_JAVA_DIR)
@ -1601,7 +1604,7 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_COMPILE) $(XPIDL_GEN_DIR)/.done
# no need to link together if XPIDLSRCS contains only XPIDL_MODULE
ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
$(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS)) Makefile.in Makefile $(XPIDL_LINK)
$(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS)) $(GLOBAL_DEPS) $(XPIDL_LINK)
$(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS))
endif # XPIDL_MODULE.xpt != XPIDLSRCS

Просмотреть файл

@ -8,7 +8,7 @@ endif
$(warning FINAL_LINK_COMP_NAMES = $(FINAL_LINK_COMP_NAMES))
$(warning FINAL_LINK_COMPS = $(FINAL_LINK_COMPS))
nsStaticComponents.cpp: $(topsrcdir)/config/nsStaticComponents.cpp.in Makefile Makefile.in $(FINAL_LINK_COMP_NAMES)
nsStaticComponents.cpp: $(topsrcdir)/config/nsStaticComponents.cpp.in $(GLOBAL_DEPS) $(FINAL_LINK_COMP_NAMES)
rm -f $@
cat $< | \
sed -e "s|%MODULE_LIST%|$(foreach m, $(STATIC_COMPONENT_LIST),MODULE($(m)))|" \

Просмотреть файл

@ -197,7 +197,7 @@ embed-link-comp-modules: embed-link-comp-names
done \
> $@
EmbedComponents.cpp: EmbedComponents.cpp.in Makefile Makefile.in $(EMBED_LINK_COMP_MODULES)
EmbedComponents.cpp: EmbedComponents.cpp.in $(GLOBAL_DEPS) $(EMBED_LINK_COMP_MODULES)
cat $< | \
sed -e "s|%DECL_NSGETMODULES%|$(foreach m,$(shell cat $(EMBED_LINK_COMP_MODULES)),DECL_NSGETMODULE($(m)))|" | \
sed -e "s|%MODULE_LIST%|$(foreach m, $(shell cat $(EMBED_LINK_COMP_MODULES)),MODULE($(m)),)|" \

Просмотреть файл

@ -161,7 +161,7 @@ else
_TARGET = $@
endif
nsMetaModule_%.cpp: nsMetaModule.cpp.in Makefile Makefile.in $(topsrcdir)/config/config.mk
nsMetaModule_%.cpp: nsMetaModule.cpp.in $(GLOBAL_DEPS) $(topsrcdir)/config/config.mk
rm -f $@
cat $< | \
sed -e "s|%DECLARE_SUBMODULE_INFOS%|$(foreach m, $($(_META_COMPONENT_NAMES)), extern nsModuleInfo NSMODULEINFO($(m));)|" | \

Просмотреть файл

@ -90,7 +90,7 @@ $(_JAVA_DIR)/$(PACKAGE_DIR)/Mozilla.class: $(PACKAGE_DIR)/IXPCOMError.java
$(PACKAGE_DIR)::
$(NSINSTALL) -D $@
$(PACKAGE_DIR)/IXPCOMError.java: $(topsrcdir)/xpcom/base/nsError.h gen-nsError.pl $(PACKAGE_DIR) Makefile Makefile.in
$(PACKAGE_DIR)/IXPCOMError.java: $(topsrcdir)/xpcom/base/nsError.h gen-nsError.pl $(PACKAGE_DIR) $(GLOBAL_DEPS)
$(PERL) $(srcdir)/gen-nsError.pl < $< > $@
##
@ -112,7 +112,7 @@ endif
# Using the temporary "java.files" avoids an "argument list too long"
# error on Windows when using *.java
$(IFACES_DIR)/$(JAVA_IFACES_PKG_NAME)/nsISupports.class: $(IFACES_DIR) $(wildcard $(JAVA_DIST_DIR)/default/$(JAVA_IFACES_PKG_NAME)/*.java) Makefile Makefile.in
$(IFACES_DIR)/$(JAVA_IFACES_PKG_NAME)/nsISupports.class: $(IFACES_DIR) $(wildcard $(JAVA_DIST_DIR)/default/$(JAVA_IFACES_PKG_NAME)/*.java) $(GLOBAL_DEPS)
@echo Compiling Java interfaces
find $(JAVA_DIST_DIR)/default -name "*.java" $(IGNORE_IFACES) > java.files
$(CYGWIN_WRAPPER) $(JAVAC) $(JAVAC_FLAGS) -classpath $(IFACES_DIR) \

Просмотреть файл

@ -99,7 +99,7 @@ FINAL_COMPONENT_NAMES := $(shell cat $(FINAL_LINK_COMP_NAMES))
nsMetaModule.$(OBJ_SUFFIX): module_list.h
module_list.h: Makefile Makefile.in $(DEPTH)/config/autoconf.mk
module_list.h: $(GLOBAL_DEPS)
echo '#define MODULES \' > $@
awk '{ print "MODULE(" $$1 ") \\" }' < $(FINAL_LINK_COMP_NAMES) >> $@
echo >> $@

Просмотреть файл

@ -270,7 +270,7 @@ DEFINES += -DDLL_PREFIX=$(DLL_PREFIX) -DDLL_SUFFIX=$(DLL_SUFFIX)
ifdef MOZ_PKG_REMOVALS
MOZ_PKG_REMOVALS_GEN = removed-files
$(MOZ_PKG_REMOVALS_GEN): $(MOZ_PKG_REMOVALS) Makefile Makefile.in
$(MOZ_PKG_REMOVALS_GEN): $(MOZ_PKG_REMOVALS) $(GLOBAL_DEPS)
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) $(MOZ_PKG_REMOVALS) > $(MOZ_PKG_REMOVALS_GEN)
GARBAGE += $(MOZ_PKG_REMOVALS_GEN)

Просмотреть файл

@ -130,7 +130,7 @@ check:: \
$(STATIC_WARNING_TESTCASES:.cpp=.s-warn) \
$(STATIC_PASS_TESTCASES:.cpp=.s-pass)
%.s-fail: %.cpp Makefile Makefile.in $(DEHYDRA_SCRIPTS)
%.s-fail: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS)
@printf "Compiling $(<F) to check that the static-analysis script is checking properly..."
@if $(CCC) $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \
printf "fail:\nerror: compilation of $(<F) succeeded. It shouldn't have!\n"; \
@ -139,7 +139,7 @@ check:: \
printf "ok.\n"; \
fi
%.s-warn: %.cpp Makefile Makefile.in $(DEHYDRA_SCRIPTS)
%.s-warn: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS)
@printf "Compiling $(<F) to check that the static-analysis script is checking properly..."
@if $(CCC) -Werror $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \
printf "fail:\nerror: compilation of $(<F) succeeded with -Werror. It shouldn't have!\n" \
@ -152,7 +152,7 @@ check:: \
exit 1; \
fi
%.s-pass: %.cpp Makefile Makefile.in $(DEHYDRA_SCRIPTS)
%.s-pass: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS)
@printf "Compiling $(<F) to check that the static-analysis script is checking properly..."
@if $(CCC) -Werror $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \
printf "ok.\n"; \

Просмотреть файл

@ -206,7 +206,7 @@ endif
ifneq (,$(filter-out OS2 WINCE WINNT Darwin BeOS,$(OS_ARCH)))
xulrunner:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
xulrunner:: mozilla.in $(GLOBAL_DEPS)
cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \
-e "s|%MOZ_USER_DIR%|.mozilla/xulrunner|" \
-e "s|%MREDIR%|$(mredir)|" > $@

Просмотреть файл

@ -110,7 +110,7 @@ ifndef MOZ_NATIVE_NSS
pkg_config_files += mozilla-nss.pc
endif
%.pc: $(srcdir)/%.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
%.pc: $(srcdir)/%.pc.in $(GLOBAL_DEPS)
cat $< | sed \
-e "s|%prefix%|$(prefix)|" \
-e "s|%includedir%|$(includedir)|" \