partain 1.3 changes to 960626
Makefile:: $(JMAKE)
$(JMAKE):
Makefile:: $(JMAKE)
$(JMAKE):
- @(cd $(JMAKESRC); if [ -f Makefile ]; then \
+ @(cd $(JMAKESRC) && if [ -f Makefile ]; then \
echo "checking $@ in $(JMAKESRC) first..."; $(MAKE) all; else \
echo "bootstrapping $@ from Makefile.BOOT in $(JMAKESRC) first..."; \
$(MAKE) -f Makefile.BOOT BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS); fi; \
echo "checking $@ in $(JMAKESRC) first..."; $(MAKE) all; else \
echo "bootstrapping $@ from Makefile.BOOT in $(JMAKESRC) first..."; \
$(MAKE) -f Makefile.BOOT BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS); fi; \
CDependTarget( $(SRCS_C) )
CDependTarget( $(SRCS_C) )
-RunStdTest(msub001,msub,-f test.makefile testfile -o1 test.out)
+RunStdTest(msub001,msub,-o1 test.out -f test.makefile testfile)
EOUSAGE
$Makefile = 'Makefile';
EOUSAGE
$Makefile = 'Makefile';
-$Tmpfile = "/tmp/Makefile$$";
-chop($Arch = `uname -a`);
+if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
+ $Tmpfile = $ENV{'TMPDIR'} . "/Makefile$$";
+} else {
+ $Tmpfile = "$(TMPDIR)/Makefile$$";
+ $ENV{'TMPDIR'} = '$(TMPDIR)'; # set the env var as well
+}
$SleazyTouch = '/usr/5bin/touch';
$DoTouch = 0;
$Verbose = 0;
$SleazyTouch = '/usr/5bin/touch';
$DoTouch = 0;
$Verbose = 0;
-if ($Arch ne "sun3") {
- $Make = 'make JMAKE=jmake LIT2PGM=lit2pgm LIT2LATEX=lit2latex LIT2TEXI=lit2texi MKDEPENDLIT=mkdependlit MAKEINFO=makeinfo POSTMAKEINFO=postmakeinfo';
-} else {
- $Make = 'make';
-}
+$Make = 'make JMAKE=jmake LIT2PGM=lit2pgm LIT2LATEX=lit2latex LIT2TEXI=lit2texi MKDEPENDLIT=mkdependlit MAKEINFO=makeinfo POSTMAKEINFO=postmakeinfo';
+
print STDERR "$Make $MakeFlags -f $Tmpfile $Target; rm $Tmpfile\n" if $Verbose;
system( "$Make $MakeFlags -f $Tmpfile $Target; rm $Tmpfile" );
print STDERR "$Make $MakeFlags -f $Tmpfile $Target; rm $Tmpfile\n" if $Verbose;
system( "$Make $MakeFlags -f $Tmpfile $Target; rm $Tmpfile" );
$Usage = "usage: $Pgm: not done yet\n";
$Status = 0; # just used for exit() status
$Usage = "usage: $Pgm: not done yet\n";
$Status = 0; # just used for exit() status
$Dashdashes_seen = 0;
$Begin_magic_str = "# DO NOT DELETE: Beginning of C dependencies\n";
$Dashdashes_seen = 0;
$Begin_magic_str = "# DO NOT DELETE: Beginning of C dependencies\n";
$Makefile = 'makefile';
} elsif ( ! $Makefile && -f 'Makefile') {
$Makefile = 'Makefile';
$Makefile = 'makefile';
} elsif ( ! $Makefile && -f 'Makefile') {
$Makefile = 'Makefile';
+} elsif ( ! $Makefile) {
die "$Pgm: no makefile or Makefile found\n";
}
die "$Pgm: no makefile or Makefile found\n";
}
}
close(NMKF);
close(OMKF);
}
close(NMKF);
close(OMKF);
exit 0;
sub mangle_command_line_args {
exit 0;
sub mangle_command_line_args {
} elsif ($Dashdashes_seen != 1) { # not between -- ... --
if ( /^-v$/ ) {
} elsif ($Dashdashes_seen != 1) { # not between -- ... --
if ( /^-v$/ ) {
} elsif ( /^-f/ ) {
$Makefile = &grab_arg_arg($_);
} elsif ( /^-o/ ) {
} elsif ( /^-f/ ) {
$Makefile = &grab_arg_arg($_);
} elsif ( /^-o/ ) {
arg: while ($_ = $ARGV[0]) {
shift(@ARGV);
arg: while ($_ = $ARGV[0]) {
shift(@ARGV);
+ /^--$/ && do { # let anything past after --
+ push(@PgmArgs, @ARGV);
+ last arg; };
+
/^-v$/ && do { $Verbose = 1; next arg; };
/^-O(.*)/ && do { push(@PgmArgs, &grab_arg_arg('-O',$1)); next arg; };
/^-i(.*)/ && do { $PgmStdinFile = &grab_arg_arg('-i',$1);
/^-v$/ && do { $Verbose = 1; next arg; };
/^-O(.*)/ && do { push(@PgmArgs, &grab_arg_arg('-O',$1)); next arg; };
/^-i(.*)/ && do { $PgmStdinFile = &grab_arg_arg('-i',$1);
open(SPIXNM, "nm -n $ToRunOrig |") || die "nm -n $ToRunOrig open failed!\n";
spix: while (<SPIXNM>) {
open(SPIXNM, "nm -n $ToRunOrig |") || die "nm -n $ToRunOrig open failed!\n";
spix: while (<SPIXNM>) {
- if ( / T (_FreeMallocPtr|_([A-Za-z]+)Hook|_xmalloc|_mpz_get_si)$/ ) {
+ if ( / T +(_FreeMallocPtr|_([A-Za-z]+)Hook|_xmalloc|_mpz_get_si)$/ ) {
$LastSpix = $1;
last spix;
}
$LastSpix = $1;
last spix;
}
#NB: nearly the same as in GHC driver's -ghc-timing stuff
open(STATS, $StatsFile) || die "Failed when opening $StatsFile\n";
#NB: nearly the same as in GHC driver's -ghc-timing stuff
open(STATS, $StatsFile) || die "Failed when opening $StatsFile\n";
- local($tot_live) = 0; # for calculating avg residency
+
+ local($max_live) = 0;
+ local($tot_live) = 0; # for calculating residency stuff
+ local($tot_samples) = 0;
- $tot_live += $1 if /^\s*\d+\s+\d+\s+\d+\.\d+\%\s+(\d+)\s+\d+\.\d+\%/;
+ if (! /Minor/ && /^\s*\d+\s+\d+\s+(\d+)\s+\d+\.\d+\%/ ) {
+ $max_live = $1 if $max_live < $1;
+ $tot_live += $1;
+ $tot_samples += 1;
+ }
$BytesAlloc = $1 if /^\s*([0-9,]+) bytes allocated in the heap/;
$BytesAlloc = $1 if /^\s*([0-9,]+) bytes allocated in the heap/;
- if ( /^\s*([0-9,]+) bytes maximum residency .* (\d+) sample/ ) {
- $MaxResidency = $1; $ResidencySamples = $2;
- }
+# if ( /^\s*([0-9,]+) bytes maximum residency .* (\d+) sample/ ) {
+# $MaxResidency = $1; $ResidencySamples = $2;
+# }
$GCs = $1 if /^\s*([0-9,]+) garbage collections? performed/;
$GCs = $1 if /^\s*([0-9,]+) garbage collections? performed/;
}
}
close(STATS) || die "Failed when closing $StatsFile\n";
}
}
close(STATS) || die "Failed when closing $StatsFile\n";
- if ( defined($ResidencySamples) && $ResidencySamples > 0 ) {
- $AvgResidency = int ($tot_live / $ResidencySamples) ;
+ if ( $tot_samples > 0 ) {
+ $ResidencySamples = $tot_samples;
+ $MaxResidency = $max_live;
+ $AvgResidency = int ($tot_live / $tot_samples) ;
}
} elsif ( $SysSpecificTiming eq 'hbc' ) {
}
} elsif ( $SysSpecificTiming eq 'hbc' ) {