automake
[Top][All Lists]
Advanced

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

Re: Including a file at make-time instead of automake-time


From: Ralf Wildenhues
Subject: Re: Including a file at make-time instead of automake-time
Date: Sat, 25 Oct 2008 10:39:52 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Tim,

* Tim Bocek wrote on Fri, Oct 24, 2008 at 07:20:18PM CEST:
> I kind of an autotools novice and have a problem with using the include
> directive in make and automake.  I need to generate an include file at make
> time, so this file is not available when I run automake.

Do you require GNU make for building your package?

> Is there any way to tell automake to defer including the file to when make
> is run?

With GNU make, I see a couple of ways to hide the include from automake:

1) Create a GNUmakefile in the same build directory with contents
include Makefile
include generated-file

2) prepend a substitution: put
  AC_SUBST([myinclude], [include])
in configure.ac, and use
  @include@ generated-file

Even for portable make, I see a way, but it uses a currently
undocumented feature of Automake (thus may break in future versions):
For dependency tracking, the macro AM_MAKE_INCLUDE finds out how the
make implementation allows file inclusion.  It sets @am__include@ which
you can use then as portable include.

Cheers,
Ralf




reply via email to

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