Re: Conditional append

2005-01-13 Thread Alexandre Duret-Lutz
>>> "Stepan" == Stepan Kasal <[EMAIL PROTECTED]> writes: Stepan> Hi. Stepan> On Fri, Jan 07, 2005 at 12:20:57PM -0800, Shaun Jackman wrote: >> Is there any reason why the append operator shouldn't treat an >> undefined variable as empty? Stepan> Safety, I guess. http://sources.redhat.com/ml

Re: Conditional append

2005-01-13 Thread Alexandre Duret-Lutz
>>> "Stepan" == Stepan Kasal <[EMAIL PROTECTED]> writes: Stepan> Hi, Stepan> On Thu, Jan 06, 2005 at 09:26:04AM -0800, Shaun Jackman wrote: >> bin_PROGRAMS=hello >> CLEANFILES=something >> include $(top_srcdir)/extra.am >> >> or simply >> >> bin_PROGRAMS=goodbye >> include $(top_srcdir

Re: Conditional append

2005-01-11 Thread J.T. Conklin
Stepan Kasal <[EMAIL PROTECTED]> writes: >> 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 variab

Re: Conditional append

2005-01-11 Thread Stepan Kasal
Hi, 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

Re: Conditional append

2005-01-10 Thread J.T. Conklin
Shaun Jackman <[EMAIL PROTECTED]> writes: > Thanks Stepan. I'm going to go with your latter suggestion, since it > doesn't require modifying all the other Makefile.am. This seems like a > rather arbitrary limitation of automake though. Is there any reason > why the append operator shouldn't treat a

Re: Conditional append

2005-01-10 Thread Stepan Kasal
Hi. On Fri, Jan 07, 2005 at 12:20:57PM -0800, Shaun Jackman wrote: > Is there any reason why the append operator shouldn't treat an > undefined variable as empty? Safety, I guess. make handles variables differently from normal imperative languages, so you can do this in your makefile: a=$b c b=

Re: Conditional append

2005-01-07 Thread Shaun Jackman
Thanks Stepan. I'm going to go with your latter suggestion, since it doesn't require modifying all the other Makefile.am. This seems like a rather arbitrary limitation of automake though. Is there any reason why the append operator shouldn't treat an undefined variable as empty? Cheers, Shaun >

Re: Conditional append

2005-01-07 Thread Stepan Kasal
Hi, On Thu, Jan 06, 2005 at 09:26:04AM -0800, Shaun Jackman wrote: > bin_PROGRAMS=hello > CLEANFILES=something > include $(top_srcdir)/extra.am > > or simply > > bin_PROGRAMS=goodbye > include $(top_srcdir)/extra.am > > and extra.am needs to add one file to CLEANFILES in both cases. well, I se

Re: Conditional append

2005-01-06 Thread Shaun Jackman
That's the right track. My problem, though, is that your little snippet is in an included automake snippet. bin_PROGRAMS=hello CLEANFILES=something include $(top_srcdir)/extra.am or simply bin_PROGRAMS=goodbye include $(top_srcdir)/extra.am and extra.am needs to add one file to CLEANFILES in bo

Re: Conditional append

2005-01-06 Thread J.T. Conklin
Shaun Jackman <[EMAIL PROTECTED]> writes: > The automake files of my project may or may not define CLEANFILES, > they then include an automake snippet which conditionally appends a > file to CLEANFILES. I can't use either = or += because I get either > > flash-image.am:4: CLEANFILES must be set wit