bug-automake
[Top][All Lists]
Advanced

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

APIVERSION


From: Akim Demaille
Subject: APIVERSION
Date: 21 Jan 2002 16:36:07 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

Up to now I was able to bypass the very troublesome aclocal.  I'm
using the scheme which someday (NRSN) should be implemented into
autoreconf: it installs local copies (or symlinks) of the lib .m4
files in the packages, and uses m4_include to import then, instead of
an additional verbatim copy.

Here is how I used to do that:


| ~/src/m4 % less bootstrap
| #! /bin/sh -x
| 
| # helps bootstrapping M4, when checked out from CVS
| # requires GNU autoconf, GNU automake and GNU libtool
| 
| find . -name autom4te.cache | xargs rm -rf
| 
| auxdir=`grep '^AC_CONFIG_AUX_DIR' configure.ac | sed 
's/^.*(\([^)]*\)).*$/\1/'`
| 
| rm -f config.cache
| rm aclocal.m4
| 
| trap 'rm -f aclocal.m4t' 0 1 9 15
| 
| # Make a copy of each Automake/Gettext m4 file we need.
| aclocal_libdir=`aclocal --print-ac-dir`
| for i in `make -f config/Makefile.am spy SPIED=ACLOCAL_MACROS`
| do
|   cp $aclocal_libdir/$i config ||
|     echo "$0: cannot find $i" >&2
| done

As you can see, here I rely on aclocal spitting its lib dir, so that I
can go by hand in there, and steal its macros.  Now, it is answering
the non version'ed directory, and my stuff is failing.

I need some reliable way to get this directory.  This is very
important, as autoreconf must be able to rely on this some day.

Thanks!

PS/ FYI, the rest of the bootstrap part devoted to aclocal.m4 new
generation.

| # aclocal is one of the worst things that ever happened to the GNU
| # build system...
| {
|   sed 's/^  //' <<EOF
|   # This file was gererated by $0.
|   # Do not edit by hand, *nor by aclocal*.
| 
|   # aclocal macros.
| EOF
|   for i in `make -f config/Makefile.am spy SPIED=ACLOCAL_MACROS`
|   do
|     echo "m4_include([config/$i])"
|   done
|   echo
|   echo '# GNU M4 macros.'
|   for i in `make -f config/Makefile.am spy SPIED=SPECIFIC_MACROS`
|   do
|     echo "m4_include([config/$i])"
|   done
|   echo
| } >aclocal.m4
| 
| 
| # Automake understands nothing to our aclocal and misses all its
| # AC_SUBST...  We need aclocal to contain the includes though, otherwise
| # autoconf won't see them either :)
| # Output them, but in a way that makes m4 ignore then.
| #
| # Don't have aclocal grow while autoconf reads it: use aclocal.m4t.
| {
|   echo '# Help Automake understand includes.'
|   echo "ifelse("
|   echo "  ["
|   echo "    # It doesn't see AC_SUBSTs."
|   autoconf -t AC_SUBST:'    AC_SUBST([$1])' | sort -u
|   echo "    # It doesn't see AM_CONDITIONALs."
|   autoconf -t AM_CONDITIONAL:'    AM_CONDITIONAL([$1])' | sort -u
|   echo "  ]"
|   echo ")"
| } >aclocal.m4t
| 
| cat aclocal.m4t >>aclocal.m4



reply via email to

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