[dev] Re: Reasonable Makefiles

From: Thorsten Glaser <tg_AT_mirbsd.de>
Date: Tue, 11 Feb 2014 20:15:06 +0000 (UTC)

“Re: *** GMX Spamverdacht *** [dev] Reasonable Makefiles”.
Honestly!


Markus Wichmann dixit:

>A typical Makefile of mine looks like this:

Ugh, a horrid GNUmakefile… I normally write:

PROG= foo

.include <bsd.prog.mk>

Or, if the sources are more than just foo.c, and if the manpage
is in section 8:

PROG= foo
SRCS+= foo.c
SRCS+= bar.c
SRCS+= baz.c
MAN= foo.8

.include <bsd.prog.mk>

Of course, I could also write…

SRCS!= cd ${.CURDIR} && echo *.c

… but I prefer explicit enumeration here. (We do have implicit
enumeration for some cases, like ports subdirs, and manpages in
the manpage-only source subdirs.)

bye,
//mirabilos
-- 
<Natureshadow> Ach, mach doch was du willst, du hast doch eh immer Recht!
<mirabilos> jupp ~/.etc/sig………
<Natureshadow> unfaßbar…
<Natureshadow> Mit Eszett sogar, unfaßbar!
Received on Tue Feb 11 2014 - 21:15:06 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 11 2014 - 21:24:06 CET