Hello, On Tue, Jul 05, 2005 at 09:31:10AM -0400, [EMAIL PROTECTED] wrote: > ifeq (,$(filter second-expansion,$(.FEATURES))) > # GNU make <3.81 > PRE_D := $$ > else > # GNU make >=3.81 > PRE_D := $$$$ > endif ... > install-dist_myDATA: $(subst $$,$(PRE_D),$(dist_my_DATA))
> The trick will be knowing when to generate this GNU make-specific > content into the makefile, and when you can avoid it... I assume you'd > only want to generate it when you have filenames containing $. Or, as Alexandre pointed out, when you _might_ have them, for example when some filenames are substituted by configure. This means that Automake has to place both alternatives into the generated Makefile.in. When building the package, configure would detect which make is used, and select the right alternative when generating the Makefile, by a mechanism similar to AM_CONDITIONAL. Actually, this can be reduced: Makefile.in would contain the following two alternatives: install-dist_myDATA: $(dist_my_DATA) install-dist_myDATA: $(subst $$,$$$$,$(dist_my_DATA)) And configure would select the latter variant, iff GNU make 3.81 is detected. Actually, it follows the standard teplate: - test for a vendor bug in configure - activate a workaround if the bug is detected But it's sad that the vendor of the non-portable implementation here is GNU. Alternatively, Automake could simply state that $'s in filename are not portable. I'd really like to ask you to introduce a way to switch this unusual feature off, preferably with a dot-target, so that portable Makefiles can be generated more easily. Have a nice day, Stepan