autoconf
[Top][All Lists]
Advanced

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

Re: Using $program_transform_name from ‘configure’


From: Ludovic Courtès
Subject: Re: Using $program_transform_name from ‘configure’
Date: Thu, 24 Apr 2014 23:48:39 +0200
User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)

Eric Blake <address@hidden> skribis:

> On 04/24/2014 03:54 AM, Ludovic Courtès wrote:
>
>>> I don't see an AC_CONFIG_FILES() in configure.ac that tries to create
>>> guild solely at configure time.  Therefore, I assume it's being created
>>> at make time - but which Makefile.am is responsible for creating it?
>> 
>> No, there was a ‘GUILE_CONFIG_SCRIPT’ invocation in configure.ac, which
>> wraps ‘AC_CONFIG_FILES’.
>> 
>>> _That_ rule would be the place to run $program_transform_name as part of
>>> the creation process, rather than trying to shoehorn the conversion into
>>> configure.ac.
>> 
>> Yeah I realized we can easily do that in Makefile.am (and we already did
>> for another script), so I took that route:
>> 
>>   
>> http://git.savannah.gnu.org/cgit/guile.git/commit/?id=d80b6acf198dddc90eba40a83de36b65ddf9f0ac
>
> Yay, glad we found a solution.
>
> Useless use of cat:
>
>> + cat $(srcdir)/guild.in \
>> + | $(SED) -e "s,@installed_guile@,$$guile,g" \
>
> could be simplified to pass the input file directly as sed's stdin,
> rather than through a pipe, as in:
>
> $(SED) < $(srcdir)/guild.in -e ...

Right.

> Also, two potential gotchas:
>
> You may want to use s,address@hidden@],$$guile,g to match the style
> used in the lines below (in fact, doing this is necessary to avoid false
> positives if you use gnulib's syntax-check rule that checks for
> unsubstituted @var@ in makefiles, where automake $(var) should have been
> used instead - but in that case, you'd also want to use $(bindir)
> instead of @bindir@ when determining $$guile).

OK.  I think this is addressed with:

  
http://git.sv.gnu.org/cgit/guile.git/commit/?id=7a85f2b68ce8c7c8a28e6bde03b7c9da01004db5

> Your use of s,,,g is risky.  If $$guile contains any commas after the
> user's program transform, or if @bindir@ contains any commas, you have
> an invalid sed script.  You could work around it by changing , to \,
> with another sed invocation, if you are worried about this case.

I’m not worried.  ;-)

Thanks,
Ludo’.



reply via email to

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