On Tue, 11 Feb 2014 20:15:06 +0000 (UTC)
Thorsten Glaser <t...@mirbsd.de> wrote:

> 
> Ugh, a horrid GNUmakefile… I normally write:
> 
> PROG=         foo
> 
> .include <bsd.prog.mk>
>

Not that I defend GNU make, but you can do:

foo:

This will use implicit rules and will compile foo.c.  If you have more
than one file with source code, this should work:

foo: bar.o

Will pick both foo.c and bar.c.  Of course pmake/bmake makes more than
that (and I don't want to argue about it): logic for installing
binaries/manpages, cleaning directories etc.

You can write sane rules for GNU make (I avoid implicit rules described
earlier myself). The problem is that auto-generated makefiles by
autotools are far from sane.  I would guess that poison starts there
and that is why GNU makefiles handle some obscure and weird
rules/variables and so on.  


-- 
Paul Onyschuk

Reply via email to