autoxt
tool
which should be run as part of the Autoconf/Automake bootstrapping process,
prior to running autoconf
. A typical bootstrap
script looks like:
#! /bin/sh autoxt autoreconf -if
The toplevel Makefile.am
should declare:
ACLOCAL_AMFLAGS = -I .
Autoxt installs a set of m4 macros autoxt.m4
with support for
package configuration switches. By just including the macro call
XT_USE_XT_PACKAGES
a configure.ac
file can be parameterized with
switches for all the StrategoXT packages:
AC_INIT([java-front],[0.6],[stratego-bugs@cs.uu.nl]) AM_INIT_AUTOMAKE XT_USE_XT_PACKAGES XT_PKG_ATERM XT_PKG_SDF XT_PKG_STRATEGOXT AC_PROG_CC AC_PROG_INSTALL AC_CONFIG_FILES([Makefile syn/Makefile]) AC_OUTPUT
XT_USE_XT_PACKAGES
XT_PKG_ATERM
XT_PKG_SDF
XT_PKG_STRATEGOXT
XT_TERM_DEFINE
PACKAGE_NAME_TERM()
, PACKAGE_TARNAME_TERM()
, PACKAGE_VERSION_TERM()
, PACKAGE_BUGREPORT_TERM()
, and SVN_REVISION_TERM()
. These strategies can be used in any Stratego program in this package.
XT_PRE_RELEASE
pre${SVN_REVISION}
to the PACKAGE_VERSION
and VERSION
variables. This is a naming convention for unstable packages that we are using in our release management system.
Furthermore, autoxt installs Makefile.xt
, a collection of automake
rules for compiling Stratego programs and applying other XT tools,
such as signature generation. Using this makefile, a makefile
reduces to a declaration of programs to be compiled. The makefile
automatically takes care of distributing the generated C code. The
specification will only be compiled when it is newer than the C
code. This means that packages using autoxt can be built using only
the Stratego Run-Time System (srts).
include $(top_srcdir)/Makefile.xt include $(wildcard *.dep) bin_PROGRAMS = xtc pkgdata_DATA = xtc-lib.rtree xtc-rep.rtree xtc-proc.rtree SCFLAGS = --main $* STRINCLUDES = -I $(XTC)/share/xtc EXTRA_DIST = $(pkgdata_DATA) $(wildcard *.str) $(wildcard *.meta) CLEANFILES = $(wildcard *.dep) BOOTCLEANFILES = xtc.c
include $(top_srcdir)/Makefile.xt
include $(wildcard *.dep)
bin_PROGRAMS
pkgdata_DATA
SCFLAGS
STRINCLUDES
EXTRA_DIST
CLEANFILES
BOOTCLEANFILES
See also: