From 4f81d055450bd0da3396b8909fdba4d7823e6c82 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 14 Dec 1999 03:57:18 +0000 Subject: [PATCH] * nostdinc.test: New file. * Makefile.am (TESTS): Added nostdinc.test. * condincl2.test: New file. * condincl.test: New file. * Makefile.am (TESTS): Added condincl.test, condincl2.test. * suffix2.test: New file. * Makefile.am (TESTS): Added suffix2.test. --- tests/ChangeLog | 10 ++++++++++ tests/Makefile.am | 4 ++++ tests/Makefile.in | 4 ++++ tests/condincl.test | 25 +++++++++++++++++++++++++ tests/condincl2.test | 24 ++++++++++++++++++++++++ tests/nostdinc.test | 20 ++++++++++++++++++++ tests/suffix2.test | 28 ++++++++++++++++++++++++++++ 7 files changed, 115 insertions(+) create mode 100755 tests/condincl.test create mode 100755 tests/condincl2.test create mode 100755 tests/nostdinc.test create mode 100755 tests/suffix2.test diff --git a/tests/ChangeLog b/tests/ChangeLog index 1047b06d..1e85255d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,15 @@ 1999-12-13 Tom Tromey + * nostdinc.test: New file. + * Makefile.am (TESTS): Added nostdinc.test. + + * condincl2.test: New file. + * condincl.test: New file. + * Makefile.am (TESTS): Added condincl.test, condincl2.test. + + * suffix2.test: New file. + * Makefile.am (TESTS): Added suffix2.test. + * subobj.test: Remove final test. 1999-12-12 Tom Tromey diff --git a/tests/Makefile.am b/tests/Makefile.am index 6dee11e1..a81e0ddc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -54,6 +54,8 @@ cond6.test \ cond7.test \ cond8.test \ cond9.test \ +condincl.test \ +condincl2.test \ condman.test \ condman2.test \ conf2.test \ @@ -157,6 +159,7 @@ mkinstall.test \ nodep.test \ nodist.test \ noinst.test \ +nostdinc.test \ number.test \ objc.test \ obsolete.test \ @@ -213,6 +216,7 @@ subobj2.test \ subobj3.test \ subst.test \ suffix.test \ +suffix2.test \ symlink.test \ syntax.test \ tags.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 4e48a281..38101f81 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -121,6 +121,8 @@ cond6.test \ cond7.test \ cond8.test \ cond9.test \ +condincl.test \ +condincl2.test \ condman.test \ condman2.test \ conf2.test \ @@ -224,6 +226,7 @@ mkinstall.test \ nodep.test \ nodist.test \ noinst.test \ +nostdinc.test \ number.test \ objc.test \ obsolete.test \ @@ -280,6 +283,7 @@ subobj2.test \ subobj3.test \ subst.test \ suffix.test \ +suffix2.test \ symlink.test \ syntax.test \ tags.test \ diff --git a/tests/condincl.test b/tests/condincl.test new file mode 100755 index 00000000..5e95f64a --- /dev/null +++ b/tests/condincl.test @@ -0,0 +1,25 @@ +#! /bin/sh + +# Make sure a conditional include statement is handled properly. + +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +AM_CONDITIONAL(TOBE, false) +END + +cat > Makefile.am << 'END' +if TOBE +include adjunct +endif +END + +cat > adjunct << 'END' +target: dependency + rule +END + +$AUTOMAKE || exit 1 + +grep '^target' Makefile.in && exit 1 +exit 0 diff --git a/tests/condincl2.test b/tests/condincl2.test new file mode 100755 index 00000000..59b2a290 --- /dev/null +++ b/tests/condincl2.test @@ -0,0 +1,24 @@ +#! /bin/sh + +# Another test of conditional include statements. + +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +AM_CONDITIONAL(TOBE, false) +END + +cat > Makefile.am << 'END' +if TOBE +include adjunct +endif +END + +cat > adjunct << 'END' +target: dependency + rule +endif +END + +$AUTOMAKE && exit 1 +exit 0 diff --git a/tests/nostdinc.test b/tests/nostdinc.test new file mode 100755 index 00000000..aea1e3e2 --- /dev/null +++ b/tests/nostdinc.test @@ -0,0 +1,20 @@ +#! /bin/sh + +# Test to make sure nostdinc option works correctly. + +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +AC_PROG_CC +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS = nostdinc +bin_PROGRAMS = foo +foo_SOURCES = foo.c +END + +$AUTOMAKE || exit 1 + +fgrep -e '-I.' Makefile.in && exit 1 +exit 0 diff --git a/tests/suffix2.test b/tests/suffix2.test new file mode 100755 index 00000000..4e02113c --- /dev/null +++ b/tests/suffix2.test @@ -0,0 +1,28 @@ +#! /bin/sh + +# Test to make sure .c.o rule is only included once. + +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +AC_PROG_CC +AC_PROG_LIBTOOL +END + +cat > Makefile.am << 'END' +lib_LTLIBRARIES = libltdl.la +libltdl_la_SOURCES = ltdl.c ltdl.h +END + +: > ltdl.c +: > ltdl.h + +: > ltconfig +: > ltmain.sh + +$AUTOMAKE -a || exit 1 + +test "`fgrep '.c.o' Makefile.in | wc -l`" -eq 1 + +# FIXME: make this fail just like the real ltdl +exit 1 -- 2.43.5