]> sourceware.org Git - automake.git/commitdiff
added conditionals tests from ian
authorTom Tromey <tromey@redhat.com>
Wed, 30 Apr 1997 01:10:35 +0000 (01:10 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 30 Apr 1997 01:10:35 +0000 (01:10 +0000)
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/cond.test [new file with mode: 0755]
tests/cond2.test [new file with mode: 0755]

index 16a66405a509ce9dc0297f550009afc465301b7b..3fe8a2fe9adf9ad1a78840a33e1128dec5525db2 100644 (file)
@@ -1,3 +1,7 @@
+Tue Apr 29 19:08:47 1997  Tom Tromey  <tromey@cygnus.com>
+
+       * cond.test, cond2.test: New files from Ian Taylor.
+
 Sun Apr 27 21:07:49 1997  Tom Tromey  <tromey@cygnus.com>
 
        * confsub.test: Fixed bug.
index c985affe6731077df2c7952f317dad4da807de7c..ead2577f42a58262e8701b6068d919b06743c8a0 100644 (file)
@@ -25,7 +25,7 @@ colon2.test colon3.test remake.test output.test output2.test \
 remake2.test output3.test output4.test colneq2.test subst.test \
 defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test        \
 cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test \
-ldadd.test version2.test conf2.test
+ldadd.test version2.test conf2.test cond.test cond2.test
 
 EXTRA_DIST = defs $(TESTS)
 
index bb57c7057ae0fce2ec226746d6675b2da6f6d894..6d048d5f0b66c33905c78df91ea4469460c40344 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.1o from Makefile.am
+# Makefile.in generated automatically by automake 1.1n from Makefile.am
 
 # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -84,7 +84,7 @@ colon2.test colon3.test remake.test output.test output2.test \
 remake2.test output3.test output4.test colneq2.test subst.test \
 defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test        \
 cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test \
-ldadd.test version2.test conf2.test
+ldadd.test version2.test conf2.test cond.test cond2.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/tests/cond.test b/tests/cond.test
new file mode 100755 (executable)
index 0000000..459b64b
--- /dev/null
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Check basic use of conditionals.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AM_CONDITIONAL(TEST, true)
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+if TEST
+VAR = true
+else
+VAR = false
+endif
+END
+
+$AUTOMAKE || exit 1
+
+grep '^@TEST_TRUE@' Makefile.in || exit 1
+exit 0
diff --git a/tests/cond2.test b/tests/cond2.test
new file mode 100755 (executable)
index 0000000..8e4ee5b
--- /dev/null
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+# Check SUBDIRS set based on conditionals.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AM_CONDITIONAL(TEST, true)
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+if TEST
+DIR = dir1
+else
+DIR = dir2
+endif
+SUBDIRS = $(DIR)
+END
+
+mkdir dir1
+
+$AUTOMAKE && exit 1
+exit 0
This page took 0.032086 seconds and 5 git commands to generate.