From 4ee6822c1d94adf8aba66fcc41a56047ff73cbd9 Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Sat, 2 Oct 2004 01:39:39 +0000 Subject: [PATCH] Merge topsrcdir-relative (absolute) paths in jar.mn files from the aviary branch, to facilitate un-forking parts of xpfe/global git-svn-id: svn://10.0.0.236/trunk@163135 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/config/make-jars.pl | 14 +++++++++++--- mozilla/config/rules.mk | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) 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); \