Bug 1580359 - Port Bug 1496746 "Remove VPATH (add $(srcdir)/ where required)" and Bug 1580128 "Simplify required env variables for fuzzing interface" to SeaMonkey. r=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Wed, 11 Sep 2019 21:37:00 +0200
changeset 36780 9705d93a3345f930c3217c9db4be819df53dc7f7
parent 36779 a239c2a770ff0c2fc9b4aab5ea3cd7eee4a59995
child 36781 3971431fe094db61e268f93635f0db68a4d8a902
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewersfrg
bugs1580359, 1496746, 1580128
Bug 1580359 - Port Bug 1496746 "Remove VPATH (add $(srcdir)/ where required)" and Bug 1580128 "Simplify required env variables for fuzzing interface" to SeaMonkey. r=frg
suite/app/Makefile.in
suite/app/nsSuiteApp.cpp
suite/locales/Makefile.in
suite/themes/classic/Makefile.in
--- a/suite/app/Makefile.in
+++ b/suite/app/Makefile.in
@@ -27,17 +27,17 @@ CXX := $(filter-out -march=% -msse -msse
 CXX += -march=pentiumpro
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 # Rebuild seamonkey.exe if the manifest changes - it's included by splash.rc.
 # (this dependency should really be just for seamonkey.exe, not other targets)
 # Note the manifest file exists in the tree, so we use the explicit filename
 # here.
-EXTRA_DEPS += seamonkey.exe.manifest
+EXTRA_DEPS += $(srcdir)/seamonkey.exe.manifest
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(LICENSE_TXT_FILE)
 ifeq ($(OS_ARCH),WINNT)
 	$(EXIT_ON_ERROR) \
 	$(PERL) -pe 's/(?<!\r)\n/\r\n/g;' < $^ > $(DIST)/bin/license.txt
@@ -51,17 +51,17 @@ ifneq ($(OS_ARCH),WINNT)
 ifdef COMPILE_ENVIRONMENT
 libs::
 	cp -p $(DIST)/bin/$(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
 endif
 
 endif
 
 ifneq (,$(filter-out WINNT Darwin,$(OS_ARCH)))
-$(MOZ_APP_NAME).1: seamonkey.man.in $(GLOBAL_DEPS) $(DEPTH)/config/autoconf.mk
+$(MOZ_APP_NAME).1: $(srcdir)/seamonkey.man.in $(GLOBAL_DEPS) $(DEPTH)/config/autoconf.mk
 	@sed -e "s|\@bindir\@|$(bindir)|g" -e "s|\@mozappdir\@|$(mozappdir)|g" \
 		-e "s|\@MOZ_APP_DISPLAYNAME\@|$(MOZ_APP_DISPLAYNAME)|g" \
 		-e "s|\@MOZ_APP_NAME\@|$(MOZ_APP_NAME)|g" \
 		-e "s|\@MOZ_APP_VERSION\@|${MOZ_APP_VERSION}|g" < $< > $@
 
 libs:: $(MOZ_APP_NAME).1
 	$(INSTALL) $< $(DIST)/man/man1
 
--- a/suite/app/nsSuiteApp.cpp
+++ b/suite/app/nsSuiteApp.cpp
@@ -220,17 +220,17 @@ static int do_main(int argc, char* argv[
     return 255;
   }
 #endif
   config.sandboxBrokerServices = brokerServices;
   config.sandboxPermissionsService = permissionsService;
 #endif
 
 #ifdef LIBFUZZER
-  if (getenv("LIBFUZZER"))
+  if (getenv("FUZZER"))
     gBootstrap->XRE_LibFuzzerSetDriver(fuzzer::FuzzerDriver);
 #endif
 
   return gBootstrap->XRE_main(argc, argv, config);
 }
 
 static nsresult
 InitXPCOMGlue()
--- a/suite/locales/Makefile.in
+++ b/suite/locales/Makefile.in
@@ -89,30 +89,30 @@ searchplugins:: $(list-txt)
 PROFILE_CHROME = userChrome-example.css userContent-example.css
 
 NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD))
 
 BOOKMARKS_INC_FILE = $(call MERGE_FILE,profile/bookmarks.inc)
 BOOKMARKS_XTRA_FILE = $(call MERGE_FILE,profile/bookmarks.extra)
 
 # the #include in the .in file requires all to be in the same dir, sadly.
-%/defaults/profile/bookmarks.html: $(BOOKMARKS_INC_FILE) $(BOOKMARKS_XTRA_FILE) generic/profile/bookmarks.html.in
+$(FINAL_TARGET)/defaults/profile/bookmarks.html: $(BOOKMARKS_INC_FILE) $(BOOKMARKS_XTRA_FILE) $(srcdir)/generic/profile/bookmarks.html.in
 	$(SYSINSTALL) -D $(dir $@)
 	$(RM) -rf profile/*bookmarks*
 	$(NSINSTALL) -D profile
 	cp $^ profile/
 	$(call py_action,preprocessor, \
 	  -DAB_CD=$(NO_JA_JP_MAC_AB_CD) \
 	  profile/bookmarks.html.in \
 	  -o $@)
 
 PANELS_XTRA_FILE = $(call MERGE_FILE,profile/panels.extra)
 
 # the #include in the .in file requires all to be in the same dir, sadly.
-%/defaults/profile/panels.rdf: $(PANELS_XTRA_FILE) generic/profile/panels.rdf.in
+$(FINAL_TARGET)/defaults/profile/panels.rdf: $(PANELS_XTRA_FILE) $(srcdir)/generic/profile/panels.rdf.in
 	$(SYSINSTALL) -D $(dir $@)
 	$(RM) -rf profile/panels*
 	$(NSINSTALL) -D profile
 	cp $^ profile/
 	sed \
 	  -n 's/.*<RDF:Description about="\(.*\)">.*/        <RDF:li resource="\1"\/>/p' \
 	  profile/panels.extra > profile/panels-urn.inc
 	$(call py_action,preprocessor, \
--- a/suite/themes/classic/Makefile.in
+++ b/suite/themes/classic/Makefile.in
@@ -1,9 +1,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 CLASSIC_EXTENSION_DIR = {972ce4c6-7e08-4474-a285-3208198ce6fd}
 
-INSTALL_RDF = install.rdf
+INSTALL_RDF = $(srcdir)/install.rdf
 INSTALL_RDF_PATH = $(FINAL_TARGET)/extensions/$(CLASSIC_EXTENSION_DIR)
 PP_TARGETS += INSTALL_RDF