diff --git a/browser/components/sessionstore/src/Makefile.in b/browser/components/sessionstore/src/Makefile.in index a8d4832f7ba..d9a410295de 100644 --- a/browser/components/sessionstore/src/Makefile.in +++ b/browser/components/sessionstore/src/Makefile.in @@ -8,6 +8,7 @@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +include $(topsrcdir)/config/config.mk EXTRA_COMPONENTS = \ nsSessionStore.manifest \ @@ -18,24 +19,16 @@ EXTRA_PP_COMPONENTS = \ nsSessionStartup.js \ $(NULL) -libs:: - $(NSINSTALL) $(srcdir)/*.jsm $(FINAL_TARGET)/modules/sessionstore +JS_MODULES_PATH := $(FINAL_TARGET)/modules/sessionstore -SS_EXTRA_PP_JS_MODULES = \ +EXTRA_JS_MODULES := \ + DocumentUtils.jsm \ + SessionStorage.jsm \ + XPathGenerator.jsm \ + $(NULL) + +EXTRA_PP_JS_MODULES := \ SessionStore.jsm \ $(NULL) -ifdef SS_EXTRA_PP_JS_MODULES -libs:: $(SS_EXTRA_PP_JS_MODULES) -ifndef NO_DIST_INSTALL - $(EXIT_ON_ERROR) \ - $(NSINSTALL) -D $(FINAL_TARGET)/modules/sessionstore; \ - for i in $^; do \ - dest=$(FINAL_TARGET)/modules/sessionstore/`basename $$i`; \ - $(RM) -f $$dest; \ - $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \ - done -endif -endif - include $(topsrcdir)/config/rules.mk diff --git a/config/rules.mk b/config/rules.mk index 640894f887d..7b6d425d1cd 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -1385,11 +1385,14 @@ libs:: endif ################################################################################ -# Copy each element of EXTRA_JS_MODULES to $(FINAL_TARGET)/modules +# Copy each element of EXTRA_JS_MODULES to JS_MODULES_PATH, or +# $(FINAL_TARGET)/modules if that isn't defined. +JS_MODULES_PATH ?= $(FINAL_TARGET)/modules + ifdef EXTRA_JS_MODULES libs:: $(EXTRA_JS_MODULES) ifndef NO_DIST_INSTALL - $(call install_cmd,$(IFLAGS1) $^ $(FINAL_TARGET)/modules) + $(call install_cmd,$(IFLAGS1) $^ $(JS_MODULES_PATH)) endif endif @@ -1398,9 +1401,9 @@ ifdef EXTRA_PP_JS_MODULES libs:: $(EXTRA_PP_JS_MODULES) ifndef NO_DIST_INSTALL $(EXIT_ON_ERROR) \ - $(NSINSTALL) -D $(FINAL_TARGET)/modules; \ + $(NSINSTALL) -D $(JS_MODULES_PATH); \ for i in $^; do \ - dest=$(FINAL_TARGET)/modules/`basename $$i`; \ + dest=$(JS_MODULES_PATH)/`basename $$i`; \ $(RM) -f $$dest; \ $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \ done diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index 640894f887d..7b6d425d1cd 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -1385,11 +1385,14 @@ libs:: endif ################################################################################ -# Copy each element of EXTRA_JS_MODULES to $(FINAL_TARGET)/modules +# Copy each element of EXTRA_JS_MODULES to JS_MODULES_PATH, or +# $(FINAL_TARGET)/modules if that isn't defined. +JS_MODULES_PATH ?= $(FINAL_TARGET)/modules + ifdef EXTRA_JS_MODULES libs:: $(EXTRA_JS_MODULES) ifndef NO_DIST_INSTALL - $(call install_cmd,$(IFLAGS1) $^ $(FINAL_TARGET)/modules) + $(call install_cmd,$(IFLAGS1) $^ $(JS_MODULES_PATH)) endif endif @@ -1398,9 +1401,9 @@ ifdef EXTRA_PP_JS_MODULES libs:: $(EXTRA_PP_JS_MODULES) ifndef NO_DIST_INSTALL $(EXIT_ON_ERROR) \ - $(NSINSTALL) -D $(FINAL_TARGET)/modules; \ + $(NSINSTALL) -D $(JS_MODULES_PATH); \ for i in $^; do \ - dest=$(FINAL_TARGET)/modules/`basename $$i`; \ + dest=$(JS_MODULES_PATH)/`basename $$i`; \ $(RM) -f $$dest; \ $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \ done