]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Beginnings of test suite
authorTom Tromey <tromey@redhat.com>
Sun, 11 Feb 1996 00:35:29 +0000 (00:35 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 11 Feb 1996 00:35:29 +0000 (00:35 +0000)
17 files changed:
ChangeLog
Makefile.am
Makefile.in
NEWS
TODO
automake.in
configure
configure.in
lib/am/Makefile.am
tests/.cvsignore [new file with mode: 0644]
tests/ChangeLog [new file with mode: 0644]
tests/Makefile.am [new file with mode: 0644]
tests/Makefile.in [new file with mode: 0644]
tests/acoutput.test [new file with mode: 0755]
tests/defs [new file with mode: 0644]
tests/mdate.test [new file with mode: 0755]
tests/vtexi.test [new file with mode: 0755]

index db73165802ef2c14561be1cd378de192c331c986..2d8ace1a8b9211ed60785a02dbf8dab0076f8e0e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Sat Feb 10 16:45:07 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * automake.in (scan_configure): Delete everything after "]".  Test
+       acoutput.test.
+
+       * configure.in (AC_OUTPUT): Create tests/Makefile.
+       * Makefile.am (SUBDIRS): New macro.
+
+       * automake.in (handle_texinfo): Put $vtexi on texi_deps.  From Jim
+       Meyering.
+
+       * configure.in (AC_OUTPUT): Ensure automake is executable.
+
 Thu Feb  8 15:30:29 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * automake.in (handle_subdirs): Error if directory in SUBDIRS does
index 471b31e7967cecae1ac5d20e683a98cddc9bb8c0..75d3c9c75fd0a6f943b0fce27f4b56ca194fdf14 100644 (file)
@@ -2,6 +2,8 @@
 
 AUTOMAKE_OPTIONS = gnits
 
+SUBDIRS = tests
+
 bin_SCRIPTS = automake
 info_TEXINFOS = automake.texi
 # SUBDIRS = intl po
index 74a622c42ea489dd815a4cc26b764bc07d201ccd..864039c18e4d7bfd8c4c4686326a18d6a960db2b 100644 (file)
@@ -40,6 +40,8 @@ transform = @program_transform_name@
 
 AUTOMAKE_OPTIONS = gnits
 
+SUBDIRS = tests
+
 bin_SCRIPTS = automake
 info_TEXINFOS = automake.texi
 # SUBDIRS = intl po
@@ -198,13 +200,40 @@ uninstall-pkgdataDATA:
          rm -f $(pkgdatadir)/$$p;              \
        done
 
-ID: $(HEADERS) $(SOURCES)
-       here=`pwd` && cd $(srcdir) && mkid -f $$here/ID $(SOURCES) $(HEADERS)
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive: $(CONFIG_HEADER) Makefile
+       for subdir in $(SUBDIRS); do            \
+         target=`echo $@ | sed s/-recursive//`; \
+         echo making $$target in $$subdir;     \
+         (cd $$subdir && $(MAKE) $$target)     \
+          || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
+       done && test -z "$$fail"
 
 tags: TAGS
 
 TAGS:
-       here=`pwd` && cd $(srcdir) && etags $(ETAGS_ARGS) $(SOURCES) $(HEADERS) -o $$here/TAGS
+       tags=;                                  \
+       here=`pwd`;                             \
+       for subdir in $(SUBDIRS); do            \
+         (cd $$subdir && $(MAKE) TAGS);        \
+         test -f $$subdir/TAGS && {            \
+           tags="$$tags -i $$here/$$subdir/TAGS"; \
+         }                                     \
+       done;                                   \
+       test -z "$(ETAGS_ARGS)$(CONFIG_HEADER)$(SOURCES)$(HEADERS)$$tags" \
+         || etags $(ETAGS_ARGS) $$tags $(CONFIG_HEADER) $(SOURCES) $(HEADERS)
 
 mostlyclean-tags:
 
@@ -232,6 +261,13 @@ dist: $(DEP_DISTFILES)
          || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
          || cp -p $(srcdir)/$$file $(distdir)/$$file; \
        done
+       for subdir in $(SUBDIRS); do            \
+         test -d $(distdir)/$$subdir           \
+         || mkdir $(distdir)/$$subdir          \
+         || exit 1;                            \
+         chmod 777 $(distdir)/$$subdir;        \
+         (cd $$subdir && $(MAKE) dist) || exit 1; \
+       done
        @for dir in $(DIST_SUBDIRS); do         \
          echo copying directory $$dir;         \
          tar chf - $$dir | (cd $(distdir) && tar xBpf -); \
@@ -239,26 +275,32 @@ dist: $(DEP_DISTFILES)
        chmod -R a+r $(distdir)
        tar chozf $(distdir).tar.gz $(distdir)
        rm -rf $(distdir)
-all: info $(SCRIPTS) $(DATA)
+all: info $(SCRIPTS) $(DATA) all-recursive
+
+info: $(INFO_DEPS) info-recursive
 
-info: $(INFO_DEPS)
+dvi: $(DVIS) dvi-recursive
 
-dvi: $(DVIS)
+check: check-recursive
 
-check: all
+installcheck: installcheck-recursive
 
-installcheck:
+install-exec-am: install-binSCRIPTS
 
-install-exec: install-binSCRIPTS
+install-data-am: install-info install-pkgdataDATA
 
-install-data: install-info install-pkgdataDATA
+uninstall-am: uninstall-binSCRIPTS uninstall-info uninstall-pkgdataDATA uninstall-recursive
 
-install: install-exec install-data
+install-exec: install-exec-recursive install-exec-am
+
+install-data: install-data-recursive install-data-am
+
+install: install-recursive install-exec-am install-data-am
        @:
 
-uninstall: uninstall-binSCRIPTS uninstall-info uninstall-pkgdataDATA
+uninstall: uninstall-recursive uninstall-am
 
-installdirs:
+installdirs: installdirs-recursive
        $(top_srcdir)/mkinstalldirs  $(bindir) $(infodir) $(pkgdatadir)
 
 
@@ -275,19 +317,27 @@ distclean-generic:
 maintainer-clean-generic:
        test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
        test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-mostlyclean:  mostlyclean-binSCRIPTS mostlyclean-vti mostlyclean-info \
+mostlyclean-am:  mostlyclean-binSCRIPTS mostlyclean-vti mostlyclean-info \
                mostlyclean-tags mostlyclean-generic
 
-clean:  clean-binSCRIPTS clean-vti clean-info clean-tags clean-generic \
-               mostlyclean 
+clean-am:  clean-binSCRIPTS clean-vti clean-info clean-tags \
+               clean-generic mostlyclean-am 
 
-distclean:  distclean-binSCRIPTS distclean-vti distclean-info \
-               distclean-tags distclean-generic clean 
-       rm -f config.status
+distclean-am:  distclean-binSCRIPTS distclean-vti distclean-info \
+               distclean-tags distclean-generic clean-am 
 
-maintainer-clean:  maintainer-clean-binSCRIPTS maintainer-clean-vti \
+maintainer-clean-am:  maintainer-clean-binSCRIPTS maintainer-clean-vti \
                maintainer-clean-info maintainer-clean-tags maintainer-clean-generic \
-               distclean 
+               distclean-am 
+
+mostlyclean:  mostlyclean-am mostlyclean-recursive
+
+clean:  clean-am clean-recursive
+
+distclean:  distclean-am distclean-recursive
+       rm -f config.status
+
+maintainer-clean:  maintainer-clean-am maintainer-clean-recursive
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
        rm -f config.status
@@ -296,11 +346,18 @@ maintainer-clean:  maintainer-clean-binSCRIPTS maintainer-clean-vti \
     clean-binSCRIPTS maintainer-clean-binSCRIPTS uninstall-binSCRIPTS \
     mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
     install-info uninstall-info mostlyclean-info distclean-info \
-    clean-info maintainer-clean-info uninstall-pkgdataDATA tags \
-    mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
-    dist all info dvi check installcheck install-exec install-data \
-    install uninstall installdirs mostlyclean-generic distclean-generic \
-    clean-generic maintainer-clean-generic clean mostlyclean distclean \
+    clean-info maintainer-clean-info uninstall-pkgdataDATA \
+    install-data-recursive uninstall-data-recursive \
+    install-exec-recursive uninstall-exec-recursive \
+    installdirs-recursive uninstalldirs-recursive all-recursive \
+    check-recursive installcheck-recursive info-recursive dvi-recursive \
+    mostlyclean-recursive distclean-recursive clean-recursive \
+    maintainer-clean-recursive tags mostlyclean-tags distclean-tags \
+    clean-tags maintainer-clean-tags dist all info dvi check \
+    installcheck install-exec-am install-data-am uninstall-am \
+    install-exec install-data install uninstall installdirs \
+    mostlyclean-generic distclean-generic clean-generic \
+    maintainer-clean-generic clean mostlyclean distclean \
     maintainer-clean
 
 
diff --git a/NEWS b/NEWS
index 32ab8f3a89094dcc78c001d3f15674988033df7a..eefa4cd8769319c727fd90d5682fe55f0ac98a47 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 New in 0.30:
 * Bug fixes
 * configure.in scanner knows about AC_PATH_XTRA, AC_OUTPUT ":" syntax
+* Beginnings of a test suite
 \f
 New in 0.29:
 * Many bug fixes
diff --git a/TODO b/TODO
index 9ec5be856002ec991a767f957f7f292d4cf846c6..018fb724d36da8b458e5b4efef2a923094e871f0 100644 (file)
--- a/TODO
+++ b/TODO
@@ -3,6 +3,11 @@ Top priorities:
 * Must rewrite am_install_var.  Should break into multiple functions.
   This will allow the callers to be a little smarter.
 * Rewrite clean targets.
+* Expand test suite.
+
+Consider using Ulrich's test suite idea
+If so, also allow support for Cygnus-style dejagnu-based test suites
+via an option
 
 Think about ways to make automake fit better with Cygnus-style trees.
 
@@ -91,8 +96,6 @@ must look at mkid to see how it works (for subdir usage)
 Internationalize. [ gettext doesn't have the necessary machinery yet ]
 am_error should use printf-style arguments (for eventual gettext scheme)
 
-write test suite
-
 François says the ordering of files in a distribution should be as follows:
 * README
 * source files
index 568d54752e592c5e6477df9d1ee927098b66bc20..422f11cd5cdcf25843cb5d87650cd142f636e4e8 100755 (executable)
@@ -673,7 +673,7 @@ sub handle_texinfo
        # If user specified file_TEXINFOS, then use that as explicit
        # dependency list.
        @texi_deps = ();
-       push (@texi_deps, $info_cursor);
+       push (@texi_deps, $info_cursor, $vtexi);
        if (defined $contents{$infobase . "_TEXINFOS"})
        {
            push (@texi_deps, "\$" . $infobase . '_TEXINFOS');
@@ -1525,7 +1525,7 @@ sub scan_configure
        }
        if ($in_ac_output)
        {
-           s/\]//;
+           s/\].*$//;
            $in_ac_output = 0 if s/[\),]//;
 
            # Look at potential Makefile.am's.
