[Top][All Lists]

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

How to extend automake?

From: Bruno Haible
Subject: How to extend automake?
Date: Fri, 27 May 2005 13:29:44 +0200
User-agent: KMail/1.5.4


How can I extend automake (other than submitting a patch and waiting for
automake-1.10 to be released)?

More precisely, when a recipe for a certain feature contains the following

  1. In the top-level directory of your package, create a subdirectory
     called `bison-po'.  It will contain localization files borrowed
     from the Bison installation.
          $ mkdir bison-po

  2. Into the `bison-po' directory, copy the `' file
     installed by Bison under `share/bison/bison-po/' in
     Bison's installation directory.  For example, if the `bison'
     program is installed as `/usr/local/bin/bison', you will find the
     file under `/usr/local/share/bison/bison-po/'.
          $ cp /usr/local/share/bison/bison-po/ bison-po/
     The other files in this directory will be created later,

  3. Into the directory containing the GNU autoconf macros used by the
     package - often called `m4/' - copy the `bison.m4' file installed
     by Bison under `share/aclocal/bison.m4' in Bison's installation
     directory.  Example:
          $ cp /usr/local/share/aclocal/bison.m4 m4/bison.m4

  4. In the top-level `', add `bison-po' to the SUBDIRS
     variable and, if present, also to the DIST_SUBDIRS variable.  It
     should be mentioned after directories that contain .y files that
     are processed by Bison, such as - usually - `src'.  Example:
          SUBDIRS = doc lib src po bison-po tests

  5. In the top-level `', add `bison-po/Makefile' to the
     `AC_CONFIG_FILES' command that lists the autogenerated Makefiles.
          AC_CONFIG_FILES([doc/Makefile lib/Makefile src/Makefile \
                           po/ bison-po/Makefile tests/Makefile])

  6. In the top-level `', after the `AM_GNU_GETTEXT'
     invocation, add an invocation of `BISON_I18N'.  As argument, you
     pass a space-separated list of parser code files generated by
     Bison.  Example:
     The `BISON_I18N' macro is defined in `bison.m4' that you copied
     earlier.  It will cause `configure' to find the values of some
     variables that are used by `bison-po/'.

  8. Finally, invoke `autoreconf', to rebuild the autoconf/automake
     generated build infrastructure.
          $ autoreconf

Do you see how I could extend 'automake' to simplify this sequence of

What I want to do is to ship with bison (and similarly, other programs) an
autoconf macro and an automake extension, so that all packages which use
bison and a could use the extension by adding a single line to


reply via email to

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