зеркало из https://github.com/mozilla/gecko-dev.git
Make JSS buildable with shmsdos.exe.
This commit is contained in:
Родитель
b8f5dd69ba
Коммит
e34299ca4f
|
@ -32,28 +32,39 @@
|
||||||
# GPL.
|
# GPL.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Input: -d dir foo1 foo2 . . .
|
# Input: -d dir -j javahcmd foo1 foo2 . . .
|
||||||
# Compares generated "_jni/foo1.h" file with "foo1.class", and
|
# Compares generated "_jni/foo1.h" file with "foo1.class", and
|
||||||
# generated "_jni/foo2.h" file with "foo2.class", etc.
|
# generated "_jni/foo2.h" file with "foo2.class", etc.
|
||||||
# (NOTE: unlike its closely related cousin, outofdate.pl,
|
# (NOTE: unlike its closely related cousin, outofdate.pl,
|
||||||
# the "-d dir" must always be specified)
|
# 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
|
# Returns: list of headers which are OLDER than corresponding class
|
||||||
# files (non-existant class files are considered to be real old :-)
|
# files (non-existant class files are considered to be real old :-)
|
||||||
|
|
||||||
$found = 1;
|
my $javah = "";
|
||||||
|
my $classdir = "";
|
||||||
|
|
||||||
if ($ARGV[0] eq '-d')
|
while(1) {
|
||||||
{
|
if ($ARGV[0] eq '-d') {
|
||||||
$classdir = $ARGV[1];
|
$classdir = $ARGV[1];
|
||||||
$classdir .= "/";
|
$classdir .= "/";
|
||||||
shift;
|
shift;
|
||||||
shift;
|
shift;
|
||||||
|
} elsif($ARGV[0] eq '-j') {
|
||||||
|
$javah = $ARGV[1];
|
||||||
|
shift;
|
||||||
|
shift;
|
||||||
|
} else {
|
||||||
|
last;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
if( $javah eq "") {
|
||||||
print STDERR "Usage: perl ", $0, " -d dir foo1 foo2 . . .\n";
|
die "Must specify -j <javah command>";
|
||||||
exit -1;
|
}
|
||||||
|
if( $classdir eq "") {
|
||||||
|
die "Must specify -d <classdir>";
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach $filename (@ARGV)
|
foreach $filename (@ARGV)
|
||||||
|
@ -81,12 +92,15 @@ foreach $filename (@ARGV)
|
||||||
# NOTE: Since this is used by "javah", and "javah" refuses to overwrite
|
# NOTE: Since this is used by "javah", and "javah" refuses to overwrite
|
||||||
# an existing file, we force an unlink from this script, since
|
# an existing file, we force an unlink from this script, since
|
||||||
# we actually want to regenerate the header file at this time.
|
# we actually want to regenerate the header file at this time.
|
||||||
unlink $headerfilename;
|
unlink $headerfilename;
|
||||||
print $filename, " ";
|
push @filelist, $filename;
|
||||||
$found = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "\n";
|
if( @filelist ) {
|
||||||
exit 0;
|
$cmd = "$javah " . join(" ",@filelist);
|
||||||
|
print "$cmd\n";
|
||||||
|
system("$cmd");
|
||||||
|
} else {
|
||||||
|
print "All JNI header files up to date.\n"
|
||||||
|
}
|
||||||
|
|
|
@ -567,7 +567,14 @@ ifdef NETLIBDEPTH
|
||||||
CORE_DEPTH := $(NETLIBDEPTH)
|
CORE_DEPTH := $(NETLIBDEPTH)
|
||||||
endif
|
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)
|
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 \
|
@for d in $(JDIRS); do \
|
||||||
if test -d $$d; then \
|
if test -d $$d; then \
|
||||||
set $(EXIT_ON_ERROR); \
|
set $(EXIT_ON_ERROR); \
|
||||||
|
@ -701,14 +708,8 @@ export::
|
||||||
$(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \
|
$(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \
|
||||||
else \
|
else \
|
||||||
echo "Checking for out of date header files" ; \
|
echo "Checking for out of date header files" ; \
|
||||||
cmd="perl $(CORE_DEPTH)/coreconf/jniregen.pl $(PERLARG) \
|
perl $(CORE_DEPTH)/coreconf/jniregen.pl $(PERLARG) \
|
||||||
-d $(JAVA_DESTPATH) $(JNI_GEN)"; \
|
-d $(JAVA_DESTPATH) -j "$(JAVAH) -jni -d $(JNI_GEN_DIR)" $(JNI_GEN);\
|
||||||
echo $$cmd; \
|
|
||||||
list=`$$cmd`; \
|
|
||||||
if test "$${list}x" != "x"; then \
|
|
||||||
echo $(JAVAH) -jni -d $(JNI_GEN_DIR) $$list; \
|
|
||||||
$(JAVAH) -jni -d $(JNI_GEN_DIR) $$list; \
|
|
||||||
fi \
|
|
||||||
fi
|
fi
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче