[Top][All Lists]

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

Re: multiple --> single aclocal.m4

From: Stepan Kasal
Subject: Re: multiple --> single aclocal.m4
Date: Fri, 5 Aug 2005 10:54:51 +0200
User-agent: Mutt/1.4.1i

Hello Sam,

> >> So: how do I use aclocal.m4 with multiple subpackage

if my yesterday's mail haven't convinced you, here are a few hints:

Normally, aclocal finds all necessary macros and concatenates them to
form aclocal.m4.
But if the macros live in subdirectory m4/ (and aclocal was called with
option "-I m4"), aclocal doesn't copy the whole file, it just creates a
line looking like:

So you could find all macro files which are needed, copy them to one m4
directory, and aclocal.m4 would contain only such inlcude lines,
subdir/aclocal.m4 would contain

But how would you find the collection of all necessary m4 files?

Well, one possibility is to take all m4 files:

mkdir m4/
cp /usr/share/aclocal/*.m4 /usr/share/aclocal-1.9/*.m4 m4/

then run aclocal -I m4, aclocal -I ../m4, etc., in all subprojects.
And then remove unused m4 files, ie. those which are not referenced
from any aclocal.m4.

In the cvs version of Automake, aclocal has option --include, which
does this: all needed m4 files are copied to subdirectory m4/, and
aclocal.m4 contains only m4_include directives.
So you would just do
        mkdir m4/
        aclocal -I m4
        (cd sub1; aclocal -I ../m4)
        (cd sub2; aclocal -I ../m4)

To install the CVS version of automake, you have to install CVS version
of Autoconf first.
Or you can just take from CVS and incorporate this change
into automake-1.9.6/ .  CVS log should help you to extract
the exact patch that you need.

Good luck,

reply via email to

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