summaryrefslogtreecommitdiff
path: root/tests/cond6.test
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-05-26 15:42:02 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-05-26 22:32:40 +0200
commitfc5ac9a1e1573fa286da745491daaf373271578f (patch)
tree41519a29b186b5efb008e8a8f04b32b89048a934 /tests/cond6.test
parenteb147a19783b1cee960502697124e68e4c109df5 (diff)
downloadautomake-fc5ac9a1e1573fa286da745491daaf373271578f.tar.gz
tests: tweak and improve tests on Automake conditionals
The "avoid the requirement of a working compiler" we refer about below is obtained by disabling automatic dependency tracking and defining `CC' (and `EXEEXT', `OBJEXT', `CXX', etc., if needed) to dummy values, either directly in the `Makefile.am', or by AC_SUBST in `configure.in'. The "cosmetic changes" we refer about below consists in, e.g., adding a trailing `:' command to a script, using proper m4 quoting in `configure.in' files, adding commands that offer more debugging output, explicitly declaring phony targets as such in Makefiles, making use of idioms more consistent with those employed in other tests, following the GNU formatting standards more closely, etc. * tests/cond.test: Cosmetic changes. * tests/cond3.test: Likewise. * tests/cond10.test: Likewise. * tests/cond14.test: Likewise. * tests/cond15.test: Likewise. * tests/cond17.test: Likewise. * tests/cond40.test: Likewise. * tests/cond13.test: Likewise, and make grepping of the generated `Makefile.in' slightly stricter. * tests/cond6.test: Extend by also running ./configure, make and "make install". Few cosmetic changes. * tests/cond8.test: Likewise. * tests/cond2.test: Do few cosmetic changes. Make grepping of automake stderr stricter. * tests/cond20.test: Likewise. * tests/cond23.test: Likewise. * tests/cond24.test: Likewise. * tests/cond42.test: Likewise. * tests/cond46.test: Likewise. * tests/cond9.test: Move more checks in the `Makefile.am' instead of grepping make's output. * tests/cond38.test: Likewise. * tests/cond11.test: Likewise. Avoid the requirement of a working C compiler. * tests/cond16.test: Likewise. * tests/cond22.test: Likewise. * tests/cond30.test: Likewise. * tests/cond31.test: Likewise. * tests/cond4.test: Likewise, and drop the now-useless GNU make requirement as well. * tests/cond18.test: Likewise. * tests/cond19.test: Likewise. * tests/cond22.test: Likewise. * tests/cond25.test: Add trailing `:' command. * tests/cond26.test: Likewise. * tests/cond27.test: Likewise. * tests/cond28.test: Likewise. * tests/cond29.test: Use `unindent' function for better formatting. Other minor cosmetic changes. Use a `timeout' program (if it's available) to determine whether the script takes too long, instead of just hoping that the user will notice an abnormally long test execution time. * tests/cond33.test: Extend a bit. Fix heading comments. Few more cosmetic changes. * tests/cond37.test: Ensure verbose printing of captured make output. Minor cosmetic changes. * tests/cond34.test: Likewise. Avoid the requirement of a working C compiler. Make grepping of make output slightly stricter. * tests/cond35.test: Quote literal dots in grep regexp. Add extra debugging output. Minor cosmetic changes. * tests/cond36.test: Likewise. * tests/cond41.test: Do not simply check that aclocal fails, but also grep its stderr for the expected error message. * tests/cond43.test: Likewise (but the program being automake). Few cosmetic changes. * tests/condd.test: Avoid the requirement of a working C compiler. * tests/condman3.test: Extend by using more man pages and more manpage sections. * tests/condman.test: Removed, it's completely superseded by `condman3.test'. * tests/Makefile.am (TESTS): Update.
Diffstat (limited to 'tests/cond6.test')
-rwxr-xr-xtests/cond6.test33
1 files changed, 31 insertions, 2 deletions
diff --git a/tests/cond6.test b/tests/cond6.test
index 4a576b46f..60436ab68 100755
--- a/tests/cond6.test
+++ b/tests/cond6.test
@@ -19,10 +19,9 @@
. ./defs || Exit 1
-echo 'AM_CONDITIONAL(FOO, true)' >> configure.in
+echo 'AM_CONDITIONAL([FOO], [true])' >> configure.in
cat > Makefile.am << 'END'
-
if FOO
helpdir = $(prefix)/Help
@@ -36,7 +35,37 @@ helpdir = $(prefix)/help
help_DATA = foo
endif
+
+a b c d e f g h:
+ touch $@
+
+.PHONY: print-data
+print-data:
+ echo BEG: $(help_DATA) :END
END
+
+# Older versions of this test checked that automake could process the above
+# Makefile.am even with no AC_OUTPUT in configure. So continue to do this
+# check, for completeness.
$ACLOCAL
$AUTOMAKE
+
+rm -rf autom4te*.cache
+
+echo AC_OUTPUT >> configure.in
+$AUTOCONF
+$AUTOMAKE Makefile
+
+./configure --prefix="`pwd`/_inst"
+
+$MAKE print-data >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^BEG: a b c d e f g h :END$' stdout
+
+$MAKE install
+for x in a b c d e f g h; do
+ test -f _inst/Help/$x
+done
+
+: