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 ... Also, two potential gotchas: You may want to use s,[@]installed_guile[@],$$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). 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. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf