[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re-execute with the "correct" make implementation

From: Nick Bowler
Subject: Re: Re-execute with the "correct" make implementation
Date: Thu, 3 Jan 2013 17:53:02 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On 2013-01-03 23:05 +0100, Stefano Lattarini wrote:
> On 01/03/2013 10:34 PM, Eric Blake wrote:
> > Hmm, that goes back to one of the questions we asked about Automake-NG -
> > is it possible to write a generic makefile that merely forwards all
> > requests to gmake, and where all of the real magic of Automake-NG is in
> > GNUMakefile, so that even if the user types 'make all' they still end up
> > running 'gmake all' under the hood?
> >
> For usual targets, that is easy.  I don't even think that must be done
> at Automake-NG level; one can simply use 'GNUmakefile.am' as Automake-NG
> input file (instead of the usual 'Makefile.am'), add 'GNUmakefile' to
> an AC_CONFIG_FILES invocation, and then hand-write a simple Makefile
> acting as a thin wrapper:
>   TARGETS = all check clean distclean dist distcheck install uninstall
>   $(TARGETS): ; @gmake $(AM_MAKEFLAGS) $@

Unfortunately, this kind of wrapper doesn't work particularly well.  If
the user runs something similar to:

  make -j2 all install

then the wrapper makefile will happily fork off two independent make
instances in parallel: one running "gmake all" and one running "gmake
install".  The result will probably be catastrophic.

Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]