[Top][All Lists]

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

Re: "include $(top_builddir)/" is ignored by automake

From: Ralf Corsepius
Subject: Re: "include $(top_builddir)/" is ignored by automake
Date: Wed, 02 Feb 2005 11:46:28 +0100

On Wed, 2005-02-02 at 09:02 +0100, Alexandre Duret-Lutz wrote:
> >>> "Tom" == Tom Howard <address@hidden> writes:
>  Tom> Hi,
>  Tom> I use some m4 macros in my that produce a file called
>  Tom> in the top build directory.  In my files I try
>  Tom> to include this 
> An automake include is inlined when automake runs, i.e., long
> before configure would create the file.  You simply can't use
> configure output as automake input.
Right, but you can include configure output into Makefiles.

All you need to do is circumvent the pattern automake uses to catch
automake-file fragments (from automake):
my $INCLUDE_PATTERN = ('^include\s+'
                       . '((\$\(top_srcdir\)/' . $PATH_PATTERN . ')'
                       . '|(\$\(srcdir\)/' . $PATH_PATTERN . ')'
                       . '|([^/\$]' . $PATH_PATTERN . '))\s*(#.*)?' . "\

I.e. if you want configure to generate makefile fragments and to include
_makefile_ fragments into Makefiles, you can use something like this:

include $(MYDIR)/

However, I'd not recommend you to do this, because though this might
seem tempting at first glance, in most cases it is more troublesome than
helpful, in longer terms.

reply via email to

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