index bef3b5cdf0c77214746e48f0f1c955e2825c0dfa..8fb2d48c11454d30ebbde5cffc85054f3e7af90c 100755 (executable)
--- a/configure
+++ b/configure
@@ -530,6 +530,32 @@ EOF
 
 ALL_LINGUAS=
 
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+set dummy ${MAKE-make}; ac_make=$2
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftestmake <<\EOF
+all:
+       @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
 if test "$program_transform_name" = s,x,x,; then
   program_transform_name=
 else
@@ -768,7 +794,7 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "Makefile automake" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile automake tests/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -800,6 +826,7 @@ s%@infodir@%$infodir%g
 s%@mandir@%$mandir%g
 s%@PACKAGE@%$PACKAGE%g
 s%@VERSION@%$VERSION%g
+s%@SET_MAKE@%$SET_MAKE%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
@@ -809,7 +836,7 @@ CEOF
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile automake"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile automake tests/Makefile"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -866,7 +893,7 @@ fi; done
 rm -f conftest.subs
 
 
-
+chmod +x automake
 exit 0
 EOF
 chmod +x $CONFIG_STATUS
index 9a5a20568a980a126eacd2f6506cf5ba4ad75e50..e58d5ff255bafa6b1680692dcc142b8af22543a7 100644 (file)
@@ -11,6 +11,7 @@ AC_SUBST(VERSION)
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
 ALL_LINGUAS=
 
