[Top][All Lists]

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

Re: Conditional append

From: Stepan Kasal
Subject: Re: Conditional append
Date: Tue, 11 Jan 2005 10:39:27 +0100
User-agent: Mutt/1.4.1i


On Mon, Jan 10, 2005 at 12:03:21PM -0800, J.T. Conklin wrote:
> [...] MPC's automake module has a lot of otherwise unecessary code
> to track whether a given automake principal has been output in order
> to use "=" or "+=".  
> All that cruft could be removed if automake interpreted "+=" of a
> previously unseen variable as an assignment.

``a lot of code''?

All you need is:
1) remember the list of all variables used
   (To be exact, you don't need the list of variables actually used,
   any superset will do.)
2) output empty assignments to an automake fragment
3) `include' that fragment at the beginning of your

This doesn't need much code, and you have a which looks
the same as it would if Automake interpreted += of an unseen variable as
an assignment.

But I think that your current code produces nicer's.
If a variable is used only on one line, it's more natural if it's an
That matters if there is a danger that a human will try to read them.

So the price is for nicer output, not to overcome Automake limitations.

Have a nice day,
        Stepan Kasal

reply via email to

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