wheeeee

Oct. 24th, 2002 11:08 am
meganursula: (Default)
[personal profile] meganursula
This will probably just make me sound pathetic to most of you, but, i just wrote my very first Makefile from scratch. I've used Makefiles before, but only ones that i edited, never ones that i wrote.

Plus, now i don't need to type in the compile command by hand. =)

all I have to say about make is

Date: 2002-10-24 05:45 pm (UTC)
From: [identity profile] eub.livejournal.com
#!/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;

Re: all I have to say about make is

Date: 2002-10-25 09:28 am (UTC)
From: [identity profile] mh75.livejournal.com
sigh, i'm terribly slow. I don't get it.

Re: all I have to say about make is

Date: 2002-10-25 12:26 pm (UTC)
From: [identity profile] eub.livejournal.com
The make I was using in 2/97 (I guess that would be Ultrix make) did something bad if your makefile didn't have a final newline. I forget the bad thing, but it was cryptic and annoying and bad. It would silently ignore the last rule or something like that. Bad, something bad. This was a wrapper to make it never happen again.

But I checked and modern GNU make doesn't have this behavior any more, so I kind of have no point here.

Profile

meganursula: (Default)
Megan Hazen

May 2020

S M T W T F S
     12
3456789
101112 13141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 25th, 2025 08:27 am
Powered by Dreamwidth Studios