automake
[Top][All Lists]
Advanced

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

Re: Passing an "include" directive to Makefile.in


From: Ralf Wildenhues
Subject: Re: Passing an "include" directive to Makefile.in
Date: Tue, 25 Nov 2008 07:20:04 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

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 Makefile.in 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 Makefile.am included verbatim in
> Makefile.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).

Cheers,
Ralf




reply via email to

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