develooper Front page | perl.perl6.porters | Postings from April 2000

Re: Better mousetrap ^W Makefile

Jarkko Hietaniemi
April 30, 2000 12:57
Re: Better mousetrap ^W Makefile
Message ID:
> I think we'll still want to keep a minimal makefile around for the
> very very first steps required to build microperl.  Then we're off!

Yeah, something of the below complexity, and nothing much more.
(No guarantees on the syntax, I'm making this up as I write :-)

O   = .o
C   = .c
SRC = a$(C) b$(C) c$(C) d$(C)
OBJ = $(SRC:$(C)=$(O))

a$(O): a$(C) a.h
b$(O): b$(C) b.h a.h
c$(O): c$(C) c.h x.h
d$(O): d$(C) d.h a.h x.h
main$(O): main$(C)

microperl: $(OBJ) main$(O)
	$(CC) -o $@ main$(O) $(OBJ) 

And, of course, even the above is unportable: -o.  We still need Win*
and VMS makefiles to cater their compilers' syntaxes, at least -- unless
we still are assuming gcc.

> > ... not even to spit at the general direction of GNU
> > configure/automake [...]
> I shall waste none of my precious bodily fluids in so foolish an
> endeavor.  The GNU build tools are, by and large, awful.  GNU make
> is pretty good, but the rest are recycling fodder.


> > And yes, I would make building out of the source directory a
> > requirement.
> You mean, 'building outside of the source dir'?  If so, three cheers.


$jhi++; #
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About