discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Revisiting a Makefile


From: Nicola Pero
Subject: Re: Revisiting a Makefile
Date: Wed, 8 Jun 2005 14:15:56 +0100 (BST)

> > Currently, you create config.make when 'make' is typed for the first time
> > ... then you delete it when 'make clean' or 'make distclean' is used.
> > PS: if you have after-clean::, you don't need after-distclean::.  'make
> > distclean' runs 'make clean' first, then does the additional distclean
> > operations. ;-)
> 
> Didn't work for me. Without the after-distclean, the last thing "make
> distclean" does
> is a "sh config.sh". So i added this line which solved the problem.

<puzzled> ... <checks GNUmakefile again> ... you are using frameworks,
that's why! ;-)

Anyway your diagnosis is correct then ... distclean runs clean first, and
that would remove the file; but then the frameworks' distclean does a
recursive invocation which means make reads the GNUmakefile again and that
requires regenerating the file.

It's quite annoying to have the config script executed during make 
distclean though.  I'd recommend a solution where it's not executed at all 
during 'make distclean'.

So ... the easiest and cleanest thing to do would be to only delete the
file on 'make distclean'.

Normally, you expect that 'make clean' deletes compilation products but
leaves the configuration unchanged, while 'make distclean' removes all
generated files (configuration included) and gives you the pristine source
package.

So, I suggest you have only an 'after-distclean::' rule.  If you do, then
the config file is also not regenerated during a 'make distclean'.  :-)

Anyway, I suppose you could keep the solution you have if you like it. ;-)

Thanks


PS: you don't need to include aggregate.make I think ;-)






reply via email to

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