aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2004-02-06 12:51:00 +0000
committerBen Elliston <bje@gnu.org>2004-02-06 12:51:00 +0000
commit501fbb6421afa325d1cff304285ef9bd70730a95 (patch)
tree421d60c655f1a90007bed3347fa10204860ec9c7 /Makefile.am
parentdfe3dd5f140723ecc164931f1f0655efd5fb177f (diff)
downloaddejagnu-501fbb6421afa325d1cff304285ef9bd70730a95.zip
dejagnu-501fbb6421afa325d1cff304285ef9bd70730a95.tar.gz
dejagnu-501fbb6421afa325d1cff304285ef9bd70730a95.tar.bz2
* Use modern Automake features to simplify the Makefiles/configury.
* This work eliminates the need for the special Clean.tcl script. * Clean.tcl: Remove. * Makefile.am (SUBDIRS): Add testsuite, example directories. (EXTRA_DIST): Define. (pkgdata_SCRIPTS): Add lib/*.exp files. (DATE, TCLSH): Remove. (configdir, config_DATA, config_SCRIPTS): Define. (baseboarddir, baseboard_DATA, baseboard_SCRIPTS): Likewise. (pkgdata_DATA): Likewise. (djlibexecdir, djlibexec_SCRIPTS): Likewise. (PKGING, PACKAGING_METAFILES): New macros. (clean-local): Remove. (rpm): Depend on dist. (deb): Likewise. (dist-hook): Remove. (lib_dest, lib_files): Likewise. (baseboard_dest, baseboard_files): Likewise. (include_dest, config_dest, config_files): Likewise. (install-data-local): Likewise. (uninstall-local): Likewise. (site.exp): Likewise. * Makefile.in: Regenerate. * testsuite/Makefile.am (all, all-am, etcetera): Remove. (force): Likewise. (EXTRA_DIST): Define. (site.exp): Remove target. * testsuite/Makefile.in: Regenerate. * testsuite/libdejagnu/Makefile.am (EXTRA_DIST): Define. (noinst_PROGRAMS): Rename from this .. (check_PROGRAMS): .. to this. * testsuite/libdejagnu/Makefile.in: Regenerate. * doc/Makefile.am (man_MANS): Rename from this .. (dist_man_MANS): .. to this. (info_TEXINFOS): Define. (TARGETS): Remove overview.rtf. (EXTRA_DIST): Define. (%.rtf: %.sgml): Remove rule. (%.gif: %.fig): Likewise. (%.epsi: %.eps): Likewise. (%.eps: %.fig): Likewise. (clean, realclean, distclean): Remove. (install-docs): Don't install overview.rtf. * doc/Makefile.in: Regenerate. * doc/texinfo.tex: New file. * example/calc/Makefile.am (noinst_PROGRAMS): Rename from this .. (check_PROGRAMS): .. to this. (EXTRA_DIST): Add test cases and calc.1 man page. * example/calc/Makefile.in: Regenerate. * example/calc/aclocal.m4: Likewise. * example/calc/configure: Likewise. * example/calc/stamp-h.in: Remove. * example/hello/Makefile.am (bin_PROGRAMS): Rename from this .. (check_PROGRAMS): .. to this. (EXTRA_DIST): Define. * example/hello/Makefile.in: Regenerate. * example/hello/aclocal.m4: Likewise. * example/hello/configure: Likewise. * example/hello/testsuite/Makefile.am (EXTRA_DIST): Define. * example/hello/testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am273
1 files changed, 174 insertions, 99 deletions
diff --git a/Makefile.am b/Makefile.am
index 3a4c8a6..9e78203 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,25 +1,180 @@
# Process this file with automake to generate Makefile.in
AUTOMAKE_OPTIONS = dejagnu
+SUBDIRS = doc testsuite example
-# Install all the associated data files
-SUBDIRS = doc # testsuite example
+EXTRA_DIST = ChangeLog.0 MAINTAINERS runtest site.tmpl \
+ $(pkgdata_DATA) $(pkgdata_SCRIPTS) \
+ $(config_DATA) $(config_SCRIPTS) \
+ $(baseboard_DATA) $(baseboard_SCRIPTS) \
+ $(PACKAGING_METAFILES)
-# Install the bourne shell script driver in the bindir
bin_SCRIPTS = runtest
+include_HEADERS = dejagnu.h
-# Install the main DejaGnu expect file in the datadir
-pkgdata_SCRIPTS = runtest.exp
+pkgdata_SCRIPTS = \
+ runtest.exp \
+ lib/debugger.exp lib/dejagnu.exp lib/dg.exp lib/framework.exp \
+ lib/ftp.exp lib/kermit.exp lib/libgloss.exp lib/mondfe.exp \
+ lib/remote.exp lib/rlogin.exp lib/rsh.exp lib/standard.exp \
+ lib/target.exp lib/targetdb.exp lib/telnet.exp lib/tip.exp \
+ lib/util-defs.exp lib/utils.exp lib/xsh.exp
-# Install config.guess too, so we can use it to figure out what type
-# of machine we're running on.
-libexecdir = $(pkgdatadir)/libexec
-libexec_SCRIPTS = config.guess
+configdir = $(pkgdatadir)/config
+config_DATA = config/README
+config_SCRIPTS = \
+ config/arc.exp \
+ config/arm-ice.exp \
+ config/base-config.exp \
+ config/base68k.exp \
+ config/bug.exp \
+ config/cfdbug.exp \
+ config/cygmon.exp \
+ config/d10v.exp \
+ config/ddb-ether.exp \
+ config/ddb.exp \
+ config/default.exp \
+ config/dos.exp \
+ config/dve.exp \
+ config/gdb-comm.exp \
+ config/gdb_stub.exp \
+ config/h8300.exp \
+ config/i386-bozo.exp \
+ config/i960.exp \
+ config/m32r-stub.exp \
+ config/m32r.exp \
+ config/m68hc11.exp \
+ config/m68k-emc.exp \
+ config/mips-idt.exp \
+ config/mn10200-eval.exp \
+ config/mn10300-eval.exp \
+ config/netware.exp \
+ config/powerpc-bug.exp \
+ config/proelf.exp \
+ config/rom68k.exp \
+ config/sh.exp \
+ config/sid.exp \
+ config/sim.exp \
+ config/slite.exp \
+ config/sparclet.exp \
+ config/tic80.exp \
+ config/udi.exp \
+ config/unix.exp \
+ config/vr4100.exp \
+ config/vr4300.exp \
+ config/vr5000.exp \
+ config/vrtx.exp \
+ config/vxworks.exp
-DATE = `date "+%Y%m%d`
+baseboarddir = $(pkgdatadir)/baseboards
+baseboard_DATA = baseboards/README
+baseboard_SCRIPTS = \
+ baseboards/a29k-udi.exp \
+ baseboards/am33_2.0-libremote.exp \
+ baseboards/arc-sim.exp \
+ baseboards/arm-ice.exp \
+ baseboards/arm-sid.exp \
+ baseboards/arm-sim.exp \
+ baseboards/basic-sid.exp \
+ baseboards/basic-sim.exp \
+ baseboards/cf.exp \
+ baseboards/cygmon.exp \
+ baseboards/cygwin.exp \
+ baseboards/d10v-sim.exp \
+ baseboards/d10v.exp \
+ baseboards/d30v-sim.exp \
+ baseboards/danlite-elf.exp \
+ baseboards/dos.exp \
+ baseboards/fr30-cygmon.exp \
+ baseboards/fr30-elf.exp \
+ baseboards/fr30-sim.exp \
+ baseboards/frv-elf.exp \
+ baseboards/frv-sim.exp \
+ baseboards/frv-tiger.exp \
+ baseboards/frv-tomcat.exp \
+ baseboards/gdbserver-sample.exp \
+ baseboards/h8300-sim.exp \
+ baseboards/h8300.exp \
+ baseboards/i386-bozo.exp \
+ baseboards/i386-sid.exp \
+ baseboards/i960-cyclone.exp \
+ baseboards/i960-sim.exp \
+ baseboards/jmr3904-sim.exp \
+ baseboards/linux-gdbserver.exp \
+ baseboards/linux-libremote.exp \
+ baseboards/m32r-elf.exp \
+ baseboards/m32r-sid.exp \
+ baseboards/m32r-sim.exp \
+ baseboards/m68hc11-sim.exp \
+ baseboards/m68k-emc.exp \
+ baseboards/m68k-sid.exp \
+ baseboards/mcore-elf.exp \
+ baseboards/mcore-moto-sim.exp \
+ baseboards/mcore-pe.exp \
+ baseboards/mcore-sim.exp \
+ baseboards/mips-idt.exp \
+ baseboards/mips-lnews-sim.exp \
+ baseboards/mips-lsi-sim.exp \
+ baseboards/mips-sim-idt32.exp \
+ baseboards/mips-sim-idt64.exp \
+ baseboards/mips-sim.exp \
+ baseboards/mips64-sim.exp \
+ baseboards/mips64vr4100-sim.exp \
+ baseboards/mmixware-sim.exp \
+ baseboards/mn10200-cygmon.exp \
+ baseboards/mn10200-sim.exp \
+ baseboards/mn10300-cygmon.exp \
+ baseboards/mn10300-sim.exp \
+ baseboards/msparc-cygmon.exp \
+ baseboards/op50n.exp \
+ baseboards/powerpc-bug.exp \
+ baseboards/powerpc-bug1.exp \
+ baseboards/powerpc-sim.exp \
+ baseboards/powerpcle-sim.exp \
+ baseboards/rom68k-idp.exp \
+ baseboards/sh-hms.exp \
+ baseboards/sh-sid.exp \
+ baseboards/sh-sim.exp \
+ baseboards/sparc-sim.exp \
+ baseboards/sparc64-sim.exp \
+ baseboards/sparclet-aout.exp \
+ baseboards/sparclite-coff.exp \
+ baseboards/sparclite-cygmon.exp \
+ baseboards/sparclite-sim-le.exp \
+ baseboards/sparclite-sim.exp \
+ baseboards/strongarm-cygmon.exp \
+ baseboards/tic80-sim.exp \
+ baseboards/tx39-dve.exp \
+ baseboards/tx39-sim.exp \
+ baseboards/unix.exp \
+ baseboards/usparc-cygmon.exp \
+ baseboards/v850-sim.exp \
+ baseboards/vr4100-ddb.exp \
+ baseboards/vr4100-sim.exp \
+ baseboards/vr4111-sim.exp \
+ baseboards/vr4300-ddb.exp \
+ baseboards/vr4300-sim.exp \
+ baseboards/vr4300.exp \
+ baseboards/vr5000-ddb.exp \
+ baseboards/vx4300.exp \
+ baseboards/vx68k.exp \
+ baseboards/vx960.exp \
+ baseboards/vxsparc.exp \
+ baseboards/x86-cygmon.exp \
+ baseboards/xscale-cygmon.exp \
+ baseboards/xtensa-sim.exp
-TLCSH = @TCLSH@
-PKGDIR = /opt
+pkgdata_DATA = stub-loader.c testglue.c
+
+djlibexecdir = $(pkgdatadir)/libexec
+djlibexec_SCRIPTS = config.guess
+
+PKGING = packaging
+PACKAGING_METAFILES = $(PKGING)/depot/dejagnu.psf \
+ $(PKGING)/deb/site.exp $(PKGING)/deb/changelog $(PKGING)/deb/conffiles \
+ $(PKGING)/deb/control $(PKGING)/deb/copyright $(PKGING)/deb/postinst \
+ $(PKGING)/deb/preinst $(PKGING)/deb/rules $(PKGING)/pkg/pkginfo \
+ $(PKGING)/pkg/prototype $(PKGING)/rpm/dejagnu.spec
RUNTESTDEFAULTFLAGS = --srcdir $(srcdir)/testsuite RUNTEST=$(RUNTEST)
RUNTEST = ` \
@@ -32,14 +187,6 @@ check-DEJAGNU:
cd testsuite ; $(MAKE) check
cd example ; $(MAKE) check
-# Since we don't use SUBDIRS, we have to manually clean the
-# subdirectories. We don't use SUBDIRS, so the example or test cases
-# don't get built by default for a "make all".
-clean-local:
- cd doc ; $(MAKE) clean
- cd testsuite ; $(MAKE) clean
- cd example ; $(MAKE) clean
-
# Set ourselves up to build an RPM
tarball: book1.html overview.ps overview.pdf
-rm -fr dejagnu-${VERSION}
@@ -50,7 +197,6 @@ tarball: book1.html overview.ps overview.pdf
cp -R $(srcdir)/doc/html dejagnu-${VERSION}/doc/; \
cp $(srcdir)/doc/overview.ps dejagnu-${VERSION}/doc/; \
cp $(srcdir)/doc/overview.pdf dejagnu-${VERSION}/doc/; \
- cp $(srcdir)/doc/overview.rtf dejagnu-${VERSION}/doc/; \
tar cvf ../dejagnu-${VERSION}.tar dejagnu-${VERSION}; \
gzip -9fv ../dejagnu-${VERSION}.tar
@@ -58,12 +204,12 @@ rpmspec: $(srcdir)/packaging/rpm/dejagnu.spec
cp -f $(srcdir)/packaging/rpm/dejagnu.spec /usr/src/redhat/SPECS/
# Build an RPM package
-rpm: tarball rpmspec
- cp -f ../dejagnu-${VERSION}.tar.gz /usr/src/redhat/SOURCES/
+rpm: rpmspec dist
+ cp -f dejagnu-${VERSION}.tar.gz /usr/src/redhat/SOURCES/
rpm -ba /usr/src/redhat/SPECS/dejagnu.spec
-# Build a Debian deb package
-deb: book1.html overview.ps overview.pdf
+# Build a Debian package
+deb: dist
-rm -fr dejagnu-${VERSION}
cp -fpr $(srcdir) dejagnu-${VERSION}
@echo "clean up stuff we don't want in the source file"
@@ -75,9 +221,10 @@ deb: book1.html overview.ps overview.pdf
-cp -fr doc/html dejagnu-${VERSION}/doc/;
-cp -fr doc/overview.ps dejagnu-${VERSION}/doc/;
-cp -fr doc/overview.pdf dejagnu-${VERSION}/doc/;
- -cp -fr doc/overview.rtf dejagnu-${VERSION}/doc/;
(cd dejagnu-${VERSION}; dpkg-buildpackage)
+PKGDIR = /opt
+
# Build a Solaris package
solpkg: $(srcdir)/packaging/pkg/prototype
if test ! -d $(PKGDIR)/dejagnu; then \
@@ -97,7 +244,7 @@ solpkg: $(srcdir)/packaging/pkg/prototype
rm -fr /tmp/prototype /tmp/pkginfo /tmp/DejaGnu
# Build a HP depot package
-hpdepot: # $(srcdir)/packaging/depot/dejagnu.psf
+hpdepot:
if test ! -d $(PKGDIR)/dejagnu; then \
rm -fr dejagnu-${VERSION}; \
mkdir dejagnu-${VERSION}; \
@@ -111,75 +258,3 @@ hpdepot: # $(srcdir)/packaging/depot/dejagnu.psf
tar cf $$here/dejagnu-${VERSION}.hpux11.depot dejagnu; \
gzip -9fv $$here/dejagnu-${VERSION}.hpux11.depot; \
rm -fr /tmp/dejagnu
-
-book1.html overview.ps overview.pdf install-doc:
- cd doc && $(MAKE) $(FLAGS_TO_PASS) $@
-
-# Automake sucks when it comes to building a distribution, so
-# we just copy the source tree onto of what Automake did, and
-# then we Clean it. Automake only includes the source files.
-# We want all the testsuites, data files, and html versions of the doc.
-dist-hook: rpmspec book1.html overview.ps overview.pdf
- -rm -fr $(distdir)
- cp -fpr $(srcdir) $(distdir)
- (cd $(distdir) ; $(TCLSH) $(srcdir)/Clean.tcl)
- -cp -fr doc/html $(distdir)/doc/
- -cp -fr doc/overview.ps $(distdir)/doc/
- -cp -fr doc/overview.pdf $(distdir)/doc/
-
-# Below, host-independent data files that need to get installed.
-# We do it this way so we can use globbing.
-
-lib_dest = $(DESTDIR)$(pkgdatadir)
-lib_files = $(srcdir)/*.c $(srcdir)/lib/*.exp
-
-baseboards_dest = $(DESTDIR)$(pkgdatadir)/baseboards
-baseboards_files = $(srcdir)/baseboards/README $(srcdir)/baseboards/*.exp
-
-include_dest = $(DESTDIR)$(includedir)
-config_dest = $(DESTDIR)$(pkgdatadir)/config
-config_files = $(srcdir)/config/README $(srcdir)/config/*.exp
-
-install-data-local:
- $(mkinstalldirs) $(lib_dest) $(include_dest)
- for f in $(lib_files); do \
- test ! -f "$$f" || $(INSTALL_DATA) $$f $(lib_dest); \
- done
- $(mkinstalldirs) $(baseboards_dest)
- for f in $(baseboards_files); do \
- test ! -f "$$f" || $(INSTALL_DATA) $$f $(baseboards_dest); \
- done
- $(INSTALL_DATA) $(srcdir)/dejagnu.h $(include_dest); \
- $(mkinstalldirs) $(config_dest)
- for f in $(config_files); do \
- test ! -f "$$f" || $(INSTALL_DATA) $$f $(config_dest); \
- done
-
-uninstall-local:
- for f in $(lib_files); do \
- test ! -f "$$f" || rm -f $(lib_dest)/`basename "$$f"`; \
- done
- for f in $(config_files); do \
- test ! -f "$$f" || rm -f $(config_dest)/`basename "$$f"`; \
- done
- for f in $(baseboards_files); do \
- test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
- done
-
- for f in $(baseboards_files); do \
- test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
- done
- rm -f $(include_dest)/dejagnu.h;
-
-site.exp: Makefile
- @echo 'Making a new site.exp file...'
- @test ! -f site.bak || rm -f site.bak
- @echo '## these variables are automatically generated by make ##' > $@-t
- @echo '# Do not edit here. If you wish to override these values' >> $-t
- @echo '# edit the last section' >> $@-t
- @echo 'set srcdir $(srcdir)' >> $@-t
- @echo 'set objdir' `pwd` >> $@-t
- @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
- @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
- @test ! -f site.exp || mv site.exp site.bak
- @mv $@-t site.exp