diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-05-05 12:31:43 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-05-05 12:31:43 +0000 |
commit | c1094b4539e13e528ab5fc43705d9a32b37d1da9 (patch) | |
tree | 5cf53037696918d5602d5529ef397bd4d3ddbedc | |
parent | f129a789c105c7ff2e51db559b51672fd36e511a (diff) | |
download | nss-hg-c1094b4539e13e528ab5fc43705d9a32b37d1da9.tar.gz |
Bug 1629553 Drop coreconf java support r=rrelyea
There aren't an Java sources in NSS, so just drop all the stuff
referencing java, jars, jni, etc.
I didn't try to remove it from tests.
Differential Revision: https://phabricator.services.mozilla.com/D70986
-rw-r--r-- | coreconf/OpenUNIX.mk | 3 | ||||
-rw-r--r-- | coreconf/README | 18 | ||||
-rw-r--r-- | coreconf/SCO_SV3.2.mk | 3 | ||||
-rw-r--r-- | coreconf/config.mk | 8 | ||||
-rwxr-xr-x | coreconf/cpdist.pl | 167 | ||||
-rwxr-xr-x | coreconf/import.pl | 189 | ||||
-rw-r--r-- | coreconf/jdk.mk | 504 | ||||
-rwxr-xr-x | coreconf/jniregen.pl | 79 | ||||
-rw-r--r-- | coreconf/module.mk | 4 | ||||
-rwxr-xr-x | coreconf/outofdate.pl | 39 | ||||
-rwxr-xr-x | coreconf/release.pl | 112 | ||||
-rw-r--r-- | coreconf/rules.mk | 385 | ||||
-rw-r--r-- | coreconf/ruleset.mk | 71 | ||||
-rw-r--r-- | coreconf/source.mk | 34 | ||||
-rw-r--r-- | coreconf/version.mk | 4 |
15 files changed, 7 insertions, 1613 deletions
diff --git a/coreconf/OpenUNIX.mk b/coreconf/OpenUNIX.mk index 209ca410e..1afc80ac7 100644 --- a/coreconf/OpenUNIX.mk +++ b/coreconf/OpenUNIX.mk @@ -55,6 +55,3 @@ PROCESS_MAP_FILE = cp $< $@ BUILD_UNIX_PLUGINS = 1 #DSO_LDOPTS += -b elf -G -z defs DSO_LDOPTS += -G - -# Used for Java compiler -EXPORT_FLAGS += -W l,-Bexport diff --git a/coreconf/README b/coreconf/README index d17e64b50..50d364c55 100644 --- a/coreconf/README +++ b/coreconf/README @@ -337,12 +337,6 @@ OVERVIEW of "rules.mk": clobber_all:: synonym for "realclean::" rule - IMPORT - ------ - import:: uses perl script to retrieve specified - VERSION of the binary release from - $(RELEASE_TREE) - RELEASE ------- release_clean:: remove all files from the @@ -364,18 +358,6 @@ OVERVIEW of "rules.mk": $(SOURCE_RELEASE_PREFIX)/ $(SOURCE_RELEASE_BIN_DIR) directory - release_jars:: use perl script to package appropriate - files in the $(XPCLASS_JAR), - $(XPHEADER_JAR), $(MDHEADER_JAR), and - $(MDBINARY_JAR) jar files - - release_cpdistdir:: use perl script to copy the - $(XPCLASS_JAR), $(XPHEADER_JAR), - $(MDHEADER_JAR), and $(MDBINARY_JAR) - jar files to the specified VERSION - of the $(RELEASE_TREE) directory - - TOOLS and AUTOMATION -------------------- diff --git a/coreconf/SCO_SV3.2.mk b/coreconf/SCO_SV3.2.mk index e0b9fe856..813603f26 100644 --- a/coreconf/SCO_SV3.2.mk +++ b/coreconf/SCO_SV3.2.mk @@ -55,6 +55,3 @@ PROCESS_MAP_FILE = cp $< $@ BUILD_UNIX_PLUGINS = 1 #DSO_LDOPTS += -b elf -G -z defs DSO_LDOPTS += -b elf -G - -# Used for Java compiler -EXPORT_FLAGS += -W l,-Bexport diff --git a/coreconf/config.mk b/coreconf/config.mk index ac99f1024..311589e5d 100644 --- a/coreconf/config.mk +++ b/coreconf/config.mk @@ -122,14 +122,6 @@ include $(CORE_DEPTH)/coreconf/suffix.mk endif ####################################################################### -# [13.0] Master "Core Components" for defining JDK # -# (dependent upon <architecture>, <source>, and <suffix> tags)# -####################################################################### -ifdef NS_USE_JDK -include $(CORE_DEPTH)/coreconf/jdk.mk -endif - -####################################################################### # [14.0] Master "Core Components" rule set # ####################################################################### ifndef MK_RULESET diff --git a/coreconf/cpdist.pl b/coreconf/cpdist.pl deleted file mode 100755 index 800edfb46..000000000 --- a/coreconf/cpdist.pl +++ /dev/null @@ -1,167 +0,0 @@ -#! /usr/local/bin/perl -# -# 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/. -require('coreconf.pl'); - -#######-- read in variables on command line into %var - -&parse_argv; - -### do the copy - -print STDERR "RELEASE TREE / MODULE = $var{RELEASE_TREE} $var{MODULE}\n"; - - - -# 1 -if ($var{RELEASE} eq "") { exit; } # Can't do release here, so exit. - -# 2 -#if (! ($var{RELEASE} =~ /\//)) { # if no specific version is specified in RELEASE variable -# $component = $var{RELEASE}; -#} -#else { # if a subcomponent/version is given in the RELEASE variable -# $var{RELEASE} =~ m|^([^/]*)/|; -# $component = $1; # everything before the first slash; -# } - -# 3 -$path = $var{RELEASE}; - - -# 4 -# find out what directory we would create for 'today' - -$year = (localtime)[5] + 1900; -$month = (localtime)[4] + 1; -$day = (localtime)[3]; -$today = sprintf( "%d%02d%02d", $year, $month, $day ); - -# 5 -# if version is null, then set the version to today. -if ($var{"RELEASE_VERSION"} eq "") { - $var{"RELEASE_VERSION"} = $today; -} - -#6 -$version = $var{"RELEASE_VERSION"}; # set RELEASE_VERSION to passed in variable - -#7 -# if version is today, then we will want to make a 'current' link. - -if ($version eq $today) { - $create_current = 1; -} - -#8 -# version can be a) passed in value from command line, b) value in manifest.mn -# or c) computed value such as '19970909' - - -$dir = "$var{'RELEASE_TREE'}/$path"; - -#9 -if (! (-e "$dir/$version" && -d "$dir/$version")) { - print "making dir $dir \n"; - &rec_mkdir("$dir/$version"); -} - - - -print "version = $version\n"; -print "path = $path\n"; -print "var{release_tree} = $var{'RELEASE_TREE'}\n"; -print "dir = $dir = RELEASE_TREE/path\n"; - - -#10 -if ($create_current == 1) { - -# unlinking and linking always occurs, even if the link is correct - print "unlinking $dir/current\n"; - unlink("$dir/current"); - - print "putting version number $today into 'current' file.."; - - open(FILE,">$dir/current") || die " couldn't open current\n"; - print FILE "$today\n"; - close(FILE); - print " ..done\n" - -} - -&rec_mkdir("$dir/$version/$var{'RELEASE_MD_DIR'}"); -&rec_mkdir("$dir/$version/$var{'RELEASE_XP_DIR'}"); - - - - -foreach $jarfile (split(/ /,$var{FILES}) ) { - print STDERR "---------------------------------------------\n"; - - $jarinfo = $var{$jarfile}; - - ($jardir,$jaropts) = split(/\|/,$jarinfo); - - if ($jaropts =~ /f/) { - print STDERR "Copying files $jardir....\n"; - } - else { - print STDERR "Copying jar file $jarfile....\n"; - } - - print "jaropts = $jaropts\n"; - - if ($jaropts =~ /m/) { - $destdir = $var{"RELEASE_MD_DIR"}; - print "found m, using MD dir $destdir\n"; - } - elsif ($jaropts =~ /x/) { - $destdir = $var{"RELEASE_XP_DIR"}; - print "found x, using XP dir $destdir\n"; - } - else { - die "Error: must specify m or x in jar options in $jarinfo line\n"; - } - - - $distdir = "$dir/$version/$destdir"; - - - - if ($jaropts =~ /f/) { - - print "splitting: \"$jardir\"\n"; - for $srcfile (split(/ /,$jardir)) { - -#if srcfile has a slash - if ($srcfile =~ m|/|) { -#pull out everything before the last slash into $1 - $srcfile =~ m|(.*)/|; - $distsubdir = "/$1"; - print "making dir $distdir$distsubdir\n"; - &rec_mkdir("$distdir$distsubdir"); - } - print "copy: from $srcfile\n"; - print " to $distdir$distsubdir\n"; - $srcprefix = ""; - if ($jaropts =~/m/) { - $srcprefix = "$var{'PLATFORM'}/"; - } - system("cp $srcprefix$srcfile $distdir$distsubdir"); - } - } - else { - $srcfile = "$var{SOURCE_RELEASE_PREFIX}/$jardir/$jarfile"; - - print "copy: from $srcfile\n"; - print " to $distdir\n"; - - system("cp $srcfile $distdir"); - - } - - } - diff --git a/coreconf/import.pl b/coreconf/import.pl deleted file mode 100755 index dd2d177f6..000000000 --- a/coreconf/import.pl +++ /dev/null @@ -1,189 +0,0 @@ -#! /usr/local/bin/perl -# -# 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/. - -print STDERR "import.pl\n"; - -require('coreconf.pl'); - - -$returncode =0; - - -#######-- read in variables on command line into %var - -$var{UNZIP} = "unzip -o"; - -&parse_argv; - -if (! ($var{IMPORTS} =~ /\w/)) { - print STDERR "nothing to import\n"; -} - -######-- Do the import! - -foreach $import (split(/ /,$var{IMPORTS}) ) { - - print STDERR "\n\nIMPORTING .... $import\n-----------------------------\n"; - - -# if a specific version specified in IMPORT variable -# (if $import has a slash in it) - - if ($import =~ /\//) { - # $component=everything before the first slash of $import - - $import =~ m|^([^/]*)/|; - $component = $1; - - $import =~ m|^(.*)/([^/]*)$|; - - # $path=everything before the last slash of $import - $path = $1; - - # $version=everything after the last slash of $import - $version = $2; - - if ($var{VERSION} ne "current") { - $version = $var{VERSION}; - } - } - else { - $component = $import; - $path = $import; - $version = $var{VERSION}; - } - - $releasejardir = "$var{RELEASE_TREE}/$path"; - if ($version eq "current") { - print STDERR "Current version specified. Reading 'current' file ... \n"; - - open(CURRENT,"$releasejardir/current") || die "NO CURRENT FILE\n"; - $version = <CURRENT>; - $version =~ s/(\r?\n)*$//; # remove any trailing [CR/]LF's - close(CURRENT); - print STDERR "Using version $version\n"; - if ( $version eq "") { - die "Current version file empty. Stopping\n"; - } - } - - $releasejardir = "$releasejardir/$version"; - if ( ! -d $releasejardir) { - die "$releasejardir doesn't exist (Invalid Version?)\n"; - } - foreach $jarfile (split(/ /,$var{FILES})) { - - ($relpath,$distpath,$options) = split(/\|/, $var{$jarfile}); - - if ($var{'OVERRIDE_IMPORT_CHECK'} eq 'YES') { - $options =~ s/v//g; - } - - if ( $relpath ne "") { $releasejarpathname = "$releasejardir/$relpath";} - else { $releasejarpathname = $releasejardir; } - -# If a component doesn't have IDG versions, import the DBG ones - if( ! -e "$releasejarpathname/$jarfile" ) { - if( $relpath =~ /IDG\.OBJ$/ ) { - $relpath =~ s/IDG.OBJ/DBG.OBJ/; - $releasejarpathname = "$releasejardir/$relpath"; - } elsif( $relpath =~ /IDG\.OBJD$/ ) { - $relpath =~ s/IDG.OBJD/DBG.OBJD/; - $releasejarpathname = "$releasejardir/$relpath"; - } - } - - if (-e "$releasejarpathname/$jarfile") { - print STDERR "\nWorking on jarfile: $jarfile\n"; - - if ($distpath =~ m|/$|) { - $distpathname = "$distpath$component"; - } - else { - $distpathname = "$distpath"; - } - - -#the block below is used to determine whether or not the xp headers have -#already been imported for this component - - $doimport = 1; - if ($options =~ /v/) { # if we should check the imported version - print STDERR "Checking if version file exists $distpathname/version\n"; - if (-e "$distpathname/version") { - open( VFILE, "<$distpathname/version") || - die "Cannot open $distpathname/version for reading. Permissions?\n"; - $importversion = <VFILE>; - close (VFILE); - $importversion =~ s/\r?\n$//; # Strip off any trailing CR/LF - if ($version eq $importversion) { - print STDERR "$distpathname version '$importversion' already imported. Skipping...\n"; - $doimport =0; - } - } - } - - if ($doimport == 1) { - if (! -d "$distpathname") { - &rec_mkdir("$distpathname"); - } - # delete the stuff in there already. - # (this should really be recursive delete.) - - if ($options =~ /v/) { - $remheader = "\nREMOVING files in '$distpathname/' :"; - opendir(DIR,"$distpathname") || - die ("Cannot read directory $distpathname\n"); - @filelist = readdir(DIR); - closedir(DIR); - foreach $file ( @filelist ) { - if (! ($file =~ m!/.?.$!) ) { - if (! (-d $file)) { - $file =~ m!([^/]*)$!; - print STDERR "$remheader $1"; - $remheader = " "; - unlink "$distpathname/$file"; - } - } - } - } - - - print STDERR "\n\n"; - - print STDERR "\nExtracting jarfile '$jarfile' to local directory $distpathname/\n"; - - print STDERR "$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname\n"; - system("$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname"); - - $r = $?; - - if ($options =~ /v/) { - if ($r == 0) { - unlink ("$distpathname/version"); - if (open(VFILE,">$distpathname/version")) { - print VFILE "$version\n"; - close(VFILE); - } - } - else { - print STDERR "Could not create '$distpathname/version'. Permissions?\n"; - $returncode ++; - } - } - } # if (doimport) - } # if (-e releasejarpathname/jarfile) - } # foreach jarfile) -} # foreach IMPORT - - - -exit($returncode); - - - - - diff --git a/coreconf/jdk.mk b/coreconf/jdk.mk deleted file mode 100644 index 92eb0e6f3..000000000 --- a/coreconf/jdk.mk +++ /dev/null @@ -1,504 +0,0 @@ -# -# 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/. - -ifdef NS_USE_JDK -####################################################################### -# [1] Define preliminary JDK "Core Components" toolset options # -####################################################################### - -# set default JDK java threading model -ifeq ($(JDK_THREADING_MODEL),) - JDK_THREADING_MODEL = native_threads -# no such thing as -native flag - JDK_THREADING_MODEL_OPT = -endif - -####################################################################### -# [2] Define platform-independent JDK "Core Components" options # -####################################################################### - -# set default location of the java classes repository -ifeq ($(JAVA_DESTPATH),) -ifdef BUILD_OPT - JAVA_DESTPATH = $(SOURCE_CLASSES_DIR) -else - JAVA_DESTPATH = $(SOURCE_CLASSES_DBG_DIR) -endif -endif - -# set default location of the package under the java classes repository -# note that this overrides the default package value in ruleset.mk -ifeq ($(PACKAGE),) - PACKAGE = . -endif - -# set default location of the java source code repository -ifeq ($(JAVA_SOURCEPATH),) - JAVA_SOURCEPATH = . -endif - -# add JNI directory to default include search path -ifneq ($(JNI_GEN),) - ifdef NSBUILDROOT - INCLUDES += -I$(JNI_GEN_DIR) -I$(SOURCE_XP_DIR) - else - INCLUDES += -I$(JNI_GEN_DIR) - endif -endif - -####################################################################### -# [3] Define platform-dependent JDK "Core Components" options # -####################################################################### - -# set [Microsoft Windows] platforms -ifeq ($(OS_ARCH), WINNT) - JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar - - ifeq ($(JRE_HOME),) - JRE_HOME = $(JAVA_HOME) - JRE_CLASSES = $(JAVA_CLASSES) - else - ifeq ($(JRE_CLASSES),) - JRE_CLASSES = $(JRE_HOME)/lib/rt.jar - endif - endif - - PATH_SEPARATOR = ; - - # (2) specify "header" information - JAVA_ARCH = win32 - - INCLUDES += -I$(JAVA_HOME)/include - INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) - - # currently, disable JIT option on this platform - JDK_JIT_OPT = -nojit -endif - -# set [Sun Solaris] platforms -ifeq ($(OS_ARCH), SunOS) - JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar - - ifeq ($(JRE_HOME),) - JRE_HOME = $(JAVA_HOME) - JRE_CLASSES = $(JAVA_CLASSES) - else - ifeq ($(JRE_CLASSES),) - JRE_CLASSES = $(JRE_HOME)/lib/rt.jar - endif - endif - - PATH_SEPARATOR = : - - # (2) specify "header" information - JAVA_ARCH = solaris - - INCLUDES += -I$(JAVA_HOME)/include - INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) - - # currently, disable JIT option on this platform - JDK_JIT_OPT = -endif - -# set [Hewlett Packard HP-UX] platforms -ifeq ($(OS_ARCH), HP-UX) - JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar - - ifeq ($(JRE_HOME),) - JRE_HOME = $(JAVA_HOME) - JRE_CLASSES = $(JAVA_CLASSES) - else - ifeq ($(JRE_CLASSES),) - JRE_CLASSES = $(JRE_HOME)/lib/rt.jar - endif - endif - - PATH_SEPARATOR = : - - # (2) specify "header" information - JAVA_ARCH = hp-ux - - INCLUDES += -I$(JAVA_HOME)/include - INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) - - # no JIT option available on this platform - JDK_JIT_OPT = -endif - -# set [Redhat Linux] platforms -ifeq ($(OS_ARCH), Linux) - JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar - - ifeq ($(JRE_HOME),) - JRE_HOME = $(JAVA_HOME) - JRE_CLASSES = $(JAVA_CLASSES) - else - ifeq ($(JRE_CLASSES),) - JRE_CLASSES = $(JRE_HOME)/lib/rt.jar - endif - endif - - PATH_SEPARATOR = : - - # (2) specify "header" information - JAVA_ARCH = linux - - INCLUDES += -I$(JAVA_HOME)/include - INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) - - # no JIT option available on this platform - JDK_JIT_OPT = -endif - -# set [Mac OS X] platforms -ifeq ($(OS_ARCH), Darwin) - JAVA_CLASSES = $(JAVA_HOME)/../Classes/classes.jar - - ifeq ($(JRE_HOME),) - JRE_HOME = $(JAVA_HOME) - JRE_CLASSES = $(JAVA_CLASSES) - else - ifeq ($(JRE_CLASSES),) - JRE_CLASSES = $(JRE_HOME)/../Classes/classes.jar - endif - endif - - PATH_SEPARATOR = : - - # (2) specify "header" information - JAVA_ARCH = darwin - - INCLUDES += -I$(JAVA_HOME)/include - INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) - - # no JIT option available on this platform - JDK_JIT_OPT = -endif - -# set [IBM AIX] platforms -ifeq ($(OS_ARCH), AIX) - JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar - - ifeq ($(JRE_HOME),) - JRE_HOME = $(JAVA_HOME) - JRE_CLASSES = $(JAVA_CLASSES) - else - ifeq ($(JRE_CLASSES),) - JRE_CLASSES = $(JRE_HOME)/lib/rt.jar - endif - endif - - PATH_SEPARATOR = : - - # (2) specify "header" information - JAVA_ARCH = aix - - INCLUDES += -I$(JAVA_HOME)/include - INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) - - # no JIT option available on this platform - JDK_JIT_OPT = -endif - -# set [Digital UNIX] platforms -ifeq ($(OS_ARCH), OSF1) - JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar - - ifeq ($(JRE_HOME),) - JRE_HOME = $(JAVA_HOME) - JRE_CLASSES = $(JAVA_CLASSES) - else - ifeq ($(JRE_CLASSES),) - JRE_CLASSES = $(JRE_HOME)/lib/rt.jar - endif - endif - - PATH_SEPARATOR = : - - # (2) specify "header" information - JAVA_ARCH = alpha - - INCLUDES += -I$(JAVA_HOME)/include - INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) - - # no JIT option available on this platform - JDK_JIT_OPT = -endif - -# set [Silicon Graphics IRIX] platforms -ifeq ($(OS_ARCH), IRIX) - JAVA_CLASSES = $(JAVA_HOME)/lib/dev.jar:$(JAVA_HOME)/lib/rt.jar - - ifeq ($(JRE_HOME),) - JRE_HOME = $(JAVA_HOME) - JRE_CLASSES = $(JAVA_CLASSES) - else - ifeq ($(JRE_CLASSES),) - JRE_CLASSES = $(JRE_HOME)/lib/dev.jar:$(JRE_HOME)/lib/rt.jar - endif - endif - - PATH_SEPARATOR = : - - # (2) specify "header" information - JAVA_ARCH = irix - - INCLUDES += -I$(JAVA_HOME)/include - INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) - - # no JIT option available on this platform - JDK_JIT_OPT = -endif - -####################################################################### -# [4] Define remaining JDK "Core Components" default toolset options # -####################################################################### - -# set JDK optimization model -ifeq ($(BUILD_OPT),1) - JDK_OPTIMIZER_OPT = -O -else - JDK_OPTIMIZER_OPT = -g -endif - -# set minimal JDK debugging model -ifeq ($(JDK_DEBUG),1) - JDK_DEBUG_OPT = -debug -else - JDK_DEBUG_OPT = -endif - -# set default path to repository for JDK classes -ifeq ($(JDK_CLASS_REPOSITORY_OPT),) - JDK_CLASS_REPOSITORY_OPT = -d $(JAVA_DESTPATH) -endif - -# define a default JDK classpath -ifeq ($(JDK_CLASSPATH),) - JDK_CLASSPATH = '$(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)$(PATH_SEPARATOR)$(JAVA_CLASSES)' -endif - -# by default, override CLASSPATH environment variable using the JDK classpath option with $(JDK_CLASSPATH) -ifeq ($(JDK_CLASSPATH_OPT),) - JDK_CLASSPATH_OPT = -classpath $(JDK_CLASSPATH) -endif - -ifeq ($(USE_64), 1) - JDK_USE_64 = -d64 -endif - -endif - - -####################################################################### -# [5] Define JDK "Core Components" toolset; # -# (always allow a user to override these values) # -####################################################################### - -# -# (1) appletviewer -# - -ifeq ($(APPLETVIEWER),) - APPLETVIEWER_PROG = $(JAVA_HOME)/bin/appletviewer$(PROG_SUFFIX) - APPLETVIEWER_FLAGS = $(JDK_THREADING_MODEL_OPT) - APPLETVIEWER_FLAGS += $(JDK_DEBUG_OPT) - APPLETVIEWER_FLAGS += $(JDK_JIT_OPT) - APPLETVIEWER = $(APPLETVIEWER_PROG) $(APPLETVIEWER_FLAGS) -endif - -# -# (2) jar -# - -ifeq ($(JAR),) - JAR_PROG = $(JAVA_HOME)/bin/jar$(PROG_SUFFIX) - JAR_FLAGS = $(JDK_THREADING_MODEL_OPT) - JAR = $(JAR_PROG) $(JAR_FLAGS) -endif - -# -# (3) java -# - -ifeq ($(JAVA),) - JAVA_PROG = $(JAVA_HOME)/bin/java$(PROG_SUFFIX) - JAVA_FLAGS = $(JDK_THREADING_MODEL_OPT) - JAVA_FLAGS += $(JDK_DEBUG_OPT) - JAVA_FLAGS += $(JDK_CLASSPATH_OPT) - JAVA_FLAGS += $(JDK_JIT_OPT) - JAVA_FLAGS += $(JDK_USE_64) - JAVA = $(JAVA_PROG) $(JAVA_FLAGS) -endif - -# -# (4) javac -# - -ifeq ($(JAVAC),) - JAVAC_PROG = $(JAVA_HOME)/bin/javac$(PROG_SUFFIX) - JAVAC_FLAGS = $(JDK_THREADING_MODEL_OPT) - JAVAC_FLAGS += $(JDK_OPTIMIZER_OPT) - JAVAC_FLAGS += $(JDK_DEBUG_OPT) - JAVAC_FLAGS += $(JDK_CLASSPATH_OPT) - JAVAC_FLAGS += $(JDK_CLASS_REPOSITORY_OPT) - JAVAC_FLAGS += $(JDK_USE_64) - JAVAC = $(JAVAC_PROG) $(JAVAC_FLAGS) -endif - -# -# (5) javadoc -# - -ifeq ($(JAVADOC),) - JAVADOC_PROG = $(JAVA_HOME)/bin/javadoc$(PROG_SUFFIX) - JAVADOC_FLAGS = $(JDK_THREADING_MODEL_OPT) - JAVADOC_FLAGS += $(JDK_CLASSPATH_OPT) - JAVADOC = $(JAVADOC_PROG) $(JAVADOC_FLAGS) -endif - -# -# (6) javah -# - -ifeq ($(JAVAH),) - JAVAH_PROG = $(JAVA_HOME)/bin/javah$(PROG_SUFFIX) - JAVAH_FLAGS = $(JDK_THREADING_MODEL_OPT) - JAVAH_FLAGS += $(JDK_CLASSPATH_OPT) - JAVAH = $(JAVAH_PROG) $(JAVAH_FLAGS) -endif - -# -# (7) javakey -# - -ifeq ($(JAVAKEY),) - JAVAKEY_PROG = $(JAVA_HOME)/bin/javakey$(PROG_SUFFIX) - JAVAKEY_FLAGS = $(JDK_THREADING_MODEL_OPT) - JAVAKEY = $(JAVAKEY_PROG) $(JAVAKEY_FLAGS) -endif - -# -# (8) javap -# - -ifeq ($(JAVAP),) - JAVAP_PROG = $(JAVA_HOME)/bin/javap$(PROG_SUFFIX) - JAVAP_FLAGS = $(JDK_THREADING_MODEL_OPT) - JAVAP_FLAGS += $(JDK_CLASSPATH_OPT) - JAVAP = $(JAVAP_PROG) $(JAVAP_FLAGS) -endif - -# -# (9) javat -# - -ifeq ($(JAVAT),) - JAVAT_PROG = $(JAVA_HOME)/bin/javat$(PROG_SUFFIX) - JAVAT_FLAGS = $(JDK_THREADING_MODEL_OPT) - JAVAT = $(JAVAT_PROG) $(JAVAT_FLAGS) -endif - -# -# (10) javaverify -# - -ifeq ($(JAVAVERIFY),) - JAVAVERIFY_PROG = $(JAVA_HOME)/bin/javaverify$(PROG_SUFFIX) - JAVAVERIFY_FLAGS = $(JDK_THREADING_MODEL_OPT) - JAVAVERIFY = $(JAVAVERIFY_PROG) $(JAVAVERIFY_FLAGS) -endif - -# -# (11) javaw -# - -ifeq ($(JAVAW),) - jJAVAW_PROG = $(JAVA_HOME)/bin/javaw$(PROG_SUFFIX) - jJAVAW_FLAGS = $(JDK_THREADING_MODEL_OPT) - jJAVAW_FLAGS += $(JDK_DEBUG_OPT) - jJAVAW_FLAGS += $(JDK_CLASSPATH_OPT) - jJAVAW_FLAGS += $(JDK_JIT_OPT) - jJAVAW = $(JAVAW_PROG) $(JAVAW_FLAGS) -endif - -# -# (12) jdb -# - -ifeq ($(JDB),) - JDB_PROG = $(JAVA_HOME)/bin/jdb$(PROG_SUFFIX) - JDB_FLAGS = $(JDK_THREADING_MODEL_OPT) - JDB_FLAGS += $(JDK_DEBUG_OPT) - JDB_FLAGS += $(JDK_CLASSPATH_OPT) - JDB_FLAGS += $(JDK_JIT_OPT) - JDB = $(JDB_PROG) $(JDB_FLAGS) -endif - -# -# (13) jre -# - -ifeq ($(JRE),) - JRE_PROG = $(JAVA_HOME)/bin/jre$(PROG_SUFFIX) - JRE_FLAGS = $(JDK_THREADING_MODEL_OPT) - JRE_FLAGS += $(JDK_CLASSPATH_OPT) - JRE_FLAGS += $(JDK_JIT_OPT) - JRE = $(JRE_PROG) $(JRE_FLAGS) -endif - -# -# (14) jrew -# - -ifeq ($(JREW),) - JREW_PROG = $(JAVA_HOME)/bin/jrew$(PROG_SUFFIX) - JREW_FLAGS = $(JDK_THREADING_MODEL_OPT) - JREW_FLAGS += $(JDK_CLASSPATH_OPT) - JREW_FLAGS += $(JDK_JIT_OPT) - JREW = $(JREW_PROG) $(JREW_FLAGS) -endif - -# -# (15) native2ascii -# - -ifeq ($(NATIVE2ASCII),) - NATIVE2ASCII_PROG = $(JAVA_HOME)/bin/native2ascii$(PROG_SUFFIX) - NATIVE2ASCII_FLAGS = $(JDK_THREADING_MODEL_OPT) - NATIVE2ASCII = $(NATIVE2ASCII_PROG) $(NATIVE2ASCII_FLAGS) -endif - -# -# (16) rmic -# - -ifeq ($(RMIC),) - RMIC_PROG = $(JAVA_HOME)/bin/rmic$(PROG_SUFFIX) - RMIC_FLAGS = $(JDK_THREADING_MODEL_OPT) - RMIC_FLAGS += $(JDK_OPTIMIZER_OPT) - RMIC_FLAGS += $(JDK_CLASSPATH_OPT) - RMIC = $(RMIC_PROG) $(RMIC_FLAGS) -endif - -# -# (17) rmiregistry -# - -ifeq ($(RMIREGISTRY),) - RMIREGISTRY_PROG = $(JAVA_HOME)/bin/rmiregistry$(PROG_SUFFIX) - RMIREGISTRY_FLAGS = $(JDK_THREADING_MODEL_OPT) - RMIREGISTRY = $(RMIREGISTRY_PROG) $(RMIREGISTRY_FLAGS) -endif - -# -# (18) serialver -# - -ifeq ($(SERIALVER),) - SERIALVER_PROG = $(JAVA_HOME)/bin/serialver$(PROG_SUFFIX) - SERIALVER_FLAGS = $(JDK_THREADING_MODEL_OPT) - SERIALVER = $(SERIALVER_PROG) $(SERIALVER_FLAGS) -endif diff --git a/coreconf/jniregen.pl b/coreconf/jniregen.pl deleted file mode 100755 index 203918054..000000000 --- a/coreconf/jniregen.pl +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/local/bin/perl -# -# 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/. - -# Input: -d dir -j javahcmd foo1 foo2 . . . -# Compares generated "_jni/foo1.h" file with "foo1.class", and -# generated "_jni/foo2.h" file with "foo2.class", etc. -# (NOTE: unlike its closely related cousin, outofdate.pl, -# the "-d dir" must always be specified) -# Runs the javahcmd on all files that are different. -# -# Returns: list of headers which are OLDER than corresponding class -# files (non-existent class files are considered to be real old :-) - -my $javah = ""; -my $classdir = ""; - -while(1) { - if ($ARGV[0] eq '-d') { - $classdir = $ARGV[1]; - $classdir .= "/"; - shift; - shift; - } elsif($ARGV[0] eq '-j') { - $javah = $ARGV[1]; - shift; - shift; - } else { - last; - } -} - -if( $javah eq "") { - die "Must specify -j <javah command>"; -} -if( $classdir eq "") { - die "Must specify -d <classdir>"; -} - -foreach $filename (@ARGV) -{ - $headerfilename = "_jni/"; - $headerfilename .= $filename; - $headerfilename =~ s/\./_/g; - $headerfilename .= ".h"; - - $classfilename = $filename; - $classfilename =~ s|\.|/|g; - $classfilename .= ".class"; - - $classfilename = $classdir . $classfilename; - - - ( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $headermtime, - $ctime, $blksize, $blocks ) = stat( $headerfilename ); - - ( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $classmtime, - $ctime, $blksize, $blocks ) = stat( $classfilename ); - - if( $headermtime < $classmtime ) - { - # NOTE: Since this is used by "javah", and "javah" refuses to overwrite - # an existing file, we force an unlink from this script, since - # we actually want to regenerate the header file at this time. - unlink $headerfilename; - push @filelist, $filename; - } -} - -if( @filelist ) { - $cmd = "$javah " . join(" ",@filelist); - $cmd =~ s/\'/\"/g; # because windows doesn't understand single quote - print "$cmd\n"; - exit (system($cmd) >> 8); -} else { - print "All JNI header files up to date.\n" -} diff --git a/coreconf/module.mk b/coreconf/module.mk index 5f6d2ccb8..f9ddf6a17 100644 --- a/coreconf/module.mk +++ b/coreconf/module.mk @@ -14,10 +14,6 @@ # always be identified for compiling/linking purposes # -ifndef JAVA_SOURCE_COMPONENT - JAVA_SOURCE_COMPONENT = java -endif - ifndef NETLIB_SOURCE_COMPONENT NETLIB_SOURCE_COMPONENT = netlib endif diff --git a/coreconf/outofdate.pl b/coreconf/outofdate.pl deleted file mode 100755 index 33d80bb33..000000000 --- a/coreconf/outofdate.pl +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/local/bin/perl -# -# 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/. - -#Input: [-d dir] foo1.java foo2.java -#Compares with: foo1.class foo2.class (if -d specified, checks in 'dir', -# otherwise assumes .class files in same directory as .java files) -#Returns: list of input arguments which are newer than corresponding class -#files (non-existent class files are considered to be real old :-) - -$found = 1; - -if ($ARGV[0] eq '-d') { - $classdir = $ARGV[1]; - $classdir .= "/"; - shift; - shift; -} else { - $classdir = "./"; -} - -foreach $filename (@ARGV) { - $classfilename = $classdir; - $classfilename .= $filename; - $classfilename =~ s/.java$/.class/; - ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, - $ctime,$blksize,$blocks) = stat($filename); - ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$classmtime, - $ctime,$blksize,$blocks) = stat($classfilename); -# print $filename, " ", $mtime, ", ", $classfilename, " ", $classmtime, "\n"; - if ($mtime > $classmtime) { - print $filename, " "; - $found = 0; - } -} - -print "\n"; diff --git a/coreconf/release.pl b/coreconf/release.pl deleted file mode 100755 index 7cde19d5e..000000000 --- a/coreconf/release.pl +++ /dev/null @@ -1,112 +0,0 @@ -#! /usr/local/bin/perl -# -# 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/. - - -require('coreconf.pl'); - -#######-- read in variables on command line into %var - -$use_jar = 1; -$ZIP = "$ENV{JAVA_HOME}/bin/jar"; - -if ( $ENV{JAVA_HOME} eq "" ) { - $ZIP = "zip"; - $use_jar = 0; -} - - -&parse_argv; - - -######-- Do the packaging of jars. - -foreach $jarfile (split(/ /,$var{FILES}) ) { - print STDERR "---------------------------------------------\n"; - print STDERR "Packaging jar file $jarfile....\n"; - - $jarinfo = $var{$jarfile}; - - ($jardir,$jaropts) = split(/\|/,$jarinfo); - - if ( $use_jar ) { - $zipoptions = "-cvf"; - } else { - $zipoptions = "-T -r"; - if ($jaropts =~ /a/) { - if ($var{OS_ARCH} eq 'WINNT') { - $zipoptions .= ' -ll'; - } - } - } - -# just in case the directory ends in a /, remove it - if ($jardir =~ /\/$/) { - chop $jardir; - } - - $dirdepth --; - - print STDERR "jardir = $jardir\n"; - system("ls $jardir"); - - if (-d $jardir) { - - -# count the number of slashes - - $slashes =0; - - foreach $i (split(//,$jardir)) { - if ($i =~ /\//) { - $slashes++; - } - } - - $dotdots =0; - - foreach $i (split(m|/|,$jardir)) { - if ($i eq '..') { - $dotdots ++; - } - } - - $dirdepth = ($slashes +1) - (2*$dotdots); - - print STDERR "changing dir $jardir\n"; - chdir($jardir); - print STDERR "making dir META-INF\n"; - mkdir("META-INF",0755); - - $filelist = ""; - opendir(DIR,"."); - while ($_ = readdir(DIR)) { - if (! ( ($_ eq '.') || ($_ eq '..'))) { - if ( $jaropts =~ /i/) { - if (! /^include$/) { - $filelist .= "$_ "; - } - } - else { - $filelist .= "$_ "; - } - } - } - closedir(DIR); - - print STDERR "$ZIP $zipoptions $jarfile $filelist\n"; - system("$ZIP $zipoptions $jarfile $filelist"); - rmdir("META-INF"); - for $i (1 .. $dirdepth) { - chdir(".."); - print STDERR "chdir ..\n"; - } - } - else { - print STDERR "Directory $jardir doesn't exist\n"; - } - -} - diff --git a/coreconf/rules.mk b/coreconf/rules.mk index dcbe4f07c..b80f6eb84 100644 --- a/coreconf/rules.mk +++ b/coreconf/rules.mk @@ -39,44 +39,10 @@ $(DIRS): endif endif -# -# IMPORTS will always be associated with a component. Therefore, -# the "import" rule will always change directory to the top-level -# of a component, and traverse the IMPORTS keyword from the -# "manifest.mn" file located at this level only. -# -# note: if there is a trailing slash, the component will be appended -# (see import.pl - only used for xpheader.jar) - -import: - @echo "== import.pl ==" - @$(PERL) -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/import.pl \ - "RELEASE_TREE=$(RELEASE_TREE)" \ - "IMPORTS=$(IMPORTS)" \ - "VERSION=$(VERSION)" \ - "OS_ARCH=$(OS_ARCH)" \ - "PLATFORM=$(PLATFORM)" \ - "OVERRIDE_IMPORT_CHECK=$(OVERRIDE_IMPORT_CHECK)" \ - "ALLOW_VERSION_OVERRIDE=$(ALLOW_VERSION_OVERRIDE)" \ - "SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \ - "SOURCE_MD_DIR=$(SOURCE_MD_DIR)" \ - "SOURCE_XP_DIR=$(SOURCE_XP_DIR)" \ - "FILES=$(IMPORT_XPCLASS_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \ - "$(IMPORT_XPCLASS_JAR)=$(IMPORT_XP_DIR)|$(IMPORT_XPCLASS_DIR)|" \ - "$(XPHEADER_JAR)=$(IMPORT_XP_DIR)|$(SOURCE_XP_DIR)/public/|v" \ - "$(MDHEADER_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)/include|" \ - "$(MDBINARY_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)|" -# On Mac OS X ranlib needs to be rerun after static libs are moved. -ifeq ($(OS_TARGET),Darwin) - find $(SOURCE_MD_DIR)/lib -name "*.a" -exec $(RANLIB) {} \; -endif - export: $(DIRS) private_export release_export: $(DIRS) -release_classes: $(DIRS) - libs program install: $(DIRS) $(TARGETS) ifneq ($(LIBRARY),) $(INSTALL) -m 664 $(LIBRARY) $(SOURCE_LIB_DIR) @@ -115,90 +81,7 @@ realclean clobber_all: $(DIRS) release_clean: rm -rf $(SOURCE_XP_DIR)/release/$(RELEASE_MD_DIR) -release: release_clean release_export release_classes release_policy release_md release_jars release_cpdistdir - -release_cpdistdir: - @echo "== cpdist.pl ==" - @$(PERL) -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/cpdist.pl \ - "RELEASE_TREE=$(RELEASE_TREE)" \ - "CORE_DEPTH=$(CORE_DEPTH)" \ - "MODULE=${MODULE}" \ - "OS_ARCH=$(OS_ARCH)" \ - "RELEASE=$(RELEASE)" \ - "PLATFORM=$(PLATFORM)" \ - "RELEASE_VERSION=$(RELEASE_VERSION)" \ - "SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \ - "RELEASE_XP_DIR=$(RELEASE_XP_DIR)" \ - "RELEASE_MD_DIR=$(RELEASE_MD_DIR)" \ - "FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR) XP_FILES MD_FILES" \ - "$(XPCLASS_JAR)=$(SOURCE_RELEASE_CLASSES_DIR)|x"\ - "$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_CLASSES_DBG_DIR)|x"\ - "$(XPHEADER_JAR)=$(SOURCE_RELEASE_XPHEADERS_DIR)|x" \ - "$(MDHEADER_JAR)=$(SOURCE_RELEASE_MDHEADERS_DIR)|m" \ - "$(MDBINARY_JAR)=$(SOURCE_RELEASE_MD_DIR)|m" \ - "XP_FILES=$(XP_FILES)|xf" \ - "MD_FILES=$(MD_FILES)|mf" - - -# $(SOURCE_RELEASE_xxx_JAR) is a name like yyy.jar -# $(SOURCE_RELEASE_xx_DIR) is a name like - -release_jars: - @echo "== release.pl ==" - @$(PERL) -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/release.pl \ - "RELEASE_TREE=$(RELEASE_TREE)" \ - "PLATFORM=$(PLATFORM)" \ - "OS_ARCH=$(OS_ARCH)" \ - "RELEASE_VERSION=$(RELEASE_VERSION)" \ - "SOURCE_RELEASE_DIR=$(SOURCE_RELEASE_DIR)" \ - "FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \ - "$(XPCLASS_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)|b"\ - "$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)|b"\ - "$(XPHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_XPHEADERS_DIR)|a" \ - "$(MDHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MDHEADERS_DIR)|a" \ - "$(MDBINARY_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MD_DIR)|bi" - -# Rules for releasing classes. -# We have to do some REALLY gross stuff to deal with multiple classes in one -# file, as well as nested classes, which have a filename of the form -# ContainingClass$NestedClass.class. -# RELEASE_CLASSES simply performs a required patsubst on CLASSES -# RELEASE_CLASS_PATH is RELEASE_CLASSES with the path (in ns/dist) prepended -# RELEASE_NESTED is all the nested classes in RELEASE_CLASS_PATH. We use a -# foreach and wildcard to get all the files that start out like one of the -# class files, then have a $. So, for each class file, we look for file$* -# RELEASE_FILES is the combination of RELEASE_NESTED and the class files -# specified by RELEASE_CLASSES which have .class appended to them. Note that -# the RELEASE_NESTED don't need to have .class appended because they were -# read in from the wildcard as complete filenames. -# -# The _DBG versions are the debuggable ones. -ifneq ($(CLASSES),) - -RELEASE_CLASSES := $(patsubst %,%,$(CLASSES)) - -ifdef BUILD_OPT - RELEASE_CLASS_PATH := $(patsubst %,$(SOURCE_CLASSES_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES)) - RELEASE_NESTED := $(foreach file,$(RELEASE_CLASS_PATH),$(wildcard $(file)$$*)) - RELEASE_FILES := $(patsubst %,%.class,$(RELEASE_CLASS_PATH)) $(RELEASE_NESTED) -else - RELEASE_DBG_CLASS_PATH:= $(patsubst %,$(SOURCE_CLASSES_DBG_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES)) - RELEASE_DBG_NESTED := $(foreach file,$(RELEASE_DBG_CLASS_PATH),$(wildcard $(file)$$*)) - RELEASE_DBG_FILES := $(patsubst %,%.class,$(RELEASE_DBG_CLASS_PATH)) $(RELEASE_DBG_NESTED) -endif - -# Substitute \$ for $ so the shell doesn't choke -ifdef BUILD_OPT -release_classes: - $(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)/$(PACKAGE) -else -release_classes: - $(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_DBG_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)/$(PACKAGE) -endif - -endif - -release_policy: $(DIRS) +release: release_clean release_export release_md ifndef NO_MD_RELEASE ifdef LIBRARY @@ -481,265 +364,6 @@ endif %: %.sh rm -f $@; cp $< $@; chmod +x $@ -################################################################################ -# Bunch of things that extend the 'export' rule (in order): -################################################################################ - -$(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) $(JMCSRCDIR): - @if test ! -d $@; then \ - echo Creating $@; \ - rm -rf $@; \ - $(NSINSTALL) -D $@; \ - fi - -################################################################################ -## IDL_GEN - -ifneq ($(IDL_GEN),) - -#export: -# $(IDL2JAVA) $(IDL_GEN) - -#all: export - -#clobber: -# rm -f $(IDL_GEN:.idl=.class) # XXX wrong! - -endif - -################################################################################ -### JSRCS -- for compiling java files -### -### NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, -### replace $(CORE_DEPTH) with $(NETLIBDEPTH). -### - -ifneq ($(JSRCS),) -ifneq ($(JAVAC),) -ifdef NETLIBDEPTH - CORE_DEPTH := $(NETLIBDEPTH) -endif - -JAVA_EXPORT_SRCS=$(shell $(PERL) $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG) -d $(JAVA_DESTPATH)/$(PACKAGE) $(JSRCS) $(PRIVATE_JSRCS)) - -export: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) -ifneq ($(JAVA_EXPORT_SRCS),) - $(JAVAC) $(JAVA_EXPORT_SRCS) -endif - -all: export - -clobber: - rm -f $(SOURCE_XP_DIR)/classes/$(PACKAGE)/*.class - -endif -endif - -# -# JDIRS -- like JSRCS, except you can give a list of directories and it will -# compile all the out-of-date java files in those directories. -# -# NOTE: recursing through these can speed things up, but they also cause -# some builds to run out of memory -# -# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, -# replace $(CORE_DEPTH) with $(NETLIBDEPTH). -# -ifdef JDIRS -ifneq ($(JAVAC),) -ifdef NETLIBDEPTH - CORE_DEPTH := $(NETLIBDEPTH) -endif - -# !!!!! THIS WILL CRASH SHMSDOS.EXE !!!!! -# shmsdos does not support shell variables. It will crash when it tries -# to parse the '=' character. A solution is to rewrite outofdate.pl so it -# takes the Javac command as an argument and executes the command itself, -# instead of returning a list of files. -export: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) - @echo "!!! THIS COMMAND IS BROKEN ON WINDOWS--SEE rules.mk FOR DETAILS !!!" - return -1 - @for d in $(JDIRS); do \ - if test -d $$d; then \ - set $(EXIT_ON_ERROR); \ - files=`echo $$d/*.java`; \ - list=`$(PERL) $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG) \ - -d $(JAVA_DESTPATH)/$(PACKAGE) $$files`; \ - if test "$${list}x" != "x"; then \ - echo Building all java files in $$d; \ - echo $(JAVAC) $$list; \ - $(JAVAC) $$list; \ - fi; \ - set +e; \ - else \ - echo "Skipping non-directory $$d..."; \ - fi; \ - $(CLICK_STOPWATCH); \ - done -endif -endif - -# -# JDK_GEN -- for generating "old style" native methods -# -# Generate JDK Headers and Stubs into the '_gen' and '_stubs' directory -# -# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, -# replace $(CORE_DEPTH) with $(NETLIBDEPTH). -# -ifneq ($(JDK_GEN),) -ifneq ($(JAVAH),) -ifdef NSBUILDROOT - INCLUDES += -I$(JDK_GEN_DIR) -I$(SOURCE_XP_DIR) -else - INCLUDES += -I$(JDK_GEN_DIR) -endif - -ifdef NETLIBDEPTH - CORE_DEPTH := $(NETLIBDEPTH) -endif - -JDK_PACKAGE_CLASSES := $(JDK_GEN) -JDK_PATH_CLASSES := $(subst .,/,$(JDK_PACKAGE_CLASSES)) -JDK_HEADER_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES)) -JDK_STUB_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES)) -JDK_HEADER_CFILES := $(patsubst %,$(JDK_GEN_DIR)/%.h,$(JDK_GEN)) -JDK_STUB_CFILES := $(patsubst %,$(JDK_STUB_DIR)/%.c,$(JDK_GEN)) - -$(JDK_HEADER_CFILES): $(JDK_HEADER_CLASSFILES) -$(JDK_STUB_CFILES): $(JDK_STUB_CLASSFILES) - -export: - @echo Generating/Updating JDK headers - $(JAVAH) -d $(JDK_GEN_DIR) $(JDK_PACKAGE_CLASSES) - @echo Generating/Updating JDK stubs - $(JAVAH) -stubs -d $(JDK_STUB_DIR) $(JDK_PACKAGE_CLASSES) -ifndef NO_MAC_JAVA_SHIT - @if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then \ - echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \ - echo "!!! This allows us to automatically update generated files for the mac."; \ - echo "!!! If you see any modified files there, please check them in."; \ - fi - @echo Generating/Updating JDK headers for the Mac - $(JAVAH) -mac -d $(CORE_DEPTH)/lib/mac/Java/_gen $(JDK_PACKAGE_CLASSES) - @echo Generating/Updating JDK stubs for the Mac - $(JAVAH) -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_stubs $(JDK_PACKAGE_CLASSES) -endif -endif -endif - -# -# JRI_GEN -- for generating "old style" JRI native methods -# -# Generate JRI Headers and Stubs into the 'jri' directory -# -# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, -# replace $(CORE_DEPTH) with $(NETLIBDEPTH). -# -ifneq ($(JRI_GEN),) -ifneq ($(JAVAH),) -ifdef NSBUILDROOT - INCLUDES += -I$(JRI_GEN_DIR) -I$(SOURCE_XP_DIR) -else - INCLUDES += -I$(JRI_GEN_DIR) -endif - -ifdef NETLIBDEPTH - CORE_DEPTH := $(NETLIBDEPTH) -endif - -JRI_PACKAGE_CLASSES := $(JRI_GEN) -JRI_PATH_CLASSES := $(subst .,/,$(JRI_PACKAGE_CLASSES)) -JRI_HEADER_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES)) -JRI_STUB_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES)) -JRI_HEADER_CFILES := $(patsubst %,$(JRI_GEN_DIR)/%.h,$(JRI_GEN)) -JRI_STUB_CFILES := $(patsubst %,$(JRI_GEN_DIR)/%.c,$(JRI_GEN)) - -$(JRI_HEADER_CFILES): $(JRI_HEADER_CLASSFILES) -$(JRI_STUB_CFILES): $(JRI_STUB_CLASSFILES) - -export: - @echo Generating/Updating JRI headers - $(JAVAH) -jri -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES) - @echo Generating/Updating JRI stubs - $(JAVAH) -jri -stubs -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES) -ifndef NO_MAC_JAVA_SHIT - @if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then \ - echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \ - echo "!!! This allows us to automatically update generated files for the mac."; \ - echo "!!! If you see any modified files there, please check them in."; \ - fi - @echo Generating/Updating JRI headers for the Mac - $(JAVAH) -jri -mac -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES) - @echo Generating/Updating JRI stubs for the Mac - $(JAVAH) -jri -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES) -endif -endif -endif - -# -# JNI_GEN -- for generating JNI native methods -# -# Generate JNI Headers into the 'jni' directory -# -ifneq ($(JNI_GEN),) -ifneq ($(JAVAH),) -JNI_HEADERS := $(patsubst %,$(JNI_GEN_DIR)/%.h,$(JNI_GEN)) - -export: - @if test ! -d $(JNI_GEN_DIR); then \ - echo $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \ - $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \ - else \ - echo "Checking for out of date header files" ; \ - $(PERL) $(CORE_DEPTH)/coreconf/jniregen.pl $(PERLARG) \ - -d $(JAVA_DESTPATH) -j "$(JAVAH) -jni -d $(JNI_GEN_DIR)" $(JNI_GEN);\ - fi -endif -endif - -# -# JMC_EXPORT -- for declaring which java classes are to be exported for jmc -# -ifneq ($(JMC_EXPORT),) -JMC_EXPORT_PATHS := $(subst .,/,$(JMC_EXPORT)) -JMC_EXPORT_FILES := $(patsubst %,$(JAVA_DESTPATH)/$(PACKAGE)/%.class,$(JMC_EXPORT_PATHS)) - -# -# We're doing NSINSTALL -t here (copy mode) because calling INSTALL will pick up -# your NSDISTMODE and make links relative to the current directory. This is a -# problem because the source isn't in the current directory: -# -export: $(JMC_EXPORT_FILES) $(JMCSRCDIR) - $(NSINSTALL) -t -m 444 $(JMC_EXPORT_FILES) $(JMCSRCDIR) -endif - -# -# JMC_GEN -- for generating java modules -# -# Provide default export & install rules when using JMC_GEN -# -ifneq ($(JMC_GEN),) -ifneq ($(JMC),) - INCLUDES += -I$(JMC_GEN_DIR) -I. - JMC_HEADERS := $(patsubst %,$(JMC_GEN_DIR)/%.h,$(JMC_GEN)) - JMC_STUBS := $(patsubst %,$(JMC_GEN_DIR)/%.c,$(JMC_GEN)) - JMC_OBJS := $(patsubst %,$(OBJDIR)/%$(OBJ_SUFFIX),$(JMC_GEN)) - -$(JMC_GEN_DIR)/M%.h: $(JMCSRCDIR)/%.class - $(JMC) -d $(JMC_GEN_DIR) -interface $(JMC_GEN_FLAGS) $(?F:.class=) - -$(JMC_GEN_DIR)/M%.c: $(JMCSRCDIR)/%.class - $(JMC) -d $(JMC_GEN_DIR) -module $(JMC_GEN_FLAGS) $(?F:.class=) - -$(OBJDIR)/M%$(OBJ_SUFFIX): $(JMC_GEN_DIR)/M%.c $(JMC_GEN_DIR)/M%.h - @$(MAKE_OBJDIR) - $(CC) -o $@ -c $(CFLAGS) $< - -export: $(JMC_HEADERS) $(JMC_STUBS) -endif -endif - define copy_varlist_into_dir_RULE ifdef $(2) ifneq (,$$(strip $$($(2)))) @@ -907,12 +531,7 @@ $(filter $(OBJDIR)/%$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%$(OBJ_SUFFIX): $(DUMMY_DE # hundreds of built-in suffix rules for stuff we don't need. # .SUFFIXES: -.SUFFIXES: .out .a .ln .o .obj .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .class .java .html .asm .dep - -# -# Don't delete these files if we get killed. -# -.PRECIOUS: .java $(JDK_HEADERS) $(JDK_STUBS) $(JRI_HEADERS) $(JRI_STUBS) $(JMC_HEADERS) $(JMC_STUBS) $(JNI_HEADERS) +.SUFFIXES: .out .a .ln .o .obj .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .html .asm .dep # # Fake targets. Always run these rules, even if a file/directory with that diff --git a/coreconf/ruleset.mk b/coreconf/ruleset.mk index ff4391d14..01207cdcd 100644 --- a/coreconf/ruleset.mk +++ b/coreconf/ruleset.mk @@ -22,29 +22,6 @@ # e) # # LIBRARY -- the target library name to create from $OBJS # # ($OBJDIR automatically prepended to it) # -# f) # -# JSRCS -- java source files to compile into class files # -# (if you don't specify this it will default # -# to *.java) # -# g) # -# PACKAGE -- the package to put the .class files into # -# (e.g. netscape/applet) # -# (NOTE: the default definition for this may be # -# overridden if "jdk.mk" is included) # -# h) # -# JMC_EXPORT -- java files to be exported for use by JMC_GEN # -# (this is a list of Class names) # -# i) # -# JRI_GEN -- files to run through javah to generate headers # -# and stubs # -# (output goes into the _jri sub-dir) # -# j) # -# JMC_GEN -- files to run through jmc to generate headers # -# and stubs # -# (output goes into the _jmc sub-dir) # -# k) # -# JNI_GEN -- files to run through javah to generate headers # -# (output goes into the _jni sub-dir) # # # ####################################################################### @@ -101,7 +78,7 @@ ifdef LIBRARY_NAME LIBRARY := $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX) endif ifndef SHARED_LIBRARY - SHARED_LIBRARY := $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX) + SHARED_LIBRARY := $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) endif ifneq ($(SHARED_LIBRARY),) @@ -109,7 +86,7 @@ ifdef LIBRARY_NAME ifdef IMPORT_LIB_SUFFIX ifdef MAPFILE ifndef IMPORT_LIBRARY - IMPORT_LIBRARY := $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX)$(IMPORT_LIB_SUFFIX) + IMPORT_LIBRARY := $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) endif endif endif @@ -135,11 +112,11 @@ endif # ifdef PROGRAM - PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)) + PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(PROG_SUFFIX)) endif ifdef PROGRAMS - PROGRAMS := $(addprefix $(OBJDIR)/, $(PROGRAMS:%=%$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX))) + PROGRAMS := $(addprefix $(OBJDIR)/, $(PROGRAMS:%=%$(PROG_SUFFIX))) endif ifndef TARGETS @@ -151,8 +128,7 @@ CPPSRCS1 = $(CPPSRCS:.cpp=$(OBJ_SUFFIX)) CPPSRCS2 = $(CPPSRCS1:.cc=$(OBJ_SUFFIX)) ifndef OBJS - SIMPLE_OBJS = $(JRI_STUB_CFILES) \ - $(addsuffix $(OBJ_SUFFIX), $(JMC_GEN)) \ + SIMPLE_OBJS = \ $(CSRCS:.c=$(OBJ_SUFFIX)) \ $(CPPSRCS2) \ $(ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX)) \ @@ -173,46 +149,9 @@ if test ! -d $(@D); then $(NSINSTALL) -D $(@D); fi endef endif -ifndef PACKAGE - PACKAGE = . -endif - -ifdef NSBUILDROOT - JDK_GEN_DIR = $(SOURCE_XP_DIR)/_gen - JMC_GEN_DIR = $(SOURCE_XP_DIR)/_jmc - JNI_GEN_DIR = $(SOURCE_XP_DIR)/_jni - JRI_GEN_DIR = $(SOURCE_XP_DIR)/_jri - JDK_STUB_DIR = $(SOURCE_XP_DIR)/_stubs -else - JDK_GEN_DIR = _gen - JMC_GEN_DIR = _jmc - JNI_GEN_DIR = _jni - JRI_GEN_DIR = _jri - JDK_STUB_DIR = _stubs -endif - ALL_TRASH = $(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \ so_locations $(BUILT_SRCS) $(NOSUCHFILE) -ifdef NS_USE_JDK - ALL_TRASH += $(JDK_HEADER_CFILES) $(JDK_STUB_CFILES) \ - $(JMC_HEADERS) $(JMC_STUBS) $(JMC_EXPORT_FILES) \ - $(JNI_HEADERS) \ - $(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) \ - $(JDK_GEN_DIR) $(JMC_GEN_DIR) $(JNI_GEN_DIR) \ - $(JRI_GEN_DIR) $(JDK_STUB_DIR) - -ifdef JAVA_DESTPATH - ALL_TRASH += $(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class) -ifdef JDIRS - ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS)) -endif -else # !JAVA_DESTPATH - ALL_TRASH += $(wildcard $(PACKAGE)/*.class) $(JDIRS) -endif - -endif #NS_USE_JDK - ifdef NSS_BUILD_CONTINUE_ON_ERROR # Try to build everything. I.e., don't exit on errors. EXIT_ON_ERROR = +e diff --git a/coreconf/source.mk b/coreconf/source.mk index 14bb51023..94c383e4c 100644 --- a/coreconf/source.mk +++ b/coreconf/source.mk @@ -31,17 +31,9 @@ endif # <user_source_tree> cross-platform (xp) import/export directories # -SOURCE_CLASSES_DIR = $(SOURCE_XP_DIR)/classes -SOURCE_CLASSES_DBG_DIR = $(SOURCE_XP_DIR)/classes_DBG SOURCE_XPHEADERS_DIR = $(SOURCE_XP_DIR)/public/$(MODULE) SOURCE_XPPRIVATE_DIR = $(SOURCE_XP_DIR)/private/$(MODULE) -ifdef BUILD_OPT - IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DIR) -else - IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DBG_DIR) -endif - # # <user_source_tree> machine-dependent (md) master import/export directory # @@ -110,27 +102,9 @@ SOURCE_RELEASE_XP_DIR = $(SOURCE_RELEASE_PREFIX) # <user_source_tree> cross-platform (xp) source-side release directories # -SOURCE_RELEASE_CLASSES_DIR = classes -SOURCE_RELEASE_CLASSES_DBG_DIR = classes_DBG SOURCE_RELEASE_XPHEADERS_DIR = include # -# <user_source_tree> cross-platform (xp) JAR source-side release files -# - -XPCLASS_JAR = xpclass.jar -XPCLASS_DBG_JAR = xpclass_dbg.jar -XPHEADER_JAR = xpheader.jar - -ifdef BUILD_OPT - SOURCE_RELEASE_XP_CLASSES_DIR = $(SOURCE_RELEASE_CLASSES_DIR) - IMPORT_XPCLASS_JAR = $(XPCLASS_JAR) -else - SOURCE_RELEASE_XP_CLASSES_DIR = $(SOURCE_RELEASE_CLASSES_DBG_DIR) - IMPORT_XPCLASS_JAR = $(XPCLASS_DBG_JAR) -endif - -# # <user_source_tree> machine-dependent (md) source-side master release directory # @@ -145,14 +119,6 @@ SOURCE_RELEASE_LIB_DIR = $(PLATFORM)/lib SOURCE_RELEASE_MDHEADERS_DIR = $(PLATFORM)/include SOURCE_RELEASE_SPEC_DIR = $(SOURCE_RELEASE_MD_DIR) -# -# <user_source_tree> machine-dependent (md) JAR/tar source-side release files -# - -MDBINARY_JAR = mdbinary.jar -MDHEADER_JAR = mdheader.jar - - # Where to put the results ifneq ($(RESULTS_DIR),) diff --git a/coreconf/version.mk b/coreconf/version.mk index c3e559cdc..5e2964e39 100644 --- a/coreconf/version.mk +++ b/coreconf/version.mk @@ -54,10 +54,6 @@ endif # Set <component>-specific versions for compiliation and linkage. # -ifndef JAVA_VERSION - JAVA_VERSION = $(CURRENT_VERSION_SYMLINK) -endif - ifndef NETLIB_VERSION NETLIB_VERSION = $(CURRENT_VERSION_SYMLINK) endif |