Re: [dev] Reasonable Makefiles

From: pmarin <>
Date: Tue, 11 Feb 2014 14:39:43 +0100

You don't need to use the include statement.
cat Makefile | make -f -


On Tue, Feb 11, 2014 at 1:19 PM, Nick <> wrote:
> I was reading the opengroup specifications for make(1) recently[0],
> and found that even our standard makefile practise of using 'include'
> for config variables is nonstandard, as far as they're concerned.
> Needless to say I think 'include' is a perfectly reasonable feature
> to use, and it evidently works everywhere that people care about.
> But it got me thinking about what other features of make are worth
> using. Basically because I'm replacing a autotools horrorshow with
> plain make, but am not sure what the nicest way of allowing compile-
> time feature disabling is. Can 'ifdef' be relied upon, and does it
> tend to produce unreadable and buggy makefiles in anyone's
> experience? Are there other options, beyond asking people to comment
> out certain lines in a, to e.g. disable some LDFLAGS?
> I know switching to mk would solve all of my problems and give me
> something standard and portable, but it would also be a dependency
> which isn't as widely installed as make, which I'm not overly keen on.
> And also I generally agree that compile-time options are a bad plan,
> but one fight at a time, eh?
> Nick
> 0.
Received on Tue Feb 11 2014 - 14:39:43 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 11 2014 - 14:48:06 CET