* tests/specflags7.test, tests/specflags8.test: New files.
authorAlexandre Duret-Lutz <adl@gnu.org>
Tue, 2 Apr 2002 13:11:14 +0000 (13:11 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Tue, 2 Apr 2002 13:11:14 +0000 (13:11 +0000)
* tests/Makefile.am (TESTS): Add them.
(XFAIL_TESTS): Add specflags8.test.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/specflags7.test [new file with mode: 0755]
tests/specflags8.test [new file with mode: 0755]

index e0ab11e..b7e2de6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-04-02  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * tests/specflags7.test, tests/specflags8.test: New files.
+       * tests/Makefile.am (TESTS): Add them.
+       (XFAIL_TESTS): Add specflags8.test.
+
 2002-03-29  Tom Tromey  <tromey@redhat.com>
 
        * automake.in (check_typos): Examine AM_LDFLAGS.
index b090ba8..ffa0a64 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 
-XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test
+XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test specflags8.test
 
 TESTS =        \
 acinclude.test \
@@ -292,6 +292,8 @@ space.test \
 specflags.test \
 specflags2.test        \
 specflags3.test        \
+specflags7.test        \
+specflags8.test        \
 spell.test \
 spell2.test \
 spell3.test \
index 2c48111..15df95b 100644 (file)
@@ -76,7 +76,7 @@ am__quote = @am__quote@
 install_sh = @install_sh@
 pkgvdatadir = @pkgvdatadir@
 
-XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test
+XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test specflags8.test
 
 TESTS = \
 acinclude.test \
@@ -368,6 +368,8 @@ space.test \
 specflags.test \
 specflags2.test        \
 specflags3.test        \
+specflags7.test        \
+specflags8.test        \
 spell.test \
 spell2.test \
 spell3.test \
diff --git a/tests/specflags7.test b/tests/specflags7.test
new file mode 100755 (executable)
index 0000000..09228b7
--- /dev/null
@@ -0,0 +1,47 @@
+#! /bin/sh
+
+# The ctags/etags example from the manual, plus a check for _SHORTNAME.
+
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = etags ctags
+ctags_SOURCES = etags.c
+ctags_CFLAGS = -DCTAGS
+ctags_SHORTNAME = c
+# No etags_SOURCES definition.  Use the default source.
+etags_CFLAGS = -DETAGS
+etags_SHORTNAME = e
+END
+
+cat > etags.c << 'END'
+#include <stdio.h>
+int
+main (int argc, char *argv[])
+{
+#ifdef CTAGS
+   puts ("ctags");
+#else
+   puts ("etags");
+#endif
+   return 0;
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+./ctags | grep ctags
+./etags | grep etags
+test -f ./c-etags.o
+test -f ./e-etags.o
diff --git a/tests/specflags8.test b/tests/specflags8.test
new file mode 100755 (executable)
index 0000000..616366c
--- /dev/null
@@ -0,0 +1,49 @@
+#! /bin/sh
+
+# Like the ctags/etags example from the manual,
+# with one extra indirection in the sources.
+
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+# Using a separate variable to hold all the sources for a program is
+# common when building many flavors of this program, each with
+# different flags.
+
+cat > Makefile.am << 'END'
+ETAGSSOURCE = etags.c
+bin_PROGRAMS = etags ctags
+ctags_SOURCES = $(ETAGSSOURCE)
+ctags_CXXFLAGS = -DCTAGS
+etags_SOURCES = $(ETAGSSOURCE)
+etags_CXXFLAGS = -DETAGS
+END
+
+cat > etags.c << 'END'
+#include <stdio.h>
+int
+main (int argc, char *argv[])
+{
+#ifdef CTAGS
+   puts ("ctags");
+#else
+   puts ("etags");
+#endif
+   return 0;
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+./ctags | grep ctags
+./etags | grep etags