+AC_PROG_MAKE_SET
 AC_ARG_PROGRAM
 fp_PROG_INSTALL
 
@@ -32,6 +33,6 @@ dnl End of NLS configuration.
 dnl
 
 
-AC_OUTPUT([Makefile automake])
+AC_OUTPUT([Makefile automake tests/Makefile], [chmod +x automake])
 dnl intl/Makefile po/Makefile.in],
 dnl [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
index 471b31e7967cecae1ac5d20e683a98cddc9bb8c0..75d3c9c75fd0a6f943b0fce27f4b56ca194fdf14 100644 (file)
@@ -2,6 +2,8 @@
 
 AUTOMAKE_OPTIONS = gnits
 
+SUBDIRS = tests
+
 bin_SCRIPTS = automake
 info_TEXINFOS = automake.texi
 # SUBDIRS = intl po
diff --git a/tests/.cvsignore b/tests/.cvsignore
new file mode 100644 (file)
index 0000000..3f90d78
--- /dev/null
@@ -0,0 +1,2 @@
+testSubDir
+Makefile
diff --git a/tests/ChangeLog b/tests/ChangeLog
new file mode 100644 (file)
index 0000000..27cbf32
--- /dev/null
@@ -0,0 +1,6 @@
+Sat Feb 10 17:08:39 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * mdate.test, vtexi.test, acoutput.test: New files.
+
+       * Started.
+
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644 (file)
index 0000000..adbb7ae
--- /dev/null
@@ -0,0 +1,26 @@
+## Process this file with automake to create Makefile.in
+
+AUTOMAKE_OPTIONS = gnits
+
+## FIXME Ulrich has suggested implementing this in Automake.
+## Perhaps he is right.
+TESTS = mdate.test vtexi.test acoutput.test
+
+check-local:
+       @failed=0; all=0; \
+       srcdir=$(srcdir); export srcdir; \
+       for tst in $(TESTS); do \
+         all=`expr $$all + 1`; \
+## FIXME use $(SHELL) here?  That is what Ulrich suggests.  Maybe
+## a new macro, $(TEST_SHELL), a la $(CONFIG_SHELL)?
+## For now we just execute the file directly; this allows test files
+## which are compiled -- a possibly useful feature.
+         if test -f $$tst; then dir=.; \
+         else dir="$(srcdir)"; fi; \
+         $$dir/$$tst || failed=`expr $$failed + 1`; \
+       done; \
+       if test "$$failed" -eq 0; then \
+         echo "All $$all tests passed"; \
+       else \
+         echo "$$failed of $$all tests failed"; \
+       fi
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644 (file)
index 0000000..d17ed91
--- /dev/null
@@ -0,0 +1,140 @@
+# Makefile.in generated automatically by automake 0.30 from Makefile.am
+
+# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+AUTOMAKE_OPTIONS = gnits
+
+TESTS = mdate.test vtexi.test acoutput.test
+DIST_COMMON = ChangeLog Makefile.am Makefile.in
+
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
+       $(TEXINFOS) $(INFOS) $(MANS) $(DIST_OTHER) $(DATA)
+DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
+       $(TEXINFOS) $(INFO_DEPS) $(MANS) $(DIST_OTHER) $(DATA)
+default: all
+
+
+$(srcdir)/Makefile.in: Makefile.am
+       cd $(top_srcdir) && automake $(subdir)/Makefile
+
+Makefile: $(top_builddir)/config.status Makefile.in
+       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+tags: TAGS
+TAGS:
+
+
+subdir = tests
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist: $(DEP_DISTFILES)
+       @for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
+         test -f $(distdir)/$$file \
+         || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
+         || cp -p $(srcdir)/$$file $(distdir)/$$file; \
+       done
+all:
+
+info:
+
+dvi:
+
+check: all check-local
+
+installcheck:
+
+install: all
+       @:
+
+uninstall: 
+
+installdirs:
+
+
+mostlyclean-generic:
+       test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+       test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       rm -f Makefile $(DISTCLEANFILES)
+       rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
+
+maintainer-clean-generic:
+       test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+       test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean:  mostlyclean-generic
+
+clean:  clean-generic mostlyclean 
+
+distclean:  distclean-generic clean 
+       rm -f config.status
+
+maintainer-clean:  maintainer-clean-generic distclean 
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: default tags dist all info dvi check-local check installcheck \
+    install uninstall installdirs mostlyclean-generic distclean-generic \
+    clean-generic maintainer-clean-generic clean mostlyclean distclean \
+    maintainer-clean
+
+
+check-local:
+       @failed=0; all=0; \
+       srcdir=$(srcdir); export srcdir; \
+       for tst in $(TESTS); do \
+         all=`expr $$all + 1`; \
+         if test -f $$tst; then dir=.; \
+         else dir="$(srcdir)"; fi; \
+         $$dir/$$tst || failed=`expr $$failed + 1`; \
+       done; \
+       if test "$$failed" -eq 0; then \
+         echo "All $$all tests passed"; \
+       else \
+         echo "$$failed of $$all tests failed"; \
+       fi
+.SUFFIXES:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/acoutput.test b/tests/acoutput.test
new file mode 100755 (executable)
index 0000000..2646720
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Test for bug when AC_OUTPUT has 2 args on the same line, eg:
+#   AC_OUTPUT([Makefile automake tests/Makefile],[chmod +x automake])
+
+. $srcdir/defs
+
+cat > configure.in << 'END'
+AC_ARG_PROGRAM
+AC_PROG_INSTALL
+AC_OUTPUT([Makefile], [true])
+END
+
+: > Makefile.am
+
+$AUTOMAKE
diff --git a/tests/defs b/tests/defs
new file mode 100644 (file)
index 0000000..727b3f5
--- /dev/null
@@ -0,0 +1,42 @@
+# -*- ksh -*-
+# Defines for Automake testing environment.
+# Tom Tromey <tromey@cygnus.com>
+
+# Ensure $srcdir set correctly.
+test -f $srcdir/defs || {
+   echo "defs: installation error" 1>&2
+   exit 1
+}
+
+# If srcdir is relative, we need to modify it.
+case "$srcdir" in
+ /*)
+    ;;
+
+ *)
+    srcdir="../$srcdir"
+    ;;
+esac
+
+rm -rf testSubDir > /dev/null 2>&1
+mkdir testSubDir
+cd testSubDir
+
+# FIXME: build appropriate environment in test directory.
+# Eg create configure.in, touch all necessary files, etc.
+cat > configure.in << 'END'
+AC_ARG_PROGRAM
+AC_PROG_INSTALL
+AC_OUTPUT(Makefile)
+END
+
+: > install-sh
+: > mkinstalldirs
+
+# See how redirections should work.
+test -z "$VERBOSE" && {
+   exec > /dev/null 2>&1
+}
+
+# See how Automake should be run.
+AUTOMAKE="$srcdir/../automake --amdir=$srcdir/.."
diff --git a/tests/mdate.test b/tests/mdate.test
new file mode 100755 (executable)
index 0000000..3f83417
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Test that mdate-sh is required when Texinfo used and version.texi needed.
+
+. $srcdir/defs
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = textutils.texi
+END
+
+cat > textutils.texi << 'END'
+@include version.texi
+END
+
+# Required when using Texinfo.
+: > texinfo.tex
+
+$AUTOMAKE 2>&1 > /dev/null | grep 'required file.*mdate-sh' > /dev/null 2>&1
diff --git a/tests/vtexi.test b/tests/vtexi.test
new file mode 100755 (executable)
index 0000000..783ca83
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# Test for bug reported by Jim Meyering:
+# When I ran automake-0.29 on textutils,
+# I noticed that doc/Makefile.in had
+#   textutils.info: textutils.texi
+# instead of
+#   textutils.info: textutils.texi version.texi
+
+. $srcdir/defs
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = textutils.texi
+END
+
+cat > textutils.texi << 'END'
+@include version.texi
+END
+
+# Required when using Texinfo.
+: > mdate-sh
+: > texinfo.tex
+
+$AUTOMAKE || {
+   exit 1
+}
+
+grep '^textutils\.info: textutils\.texi version\.texi$' Makefile.in \
+   > /dev/null 2>&1