diff --git a/mozilla/config/make-jars.pl b/mozilla/config/make-jars.pl index b62d6ac5fb0..aef52810d9f 100644 --- a/mozilla/config/make-jars.pl +++ b/mozilla/config/make-jars.pl @@ -1,6 +1,6 @@ #!/perl -# make-jars [-f] [-v] [-l] [-x] [-d ] [-s ] [-z zipprog] [-o operating-system] < +# make-jars [-f] [-v] [-l] [-x] [-d ] [-s ] [-t ] [-z zipprog] [-o operating-system] < my $cygwin_mountprefix = ""; if ($^O eq "cygwin") { @@ -48,13 +48,18 @@ foreach my $arg (@ARGV) { } my $defines = join(' ', @ARGV[ $ddindex .. $#ARGV ]); -getopts("d:s:f:avlD:o:p:xz:"); +getopts("d:s:t:f:avlD:o:p:xz:"); my $baseFilesDir = "."; if (defined($::opt_s)) { $baseFilesDir = $::opt_s; } +my $topSrcDir; +if (defined($::opt_t)) { + $topSrcDir = $::opt_t; +} + my $maxCmdline = 4000; if ($Config{'archname'} =~ /VMS/) { $maxCmdline = 200; @@ -360,7 +365,10 @@ sub EnsureFileInDir my $src = $srcFile; if (defined($src)) { - if (! -e $src ) { + if ($src =~ m|^/|) { + # "absolute" patch from topSrcDir + $src = $topSrcDir.$srcFile; + } elsif (! -e $src ) { $src = "$srcPath/$srcFile"; } } diff --git a/mozilla/config/rules.mk b/mozilla/config/rules.mk index e0cdee3a24a..9f9403fa1dc 100644 --- a/mozilla/config/rules.mk +++ b/mozilla/config/rules.mk @@ -1511,7 +1511,7 @@ ifndef NO_DIST_INSTALL $(if $(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT)),-x) \ $(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(_NO_FLOCK) $(_JAR_AUTO_REG) \ -f $(MOZ_CHROME_FILE_FORMAT) -d $(DIST)/bin/chrome \ - -s $(srcdir) -z $(ZIP) -p $(MOZILLA_DIR)/config/preprocessor.pl -- \ + -s $(srcdir) -t $(topsrcdir) -z $(ZIP) -p $(MOZILLA_DIR)/config/preprocessor.pl -- \ "$(DEFINES) $(ACDEFINES)"; \ $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-chromelist.pl \ $(DIST)/bin/chrome $(JAR_MANIFEST) $(_NO_FLOCK); \ @@ -1528,7 +1528,7 @@ ifndef NO_INSTALL $(if $(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT)),-x) \ $(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(_NO_FLOCK) $(_JAR_AUTO_REG) \ -f $(MOZ_CHROME_FILE_FORMAT) -d $(DESTDIR)$(mozappdir)/chrome \ - -s $(srcdir) -z $(ZIP) -p $(MOZILLA_DIR)/config/preprocessor.pl -- \ + -s $(srcdir) -t $(topsrcdir) -z $(ZIP) -p $(MOZILLA_DIR)/config/preprocessor.pl -- \ "$(DEFINES) $(ACDEFINES)"; \ $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-chromelist.pl \ $(DESTDIR)$(mozappdir)/chrome $(JAR_MANIFEST) $(_NO_FLOCK); \