[Top][All Lists]

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

Re: Passing an "include" directive to

From: Thomas Guyot-Sionnest
Subject: Re: Passing an "include" directive to
Date: Tue, 25 Nov 2008 02:03:01 -0500
User-agent: Thunderbird (X11/20080925)

On 25/11/08 01:20 AM, Ralf Wildenhues wrote:
> Hello Thomas,
> * Thomas Guyot-Sionnest wrote on Mon, Nov 24, 2008 at 10:17:48PM CET:
>> I'm trying to pass an "include <file>" directive to without
>> having it interpreted by Automake.
>> What I'm trying to do is to update a Makefile variable based on
>> git-describe to provide a dynamic version string (in a very similar way
>> to how Git is doing in their own repository). It works nicely on GNU
>> Make with "-include" and "sinclude" because Automake doesn't interpret
>> it, but if I use "include" instead it will run Automake on every compile
>> (and we need to support non-GNU make programs).
>> Is it possible to have some lines in included verbatim in
>>, or any other way to define includes?
> If you have to support non-GNU make programs, you can't achieve this
> with one literal line.  Some non-GNU makes may need '.include' instead
> of 'include', and some need quotes.  Exploiting an undocumented Automake
> feature (please don't complain if upgrading breaks it), you can use
>   @am__include@ @address@hidden@am__quote@
> (these substitutions will be generated if you use automatic dependency
> tracking; otherwise, you may need to call the undocument AM_MAKE_INCLUDE
> macro yourself).

Thanks for your reply; that's very interesting. If at least I can
support Solaris, IRIX and hopefully HP/UX (I don't have this one for
testing but I'd expect user complaints in the future) that will be
awesome :)

In the mean time I managed to have it working at least for Solaris by
adding a space in front of the line (automake ignores it, and it looks
like make doesn't mind), but I guess your option if safer anyway. I'll
try it out.

Thanks a lot


reply via email to

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