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@ @[EMAIL PROTECTED]@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