ext_12904 ([identity profile] eub.livejournal.com) wrote in [personal profile] meganursula 2002-10-24 05:45 pm (UTC)

all I have to say about make is

#!/usr/local/bin/perl5 -w
# symlink "make" to this, before /bin/make on your path.
# v0.0 eub 2/97

$binmake = "/bin/make";         # where the real make lives

$ac = @av = @ARGV;
$makefile =
#      $ac >= 1  &&  $av[0] =~ "^-f"  &&   substr($av[0], 2)
       $ac >= 2  &&  $av[0] eq "-f"   &&   $av[1]
    || -r "Makefile"                  &&   "Makefile"
    || -r "makefile"                  &&   "makefile"
    || "XXX";

open MF, "<$makefile"  or die;
# (maybe check for genuine tabs?)
seek MF, -1, 2         or die;
if ("\n" !~ getc MF)  {
    print STDERR "\"$makefile\" lacks trailing newline.\n";
    exit(1);
}
close MF;

exec $binmake, @av;

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting