From 4ccdbe13cebe0ccbb5cf72dfa038cf1da6141f2f Mon Sep 17 00:00:00 2001 From: "edburns%acm.org" Date: Fri, 30 Jul 1999 22:04:08 +0000 Subject: [PATCH] Neither of these changes impact the SeaMonkey build. buildpkg.bat, outofdate.pl: Fixed so that java can build on win32. config.mak updated JAVA_ZIP macro. --- config/buildpkg.bat | 11 ++++--- config/config.mak | 14 +++++---- config/outofdate.pl | 71 +++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 83 insertions(+), 13 deletions(-) diff --git a/config/buildpkg.bat b/config/buildpkg.bat index d6d48c1e1707..33ab2abd1439 100644 --- a/config/buildpkg.bat +++ b/config/buildpkg.bat @@ -25,16 +25,15 @@ goto NO_CAFE if "%MOZ_CAFE%"=="" goto NO_CAFE -mkdir %MOZ_SRC%\ns\dist\classes\%2 -%MOZ_TOOLS%\bin\sj.exe -classpath %MOZ_SRC%\ns\dist\classes;%MOZ_SRC%\ns\sun-java\classsrc -d %MOZ_SRC%\ns\dist\classes *.java +mkdir %MOZ_SRC%\mozilla\dist\classes\%2 +%MOZ_TOOLS%\bin\sj.exe -classpath %MOZ_SRC%\mozilla\dist\classes;%MOZ_SRC%\mozilla\sun-java\classsrc -d %MOZ_SRC%\mozilla\dist\classes *.java goto END :NO_CAFE - -%MOZ_TOOLS%\perl5\perl.exe %MOZ_SRC%\ns\config\outofdate.pl -d %MOZ_SRC%\ns\dist\classes\%2 *.java >> %1 -%MOZ_TOOLS%\bin\java.exe -argfile %1 - +perl.exe %MOZ_SRC%\mozilla\config\outofdate.pl -d %MOZ_SRC%\mozilla\dist\classes\%2 -cfg %1 *.java > doit.bat +call doit.bat +del /F /A:A doit.bat :END diff --git a/config/config.mak b/config/config.mak index ae06150862bc..a8920a64c9dd 100644 --- a/config/config.mak +++ b/config/config.mak @@ -52,6 +52,10 @@ WINOS=$(WINOS: =)^ # need this everywhere jsapi.h might be included LCFLAGS=$(LCFLAGS) -DJS_THREADSAFE +!ifndef JAVA_HOME +JAVA_HOME=$(JDKHOME) +!endif + !if "$(STAND_ALONE_JAVA)" == "1" LCFLAGS=$(LCFLAGS) -DSTAND_ALONE_JAVA !endif @@ -315,16 +319,16 @@ PATH_SEPARATOR = ; # where the bytecode will go !if "$(AWT_11)" == "1" -JAVA_DESTPATH = $(DEPTH)\dist\classes11 +JAVA_DESTPATH = $(MOZ_SRC)\mozilla\dist\classes11 !else -JAVA_DESTPATH = $(DEPTH)\dist\classes +JAVA_DESTPATH = $(MOZ_SRC)\mozilla\dist\classes !endif # where the source are -DEFAULT_JAVA_SOURCEPATH = $(DEPTH)\sun-java\classsrc +DEFAULT_JAVA_SOURCEPATH = $(MOZ_SRC)\mozilla\sun-java\classsrc !ifndef JAVA_SOURCEPATH !if "$(AWT_11)" == "1" -JAVA_SOURCEPATH = $(DEPTH)\sun-java\classsrc11;$(DEFAULT_JAVA_SOURCEPATH) +JAVA_SOURCEPATH = $(MOZ_SRC)\mozilla\sun-java\classsrc11;$(DEFAULT_JAVA_SOURCEPATH) !else JAVA_SOURCEPATH = $(DEFAULT_JAVA_SOURCEPATH) !endif @@ -333,7 +337,7 @@ JAVA_SOURCEPATH = $(DEFAULT_JAVA_SOURCEPATH) JAVA_PROG=$(MOZ_TOOLS)\bin\java.exe #JAVA_PROG=$(DIST)\bin\java -JAVAC_ZIP=$(MOZ_TOOLS)/lib/javac.zip +JAVAC_ZIP=$(JAVA_HOME)\lib\classes.zip ZIP_PROG = $(MOZ_TOOLS)\bin\zip UNZIP_PROG = $(MOZ_TOOLS)\bin\unzip diff --git a/config/outofdate.pl b/config/outofdate.pl index fd4e86e06925..25313c3dce0b 100644 --- a/config/outofdate.pl +++ b/config/outofdate.pl @@ -26,15 +26,44 @@ $found = 1; +# GLOBALS +$SEP = 0; # the paltform independent path separator +$CFG = 0; # the value of the -cfg flag + +# determine the path separator +$_ = $ENV{"PATH"}; +if (m|/|) { + $SEP = "/"; +} +else { + $SEP = "\\"; +} + if ($ARGV[0] eq '-d') { $classdir = $ARGV[1]; - $classdir .= "/"; + $classdir .= $SEP; shift; shift; } else { - $classdir = "./"; + $classdir = "." . $SEP; } +# if -cfg is specified, print out the contents of the cfg file to stdout +if ($ARGV[0] eq '-cfg') { + $CFG = $ARGV[1]; + shift; + shift; +} + +$_ = $ARGV[0]; +if (m/\*.java/) { + # Account for the fact that the shell didn't expand *.java by doing it + # manually. + &manuallyExpandArgument("java"); +} + +$printFile = 0; + foreach $filename (@ARGV) { $classfilename = $classdir; $classfilename .= $filename; @@ -55,9 +84,47 @@ foreach $filename (@ARGV) { $ctime,$blksize,$blocks) = stat($classfilename); # print $filename, " ", $mtime, ", ", $classfilename, " ", $classmtime, "\n"; if ($mtime > $classmtime) { + + # Only print the file header if we actually have some files to + # compile. + if (!$printFile) { + $printFile = 1; + &printFile($CFG); + } print $filename, " "; $found = 0; } } print "\n"; + +# push onto $ARG array all filenames with extension $ext + +# @param ext the extension of the file + +sub manuallyExpandArgument { + local($ext) = @_; + $ext = "\." . $ext; # put it in regexp + + $result = opendir(DIR, "."); + + @allfiles = grep(/$ext/, readdir(DIR)); + $i = 0; + foreach $file (@allfiles) { + #skip emacs save files + $_ = $file; + if (!/~/) { + $ARGV[$i++] = $file; + } + } +} + +sub printFile { + local($file) = @_; + + $result = open(CFG, $file); + while () { + chop; + print $_; + } +}