diff --git a/config/config.mk b/config/config.mk index ede5020d8d5a..948a71af2092 100644 --- a/config/config.mk +++ b/config/config.mk @@ -94,7 +94,7 @@ check-variable = $(if $(filter-out 0 1,$(words $($(x))z)),$(error Spaces are not $(foreach x,$(CHECK_VARS),$(check-variable)) ifndef INCLUDED_FUNCTIONS_MK -include $(topsrcdir)/config/makefiles/functions.mk +include $(MOZILLA_DIR)/config/makefiles/functions.mk endif RM = rm -f @@ -138,7 +138,7 @@ else endif 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, @@ -337,7 +337,7 @@ OS_INCLUDES := \ $(NULL) endif -include $(topsrcdir)/config/static-checking-config.mk +include $(MOZILLA_DIR)/config/static-checking-config.mk CFLAGS = $(OS_CPPFLAGS) $(OS_CFLAGS) CXXFLAGS = $(OS_CPPFLAGS) $(OS_CXXFLAGS) @@ -528,7 +528,7 @@ endif PWD := $(CURDIR) 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 # 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. @@ -629,13 +629,13 @@ ifdef MOZ_DEBUG JAVAC_FLAGS += -g 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 := .deps -EXPAND_LIBS_EXEC = $(PYTHON) $(topsrcdir)/config/expandlibs_exec.py -EXPAND_LIBS_GEN = $(PYTHON) $(topsrcdir)/config/expandlibs_gen.py +EXPAND_LIBS_EXEC = $(PYTHON) $(MOZILLA_DIR)/config/expandlibs_exec.py +EXPAND_LIBS_GEN = $(PYTHON) $(MOZILLA_DIR)/config/expandlibs_gen.py EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR) EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC) EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC) @@ -689,7 +689,7 @@ endif endif endif -PLY_INCLUDE = -I$(topsrcdir)/other-licenses/ply +PLY_INCLUDE = -I$(MOZILLA_DIR)/other-licenses/ply export CL_INCLUDES_PREFIX # Make sure that the build system can handle non-ASCII characters diff --git a/config/makefiles/makeutils.mk b/config/makefiles/makeutils.mk index 0ae1044643c0..07961c797c0b 100644 --- a/config/makefiles/makeutils.mk +++ b/config/makefiles/makeutils.mk @@ -107,7 +107,11 @@ endif #} ########################################################################### ## 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 include $(topORerr)/config/makefiles/autotargets.mk diff --git a/config/rules.mk b/config/rules.mk index 5f7b66c81293..7c5bbb4d4bc9 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -25,11 +25,11 @@ include $(topsrcdir)/config/config.mk endif ifndef INCLUDED_VERSION_MK -include $(topsrcdir)/config/version.mk +include $(MOZILLA_DIR)/config/version.mk endif USE_AUTOTARGETS_MK = 1 -include $(topsrcdir)/config/makefiles/makeutils.mk +include $(MOZILLA_DIR)/config/makefiles/makeutils.mk ifdef REBUILD_CHECK REPORT_BUILD = $(info $(shell $(PYTHON) $(MOZILLA_DIR)/config/rebuild_check.py $@ $^)) @@ -87,12 +87,12 @@ INSTALL_TARGETS += CPP_UNIT_TESTS endif 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: @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 \ --localLib=$(DEPTH)/dist/$(MOZ_APP_NAME) \ --dm_trans=$(DM_TRANS) \ @@ -220,7 +220,7 @@ endif # WINNT ifeq ($(SOLARIS_SUNPRO_CXX),1) 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 # 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))) # 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 @@ -569,7 +569,7 @@ host:: $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_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 ############################################## @@ -594,11 +594,11 @@ endif ifneq (,$(SHARED_LIBRARY)$(PROGRAM)) export:: ifdef PROGRAM - $(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \ + $(PYTHON) $(MOZILLA_DIR)/build/win32/pgomerge.py \ $(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/bin endif 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 endif endif # SHARED_LIBRARY || PROGRAM @@ -852,14 +852,14 @@ define MAKE_DEPS_AUTO_CC if test -d $(@D); then \ echo 'Building deps for $< using Sun Studio cc'; \ $(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 endef define MAKE_DEPS_AUTO_CXX if test -d $(@D); then \ echo 'Building deps for $< using Sun Studio CC'; \ $(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 endef endif # Sun Studio on Solaris @@ -1097,7 +1097,7 @@ endif # Java rules ############################################################################### 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 ############################################################################### @@ -1543,7 +1543,7 @@ endif # Pull in non-recursive targets if this is a partial tree build. ifndef TOPLEVEL_BUILD -include $(topsrcdir)/config/makefiles/nonrecursive.mk +include $(MOZILLA_DIR)/config/makefiles/nonrecursive.mk endif ################################################################################ @@ -1578,7 +1578,7 @@ TAGS: $(CSRCS) $(CPPSRCS) $(wildcard *.h) ifndef INCLUDED_DEBUGMAKE_MK #{ ## Only parse when an echo* or show* target is requested ifneq (,$(call isTargetStem,echo,show)) - include $(topsrcdir)/config/makefiles/debugmake.mk + include $(MOZILLA_DIR)/config/makefiles/debugmake.mk endif #} endif #} @@ -1628,7 +1628,7 @@ $(PURGECACHES_FILES): ############################################################################# # Derived targets and dependencies -include $(topsrcdir)/config/makefiles/autotargets.mk +include $(MOZILLA_DIR)/config/makefiles/autotargets.mk ifneq ($(NULL),$(AUTO_DEPS)) default all libs tools export:: $(AUTO_DEPS) endif diff --git a/config/version.mk b/config/version.mk index 414a1ebb4563..1b9f68afa95b 100644 --- a/config/version.mk +++ b/config/version.mk @@ -15,7 +15,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),windows) ifndef RESFILE RCFILE=./module.rc 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 _RC_STRING += -OFFICIAL 1 endif @@ -42,8 +42,8 @@ GARBAGE += $(RESFILE) $(RCFILE) #dummy target so $(RCFILE) doesn't become the default =P all:: -$(RCFILE): $(RCINCLUDE) $(topsrcdir)/config/version_win.pl - $(PERL) $(topsrcdir)/config/version_win.pl $(_RC_STRING) +$(RCFILE): $(RCINCLUDE) $(MOZILLA_DIR)/config/version_win.pl + $(PERL) $(MOZILLA_DIR)/config/version_win.pl $(_RC_STRING) endif # RESFILE endif # Windows diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk index a88061b90bef..3c13c66da8d5 100644 --- a/toolkit/mozapps/installer/package-name.mk +++ b/toolkit/mozapps/installer/package-name.mk @@ -139,7 +139,7 @@ endif ifndef INCLUDED_RCS_MK USE_RCS_MK := 1 - include $(topsrcdir)/config/makefiles/makeutils.mk + include $(MOZILLA_DIR)/config/makefiles/makeutils.mk endif MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{node|short}\n" 2>/dev/null))