Re: [dev] Reasonable Makefiles

From: Nick <suckless-dev_AT_njw.me.uk>
Date: Tue, 11 Feb 2014 15:26:14 +0000

On Tue, Feb 11, 2014 at 03:41:43PM +0100, Roberto E. Vargas Caballero wrote:
> On Tue, Feb 11, 2014 at 02:39:43PM +0100, pmarin wrote:
> > You don't need to use the include statement.
> > cat config.mk Makefile | make -f -
>
> I usually use a rule in Makefile that, using cat in a similar way of
> you, generates a file with the name makefile (it usually generates
> the inclussion dependences and other things).

The disadvantage of that is that having files called Makefile and
makefile in the same directory, users may well look for the former to
make changes, leading to confusion. I certainly didn't know that
make looks for for 'makefile' before 'Makefile' until looking it up
just now.

Also, having created the makefile, does the Makefile invoke make
again automatically, or does the user have to re-enter their
command? If I type 'make foo' for the first time, what happens?
Presumably the target 'foo' isn't made...
Received on Tue Feb 11 2014 - 16:26:14 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 11 2014 - 16:36:06 CET