The autoxt package provides Autoconf and Automake support for packages
constructed with the XT toolset. The package provides the
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 .
Autoconf
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
Automake
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 xtc-register.rtree
SCFLAGS = --main $*
STRINCLUDES = -I $(XTC)/share/xtc
EXTRA_DIST = $(pkgdata_DATA) $(wildcard *.str) $(wildcard *.meta)
CLEANFILES = $(wildcard *.dep)
BOOTCLEANFILES = xtc.c
See also: