automake
[Top][All Lists]
Advanced

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

AMLOCAL_AMFLAGS and the dist recipe


From: David Byron
Subject: AMLOCAL_AMFLAGS and the dist recipe
Date: Tue, 15 Nov 2005 15:40:42 -0800

I've defined some macros that I'd like to share across projects.  Seems
to me I've got two choices for getting them in my dist tarball:

1. include the macros I wrote in the files I wrote
2. include the macros I wrote in aclocal.m4

>From what I can tell, automake chooses #1 when ACLOCAL_AMFLAGS is a
relative path:

ACLOCAL_AMFLAGS = -I ../../../util/scripts/m4

and it chooses #2 when ACLOCAL_AMFLAGS is an absolute path:

ACLOCAL_AMFLAGS = -I /home/dbyron/src/main/util/scripts/m4


Unfortunately, with #1, my files don't make it in the dist tarball.
Instead, the generated makefile creates the directory:

<package-version>/../../../util/scripts/m4

and then copies my macros there.  No big surprise that this doesn't
work, as aclocal has lines like:

m4_include([../../../util/scripts/m4/foo.m4])

I've come up with:

ACLOCAL_AMFLAGS = -I `cd ../../../util/scripts/m4 && pwd`

as a solution, but it feels funny.  It gets the macros included in
aclocal.m4 so my dist tarball is complete, and it keeps the extra
directories from getting created.  Is there a better way?  I'd like to
avoid the absolute path so people can grab this file from revision
control and stick it wherever they want as long as they grab the scripts
too.

The other small downside to this solution is that instead of just
sharing the macros as they are in the tree of files from revision
control, they get compiled into aclocal.m4 in each project that uses
them.

How do other people deal with this problem?

$ automake --version
automake (GNU automake) 1.9

$ autoconf --version
autoconf (GNU Autoconf) 2.59

Thanks for your help.

-DB




reply via email to

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