3
# The contents of this file are subject to the Netscape Public
4
# License Version 1.1 (the "License"); you may not use this file
5
# except in compliance with the License. You may obtain a copy of
6
# the License at http://www.mozilla.org/NPL/
8
# Software distributed under the License is distributed on an "AS
9
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10
# implied. See the License for the specific language governing
11
# rights and limitations under the License.
13
# The Original Code is mozilla.org code.
15
# The Initial Developer of the Original Code is Netscape
16
# Communications Corporation. Portions created by Netscape are
17
# Copyright (C) 1998 Netscape Communications Corporation. All
24
# Input: output_class_dir argfile javafilelist
32
$sjcmd = $ENV{'MOZ_TOOLS'} . '\bin\sj.exe';
34
open(FL, "<$filelist" ) || die "can't open $filelist for reading";
38
@java_files = (@java_files, split(/[ \t\n]/));
42
open(FL, "<$argfile" ) || die "can't open $argfile for reading";
51
print "Java Files: @java_files\n";
54
# compile as many java files as we can in one invocation
55
# given the limitations of the command line
56
foreach $filename (@java_files) {
57
$classfilename = $classdir;
58
$classfilename .= $filename;
59
$classfilename =~ s/.java$/.class/;
60
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,
61
$ctime,$blksize,$blocks) = stat($filename);
62
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$classmtime,
63
$ctime,$blksize,$blocks) = stat($classfilename);
64
# print $filename, " ", $mtime, ", ", $classfilename, " ", $classmtime, "\n";
65
if ($mtime > $classmtime) {
67
$len += length($filename);
69
print "$sjcmd $args $outofdate\n";
70
$status = system "$sjcmd $args $outofdate";
72
exit( $status / 256 );
75
$len = length($filename);
77
$outofdate .= $filename;
82
if( length($outofdate) > 0 ) {
83
print "$sjcmd $args $outofdate\n";
84
$status = system "$sjcmd $args $outofdate";
86
exit( $status / 256 );
89
print "Files are up to date.\n";