fix file stat

This commit is contained in:
Doug MacEachern 2005-05-07 19:01:20 +00:00
parent d550f84e77
commit b20fe9f6b6
1 changed files with 7 additions and 7 deletions

View File

@ -985,19 +985,19 @@ my $cfile = 'javasigar_generated.c';
my $hfile = 'javasigar_generated.h'; my $hfile = 'javasigar_generated.h';
my $pfile = 'Sigar_generated.xs'; my $pfile = 'Sigar_generated.xs';
if ((stat $0)[9] < (stat "src/jni/$cfile")[9]) {
print "$cfile unchanged\n";
exit;
}
print "generating $cfile\n";
my $build_src = $ARGV[0] or die "usage: $0 build_directory"; my $build_src = $ARGV[0] or die "usage: $0 build_directory";
if (! -d $build_src) { if (! -d $build_src) {
die "$build_src: $!"; die "$build_src: $!";
} }
if ((stat $0)[9] < (stat "$build_src/$cfile")[9]) {
print "$cfile unchanged\n";
exit;
}
print "generating $cfile\n";
chdir $build_src; chdir $build_src;
my $jsrc = 'net/hyperic/sigar'; my $jsrc = 'net/hyperic/sigar';