[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generating file lists
From: |
NightStrike |
Subject: |
Re: Generating file lists |
Date: |
Fri, 16 Oct 2009 14:51:15 -0400 |
On Fri, Oct 16, 2009 at 1:52 PM, NightStrike <address@hidden> wrote:
> On Fri, Oct 16, 2009 at 1:32 PM, Ralf Wildenhues <address@hidden> wrote:
>> * NightStrike wrote on Fri, Oct 16, 2009 at 07:24:36PM CEST:
>>> On Fri, Oct 16, 2009 at 1:22 PM, Ralf Wildenhues wrote:
>>> > SYSHEAD_LIST=`echo $srcdir/include/sys/*.h`
>>> >
>>> > or
>>> > set x $srcdir/include/sys/*.h
>>> > shift
>>> > SYSHEAD_LIST="$*"
>>>
>>> Which is more autoconfy-correct?
>>
>> Both have drawbacks and advantages. The first has a problem if $srcdir
>> starts with a hyphen (not realistic; that would break lots of other
>> places as well) or has other special characters; you could use AS_ECHO
>> instead though as a remedy. The second does not fork, which is nice.
>> But note that inside a macro, $* has relevance to M4, so you might need
>> to write $][* or $[]*, depending on quotation level.
>
> Thanks for the synopsis of both. I'll go with the first. I use
> AS_ECHO everywhere anyway.
Ok, so I tried to be fancy and do this:
AS_VAR_APPEND([SYSHEAD_LIST],[AS_ECHO([$srcdir/include/sys/*.h])])
But that results in $SYSHEAD_LIST being equal to "printf". Darn.
I was hoping to be able to keep appending more files to this list. Am
I not using AS_VAR_APPEND right?