зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1099430, part 三: Use MOZILLA_DIR instead of topsrcdir in shared makefiles, r=glandium.
With these substitutions, it is possible to have comm-central's versions of these files merely include the mozilla-central versions and avoid having to port small changes to these files.
This commit is contained in:
Родитель
605ddffb0b
Коммит
80b5548b99
|
@ -94,7 +94,7 @@ check-variable = $(if $(filter-out 0 1,$(words $($(x))z)),$(error Spaces are not
|
||||||
$(foreach x,$(CHECK_VARS),$(check-variable))
|
$(foreach x,$(CHECK_VARS),$(check-variable))
|
||||||
|
|
||||||
ifndef INCLUDED_FUNCTIONS_MK
|
ifndef INCLUDED_FUNCTIONS_MK
|
||||||
include $(topsrcdir)/config/makefiles/functions.mk
|
include $(MOZILLA_DIR)/config/makefiles/functions.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
|
@ -138,7 +138,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CONFIG_TOOLS = $(MOZ_BUILD_ROOT)/config
|
CONFIG_TOOLS = $(MOZ_BUILD_ROOT)/config
|
||||||
AUTOCONF_TOOLS = $(topsrcdir)/build/autoconf
|
AUTOCONF_TOOLS = $(MOZILLA_DIR)/build/autoconf
|
||||||
|
|
||||||
#
|
#
|
||||||
# Strip off the excessively long version numbers on these platforms,
|
# Strip off the excessively long version numbers on these platforms,
|
||||||
|
@ -337,7 +337,7 @@ OS_INCLUDES := \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(topsrcdir)/config/static-checking-config.mk
|
include $(MOZILLA_DIR)/config/static-checking-config.mk
|
||||||
|
|
||||||
CFLAGS = $(OS_CPPFLAGS) $(OS_CFLAGS)
|
CFLAGS = $(OS_CPPFLAGS) $(OS_CFLAGS)
|
||||||
CXXFLAGS = $(OS_CPPFLAGS) $(OS_CXXFLAGS)
|
CXXFLAGS = $(OS_CPPFLAGS) $(OS_CXXFLAGS)
|
||||||
|
@ -528,7 +528,7 @@ endif
|
||||||
PWD := $(CURDIR)
|
PWD := $(CURDIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
NSINSTALL_PY := $(PYTHON) $(abspath $(topsrcdir)/config/nsinstall.py)
|
NSINSTALL_PY := $(PYTHON) $(abspath $(MOZILLA_DIR)/config/nsinstall.py)
|
||||||
# For Pymake, wherever we use nsinstall.py we're also going to try to make it
|
# For Pymake, wherever we use nsinstall.py we're also going to try to make it
|
||||||
# a native command where possible. Since native commands can't be used outside
|
# a native command where possible. Since native commands can't be used outside
|
||||||
# of single-line commands, we continue to provide INSTALL for general use.
|
# of single-line commands, we continue to provide INSTALL for general use.
|
||||||
|
@ -629,13 +629,13 @@ ifdef MOZ_DEBUG
|
||||||
JAVAC_FLAGS += -g
|
JAVAC_FLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CREATE_PRECOMPLETE_CMD = $(PYTHON) $(abspath $(topsrcdir)/config/createprecomplete.py)
|
CREATE_PRECOMPLETE_CMD = $(PYTHON) $(abspath $(MOZILLA_DIR)/config/createprecomplete.py)
|
||||||
|
|
||||||
# MDDEPDIR is the subdirectory where dependency files are stored
|
# MDDEPDIR is the subdirectory where dependency files are stored
|
||||||
MDDEPDIR := .deps
|
MDDEPDIR := .deps
|
||||||
|
|
||||||
EXPAND_LIBS_EXEC = $(PYTHON) $(topsrcdir)/config/expandlibs_exec.py
|
EXPAND_LIBS_EXEC = $(PYTHON) $(MOZILLA_DIR)/config/expandlibs_exec.py
|
||||||
EXPAND_LIBS_GEN = $(PYTHON) $(topsrcdir)/config/expandlibs_gen.py
|
EXPAND_LIBS_GEN = $(PYTHON) $(MOZILLA_DIR)/config/expandlibs_gen.py
|
||||||
EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
|
EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
|
||||||
EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
|
EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
|
||||||
EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
|
EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
|
||||||
|
@ -689,7 +689,7 @@ endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PLY_INCLUDE = -I$(topsrcdir)/other-licenses/ply
|
PLY_INCLUDE = -I$(MOZILLA_DIR)/other-licenses/ply
|
||||||
|
|
||||||
export CL_INCLUDES_PREFIX
|
export CL_INCLUDES_PREFIX
|
||||||
# Make sure that the build system can handle non-ASCII characters
|
# Make sure that the build system can handle non-ASCII characters
|
||||||
|
|
|
@ -107,7 +107,11 @@ endif #}
|
||||||
###########################################################################
|
###########################################################################
|
||||||
## Common makefile library loader
|
## Common makefile library loader
|
||||||
###########################################################################
|
###########################################################################
|
||||||
topORerr =$(if $(topsrcdir),$(topsrcdir),$(error topsrcdir is not defined))
|
ifdef MOZILLA_DIR
|
||||||
|
topORerr = $(MOZILLA_DIR)
|
||||||
|
else
|
||||||
|
topORerr = $(if $(topsrcdir),$(topsrcdir),$(error topsrcdir is not defined))
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef USE_AUTOTARGETS_MK # mkdir_deps
|
ifdef USE_AUTOTARGETS_MK # mkdir_deps
|
||||||
include $(topORerr)/config/makefiles/autotargets.mk
|
include $(topORerr)/config/makefiles/autotargets.mk
|
||||||
|
|
|
@ -25,11 +25,11 @@ include $(topsrcdir)/config/config.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef INCLUDED_VERSION_MK
|
ifndef INCLUDED_VERSION_MK
|
||||||
include $(topsrcdir)/config/version.mk
|
include $(MOZILLA_DIR)/config/version.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
USE_AUTOTARGETS_MK = 1
|
USE_AUTOTARGETS_MK = 1
|
||||||
include $(topsrcdir)/config/makefiles/makeutils.mk
|
include $(MOZILLA_DIR)/config/makefiles/makeutils.mk
|
||||||
|
|
||||||
ifdef REBUILD_CHECK
|
ifdef REBUILD_CHECK
|
||||||
REPORT_BUILD = $(info $(shell $(PYTHON) $(MOZILLA_DIR)/config/rebuild_check.py $@ $^))
|
REPORT_BUILD = $(info $(shell $(PYTHON) $(MOZILLA_DIR)/config/rebuild_check.py $@ $^))
|
||||||
|
@ -87,12 +87,12 @@ INSTALL_TARGETS += CPP_UNIT_TESTS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
run-cppunittests::
|
run-cppunittests::
|
||||||
@$(PYTHON) $(topsrcdir)/testing/runcppunittests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(CPP_UNIT_TESTS)
|
@$(PYTHON) $(MOZILLA_DIR)/testing/runcppunittests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(CPP_UNIT_TESTS)
|
||||||
|
|
||||||
cppunittests-remote: DM_TRANS?=adb
|
cppunittests-remote: DM_TRANS?=adb
|
||||||
cppunittests-remote:
|
cppunittests-remote:
|
||||||
@if [ '${TEST_DEVICE}' != '' -o '$(DM_TRANS)' = 'adb' ]; then \
|
@if [ '${TEST_DEVICE}' != '' -o '$(DM_TRANS)' = 'adb' ]; then \
|
||||||
$(PYTHON) -u $(topsrcdir)/testing/remotecppunittests.py \
|
$(PYTHON) -u $(MOZILLA_DIR)/testing/remotecppunittests.py \
|
||||||
--xre-path=$(DEPTH)/dist/bin \
|
--xre-path=$(DEPTH)/dist/bin \
|
||||||
--localLib=$(DEPTH)/dist/$(MOZ_APP_NAME) \
|
--localLib=$(DEPTH)/dist/$(MOZ_APP_NAME) \
|
||||||
--dm_trans=$(DM_TRANS) \
|
--dm_trans=$(DM_TRANS) \
|
||||||
|
@ -220,7 +220,7 @@ endif # WINNT
|
||||||
|
|
||||||
ifeq ($(SOLARIS_SUNPRO_CXX),1)
|
ifeq ($(SOLARIS_SUNPRO_CXX),1)
|
||||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||||
OS_LDFLAGS += -M $(topsrcdir)/config/solaris_ia32.map
|
OS_LDFLAGS += -M $(MOZILLA_DIR)/config/solaris_ia32.map
|
||||||
endif # x86
|
endif # x86
|
||||||
endif # Solaris Sun Studio C++
|
endif # Solaris Sun Studio C++
|
||||||
|
|
||||||
|
@ -557,7 +557,7 @@ STATIC_LIB_DEP = $(if $(wildcard $(1).$(LIBS_DESC_SUFFIX)),$(1).$(LIBS_DESC_SUFF
|
||||||
STATIC_LIBS_DEPS := $(foreach l,$(STATIC_LIBS),$(call STATIC_LIB_DEP,$(l)))
|
STATIC_LIBS_DEPS := $(foreach l,$(STATIC_LIBS),$(call STATIC_LIB_DEP,$(l)))
|
||||||
|
|
||||||
# Dependencies which, if modified, should cause everything to rebuild
|
# Dependencies which, if modified, should cause everything to rebuild
|
||||||
GLOBAL_DEPS += Makefile $(addprefix $(DEPTH)/config/,$(INCLUDED_AUTOCONF_MK)) $(topsrcdir)/config/config.mk
|
GLOBAL_DEPS += Makefile $(addprefix $(DEPTH)/config/,$(INCLUDED_AUTOCONF_MK)) $(MOZILLA_DIR)/config/config.mk
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
ifdef COMPILE_ENVIRONMENT
|
ifdef COMPILE_ENVIRONMENT
|
||||||
|
@ -569,7 +569,7 @@ host:: $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS)
|
||||||
|
|
||||||
target:: $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS)
|
target:: $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS)
|
||||||
|
|
||||||
include $(topsrcdir)/config/makefiles/target_binaries.mk
|
include $(MOZILLA_DIR)/config/makefiles/target_binaries.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
|
@ -594,11 +594,11 @@ endif
|
||||||
ifneq (,$(SHARED_LIBRARY)$(PROGRAM))
|
ifneq (,$(SHARED_LIBRARY)$(PROGRAM))
|
||||||
export::
|
export::
|
||||||
ifdef PROGRAM
|
ifdef PROGRAM
|
||||||
$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
|
$(PYTHON) $(MOZILLA_DIR)/build/win32/pgomerge.py \
|
||||||
$(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/bin
|
$(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/bin
|
||||||
endif
|
endif
|
||||||
ifdef SHARED_LIBRARY
|
ifdef SHARED_LIBRARY
|
||||||
$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
|
$(PYTHON) $(MOZILLA_DIR)/build/win32/pgomerge.py \
|
||||||
$(patsubst $(DLL_PREFIX)%$(DLL_SUFFIX),%,$(SHARED_LIBRARY)) $(DIST)/bin
|
$(patsubst $(DLL_PREFIX)%$(DLL_SUFFIX),%,$(SHARED_LIBRARY)) $(DIST)/bin
|
||||||
endif
|
endif
|
||||||
endif # SHARED_LIBRARY || PROGRAM
|
endif # SHARED_LIBRARY || PROGRAM
|
||||||
|
@ -852,14 +852,14 @@ define MAKE_DEPS_AUTO_CC
|
||||||
if test -d $(@D); then \
|
if test -d $(@D); then \
|
||||||
echo 'Building deps for $< using Sun Studio cc'; \
|
echo 'Building deps for $< using Sun Studio cc'; \
|
||||||
$(CC) $(COMPILE_CFLAGS) -xM $< >$(_MDDEPFILE) ; \
|
$(CC) $(COMPILE_CFLAGS) -xM $< >$(_MDDEPFILE) ; \
|
||||||
$(PYTHON) $(topsrcdir)/build/unix/add_phony_targets.py $(_MDDEPFILE) ; \
|
$(PYTHON) $(MOZILLA_DIR)/build/unix/add_phony_targets.py $(_MDDEPFILE) ; \
|
||||||
fi
|
fi
|
||||||
endef
|
endef
|
||||||
define MAKE_DEPS_AUTO_CXX
|
define MAKE_DEPS_AUTO_CXX
|
||||||
if test -d $(@D); then \
|
if test -d $(@D); then \
|
||||||
echo 'Building deps for $< using Sun Studio CC'; \
|
echo 'Building deps for $< using Sun Studio CC'; \
|
||||||
$(CXX) $(COMPILE_CXXFLAGS) -xM $< >$(_MDDEPFILE) ; \
|
$(CXX) $(COMPILE_CXXFLAGS) -xM $< >$(_MDDEPFILE) ; \
|
||||||
$(PYTHON) $(topsrcdir)/build/unix/add_phony_targets.py $(_MDDEPFILE) ; \
|
$(PYTHON) $(MOZILLA_DIR)/build/unix/add_phony_targets.py $(_MDDEPFILE) ; \
|
||||||
fi
|
fi
|
||||||
endef
|
endef
|
||||||
endif # Sun Studio on Solaris
|
endif # Sun Studio on Solaris
|
||||||
|
@ -1097,7 +1097,7 @@ endif
|
||||||
# Java rules
|
# Java rules
|
||||||
###############################################################################
|
###############################################################################
|
||||||
ifneq (,$(JAVAFILES)$(ANDROID_RESFILES)$(ANDROID_APKNAME)$(JAVA_JAR_TARGETS))
|
ifneq (,$(JAVAFILES)$(ANDROID_RESFILES)$(ANDROID_APKNAME)$(JAVA_JAR_TARGETS))
|
||||||
include $(topsrcdir)/config/makefiles/java-build.mk
|
include $(MOZILLA_DIR)/config/makefiles/java-build.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -1543,7 +1543,7 @@ endif
|
||||||
|
|
||||||
# Pull in non-recursive targets if this is a partial tree build.
|
# Pull in non-recursive targets if this is a partial tree build.
|
||||||
ifndef TOPLEVEL_BUILD
|
ifndef TOPLEVEL_BUILD
|
||||||
include $(topsrcdir)/config/makefiles/nonrecursive.mk
|
include $(MOZILLA_DIR)/config/makefiles/nonrecursive.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -1578,7 +1578,7 @@ TAGS: $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
||||||
ifndef INCLUDED_DEBUGMAKE_MK #{
|
ifndef INCLUDED_DEBUGMAKE_MK #{
|
||||||
## Only parse when an echo* or show* target is requested
|
## Only parse when an echo* or show* target is requested
|
||||||
ifneq (,$(call isTargetStem,echo,show))
|
ifneq (,$(call isTargetStem,echo,show))
|
||||||
include $(topsrcdir)/config/makefiles/debugmake.mk
|
include $(MOZILLA_DIR)/config/makefiles/debugmake.mk
|
||||||
endif #}
|
endif #}
|
||||||
endif #}
|
endif #}
|
||||||
|
|
||||||
|
@ -1628,7 +1628,7 @@ $(PURGECACHES_FILES):
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Derived targets and dependencies
|
# Derived targets and dependencies
|
||||||
|
|
||||||
include $(topsrcdir)/config/makefiles/autotargets.mk
|
include $(MOZILLA_DIR)/config/makefiles/autotargets.mk
|
||||||
ifneq ($(NULL),$(AUTO_DEPS))
|
ifneq ($(NULL),$(AUTO_DEPS))
|
||||||
default all libs tools export:: $(AUTO_DEPS)
|
default all libs tools export:: $(AUTO_DEPS)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -15,7 +15,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
||||||
ifndef RESFILE
|
ifndef RESFILE
|
||||||
RCFILE=./module.rc
|
RCFILE=./module.rc
|
||||||
RESFILE=./module.res
|
RESFILE=./module.res
|
||||||
_RC_STRING = -QUIET 1 -DEPTH $(DEPTH) -TOPSRCDIR $(topsrcdir) -OBJDIR . -SRCDIR $(srcdir) -DISPNAME $(MOZ_APP_DISPLAYNAME) -APPVERSION $(MOZ_APP_VERSION)
|
_RC_STRING = -QUIET 1 -DEPTH $(DEPTH) -TOPSRCDIR $(MOZILLA_DIR) -OBJDIR . -SRCDIR $(srcdir) -DISPNAME $(MOZ_APP_DISPLAYNAME) -APPVERSION $(MOZ_APP_VERSION)
|
||||||
ifdef MOZILLA_OFFICIAL
|
ifdef MOZILLA_OFFICIAL
|
||||||
_RC_STRING += -OFFICIAL 1
|
_RC_STRING += -OFFICIAL 1
|
||||||
endif
|
endif
|
||||||
|
@ -42,8 +42,8 @@ GARBAGE += $(RESFILE) $(RCFILE)
|
||||||
#dummy target so $(RCFILE) doesn't become the default =P
|
#dummy target so $(RCFILE) doesn't become the default =P
|
||||||
all::
|
all::
|
||||||
|
|
||||||
$(RCFILE): $(RCINCLUDE) $(topsrcdir)/config/version_win.pl
|
$(RCFILE): $(RCINCLUDE) $(MOZILLA_DIR)/config/version_win.pl
|
||||||
$(PERL) $(topsrcdir)/config/version_win.pl $(_RC_STRING)
|
$(PERL) $(MOZILLA_DIR)/config/version_win.pl $(_RC_STRING)
|
||||||
|
|
||||||
endif # RESFILE
|
endif # RESFILE
|
||||||
endif # Windows
|
endif # Windows
|
||||||
|
|
|
@ -139,7 +139,7 @@ endif
|
||||||
|
|
||||||
ifndef INCLUDED_RCS_MK
|
ifndef INCLUDED_RCS_MK
|
||||||
USE_RCS_MK := 1
|
USE_RCS_MK := 1
|
||||||
include $(topsrcdir)/config/makefiles/makeutils.mk
|
include $(MOZILLA_DIR)/config/makefiles/makeutils.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{node|short}\n" 2>/dev/null))
|
MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{node|short}\n" 2>/dev/null))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче