summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--ChangeLog1955
-rw-r--r--ChangeLog.09243
-rw-r--r--HACKING3
-rw-r--r--Makefile.am120
-rw-r--r--Makefile.in228
-rw-r--r--NEWS68
-rw-r--r--THANKS3
-rw-r--r--aclocal.in25
-rw-r--r--aclocal.m43
-rw-r--r--[-rwxr-xr-x]automake.in245
-rwxr-xr-xbootstrap3
-rwxr-xr-xconfigure112
-rw-r--r--configure.ac8
-rw-r--r--doc/Makefile.am6
-rw-r--r--doc/Makefile.in103
-rw-r--r--doc/automake.texi167
-rw-r--r--lib/Automake/ChannelDefs.pm12
-rw-r--r--lib/Automake/Channels.pm28
-rw-r--r--lib/Automake/Condition.pm27
-rw-r--r--lib/Automake/Configure_ac.pm25
-rw-r--r--lib/Automake/Location.pm72
-rw-r--r--lib/Automake/Makefile.am9
-rw-r--r--lib/Automake/Makefile.in61
-rw-r--r--lib/Automake/Options.pm77
-rw-r--r--lib/Automake/Rule.pm13
-rw-r--r--lib/Automake/RuleDef.pm29
-rw-r--r--lib/Automake/VarDef.pm4
-rw-r--r--lib/Automake/Variable.pm14
-rw-r--r--lib/Automake/Wrap.pm16
-rw-r--r--lib/Automake/XFile.pm112
-rw-r--r--lib/Automake/tests/Cond2.pl6
-rw-r--r--lib/Automake/tests/Cond3.pl6
-rw-r--r--lib/Automake/tests/Condition-t.pl51
-rw-r--r--lib/Automake/tests/Condition.pl39
-rw-r--r--lib/Automake/tests/DisjCon2.pl8
-rw-r--r--lib/Automake/tests/DisjCon3.pl7
-rw-r--r--lib/Automake/tests/DisjConditions-t.pl32
-rw-r--r--lib/Automake/tests/DisjConditions.pl26
-rw-r--r--lib/Automake/tests/Makefile.am14
-rw-r--r--lib/Automake/tests/Makefile.in31
-rw-r--r--lib/Automake/tests/Version.pl36
-rw-r--r--lib/Automake/tests/Version2.pl5
-rw-r--r--lib/Automake/tests/Version3.pl5
-rw-r--r--lib/Automake/tests/Wrap.pl38
-rw-r--r--lib/Makefile.am5
-rw-r--r--lib/Makefile.in72
-rw-r--r--lib/am/Makefile.in17
-rw-r--r--lib/am/dejagnu.am4
-rw-r--r--lib/am/distdir.am56
-rw-r--r--lib/am/library.am4
-rw-r--r--lib/am/ltlib.am14
-rw-r--r--lib/am/ltlibrary.am4
-rw-r--r--lib/am/program.am4
-rw-r--r--lib/am/progs.am4
-rw-r--r--lib/am/tags.am40
-rw-r--r--lib/am/texibuild.am22
-rw-r--r--lib/am/texinfos.am4
-rwxr-xr-xlib/ar-lib265
-rwxr-xr-xlib/compile173
-rwxr-xr-xlib/depcomp62
-rwxr-xr-xlib/gnupload6
-rw-r--r--m4/Makefile.in17
-rw-r--r--m4/amversion.m46
-rw-r--r--m4/cond.m410
-rw-r--r--m4/depend.m426
-rw-r--r--m4/dmalloc.m419
-rw-r--r--m4/gcj.m49
-rw-r--r--m4/init.m434
-rw-r--r--m4/install-sh.m45
-rw-r--r--m4/lex.m48
-rw-r--r--m4/lispdir.m45
-rw-r--r--m4/maintainer.m411
-rw-r--r--m4/multi.m412
-rw-r--r--m4/options.m46
-rw-r--r--m4/python.m411
-rw-r--r--m4/regex.m412
-rw-r--r--m4/sanity.m429
-rw-r--r--m4/silent.m423
-rw-r--r--tests/.gitignore6
-rw-r--r--tests/Makefile.am216
-rw-r--r--tests/Makefile.in371
-rw-r--r--tests/README67
-rwxr-xr-xtests/acloca10.test7
-rwxr-xr-xtests/acloca11.test4
-rwxr-xr-xtests/acloca12.test4
-rwxr-xr-xtests/acloca13.test4
-rwxr-xr-xtests/acloca14.test4
-rwxr-xr-xtests/acloca15.test4
-rwxr-xr-xtests/acloca16.test4
-rwxr-xr-xtests/acloca17.test4
-rwxr-xr-xtests/acloca18.test32
-rwxr-xr-xtests/acloca19.test4
-rwxr-xr-xtests/acloca20.test4
-rwxr-xr-xtests/acloca21.test4
-rwxr-xr-xtests/acloca22.test4
-rwxr-xr-xtests/acloca23.test35
-rwxr-xr-xtests/aclocal.test12
-rwxr-xr-xtests/aclocal3.test5
-rwxr-xr-xtests/aclocal4.test4
-rwxr-xr-xtests/aclocal5.test4
-rwxr-xr-xtests/aclocal6.test2
-rwxr-xr-xtests/aclocal7.test4
-rwxr-xr-xtests/aclocal8.test4
-rwxr-xr-xtests/aclocal9.test6
-rwxr-xr-xtests/acoutbs.test5
-rwxr-xr-xtests/acoutbs2.test5
-rwxr-xr-xtests/acoutnoq.test6
-rwxr-xr-xtests/acoutpt.test6
-rwxr-xr-xtests/acoutpt2.test4
-rwxr-xr-xtests/acoutqnl.test6
-rwxr-xr-xtests/acsilent.test6
-rwxr-xr-xtests/acsubst.test4
-rwxr-xr-xtests/acsubst2.test4
-rwxr-xr-xtests/all.test6
-rwxr-xr-xtests/all2.test4
-rwxr-xr-xtests/alloca.test4
-rwxr-xr-xtests/alloca2.test4
-rwxr-xr-xtests/alpha.test5
-rwxr-xr-xtests/alpha2.test4
-rwxr-xr-xtests/amassign.test4
-rwxr-xr-xtests/ammissing.test5
-rwxr-xr-xtests/amopt.test11
-rwxr-xr-xtests/amopts-location.test83
-rwxr-xr-xtests/amopts-variable-expansion.test52
-rwxr-xr-xtests/amsubst.test4
-rwxr-xr-xtests/ansi.test6
-rwxr-xr-xtests/ansi10.test4
-rwxr-xr-xtests/ansi2.test4
-rwxr-xr-xtests/ansi3.test4
-rwxr-xr-xtests/ansi3b.test4
-rwxr-xr-xtests/ansi4.test6
-rwxr-xr-xtests/ansi5.test4
-rwxr-xr-xtests/ansi6.test4
-rwxr-xr-xtests/ansi7.test4
-rwxr-xr-xtests/ansi8.test4
-rwxr-xr-xtests/ansi9.test4
-rwxr-xr-xtests/ar-lib.test86
-rwxr-xr-xtests/ar.test5
-rwxr-xr-xtests/ar2.test4
-rwxr-xr-xtests/asm.test5
-rwxr-xr-xtests/asm2.test6
-rwxr-xr-xtests/asm3.test6
-rwxr-xr-xtests/autohdr.test4
-rwxr-xr-xtests/autohdr2.test4
-rwxr-xr-xtests/autohdr3.test4
-rwxr-xr-xtests/autohdr4.test4
-rwxr-xr-xtests/autohdrdry.test4
-rwxr-xr-xtests/automake.test8
-rwxr-xr-xtests/auxdir.test17
-rwxr-xr-xtests/auxdir2.test16
-rwxr-xr-xtests/auxdir3.test8
-rwxr-xr-xtests/auxdir4.test20
-rwxr-xr-xtests/auxdir5.test34
-rwxr-xr-xtests/auxdir6.test50
-rwxr-xr-xtests/auxdir7.test47
-rwxr-xr-xtests/auxdir8.test47
-rwxr-xr-xtests/auxdir9.test130
-rwxr-xr-xtests/backcompat.test64
-rwxr-xr-xtests/backcompat2.test65
-rwxr-xr-xtests/backcompat3.test151
-rwxr-xr-xtests/backcompat4.test66
-rwxr-xr-xtests/backcompat5.test117
-rwxr-xr-xtests/backcompat6.test99
-rwxr-xr-xtests/backsl.test5
-rwxr-xr-xtests/backsl2.test6
-rwxr-xr-xtests/backsl3.test4
-rwxr-xr-xtests/backsl4.test4
-rwxr-xr-xtests/badline.test5
-rwxr-xr-xtests/badopt.test5
-rwxr-xr-xtests/badprog.test5
-rwxr-xr-xtests/block.test5
-rwxr-xr-xtests/bsource.test4
-rwxr-xr-xtests/candist.test32
-rwxr-xr-xtests/canon-name.test10
-rwxr-xr-xtests/canon.test14
-rwxr-xr-xtests/canon2.test6
-rwxr-xr-xtests/canon3.test8
-rwxr-xr-xtests/canon4.test13
-rwxr-xr-xtests/canon5.test15
-rwxr-xr-xtests/canon6.test41
-rwxr-xr-xtests/canon7.test90
-rwxr-xr-xtests/canon8.test38
-rwxr-xr-xtests/ccnoco.test7
-rwxr-xr-xtests/ccnoco2.test4
-rwxr-xr-xtests/ccnoco3.test5
-rwxr-xr-xtests/check.test4
-rwxr-xr-xtests/check10.test4
-rwxr-xr-xtests/check11.test4
-rwxr-xr-xtests/check12.test204
-rwxr-xr-xtests/check2.test4
-rwxr-xr-xtests/check3.test4
-rwxr-xr-xtests/check4.test4
-rwxr-xr-xtests/check5.test6
-rwxr-xr-xtests/check6.test4
-rwxr-xr-xtests/check7.test4
-rwxr-xr-xtests/check8.test4
-rwxr-xr-xtests/check9.test4
-rwxr-xr-xtests/checkall.test4
-rwxr-xr-xtests/clean.test5
-rwxr-xr-xtests/clean2.test23
-rwxr-xr-xtests/colneq.test13
-rwxr-xr-xtests/colneq2.test20
-rwxr-xr-xtests/colneq3.test44
-rwxr-xr-xtests/colon.test21
-rwxr-xr-xtests/colon2.test55
-rwxr-xr-xtests/colon3.test65
-rwxr-xr-xtests/colon4.test6
-rwxr-xr-xtests/colon5.test49
-rwxr-xr-xtests/colon6.test83
-rwxr-xr-xtests/colon7.test31
-rwxr-xr-xtests/color.test4
-rwxr-xr-xtests/color2.test4
-rwxr-xr-xtests/commen10.test4
-rwxr-xr-xtests/commen11.test4
-rwxr-xr-xtests/comment.test5
-rwxr-xr-xtests/comment2.test5
-rwxr-xr-xtests/comment3.test4
-rwxr-xr-xtests/comment4.test3
-rwxr-xr-xtests/comment5.test11
-rwxr-xr-xtests/comment6.test4
-rwxr-xr-xtests/comment7.test4
-rwxr-xr-xtests/comment8.test4
-rwxr-xr-xtests/comment9.test4
-rwxr-xr-xtests/comments-in-var-def.test2
-rwxr-xr-xtests/compile.test8
-rwxr-xr-xtests/compile2.test6
-rwxr-xr-xtests/compile3.test52
-rwxr-xr-xtests/compile4.test83
-rwxr-xr-xtests/compile5.test79
-rwxr-xr-xtests/compile6.test97
-rwxr-xr-xtests/compile_f90_c_cxx.test14
-rwxr-xr-xtests/compile_f_c_cxx.test12
-rwxr-xr-xtests/cond-basic.test (renamed from tests/ctarget1.test)18
-rwxr-xr-xtests/cond.test5
-rwxr-xr-xtests/cond10.test4
-rwxr-xr-xtests/cond11.test4
-rwxr-xr-xtests/cond13.test4
-rwxr-xr-xtests/cond14.test4
-rwxr-xr-xtests/cond15.test4
-rwxr-xr-xtests/cond16.test4
-rwxr-xr-xtests/cond17.test4
-rwxr-xr-xtests/cond18.test4
-rwxr-xr-xtests/cond19.test4
-rwxr-xr-xtests/cond2.test5
-rwxr-xr-xtests/cond20.test4
-rwxr-xr-xtests/cond21.test4
-rwxr-xr-xtests/cond22.test4
-rwxr-xr-xtests/cond23.test4
-rwxr-xr-xtests/cond24.test4
-rwxr-xr-xtests/cond25.test4
-rwxr-xr-xtests/cond26.test4
-rwxr-xr-xtests/cond27.test4
-rwxr-xr-xtests/cond28.test4
-rwxr-xr-xtests/cond29.test4
-rwxr-xr-xtests/cond3.test6
-rwxr-xr-xtests/cond30.test4
-rwxr-xr-xtests/cond31.test4
-rwxr-xr-xtests/cond32.test4
-rwxr-xr-xtests/cond33.test4
-rwxr-xr-xtests/cond34.test4
-rwxr-xr-xtests/cond35.test6
-rwxr-xr-xtests/cond36.test2
-rwxr-xr-xtests/cond37.test4
-rwxr-xr-xtests/cond38.test4
-rwxr-xr-xtests/cond39.test4
-rwxr-xr-xtests/cond4.test5
-rwxr-xr-xtests/cond40.test4
-rwxr-xr-xtests/cond41.test4
-rwxr-xr-xtests/cond42.test4
-rwxr-xr-xtests/cond43.test4
-rwxr-xr-xtests/cond44.test4
-rwxr-xr-xtests/cond45.test4
-rwxr-xr-xtests/cond46.test108
-rwxr-xr-xtests/cond5.test6
-rwxr-xr-xtests/cond6.test5
-rwxr-xr-xtests/cond7.test5
-rwxr-xr-xtests/cond8.test5
-rwxr-xr-xtests/cond9.test5
-rwxr-xr-xtests/condd.test5
-rwxr-xr-xtests/condhook.test4
-rwxr-xr-xtests/condhook2.test4
-rwxr-xr-xtests/condinc.test5
-rwxr-xr-xtests/condinc2.test25
-rwxr-xr-xtests/condlib.test5
-rwxr-xr-xtests/condman.test5
-rwxr-xr-xtests/condman2.test5
-rwxr-xr-xtests/condman3.test4
-rwxr-xr-xtests/confdeps.test8
-rwxr-xr-xtests/conff.test4
-rwxr-xr-xtests/conff2.test4
-rwxr-xr-xtests/confh.test4
-rwxr-xr-xtests/confh4.test6
-rwxr-xr-xtests/confh5.test4
-rwxr-xr-xtests/confh6.test4
-rwxr-xr-xtests/confh7.test4
-rwxr-xr-xtests/confh8.test4
-rwxr-xr-xtests/configure.test4
-rwxr-xr-xtests/confincl.test5
-rwxr-xr-xtests/conflnk.test4
-rwxr-xr-xtests/conflnk2.test4
-rwxr-xr-xtests/conflnk3.test4
-rwxr-xr-xtests/conflnk4.test4
-rwxr-xr-xtests/confsub.test6
-rwxr-xr-xtests/confvar.test5
-rwxr-xr-xtests/confvar2.test5
-rwxr-xr-xtests/copy.test10
-rwxr-xr-xtests/cscope.test107
-rwxr-xr-xtests/cscope2.test (renamed from tests/outdir.test)22
-rwxr-xr-xtests/cscope3.test39
-rwxr-xr-xtests/cxx.test4
-rwxr-xr-xtests/cxx2.test4
-rwxr-xr-xtests/cxxansi.test4
-rwxr-xr-xtests/cxxcpp.test5
-rwxr-xr-xtests/cxxlibobj.test5
-rwxr-xr-xtests/cxxlink.test5
-rwxr-xr-xtests/cxxnoc.test5
-rwxr-xr-xtests/cxxo.test5
-rwxr-xr-xtests/cygnus-check-without-all.test50
-rwxr-xr-xtests/cygnus-dependency-tracking.test72
-rwxr-xr-xtests/cygnus-imply-foreign.test59
-rwxr-xr-xtests/cygnus-no-dist.test84
-rwxr-xr-xtests/cygnus-no-installinfo.test53
-rwxr-xr-xtests/cygnus-requires-maintainer-mode.test53
-rwxr-xr-xtests/cygwin32.test4
-rwxr-xr-xtests/dash.test5
-rw-r--r--tests/defs (renamed from tests/defs.in)623
-rw-r--r--tests/defs-static.in141
-rwxr-xr-xtests/defun.test16
-rwxr-xr-xtests/defun2.test7
-rwxr-xr-xtests/dejagnu.test12
-rwxr-xr-xtests/dejagnu2.test24
-rwxr-xr-xtests/dejagnu3.test19
-rwxr-xr-xtests/dejagnu4.test21
-rwxr-xr-xtests/dejagnu5.test21
-rwxr-xr-xtests/dejagnu6.test18
-rwxr-xr-xtests/dejagnu7.test14
-rwxr-xr-xtests/depacl2.test5
-rwxr-xr-xtests/depcomp.test4
-rwxr-xr-xtests/depcomp2.test4
-rwxr-xr-xtests/depcomp3.test4
-rwxr-xr-xtests/depcomp4.test4
-rwxr-xr-xtests/depcomp5.test4
-rwxr-xr-xtests/depcomp6.test2
-rwxr-xr-xtests/depcomp7.test2
-rwxr-xr-xtests/depcomp8a.test4
-rwxr-xr-xtests/depcomp8b.test4
-rwxr-xr-xtests/depdist.test43
-rwxr-xr-xtests/depend.test5
-rwxr-xr-xtests/depend2.test6
-rwxr-xr-xtests/depend3.test4
-rwxr-xr-xtests/depend4.test4
-rwxr-xr-xtests/depend5.test4
-rwxr-xr-xtests/depend6.test4
-rwxr-xr-xtests/deprecated-acinit.test52
-rwxr-xr-xtests/destdir.test4
-rwxr-xr-xtests/dirforbid.test4
-rwxr-xr-xtests/dirlist.test4
-rwxr-xr-xtests/dirlist2.test5
-rwxr-xr-xtests/discover.test4
-rwxr-xr-xtests/dist-included-parent-dir.test4
-rwxr-xr-xtests/distcleancheck.test4
-rwxr-xr-xtests/distcom2.test6
-rwxr-xr-xtests/distcom3.test4
-rwxr-xr-xtests/distcom4.test4
-rwxr-xr-xtests/distcom5.test4
-rwxr-xr-xtests/distcom6.test5
-rwxr-xr-xtests/distcom7.test6
-rwxr-xr-xtests/distdir.test6
-rwxr-xr-xtests/distlinks.test4
-rwxr-xr-xtests/distlinksbrk.test4
-rwxr-xr-xtests/distname.test5
-rwxr-xr-xtests/dmalloc.test4
-rwxr-xr-xtests/dollar.test4
-rwxr-xr-xtests/dollarvar.test4
-rwxr-xr-xtests/dollarvar2.test4
-rwxr-xr-xtests/double.test5
-rwxr-xr-xtests/dup2.test4
-rwxr-xr-xtests/else.test5
-rwxr-xr-xtests/empty.test4
-rwxr-xr-xtests/empty2.test5
-rwxr-xr-xtests/empty3.test5
-rwxr-xr-xtests/empty4.test5
-rwxr-xr-xtests/exdir.test5
-rwxr-xr-xtests/exdir2.test5
-rwxr-xr-xtests/exdir3.test4
-rwxr-xr-xtests/exeext.test5
-rwxr-xr-xtests/exeext2.test5
-rwxr-xr-xtests/exeext3.test4
-rwxr-xr-xtests/exeext4.test4
-rwxr-xr-xtests/exsource.test6
-rwxr-xr-xtests/ext.test6
-rwxr-xr-xtests/ext2.test4
-rwxr-xr-xtests/ext3.test39
-rwxr-xr-xtests/extra.test5
-rwxr-xr-xtests/extra10.test4
-rwxr-xr-xtests/extra11.test4
-rwxr-xr-xtests/extra12.test4
-rwxr-xr-xtests/extra2.test4
-rwxr-xr-xtests/extra3.test5
-rwxr-xr-xtests/extra4.test6
-rwxr-xr-xtests/extra5.test4
-rwxr-xr-xtests/extra6.test4
-rwxr-xr-xtests/extra7.test4
-rwxr-xr-xtests/extra8.test4
-rwxr-xr-xtests/extra9.test44
-rwxr-xr-xtests/extradep.test102
-rwxr-xr-xtests/extradep2.test84
-rwxr-xr-xtests/f90only.test6
-rwxr-xr-xtests/flavor.test4
-rwxr-xr-xtests/flibs.test6
-rwxr-xr-xtests/fn99.test2
-rwxr-xr-xtests/fn99subdir.test2
-rwxr-xr-xtests/fnoc.test6
-rwxr-xr-xtests/fo.test6
-rwxr-xr-xtests/fonly.test6
-rwxr-xr-xtests/forcemiss.test5
-rwxr-xr-xtests/forcemiss2.test5
-rwxr-xr-xtests/fort1.test4
-rwxr-xr-xtests/fort2.test4
-rwxr-xr-xtests/fort4.test4
-rwxr-xr-xtests/fort5.test4
-rwxr-xr-xtests/fortdep.test5
-rwxr-xr-xtests/gcj.test13
-rwxr-xr-xtests/gcj2.test5
-rwxr-xr-xtests/gcj3.test12
-rwxr-xr-xtests/gcj4.test6
-rwxr-xr-xtests/gcj5.test4
-rwxr-xr-xtests/gcj6.test4
-rwxr-xr-xtests/gen-parallel-tests14
-rwxr-xr-xtests/getopt.test4
-rwxr-xr-xtests/gettext.test4
-rwxr-xr-xtests/gettext2.test5
-rwxr-xr-xtests/gettext3.test4
-rwxr-xr-xtests/gnits.test5
-rwxr-xr-xtests/gnits2.test9
-rwxr-xr-xtests/gnits3.test13
-rwxr-xr-xtests/gnumake.test4
-rwxr-xr-xtests/gnuwarn.test17
-rwxr-xr-xtests/gnuwarn2.test4
-rwxr-xr-xtests/hdr-vars-defined-once.test26
-rwxr-xr-xtests/header.test16
-rwxr-xr-xtests/help-depend.test4
-rwxr-xr-xtests/help-depend2.test4
-rwxr-xr-xtests/help-dmalloc.test4
-rwxr-xr-xtests/help-init.test4
-rwxr-xr-xtests/help-lispdir.test4
-rwxr-xr-xtests/help-maintainer.test4
-rwxr-xr-xtests/help-multilib.test4
-rwxr-xr-xtests/help-regex.test4
-rwxr-xr-xtests/help-silent.test4
-rwxr-xr-xtests/help-upc.test4
-rwxr-xr-xtests/help.test11
-rwxr-xr-xtests/help2.test11
-rwxr-xr-xtests/help3.test11
-rwxr-xr-xtests/help4.test11
-rwxr-xr-xtests/hfs.test4
-rwxr-xr-xtests/hosts.test4
-rwxr-xr-xtests/implicit.test9
-rwxr-xr-xtests/info.test14
-rwxr-xr-xtests/init.test31
-rwxr-xr-xtests/init2.test4
-rwxr-xr-xtests/insh2.test8
-rwxr-xr-xtests/install2.test4
-rwxr-xr-xtests/installdir.test4
-rwxr-xr-xtests/instdat.test13
-rwxr-xr-xtests/instdat2.test3
-rwxr-xr-xtests/instdir-java.test4
-rwxr-xr-xtests/instdir-lisp.test4
-rwxr-xr-xtests/instdir-ltlib.test28
-rwxr-xr-xtests/instdir-prog.test28
-rwxr-xr-xtests/instdir-python.test4
-rwxr-xr-xtests/instdir-texi.test2
-rwxr-xr-xtests/instdir.test4
-rwxr-xr-xtests/instdir2.test4
-rwxr-xr-xtests/instexec.test5
-rwxr-xr-xtests/instfail-info.test4
-rwxr-xr-xtests/instfail-java.test4
-rwxr-xr-xtests/instfail-libtool.test4
-rwxr-xr-xtests/instfail.test4
-rwxr-xr-xtests/insthook.test5
-rwxr-xr-xtests/instman.test4
-rwxr-xr-xtests/instman2.test9
-rwxr-xr-xtests/instmany-mans.test4
-rwxr-xr-xtests/instmany-python.test4
-rwxr-xr-xtests/instmany.test4
-rwxr-xr-xtests/instsh.test5
-rwxr-xr-xtests/instsh2.test2
-rwxr-xr-xtests/instsh3.test4
-rwxr-xr-xtests/instspc-data.test26
-rwxr-xr-xtests/instspc-tests.sh342
-rwxr-xr-xtests/instspc.test191
-rwxr-xr-xtests/interp.test9
-rwxr-xr-xtests/interp2.test7
-rwxr-xr-xtests/java.test5
-rwxr-xr-xtests/java2.test4
-rwxr-xr-xtests/java3.test4
-rwxr-xr-xtests/javaprim.test11
-rwxr-xr-xtests/javasubst.test13
-rwxr-xr-xtests/ldadd.test4
-rwxr-xr-xtests/ldflags.test10
-rwxr-xr-xtests/lex.test10
-rwxr-xr-xtests/lex2.test14
-rwxr-xr-xtests/lex3.test48
-rwxr-xr-xtests/lex4.test9
-rwxr-xr-xtests/lex5.test15
-rwxr-xr-xtests/lexcpp.test44
-rwxr-xr-xtests/lexvpath.test113
-rwxr-xr-xtests/lflags.test4
-rwxr-xr-xtests/lflags2.test4
-rwxr-xr-xtests/libexec.test4
-rwxr-xr-xtests/libobj-basic.test108
-rwxr-xr-xtests/libobj10.test24
-rwxr-xr-xtests/libobj12.test26
-rwxr-xr-xtests/libobj13.test8
-rwxr-xr-xtests/libobj14.test8
-rwxr-xr-xtests/libobj15a.test (renamed from tests/libobj11.test)20
-rwxr-xr-xtests/libobj15b.test (renamed from tests/aclibobj.test)27
-rwxr-xr-xtests/libobj15c.test47
-rwxr-xr-xtests/libobj16a.test137
-rwxr-xr-xtests/libobj16b.test138
-rwxr-xr-xtests/libobj17.test65
-rwxr-xr-xtests/libobj18.test44
-rwxr-xr-xtests/libobj19.test60
-rwxr-xr-xtests/libobj2.test42
-rwxr-xr-xtests/libobj20a.test43
-rwxr-xr-xtests/libobj20b.test54
-rwxr-xr-xtests/libobj20c.test51
-rwxr-xr-xtests/libobj3.test12
-rwxr-xr-xtests/libobj4.test9
-rwxr-xr-xtests/libobj5.test15
-rwxr-xr-xtests/libobj7.test63
-rwxr-xr-xtests/libobj8.test17
-rwxr-xr-xtests/library.test7
-rwxr-xr-xtests/library2.test4
-rwxr-xr-xtests/library3.test4
-rwxr-xr-xtests/libtoo10.test4
-rwxr-xr-xtests/libtoo11.test4
-rwxr-xr-xtests/libtool.test11
-rwxr-xr-xtests/libtool2.test20
-rwxr-xr-xtests/libtool3.test4
-rwxr-xr-xtests/libtool4.test4
-rwxr-xr-xtests/libtool5.test4
-rwxr-xr-xtests/libtool6.test4
-rwxr-xr-xtests/libtool7.test4
-rwxr-xr-xtests/libtool8.test4
-rwxr-xr-xtests/libtool9.test4
-rwxr-xr-xtests/license.test4
-rwxr-xr-xtests/license2.test4
-rwxr-xr-xtests/link_c_cxx.test5
-rwxr-xr-xtests/link_dist.test4
-rwxr-xr-xtests/link_f90_only.test6
-rwxr-xr-xtests/link_f_only.test6
-rwxr-xr-xtests/link_fc.test6
-rwxr-xr-xtests/link_fccxx.test6
-rwxr-xr-xtests/link_fcxx.test6
-rwxr-xr-xtests/link_override.test44
-rwxr-xr-xtests/lisp2.test4
-rwxr-xr-xtests/lisp3.test4
-rwxr-xr-xtests/lisp4.test4
-rwxr-xr-xtests/lisp5.test4
-rwxr-xr-xtests/lisp6.test4
-rwxr-xr-xtests/lisp7.test4
-rwxr-xr-xtests/lisp8.test4
-rwxr-xr-xtests/lispdry.test4
-rwxr-xr-xtests/listval.test10
-rwxr-xr-xtests/location.test24
-rwxr-xr-xtests/longlin2.test4
-rwxr-xr-xtests/longline.test4
-rwxr-xr-xtests/ltcond.test4
-rwxr-xr-xtests/ltcond2.test4
-rwxr-xr-xtests/ltconv.test4
-rwxr-xr-xtests/ltdeps.test4
-rwxr-xr-xtests/ltinstloc.test10
-rwxr-xr-xtests/ltlibobjs.test9
-rwxr-xr-xtests/ltlibsrc.test4
-rwxr-xr-xtests/ltorder.test4
-rwxr-xr-xtests/lzip.test39
-rwxr-xr-xtests/lzma.test4
-rwxr-xr-xtests/m4-inclusion.test20
-rwxr-xr-xtests/maintclean.test5
-rwxr-xr-xtests/make.test15
-rwxr-xr-xtests/makej.test10
-rwxr-xr-xtests/makej2.test4
-rwxr-xr-xtests/maken.test4
-rwxr-xr-xtests/maken2.test4
-rwxr-xr-xtests/maken3.test5
-rwxr-xr-xtests/maken4.test5
-rwxr-xr-xtests/makevars.test10
-rwxr-xr-xtests/man.test11
-rwxr-xr-xtests/man2.test11
-rwxr-xr-xtests/man3.test6
-rwxr-xr-xtests/man4.test48
-rwxr-xr-xtests/man5.test8
-rwxr-xr-xtests/man6.test97
-rwxr-xr-xtests/man7.test59
-rwxr-xr-xtests/man8.test57
-rwxr-xr-xtests/mclean.test9
-rwxr-xr-xtests/mdate.test6
-rwxr-xr-xtests/mdate2.test9
-rwxr-xr-xtests/mdate3.test13
-rwxr-xr-xtests/mdate4.test15
-rwxr-xr-xtests/mdate5.test6
-rwxr-xr-xtests/mdate6.test6
-rwxr-xr-xtests/missing.test6
-rwxr-xr-xtests/missing2.test5
-rwxr-xr-xtests/missing3.test4
-rwxr-xr-xtests/missing4.test5
-rwxr-xr-xtests/missing5.test4
-rwxr-xr-xtests/missing6.test4
-rwxr-xr-xtests/mkinst2.test5
-rwxr-xr-xtests/mkinst3.test6
-rwxr-xr-xtests/mkinstall.test7
-rwxr-xr-xtests/mmode.test4
-rwxr-xr-xtests/mmodely.test6
-rwxr-xr-xtests/multlib.test9
-rwxr-xr-xtests/no-outdir-option.test29
-rwxr-xr-xtests/nobase-libtool.test6
-rwxr-xr-xtests/nobase-python.test14
-rwxr-xr-xtests/nobase.test6
-rwxr-xr-xtests/nodef.test4
-rwxr-xr-xtests/nodef2.test4
-rwxr-xr-xtests/nodep.test5
-rwxr-xr-xtests/nodep2.test4
-rwxr-xr-xtests/nodepcomp.test5
-rwxr-xr-xtests/nodist.test21
-rwxr-xr-xtests/nodist2.test6
-rwxr-xr-xtests/nodist3.test14
-rwxr-xr-xtests/nogzip.test4
-rwxr-xr-xtests/nogzip2.test4
-rwxr-xr-xtests/noinst.test9
-rwxr-xr-xtests/noinstdir.test9
-rwxr-xr-xtests/nolink.test4
-rwxr-xr-xtests/nostdinc.test5
-rwxr-xr-xtests/notrans.test4
-rwxr-xr-xtests/number.test10
-rwxr-xr-xtests/objc.test9
-rwxr-xr-xtests/objc2.test4
-rwxr-xr-xtests/obsolete.test25
-rwxr-xr-xtests/oldvars.test35
-rwxr-xr-xtests/order.test4
-rwxr-xr-xtests/output-order.test4
-rwxr-xr-xtests/output.test15
-rwxr-xr-xtests/output10.test4
-rwxr-xr-xtests/output11.test4
-rwxr-xr-xtests/output12.test4
-rwxr-xr-xtests/output13.test4
-rwxr-xr-xtests/output2.test15
-rwxr-xr-xtests/output3.test13
-rwxr-xr-xtests/output4.test15
-rwxr-xr-xtests/output5.test6
-rwxr-xr-xtests/output6.test4
-rwxr-xr-xtests/output7.test4
-rwxr-xr-xtests/output8.test4
-rwxr-xr-xtests/output9.test4
-rwxr-xr-xtests/override-conditional-1.test54
-rwxr-xr-xtests/override-conditional-2.test39
-rwxr-xr-xtests/override-html.test33
-rwxr-xr-xtests/override-suggest-local.test (renamed from tests/overrid.test)28
-rwxr-xr-xtests/parallel-am.test5
-rwxr-xr-xtests/parallel-am2.test5
-rwxr-xr-xtests/parallel-am3.test5
-rwxr-xr-xtests/parallel-tests.test4
-rwxr-xr-xtests/parallel-tests10.test4
-rwxr-xr-xtests/parallel-tests2.test4
-rwxr-xr-xtests/parallel-tests3.test4
-rwxr-xr-xtests/parallel-tests4.test4
-rwxr-xr-xtests/parallel-tests5.test4
-rwxr-xr-xtests/parallel-tests6.test4
-rwxr-xr-xtests/parallel-tests7.test4
-rwxr-xr-xtests/parallel-tests8.test2
-rwxr-xr-xtests/parallel-tests9.test4
-rwxr-xr-xtests/parse.test13
-rwxr-xr-xtests/percent.test4
-rwxr-xr-xtests/percent2.test4
-rwxr-xr-xtests/phony.test4
-rwxr-xr-xtests/pluseq.test3
-rwxr-xr-xtests/pluseq10.test4
-rwxr-xr-xtests/pluseq11.test4
-rwxr-xr-xtests/pluseq2.test6
-rwxr-xr-xtests/pluseq3.test4
-rwxr-xr-xtests/pluseq4.test5
-rwxr-xr-xtests/pluseq5.test10
-rwxr-xr-xtests/pluseq6.test5
-rwxr-xr-xtests/pluseq7.test6
-rwxr-xr-xtests/pluseq8.test4
-rwxr-xr-xtests/pluseq9.test8
-rwxr-xr-xtests/posixsubst-data.test74
-rwxr-xr-xtests/posixsubst-extradist.test54
-rwxr-xr-xtests/posixsubst-ldadd.test76
-rwxr-xr-xtests/posixsubst-libraries.test63
-rwxr-xr-xtests/posixsubst-ltlibraries.test65
-rwxr-xr-xtests/posixsubst-programs.test62
-rwxr-xr-xtests/posixsubst-scripts.test99
-rwxr-xr-xtests/posixsubst-sources.test80
-rwxr-xr-xtests/posixsubst-tests.test68
-rwxr-xr-xtests/postproc.test5
-rwxr-xr-xtests/ppf77.test10
-rwxr-xr-xtests/pr2.test6
-rwxr-xr-xtests/pr204.test6
-rwxr-xr-xtests/pr211.test5
-rwxr-xr-xtests/pr220.test6
-rwxr-xr-xtests/pr224.test4
-rwxr-xr-xtests/pr229.test4
-rwxr-xr-xtests/pr243.test5
-rwxr-xr-xtests/pr266.test5
-rwxr-xr-xtests/pr279-2.test4
-rwxr-xr-xtests/pr279.test4
-rwxr-xr-xtests/pr287.test4
-rwxr-xr-xtests/pr300-lib.test4
-rwxr-xr-xtests/pr300-ltlib.test6
-rwxr-xr-xtests/pr300-prog.test5
-rwxr-xr-xtests/pr307.test4
-rwxr-xr-xtests/pr401.test5
-rwxr-xr-xtests/pr401b.test5
-rwxr-xr-xtests/pr401c.test5
-rwxr-xr-xtests/pr72.test5
-rwxr-xr-xtests/pr87.test5
-rwxr-xr-xtests/pr9.test5
-rwxr-xr-xtests/prefix.test5
-rwxr-xr-xtests/primary.test6
-rwxr-xr-xtests/primary2.test4
-rwxr-xr-xtests/primary3.test4
-rwxr-xr-xtests/proginst.test6
-rwxr-xr-xtests/python-dist.test80
-rwxr-xr-xtests/python-vars.test109
-rwxr-xr-xtests/python-virtualenv.test186
-rwxr-xr-xtests/python.test13
-rwxr-xr-xtests/python10.test8
-rwxr-xr-xtests/python11.test13
-rwxr-xr-xtests/python12.test4
-rwxr-xr-xtests/python2.test20
-rwxr-xr-xtests/python3.test6
-rwxr-xr-xtests/python4.test13
-rwxr-xr-xtests/python5.test16
-rwxr-xr-xtests/python5b.test55
-rwxr-xr-xtests/python6.test13
-rwxr-xr-xtests/python7.test11
-rwxr-xr-xtests/python8.test14
-rwxr-xr-xtests/python9.test16
-rwxr-xr-xtests/recurs.test6
-rwxr-xr-xtests/recurs2.test5
-rwxr-xr-xtests/regex-obsolete.test30
-rwxr-xr-xtests/regex.test4
-rwxr-xr-xtests/remake.test22
-rwxr-xr-xtests/remake10a.test106
-rwxr-xr-xtests/remake10b.test105
-rwxr-xr-xtests/remake10c.test110
-rwxr-xr-xtests/remake11.test82
-rwxr-xr-xtests/remake12.test120
-rwxr-xr-xtests/remake1a.test56
-rwxr-xr-xtests/remake2.test24
-rwxr-xr-xtests/remake3.test19
-rwxr-xr-xtests/remake3a.test73
-rwxr-xr-xtests/remake4.test8
-rwxr-xr-xtests/remake5.test11
-rwxr-xr-xtests/remake6.test20
-rwxr-xr-xtests/remake7.test11
-rwxr-xr-xtests/remake8a.test191
-rwxr-xr-xtests/remake8b.test193
-rwxr-xr-xtests/remake9a.test104
-rwxr-xr-xtests/remake9b.test106
-rwxr-xr-xtests/remake9c.test107
-rwxr-xr-xtests/remake9d.test107
-rwxr-xr-xtests/repeated-options.test78
-rwxr-xr-xtests/req.test7
-rwxr-xr-xtests/reqd.test4
-rwxr-xr-xtests/reqd2.test4
-rwxr-xr-xtests/rulepat.test9
-rwxr-xr-xtests/sanity.test4
-rwxr-xr-xtests/scripts.test4
-rwxr-xr-xtests/seenc.test5
-rwxr-xr-xtests/self-check-cleanup.test129
-rwxr-xr-xtests/self-check-dir.test37
-rwxr-xr-xtests/self-check-exit.test80
-rwxr-xr-xtests/self-check-is_newest.test42
-rwxr-xr-xtests/self-check-me.test29
-rwxr-xr-xtests/self-check-sanity.test69
-rwxr-xr-xtests/self-check-unindent.test255
-rwxr-xr-xtests/silent-lex-gcc.test4
-rwxr-xr-xtests/silent-lex-generic.test4
-rwxr-xr-xtests/silent-many-gcc.test6
-rwxr-xr-xtests/silent-many-generic.test6
-rwxr-xr-xtests/silent-nowarn.test44
-rwxr-xr-xtests/silent-yacc-gcc.test6
-rwxr-xr-xtests/silent-yacc-generic.test6
-rwxr-xr-xtests/silent.test4
-rwxr-xr-xtests/silent2.test4
-rwxr-xr-xtests/silent3.test4
-rwxr-xr-xtests/silent4.test4
-rwxr-xr-xtests/silent6.test4
-rwxr-xr-xtests/silent7.test4
-rwxr-xr-xtests/silent8.test66
-rwxr-xr-xtests/silent9.test4
-rwxr-xr-xtests/silentcxx.test4
-rwxr-xr-xtests/silentf77.test4
-rwxr-xr-xtests/silentf90.test4
-rwxr-xr-xtests/space.test5
-rwxr-xr-xtests/specflg.test5
-rwxr-xr-xtests/specflg10.test4
-rwxr-xr-xtests/specflg2.test5
-rwxr-xr-xtests/specflg3.test26
-rwxr-xr-xtests/specflg6.test13
-rwxr-xr-xtests/specflg7.test4
-rwxr-xr-xtests/specflg8.test4
-rwxr-xr-xtests/specflg9.test4
-rwxr-xr-xtests/spell.test5
-rwxr-xr-xtests/spell2.test5
-rwxr-xr-xtests/spell3.test7
-rwxr-xr-xtests/spelling.test14
-rwxr-xr-xtests/spy.test2
-rwxr-xr-xtests/srcsub.test5
-rwxr-xr-xtests/srcsub2.test4
-rwxr-xr-xtests/stamph2.test21
-rwxr-xr-xtests/stdinc.test4
-rwxr-xr-xtests/stdlib.test5
-rwxr-xr-xtests/stdlib2.test4
-rwxr-xr-xtests/strictness-override.test123
-rwxr-xr-xtests/strictness-precedence.test77
-rwxr-xr-xtests/strip.test4
-rwxr-xr-xtests/strip2.test4
-rwxr-xr-xtests/strip3.test4
-rwxr-xr-xtests/subcond.test5
-rwxr-xr-xtests/subcond2.test4
-rwxr-xr-xtests/subcond3.test4
-rwxr-xr-xtests/subdir.test4
-rwxr-xr-xtests/subdir10.test4
-rwxr-xr-xtests/subdir2.test4
-rwxr-xr-xtests/subdir3.test5
-rwxr-xr-xtests/subdir4.test5
-rwxr-xr-xtests/subdir5.test2
-rwxr-xr-xtests/subdir6.test4
-rwxr-xr-xtests/subdir7.test5
-rwxr-xr-xtests/subdir8.test2
-rwxr-xr-xtests/subdir9.test4
-rwxr-xr-xtests/subdirbuiltsources.test4
-rwxr-xr-xtests/subobj.test6
-rwxr-xr-xtests/subobj10.test4
-rwxr-xr-xtests/subobj11a.test4
-rwxr-xr-xtests/subobj11b.test4
-rwxr-xr-xtests/subobj11c.test4
-rwxr-xr-xtests/subobj2.test5
-rwxr-xr-xtests/subobj3.test6
-rwxr-xr-xtests/subobj4.test5
-rwxr-xr-xtests/subobj5.test5
-rwxr-xr-xtests/subobj6.test6
-rwxr-xr-xtests/subobj7.test5
-rwxr-xr-xtests/subobj8.test4
-rwxr-xr-xtests/subobj9.test5
-rwxr-xr-xtests/subobjname.test4
-rwxr-xr-xtests/subpkg.test7
-rwxr-xr-xtests/subpkg2.test4
-rwxr-xr-xtests/subpkg3.test4
-rwxr-xr-xtests/subpkg4.test4
-rwxr-xr-xtests/subst.test6
-rwxr-xr-xtests/subst2.test4
-rwxr-xr-xtests/subst3.test6
-rwxr-xr-xtests/subst4.test5
-rwxr-xr-xtests/subst5.test40
-rwxr-xr-xtests/substre2.test4
-rwxr-xr-xtests/substref.test2
-rwxr-xr-xtests/substtarg.test6
-rwxr-xr-xtests/suffix.test19
-rwxr-xr-xtests/suffix10.test37
-rwxr-xr-xtests/suffix11.test41
-rwxr-xr-xtests/suffix12.test23
-rwxr-xr-xtests/suffix13.test4
-rwxr-xr-xtests/suffix2.test19
-rwxr-xr-xtests/suffix3.test42
-rwxr-xr-xtests/suffix4.test8
-rwxr-xr-xtests/suffix5.test28
-rwxr-xr-xtests/suffix6.test41
-rwxr-xr-xtests/suffix6b.test75
-rwxr-xr-xtests/suffix6c.test90
-rwxr-xr-xtests/suffix7.test4
-rwxr-xr-xtests/suffix8.test71
-rwxr-xr-xtests/suffix9.test4
-rwxr-xr-xtests/symlink.test5
-rwxr-xr-xtests/symlink2.test5
-rwxr-xr-xtests/syntax.test9
-rwxr-xr-xtests/tags.test5
-rwxr-xr-xtests/tags2.test42
-rwxr-xr-xtests/tagsub.test6
-rwxr-xr-xtests/tar.test4
-rwxr-xr-xtests/tar2.test4
-rwxr-xr-xtests/tar3.test4
-rwxr-xr-xtests/target-cflags.test14
-rwxr-xr-xtests/targetclash.test7
-rwxr-xr-xtests/transform.test6
-rwxr-xr-xtests/transform2.test5
-rwxr-xr-xtests/txinfo-unrecognized-extension.test38
-rwxr-xr-xtests/txinfo.test2
-rwxr-xr-xtests/txinfo10.test4
-rwxr-xr-xtests/txinfo13.test5
-rwxr-xr-xtests/txinfo16.test2
-rwxr-xr-xtests/txinfo17.test4
-rwxr-xr-xtests/txinfo18.test2
-rwxr-xr-xtests/txinfo19.test4
-rwxr-xr-xtests/txinfo2.test2
-rwxr-xr-xtests/txinfo20.test4
-rwxr-xr-xtests/txinfo21.test5
-rwxr-xr-xtests/txinfo22.test8
-rwxr-xr-xtests/txinfo23.test2
-rwxr-xr-xtests/txinfo24.test2
-rwxr-xr-xtests/txinfo25.test2
-rwxr-xr-xtests/txinfo26.test4
-rwxr-xr-xtests/txinfo27.test4
-rwxr-xr-xtests/txinfo28.test4
-rwxr-xr-xtests/txinfo29.test2
-rwxr-xr-xtests/txinfo3.test2
-rwxr-xr-xtests/txinfo30.test4
-rwxr-xr-xtests/txinfo31.test4
-rwxr-xr-xtests/txinfo32.test4
-rwxr-xr-xtests/txinfo33.test4
-rwxr-xr-xtests/txinfo4.test2
-rwxr-xr-xtests/txinfo5.test2
-rwxr-xr-xtests/txinfo5b.test2
-rwxr-xr-xtests/txinfo6.test2
-rwxr-xr-xtests/txinfo7.test2
-rwxr-xr-xtests/txinfo8.test2
-rwxr-xr-xtests/txinfo9.test2
-rwxr-xr-xtests/unused.test6
-rwxr-xr-xtests/upc.test4
-rwxr-xr-xtests/upc2.test4
-rwxr-xr-xtests/upc3.test4
-rwxr-xr-xtests/vala.test6
-rwxr-xr-xtests/vala1.test6
-rwxr-xr-xtests/vala2.test6
-rwxr-xr-xtests/vala3.test6
-rwxr-xr-xtests/vala4.test4
-rwxr-xr-xtests/vala5.test6
-rwxr-xr-xtests/vars.test10
-rwxr-xr-xtests/vars3.test10
-rwxr-xr-xtests/vartar.test7
-rwxr-xr-xtests/vartypo2.test69
-rwxr-xr-xtests/vartypos.test89
-rwxr-xr-xtests/version.test5
-rwxr-xr-xtests/version2.test5
-rwxr-xr-xtests/version3.test5
-rwxr-xr-xtests/version4.test4
-rwxr-xr-xtests/version6.test4
-rwxr-xr-xtests/version7.test11
-rwxr-xr-xtests/version8.test3
-rwxr-xr-xtests/vpath.test5
-rwxr-xr-xtests/vtexi.test2
-rwxr-xr-xtests/vtexi2.test2
-rwxr-xr-xtests/vtexi3.test2
-rwxr-xr-xtests/vtexi4.test2
-rwxr-xr-xtests/warning-groups-win-over-strictness.test64
-rwxr-xr-xtests/warnings-override.test111
-rwxr-xr-xtests/warnings-precedence.test77
-rwxr-xr-xtests/warnings-strictness-interactions.test59
-rwxr-xr-xtests/warnings-unknown.test44
-rwxr-xr-xtests/warnings-win-over-strictness.test90
-rwxr-xr-xtests/warnopts.test12
-rwxr-xr-xtests/werror.test8
-rwxr-xr-xtests/werror2.test4
-rwxr-xr-xtests/werror3.test4
-rwxr-xr-xtests/werror4.test66
-rwxr-xr-xtests/whoami.test4
-rwxr-xr-xtests/xsource.test6
-rwxr-xr-xtests/xz.test4
-rwxr-xr-xtests/yacc-basic.test86
-rwxr-xr-xtests/yacc-clean.test153
-rwxr-xr-xtests/yacc-d-basic.test156
-rwxr-xr-xtests/yacc-d-vpath.test110
-rwxr-xr-xtests/yacc-dist-nobuild.test87
-rwxr-xr-xtests/yacc-nodist.test99
-rwxr-xr-xtests/yacc.test9
-rwxr-xr-xtests/yacc2.test43
-rwxr-xr-xtests/yacc4.test18
-rwxr-xr-xtests/yacc5.test14
-rwxr-xr-xtests/yacc6.test20
-rwxr-xr-xtests/yacc7.test10
-rwxr-xr-xtests/yacc8.test28
-rwxr-xr-xtests/yaccdry.test6
-rwxr-xr-xtests/yaccpp.test23
-rwxr-xr-xtests/yaccvpath.test34
-rwxr-xr-xtests/yflags-cmdline-override.test88
-rwxr-xr-xtests/yflags-conditional.test143
-rwxr-xr-xtests/yflags-d-false-positives.test (renamed from tests/yacc3.test)38
-rwxr-xr-xtests/yflags-force-conditional.test93
-rwxr-xr-xtests/yflags-force-override.test64
-rwxr-xr-xtests/yflags-var-expand.test61
-rwxr-xr-xtests/yflags.test2
-rwxr-xr-xtests/yflags2.test2
986 files changed, 18325 insertions, 4387 deletions
diff --git a/.gitignore b/.gitignore
index 81e5a98ef..716ef8b30 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,5 +7,9 @@ config.log
config.status
config.status.lineno
configure.lineno
+cscope.files
+cscope.in.out
+cscope.out
+cscope.po.out
tags
TAGS
diff --git a/ChangeLog b/ChangeLog
index 1be7709f6..d8750df0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -94,6 +94,30 @@
primary is used").
From a report by Patrick Welche.
+2011-03-17 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ cosmetics: better use of m4 quoting and m4sugar macros
+ * m4/dmalloc.m4: Better use of m4 quoting. Bump serial number.
+ * m4/gcj.m4: Likewise.
+ * m4/init.m4: Likewise.
+ * m4/install-sh.m4: Likewise.
+ * m4/lex.m4: Likewise.
+ * m4/multi.m4: Likewise.
+ * m4/option.m4: Likewise.
+ * m4/python.m4: Likewise.
+ * m4/sanity.m4: Likewise.
+ * m4/cond.m4: Likewise. Also, prefer the m4sugar macro 'm4_if'
+ over the plain m4 macro 'ifelse'.
+ * m4/depend.m4: Likewise.
+
+2011-03-17 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: add test about deprecated use of AC_INIT
+ * tests/deprecated-acinit.test: New test, check that automake
+ and autoconf complain about an old-style AC_INIT call used with
+ a new-style AM_AUTOMAKE_INIT call.
+ * tests/Makefile.am (TESTS): Update.
+
2011-03-04 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: fix bug (comments-in-var-defn.test + autoconf 2.62)
@@ -114,6 +138,13 @@
* NEWS: Likewise.
* TODO: Likewise.
+2011-03-01 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: extend checks on the 'unindent' shell function
+ * tests/self-check-unindent.test: Also check that multiple
+ instances of 'unindent' can run in parallel (this was not
+ the case when that function used temporary files).
+
2011-03-01 Peter Rosin <peda@lysator.liu.se>
test defs: unindent without temporary file
@@ -139,6 +170,32 @@
works with LT_INIT-based interface.
Thanks to Jack Kelly for the suggestion.
+2011-02-25 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: add testcases sanity-checking the testsuite
+ Helper subroutines, variables and other pieces of code defined
+ in the `tests/defs' and used by many testcases are non-obvious,
+ and tricky to get to work portably; but until now, they weren't
+ tested at all in a clear and self-contained way.
+ This change should remedy to the situation.
+ * tests/self-check-cleanup.test: New test, check removal of
+ temporary test working directory by `./defs'.
+ * tests/self-check-dir.test: New test, check that tests using
+ `./defs' create a proper temporary directory, and run in it.
+ * tests/self-check-exit.test: New test, check that, in case of
+ failing commands, the correct exit status is passed to the exit
+ trap installed by the `./defs' script.
+ * tests/self-check-is_newest.test: New test, checking the
+ `is_newest' subroutine.
+ * tests/self-check-me.test: New test, checking that $me gets
+ defined automatically by `tests/defs' if not set, and that it
+ can be overridden from either the shell or the environment.
+ * tests/self-check-sanity.test: New test, check that the sanity
+ checks performed by the `tests/defs' script works correctly.
+ * tests/self-check-unindent.test: New test, checking the
+ `unindent' subroutine.
+ * tests/Makefile.am (TESTS): Update.
+
2011-02-20 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: tempdirs with restrictive permissions are cleaned correctly
@@ -155,6 +212,7 @@
test defs: add subroutine for input unindenting
* tests/defs.in (unindent): New subroutine.
+ * tests/instspc-tests.sh: Use it.
2011-02-15 Stefano Lattarini <stefano.lattarini@gmail.com>
@@ -173,6 +231,52 @@
from environment won't interfere with the testcases.
Suggestion by Ralf Wildenhues.
+2011-02-15 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: `instspc-*.test': do not create useless source file
+ * tests/instspc-tests.sh (create_input_data): Do not create
+ unused source file `source2.c'.
+
+2011-02-15 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: optimize `instspc-*.test' for speed
+ After the split of `instspc.test' into various generated tests,
+ the running time of the testsuite has noticeably increased, since
+ all these new generated tests must run aclocal, autoconf and
+ automake, whereas previously they were run only once (at the
+ beginning of `instspc.test'). But luckily, since the new tests
+ share the same input files for the autotools, this situation can
+ be easily worked around (at the expenses of a slight increase of
+ complexity for the testsuite scaffolding).
+ * tests/instspc-data.test: New helper test, properly calling
+ the `instspc-tests.sh' script to generate input data for the
+ others `instspc-*.test' tests.
+ * tests/Makefile.am (TESTS): Add `instspc-data.test'.
+ ($(instspc_tests:.test=.log)): Depend on its log file.
+ (instspc-data.log): Depend on `instspc-tests.sh'.
+ * tests/instspc-tests.sh: Recognize new action `generate-data',
+ and use it to create hand-written and autotools-generated static
+ files shared by all the `instspc-*.test' tests.
+ When sourced by the `instspc-*.test' tests, use those previously
+ created files instead of recreating them from scratch.
+ (unindent, create_input_data): New subroutines.
+ Some other related changes and refactorings.
+ From a suggestion by Ralf Wildenhues.
+
+2011-02-14 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ python: fix spurious failure in tests
+ * tests/python-vars.test: Ignore cached values from config.site
+ by exporting CONFIG_SITE=/dev/null. Be laxer in matching the
+ expected values of output variables `pythondir' and `pyexecdir',
+ since they can change quite unpredictably among different python
+ installations. Also, avoid "hyping" debugging output, thus
+ offering smaller trace output and more informative diff.
+ Report and suggestions by Ralf Wildenhues.
+ * tests/python-virtualenv.test: Require python, since we call it
+ even after the virtualenv has been deactivated. Ignore cached
+ values from config.site by exporting CONFIG_SITE=/dev/null.
+
2011-02-06 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: tweak few tests on simple and parallel test drivers
@@ -182,6 +286,58 @@
environment won't risk to interfere with the test.
Suggestions by Ralf Wildenhues.
+2011-02-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ python: extend and improve tests, fix minor glitches
+ * m4/python.m4 (AM_PATH_PYTHON): Ensure the "checking ..." messages
+ from configure are always complete, even in case of failure. Tiny
+ cosmetic improvement in info/error messages.
+ * tests/python.test: Also check that automake complains if the
+ PYTHON primary is used but the `py-compile' script is not present.
+ Make grepping of generated Makefile.in laxer w.r.t. whitespace.
+ Add trailing `:' command.
+ * tests/python2.test: Remove repeated calls aclocal: they are
+ useless because configure.in is never modified. Make grepping
+ of automake stderr more comprehensive. Remove the pre-existing
+ `py-compile' file before trying to install it with `--add-missing'.
+ Add trailing `:' command.
+ * tests/python3.test: Add trailing `:' command.
+ * tests/python11.test: Likewise.
+ * tests/python4.test: Likewise. Also, try to pass PYTHON config
+ variable to configure from the environment, rather than only from
+ the command line.
+ * tests/python5.test: Ensure that the "checking ..." messages from
+ configure are always complete. Use proper m4 quoting. Add a
+ trailing `:' command.
+ * tests/python6.test: Simplify test logic, by checking for files
+ created by configure rather then grepping its output.
+ * tests/python7.test: Likewise.
+ * tests/python8.test: Also check that `$PYTHON' is meaningfully
+ set in the ACTION-IF-TRUE argument of AM_PATH_PYTHON.
+ * tests/python9.test: Likewise.
+ * tests/python10.test: Add trailing `:' command.
+ (Makefile.am): Declare `disttest' target as `.PHONY', and add
+ an `ls -l' to its recipe, for debugging.
+ * tests/nobase-python.test: In testing "make uninstall" and
+ "make install" results, prefer idioms that make verbose logs
+ more helpful. Remove a couple of lines of dead code. Add a
+ trailing `:' command.
+ * tests/python5b.test: New test, checking that configure performs
+ the check on the python version even when the choice of the python
+ interpreter is forced by the user.
+ * tests/python-dist.test: New test, checking the distribution of
+ *_PYTHON files.
+ * tests/python-vars.test: New test, checking that AM_PATH_PYTHON
+ correctly set all the output variables advertised in the manual.
+ * tests/python-virtualenv.test: New test, checking that python
+ support offered by automake works well with "virtual python
+ environments" created by the `virtualenv' program.
+ * tests/instdir-prog.test: Also check `$(pyexecdir)'. Existing
+ checks made slightly stricter.
+ * tests/instdir-prog.test: Also check `$(pyexecdir)'. Existing
+ * tests/instdir-ltlib.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+
2011-02-01 Stefano Lattarini <stefano.lattarini@gmail.com>
coverage: more tests on simple and parallel test drivers
@@ -207,14 +363,6 @@
thus causing colored test output not to be automatically
activated when it should.
-2011-01-23 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- tests: avoid instspc.test failures due to make's whitespace trimming
- * tests/instspc.test: Prepend './' when passing the test
- characters, to avoid leading whitespace characters to be trimmed
- from macros set from environment variables. Fixes testsuite
- failures with HP-UX, IRIX, and Tru64/OSF make.
-
2011-01-23 Stefano Lattarini <stefano.lattarini@gmail.com>
coverage: test semantics of "dummy" per-target flags
@@ -226,14 +374,28 @@
2011-01-23 Stefano Lattarini <stefano.lattarini@gmail.com>
tests defs: sanitize IFS
- * tests/defs.in ($IFS): Define to <space>, <tab>, <newline>.
+ * tests/defs ($IFS): Define to <space>, <tab>, <newline>.
($sp): New variable, holding a single whitespace character.
($tab): New variable, holding a tabulation character.
($nl): New variable, holding a newline character.
+2011-01-23 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ tests: avoid instspc* failures due to make's whitespace trimming
+ * tests/instspc-tests.sh: Prepend './' when passing the test
+ characters, to avoid leading whitespace characters to be trimmed
+ from macros set from environment variables. Fixes testsuite
+ failures with HP-UX and Tru64/OSF make.
+
2011-01-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
tests: fix VPATH auto-expansion workarounds.
+ * tests/suffix10.test, tests/suffix11.test, tests/suffix12.test,
+ tests/suffix3.test, tests/suffix5.test, tests/suffix8.test:
+ Ensure $< is not surrounded by white space, to prevent Solaris
+ make from applying automatic VPATH text expansion.
+
+ tests: fix VPATH auto-expansion workarounds.
* tests/parallel-tests8.test, tests/suffix13.test:
Ensure $< is not surrounded by white space, to prevent Solaris
make from applying automatic VPATH text expansion.
@@ -281,6 +443,34 @@
TESTS_ENVIRONMENT for the perl driver. Instead, point to the
parallel-tests driver.
+2011-01-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ tests: check for presence of cscope with redirected input.
+ * tests/defs: Add required test for cscope.
+ Fixes cscope3.test hang with Sun C 5.9 cscope.
+
+ tests: avoid false failure in cygnus-dependency-tracking.test.
+ * tests/cygnus-dependency-tracking.test: Be less restrictive
+ when grepping the compiler error message, GCC 3.4.6 on FreeBSD
+ does not mention an undefined symbol.
+
+2011-01-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ tests: revert not turning off errexit in instspc-test.sh
+ * tests/instspc-tests.sh: Turn off errexit while sourcing defs,
+ the scripts might still not be clean.
+
+2011-01-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ tests: work around Tru64 sh -e issues for instspc*.test.
+ Apparently, Tru64 sh does not like turning off errexit mode,
+ and gets confused.
+ * tests/defs: Document 'errexit' cleanliness requirement.
+ * tests/defs-static.in: Likewise. Avoid error from command
+ substitution to abort instspc*.test with Tru64/OSF 5.1 sh.
+ * tests/instspc-tests.sh: Drop now-unneeded temporary errexit
+ dropping. Add strategic '|| Exit' to let tests work on Tru64.
+
2011-01-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Allow _AM_DEPENDENCIES to be used later in configure.
@@ -302,6 +492,13 @@
do not want to depend on are strictly older than the target.
Also test with a target out of date wrt. more than one rule.
+2011-01-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Avoid local $_ perl variable, for Perl before 5.9.1.
+ * lib/Automake/Options.pm (_process_option_list): Do not
+ lexically localize $_. Fixes bootstrap on AIX 5.1.
+ Bug introduced in commit `v1.11-622-gf90a06c'.
+
2011-01-16 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: remove useless requirements from cond36.test
@@ -309,6 +506,13 @@
Since we are at it, add a trailing `:' command.
2011-01-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ tests: avoid failing command substitution in errexit mode.
+ * tests/vartypo2.test, tests/vartypos.test: Rewrite to not use
+ a command substitution with a nonzero exit status, that causes
+ IRIX and Tru64/OSF sh to fail the whole test.
+
+2011-01-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Stefano Lattarini <stefano.lattarini@gmail.com>
parallel-tests: work around Tru64/OSF 5.1 sh read bugs.
@@ -323,6 +527,20 @@
* NEWS, README: Update copyright years.
+2011-01-15 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: hard error in case of internal failures or signal caught
+ * tests/defs: Exit with status 99 (hard error) rather than
+ 1 (failure) on unexpected/internal errors, or when a signal
+ is caught by the client script.
+
+ Tests defs: don't let useless variables leak in test scripts.
+ * tests/defs ($priv_check_temp, $overwrite_status, $ro_dir_temp,
+ $create_status, $r2h, $libtool_found, $gettext_found, $aclocaldir,
+ $extra_includes): Unset once they've served their purpose.
+
+2011-01-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
Fix parallel-tests.test failure with HP-UX make.
* tests/parallel-tests.test: Sleep inside inner tests, so logs
are newer than logs of tests they depend on, for HP-UX make.
@@ -350,6 +568,138 @@
to build it.
Found by NixOS Hydra, reported by Ralf Wildenhues.
+2011-01-15 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Update docs w.r.t. warning and strictness options.
+ * doc/automake.texi (Strictness): Document that some warnings are
+ turned off by default in `foreign' strictness.
+ (Options): Divide into new sections "Options generalities" and
+ "List of Automake options". Fix typo (colon instead of full
+ stop). Document option precedence (AUTOMAKE_OPTIONS wins over
+ AM_INIT_AUTOMAKE which wins over command line). Also document
+ interactions between options specifying strictness and those
+ specifying warnings.
+
+ More tests on warnings/strictness precedence.
+ * tests/warning-groups-win-over-strictness.test: New test, similar
+ to `warnings-win-over-strictness.test', but checking the explicit
+ catch-all warning flags (like `-Wall' and `-Wnone').
+ * tests/Makefile.am (TESTS): Update.
+
+ Update NEWS about the warnings-over-strictness precedence.
+ * NEWS: Automake explicit warning levels always take precedence
+ over the implicit warning levels implied by Automake strictness.
+
+ For PR automake/547:
+ Warnings win over strictness in AUTOMAKE_OPTIONS.
+ Ensure that, for what concerns the options specified in
+ AUTOMAKE_OPTIONS, explicitly-defined warnings always take
+ precedence over implicit strictness-implied warnings.
+ This finally fixes Automake bug#7669 a.k.a. PR/547.
+ * automake.in (handle_options): Call 'process_option_list'
+ only once per set of options.
+ * lib/Automake/Options.pm (process_global_option_list,
+ process_option_list): Add sanity checks.
+ ($_options_processed, $_global_options_processed): New
+ internal variables, used by the sanity checks above.
+ * tests/warnings-win-over-strictness.test: Extend.
+
+ For PR automake/547:
+ Change signature of 'Automake::Options::_process_option_list()'.
+ This only modifies internal details in the automake implementation,
+ bearing no externally visible effect, but preparing the way for the
+ final fix of Automake bug#7669 a.k.a. PR/547.
+ * lib/Automake/Options.pm (_process_option_list): Accept as
+ arguments a list of hash references with keys 'option' and 'where',
+ where 'option' is an option as might occur in AUTOMAKE_OPTIONS or
+ AM_INIT_AUTOMAKE, and 'where' is the location where it occurred.
+ (process_option_list, process_global_option_list): Updated.
+ * automake.in (handle_options, scan_autoconf_traces): Update.
+
+ Add more tests about AUTOMAKE_OPTIONS.
+ In view of soon-to-follow refactorings (still in the pursuit of a
+ fix for Automake bug#7669 a.k.a. PR/547), add some more tests on
+ AUTOMAKE_OPTIONS support, to prevent obvious regressions.
+ * tests/amopts-variable-expansion.test: New test.
+ * tests/amopts-location.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+
+ For PR automake/547:
+ Warnings win over strictness in AM_INIT_AUTOMAKE.
+ This change ensures that, for what concerns the options specified
+ in AM_INIT_AUTOMAKE, explicitly-defined warnings always take
+ precedence over implicit strictness-implied warnings. Related to
+ Automake bug#7669 a.k.a. PR/547.
+ * lib/Automake/Options.pm (_process_option_list): Parse explicit
+ warnings only after the strictness level has been set. Fix POD
+ documentation.
+ * tests/warnings-win-over-strictness.test: Extend.
+
+ For PR automake/547:
+ Warnings win over strictness on command line.
+ Ensure that, on the command line at least, explicitly defined
+ warnings always take precedence over implicit strictness-implied
+ warnings. Related to Automake bug#7669 a.k.a. PR/547.
+ * automake.in (parse_arguments): Parse warnings only after the
+ strictness level has been processed.
+ * tests/gnuwarn.test: Update, plus miscellaneous improvements.
+ * tests/warnings-win-over-strictness.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
+ More tests on warnings and strictness.
+ * tests/warnings-strictness-interactions.test: New test.
+ * tests/warnings-unknown.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+
+ New test on silent-rules mode and portability warnings.
+ * tests/silent-nowarn.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
+ Add new tests on strictness and warnings precedence and overriding.
+ * tests/strictness-override.test: New test.
+ * tests/strictness-precedence.test: New test.
+ * tests/warnings-override.test: New test.
+ * tests/warnings-precedence.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
+2011-01-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix remake rule-induced test failures with HP-UX make.
+ * tests/remake1a.test: Require GNU make.
+
+2011-01-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix remake rule-induced test failures with HP-UX make.
+ * tests/colon6.test: Update timestamp of subdir Makefile, so we
+ do not spuriously invoke the nonexistent toplevel am--refresh
+ rule.
+
+ tests: fix typos in colon6.test
+ * tests/colon6.test: Fix typos.
+
+2011-01-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: explain MSYS setup failure issue, improve test.
+ * tests/defs: Add comment and failure message, improve fail
+ logic.
+
+2011-01-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix libobj2.test failure with non-GNU make: define $(AR).
+ * tests/libobj2.test: Ensure $(AR) is suitably defined.
+
+2011-01-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ tests: avoid spurious failures due to fork failure in test setup
+ * tests/defs: Ensure $me is always nonempty, to avoid spurious
+ failures on MinGW/MSYS in case the preceding sed command could
+ not be spawned.
+
+ Avoid configure warnings from wait about reused PIDs.
+ * m4/sanity.m4 (AM_SANITY_CHECK): Hide wait stderr output.
+ Fixes spurious failure of depcomp2.test.
+
2011-01-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Avoid testsuite failures due to Autoconf Fortran change.
@@ -385,6 +735,55 @@
2011-01-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+ tests: do not force yacc-requiring tests to use bison
+ * tests/defs.in: New required entry 'yacc'. Remove old
+ required entry 'bison'.
+ * tests/cond35.test ($required): Require yacc, not bison.
+ * tests/cond36.test: Likewise.
+ * tests/pr204.test: Likewise.
+ * tests/silent-many-gcc.test: Likewise.
+ * tests/silent-many-generic.test: Likewise.
+ * tests/silent-yacc-gcc.test: Likewise.
+ * tests/silent-yacc-generic.test: Likewise.
+ * tests/subpkg.test: Likewise.
+ * tests/suffix10.test: Likewise.
+ * tests/yacc-basic.test: Likewise.
+ * tests/yacc-clean.test: Likewise.
+ * tests/yacc-d-basic.test: Likewise.
+ * tests/yacc-d-vpath.test: Likewise.
+ * tests/yacc-dist-nobuild.test: Likewise.
+ * tests/yacc-nodist.test: Likewise.
+ * tests/yacc4.test: Likewise.
+ * tests/yacc6.test: Likewise.
+ * tests/yacc7.test: Likewise.
+ * tests/yacc8.test: Likewise.
+ * tests/yaccdry.test: Likewise.
+ * tests/yaccvpath.test: Likewise.
+
+2011-01-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: more consistent checks about invalid options
+ * tests/aclocal.test: Grepping of automake stderr for messages
+ reporting invalid options made stricter.
+ * tests/no-outdir-option.test: Likewise. Also, create a dummy
+ `Makefile.am', to ensure that the automake failures are really
+ caused only by unrecognized options.
+ * tests/automake.test: Added trailing `:' command. Removed
+ redundant checks on `--help' and `--version' option (already
+ performed in the test `help*.test').
+
+2011-01-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: enable 'errexit' shell flag by default.
+ * tests/defs: Enable `errexit' shell flag (near the end).
+ Removed redundant comment about the enabling of shell traces.
+ * tests/README (Writing test cases): Update, and use nicer
+ formatting in a couple of places.
+ * All tests: Adjusted by removing now-redundant calls to
+ 'set -e'.
+
+2011-01-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
tests: work around a texi+cygnus bug causing a spurious XFAIL
* tests/txinfo5b.test: New test, like txinfo5.test but calling
automake with the `-Wno-override' option to work around a bug
@@ -397,8 +796,17 @@
Fix another typo in Rule.pm comment.
* lib/Automake/Rule.pm: Fix typo.
+2011-01-09 Peter Rosin <peda@lysator.liu.se>
+
+ Fix another typo in Rule.pm comment.
+ * lib/Automake/Rule.pm: Fix typo.
+
2011-01-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+ tests: texinfo unrecognized extensions
+ * tests/txinfo-unrecognized-extension.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
Improve, extend and tweak tests on Texinfo support.
* tests/instdir-texi.test: Add a call to `ls -l' after that to
`make', for debugging. When looking for required tools, do not
@@ -452,10 +860,121 @@
* tests/vtexi4.test: Likewise.
* tests/Makefile.am (TESTS): Updated.
-2011-01-09 Peter Rosin <peda@lysator.liu.se>
+2011-01-11 Stefano Lattarini <stefano.lattarini@gmail.com>
- Fix another typo in Rule.pm comment.
- * lib/Automake/Rule.pm: Fix typo.
+ tests: fix spurious failure in 'tests/yflags-conditional.test'
+ * tests/yflags-conditional.test: Filter out message "warnings are
+ treated as errors" from automake stderr, to avoid a false positive
+ when grepping for extraneous warning messages.
+
+2011-01-10 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ yacc: warn about conditional content in *YFLAGS variables
+ This change fixes automake bug#7804.
+ * automake.in (lang_yacc_target_hook): Warn if any of the relevant
+ *YFLAGS variables has conditional contents (not only a conditional
+ definition). Related refactoring.
+ * NEWS: Updated.
+ * tests/yflags-conditional.test: Updated and extended.
+ * tests/yflags-conditional-force.test: New test.
+ * tests/Makefile.am (TESTS): Updated.
+
+2011-01-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ yacc: support variable expansions in *YFLAGS definition.
+ This change fixes automake bug#7800.
+ * automake.in (lang_yacc_target_hook): Use 'value_as_list_recursive'
+ instead of 'variable_value' to get the value of *YFLAGS variables.
+ Related changes.
+ ($DASH_D_PATTERN): Removed.
+ * tests/Makefile.am (XFAIL_TESTS): Remove yflags-var-expand.test.
+ * tests/yacc-clean.test: Remove workaround for now-fixed bug.
+ * NEWS: Update.
+
+2011-01-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ yacc: more tests on *YFLAGS support
+ * tests/yflags-var-expand.test: New test, still xfailing. It
+ exposes automake bug#7800 -- "automake fails to honor `-d' in
+ AM_YFLAGS when variable expansions are involved".
+ * tests/yflags-d-false-positive.test: New test, checking that
+ automake do not spuriously see `-d' in *YFLAGS when that isn't
+ really there.
+ * tests/yflags-force-override.test: New test, checking that
+ automake can cope with definition of the YFLAGS variable in
+ Makefile.am (even if that is an extremely bad practice, as that
+ variable is user-reserved).
+ * tests/yflags-cmdline-override.test: New test, checking that
+ automake can cope with user-redefinition of YFLAGS at configure
+ time and/or at make time.
+ * tests/yflags-conditional.test: New test, checks that automake
+ warns on conditionally-defined *YFLAGS variables.
+ * tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
+
+2011-01-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ yacc: extend and improve tests
+ * tests/yacc-basic.test: Also check that the intermediate C file
+ is mentioned in the generated Makefile.in, and that it is created
+ by the first make invocation.
+ * tests/yacc3.test: Test removed, superseded by ...
+ * tests/yacc-d-basic.test: ... this new test.
+ * tests/yacc2.test: Add reference to that new test in the heading
+ comments.
+ * tests/yacc-d-vpath.test: New test.
+ * tests/yaccvpath.test: Updated heading comments. Do not require
+ gcc anymore, as any working C compiler should be enough. Remove
+ redundant comments.
+ * tests/yacc-nodist.test: New test.
+ * tests/yacc-dist-nobuild.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
+2010-12-13 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Extend, fix and improve tests on Lex and Yacc support.
+ * tests/lexcpp.test: New test script, on support for Lex + C++.
+ * tests/lexvpath.test: New test script, test build and rebuild
+ rules for lexers in VPATH setup.
+ * tests/yacc-basic.test: New test script, run simple "semantic"
+ checks on basic Yacc support (similarly to what lex3.test does
+ for Lex support).
+ * tests/lex.test: Don't create useless dummy source file joe.l.
+ Remove extra blank lines.
+ * tests/lex4.test: Add trailing `:' command. Do not create dummy
+ useless lex source file.
+ * tests/lex2.test: Likewise. Call automake with the `-a' option,
+ so that it doesn't fail for the absence of `ylwrap' script. Make
+ grepping of automake stderr stricter.
+ * tests/yacc7.test: Add trailing `:' command. Enable `errexit'
+ shell flag earlier (just after having sourced ./defs).
+ * tests/yacc4.test: Likewise. Also ...
+ (configure.in): Use pre-populated skeleton set up by ./defs,
+ instead of writing one from scratch.
+ Other minor cosmetic changes.
+ * tests/yacc5.test: Likewise.
+ * tests/yaccvpath.test: Likewise. Also ...
+ ($distdir): New variable.
+ Use it throughout.
+ * tests/lex5.test: Likewise.
+ * tests/lex3.test: Likewise. Check the distdir, rather than
+ grepping the distribution tarball. Extend the test on the
+ created binary, and be sure to avoid hangs. Add some comments.
+ * tests/yacc.test: Use stricter grepping. Add trailing `:'.
+ * tests/yacc6.test: Likewise.
+ * tests/yacc3.test: Likewise. Do not create the unused file
+ `Makefile.sed'. Remove useless rules from Makefile.am. Other
+ minor cosmetic changes.
+ * tests/yacc2.test: Make grepping of generated `Makefile.in' and
+ of automake error messages stricter. Do not redirect output of
+ grep to /dev/null. Move call to aclocal earlier. Reduce the
+ number of empty blank lines. Fix a typo in comments.
+ * tests/yacc8.test: Fixed bugs that reduced the completeness of
+ the tests. Added trailing `:' command.
+ (configure.in): Use pre-populated skeleton set up by ./defs,
+ instead of writing one from scratch.
+ * tests/yaccpp.test: Test also extensions `.y++', `.ypp', and
+ `.yxx', rather than only `.yy'.
+ * tests/Makefile.am (TESTS): Update.
2011-01-09 Stefano Lattarini <stefano.lattarini@gmail.com>
@@ -465,6 +984,7 @@
* tests/cond14.test: Likewise.
* tests/fort4.test: Likewise.
* tests/fort5.test: Likewise.
+ * tests/libobj17.test: Likewise.
* tests/suffix7.test: Likewise.
* tests/vtexi2.test: Likewise.
@@ -497,6 +1017,26 @@
manual for how to convert directory values into macros.
(Optional): Fix grammar nit.
+2011-01-07 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ yacc: "make clean" removes .c and .h files from non-distributed .y
+ Previously, while automake did *not* distribute C source and header
+ files derived from non-distributed Yacc sources, it still caused
+ them to be removed only by "make maintainer-clean" only, and not by
+ simply "make clean" or "make distclean".
+ This caused "make distcheck" to fail, unless the developer put
+ those generated .c and .h files in CLEANFILES or in DISTCLEANFILES
+ by hand.
+ This change fixes this issue, by making non-distributed `.c' and
+ `.h' files generated by non-distributed Yacc sources cleaned by
+ "make clean".
+ * tests/automake.in (lang_yacc_target_hook): Make C source and
+ header files derived from non-distributed Yacc files cleaned by
+ "make clean", not only by "make maintainer-clean".
+ * tests/yacc-clean.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+ * NEWS: Update.
+
2011-01-02 Stefano Lattarini <stefano.lattarini@gmail.com>
* NEWS: Fix typo (forgotten word).
@@ -509,12 +1049,51 @@
be used to work around automake checks on invalid primary/directory
couples (such as `lib_PROGRAMS' or `doc_LIBRARIES').
+2010-01-03 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests: normalize use of the 'errexit' shell flag.
+ * tests/maken3.test (check_targets): Remove redundant call to
+ 'set -e'.
+ * tests/maken4.test: Likewise.
+ * tests/ansi5.test: Call 'set -e' just after './defs' has been
+ sourced.
+ * tests/ansi6.test: Likewise.
+ * tests/ansi7.test: Likewise.
+ * tests/cond16.test: Likewise.
+ * tests/cond17.test: Likewise.
+ * tests/cond18.test: Likewise.
+ * tests/cond19.test: Likewise.
+ * tests/cond20.test: Likewise.
+ * tests/cond21.test: Likewise.
+ * tests/instdat2.test: Likewise.
+ * tests/instdir-texi.test: Likewise.
+ * tests/parallel-tests3.test: Likewise.
+ * tests/remake1a.test: Likewise.
+ * tests/ccnoco.test: Likewise, and add trailing `:' command.
+ * tests/comment4.test: Likewise.
+ * tests/gcj4.test: Likewise.
+ * tests/nodist2.test: Likewise.
+ * tests/nodist3.test: Enable 'errexit' shell flag (this should
+ have been done in commit v1.11-248-g317e17b, but the relevant
+ hunk has been forgotten somehow).
+ * tests/output.test: Likewise.
+ * tests/gnits2.test: Likewise, and display captured stderr to
+ script's stderr, not to script's stdout.
+ * tests/gnits3.test: Likewise. Also, prefer 'cat' over 'echo'
+ to append to Makefile.am, and really check that the exit status
+ of "make installcheck" indicates failure.
+
2011-01-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Sync auxiliary files from upstream.
* lib/config.guess, lib/config.sub, lib/texinfo.tex:
Sync from upstream.
+ Avoid caching bug in cygnus mode test.
+ * tests/cygnus-requires-maintainer-mode.test: Remove
+ autom4te.cache directory before rerunning aclocal, to
+ remove trace caches.
+
Fix maintainer-check regression.
* tests/subobj11a.test: Pass DISTCHECK_CONFIGURE_FLAGS in the
environment.
@@ -524,6 +1103,42 @@
* automake.in (gen_copyright, version): Likewise.
* doc/automake.texi: Likewise.
+2010-12-23 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ * NEWS: Add missing blank line between two entries.
+
+2010-12-23 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Improve and extend tests `suffix*.test'.
+ * tests/suffix.test: Check that suffix rules for C compilation are
+ only included once. Try also with a static library.
+ * tests/suffix2.test: Add a new grep to help potential debugging.
+ Do not run automake with the `--add-missing' options, since we
+ already create all the needed auxiliary files. Try also *without*
+ the `no-dependencies' automake option.
+ * tests/suffix4.test: Make grepping of Makefile.in stricter.
+ * tests/suffix3.test: Rewritten to run also autoconf, ./configure
+ and make.
+ * tests/suffix5.test: Likewise.
+ * tests/suffix6.test: Fix botched recipe indentation (eight spaces
+ were used instead of a tabulation character). Extend to check
+ that `.obj' is handled like `.$(OBJEXT)' (as is done for `.o').
+ Improved parsing & grepping of generated Makefile.in. Other minor
+ fixes and improvements.
+ * tests/suffix10.test: Move some checks in Makefile.am. Also run
+ "make all".
+ * tests/suffix12.test: Likewise, and account for VPATH issues in
+ weaker make implementations.
+ * tests/suffix11.test: Likewise. Also, run "make distcheck", for
+ completeness, and related changes.
+ * tests/suffix8.test: Likewise. Also, do not put `gcc' anymore
+ in $required.
+ * tests/suffix13.test: Do not use the `--force-missing' automake
+ option unnecessarily.
+ * tests/suffix6b.test: New test, semantic sister of `suffix6.test'.
+ * tests/suffix6c.test: Likewise.
+ * tests/Makefile.am (TESTS): Updated.
+
2010-12-23 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Stefano Lattarini <stefano.lattarini@gmail.com>
@@ -561,6 +1176,56 @@
2010-12-22 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Add some tests on 'cygnus' mode.
+ * tests/clean2.test: Extend.
+ * tests/cygnus-check-without-all.test: New test.
+ * tests/cygnus-dependency-tracking.test: Likewise.
+ * tests/cygnus-distclean.test: Likewise.
+ * tests/cygnus-imply-foreign.test: Likewise.
+ * tests/cygnus-no-dist.test: Likewise.
+ * tests/cygnus-no-installinfo.test: Likewise.
+ * tests/cygnus-requires-maintainer-mode.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+
+2010-12-22 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix parallel testsuite run with Zsh.
+ This change deals with a Zsh incompatibility in the handling
+ of the special shell variable `$0' in sourced files; this
+ incompatibility used to cause utter breakage when the
+ Automake testsuite was run in parallel mode with Zsh as
+ the $(TEST_LOG_COMPILER).
+ For more information, please refer to the thread "Fix parallel
+ testsuite run with zsh" on automake-patches, dated 2010-12-22:
+ <http://lists.gnu.org/archive/html/automake-patches/2010-12/msg00135.html>
+ This change works around the problems described above for Zsh 4.3
+ or later, and offers better error messages (instead of random
+ failures) for earlier Zsh version.
+ * tests/README (Supported shells): When describing the manual
+ workaround about the Zsh incompatibility in the handling of `$0',
+ tell that it is now needed only with Zsh versions preceding 4.3.
+ Done also some minor rewordings.
+ * tests/defs-static.in ($argv0): New variable, offers a workaround
+ for the Zsh incompatibility in the handling of `$0'.
+ Abort if that variable cannot be correctly set (can happen only
+ in older Zsh version).
+ * tests/defs ($me): Define using `$argv0', not `$0'.
+
+2010-12-22 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: keep track of original $AUTOMAKE and $ACLOCAL values.
+ This is especially useful for tests which might want to run
+ automake and aclocal without additional flags and warnings.
+ * tests/defs-static.in ($original_ACLOCAL): New variable.
+ ($original_AUTOMAKE): Likewise.
+ * tests/help.test: Use them.
+ * tests/help2.test: Likewise.
+ * tests/help3.test: Likewise.
+ * tests/help4.test: Likewise.
+ From a suggestion by Ralf Wildenhues.
+
+2010-12-22 Stefano Lattarini <stefano.lattarini@gmail.com>
+
distlinksbrk.test: Work around botched "make -k".
* tests/distlinksbrk.test: Run "make" multiple times and grep
its output each time for a single error message, rather than
@@ -575,11 +1240,59 @@
2010-12-21 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Minor improvements to test 'amopts.test'.
+ * tests/amopts.test: Remove botched comment. Make grepping of
+ automake stderr slighty stricter. Add trailing `:' command.
+
+2010-12-21 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ backcompat6.test: avoid comments inside recipe commands.
+ * tests/backcompat6.test: Remove shell comments from makefile rule
+ commands, as they are not portable to (at least) Tru64 make.
+
+2010-12-21 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ man8.test: avoid comments inside recipe commands.
+ * tests/man8.test: Remove shell comments from makefile rule
+ commands, as they are not portable to (at least) Tru64 make.
+
+2010-12-21 Stefano Lattarini <stefano.lattarini@gmail.com>
+
Fix sed-related buglet in test "subdir5.test"
* tests/subdir5.test: Always terminate text passed to the
`i' sed command with a newline, to work around limitations
in e.g. older OpenBSD sed.
+2010-12-21 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix spurious failures in tests on AC_CONFIG_AUX_DIR.
+ * tests/auxdir7.test: Do not try to needlessly overwrite the files
+ `install-sh' and `missing'. This avoid spurious failures in "make
+ distcheck", when those files might be copied as read-only from the
+ `lib' directory.
+ * tests/auxdir8.test: Likewise.
+
+2010-12-18 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Make test 'posixsubst-script' portable to MinGW/MSYS.
+ * tests/posixsubst-script.test: Ensure that the generated dummy
+ scripts really start with a shebang line, to work around a
+ limitation of 'test -x' on MinGW/MSYS.
+ Reported by Ralf Wildenhues.
+
+ Improve comments in tests `posixsubst*.test'.
+ * tests/posixsubst-data.test: Improve comment explaining why we
+ try also empty match suffix.
+ * tests/posixsubst-extradist.test: Likewise.
+ * tests/posixsubst-ldadd.test: Likewise.
+ * tests/posixsubst-libraries.test: Likewise.
+ * tests/posixsubst-ltlibraries.test: Likewise.
+ * tests/posixsubst-programs.test: Likewise.
+ * tests/posixsubst-scripts.test: Likewise.
+ * tests/posixsubst-sources.test: Likewise.
+ * tests/posixsubst-tests.test: Likewise.
+ Suggested by Ralf Wildenhues.
+
2010-12-18 Stefano Lattarini <stefano.lattarini@gmail.com>
docs: fix blunder in example about python extension modules
@@ -593,6 +1306,51 @@
* doc/automake.texi (Uniform): List `LTLIBRARIES' among
the Automake primaries.
+2010-12-13 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Tests defs: requirement 'xsi-shell' must be synced with libtool.
+ * tests/defs (xsi-shell): Add comment telling to keep the
+ XSI-conformance checks in sync with libtool.
+
+2010-12-17 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Minor cleanups in canon7.test.
+ * tests/canon7.test (_foo_bar_SOURCES): Remove libs.c.
+ (configure.in): Remove AC_PROG_CXX.
+
+2010-12-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Avoid false positive in sc_tests_plain_make maintainer-check.
+ * Makefile.am (sc_tests_plain_make): Ensure to only match full
+ `make' words. Avoid false positive with remake11.test.
+
+2010-12-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix canon7.test failure.
+ * tests/canon7.test (_foo_bar_SOURCES): Add foobar.c.
+ (lib.h, libd.c, libs.c): Use const for constant strings.
+
+2010-12-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix typos in test comments.
+ * tests/posixsubst-data.test, tests/posixsubst-extradist.test,
+ tests/posixsubst-ldadd.test, tests/posixsubst-libraries.test,
+ tests/posixsubst-ltlibraries.test, tests/posixsubst-programs.test,
+ tests/posixsubst-scripts.test, tests/posixsubst-sources.test,
+ tests/posixsubst-tests.test: Fix typos.
+
+2010-12-14 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ More uses of AS_HELP_STRING in automake macros.
+ * m4/depend.m4 (AM_DEP_TRACK): Use `AS_HELP_STRING' to format
+ the help message added to the generated configure.
+ * m4/dmalloc.m4 (AM_WITH_DMALLOC): Likewise.
+ * m4/lispdir.m4 (AM_PATH_LISPDIR): Likewise.
+ * m4/maintainer.m4 (AM_MAINTAINER_MODE): Likewise.
+ * m4/multi.m4 (AM_ENABLE_MULTILIB): Likewise.
+ Also, bumped all serial numbers of the modified m4 files.
+
2010-12-14 Stefano Lattarini <stefano.lattarini@gmail.com>
Improve tests on generated portions of configure help screen.
@@ -609,6 +1367,239 @@
* tests/help-init.test: Grepping of configure help screen
tightened.
+2010-12-15 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Extended tests on AC_CONFIG_AUX_DIR.
+ * tests/auxdir.test: Enable `errexit' shell flag. Prefer `$me'
+ over hard-coded test name. Use proper m4 quoting. Add trailing
+ `:' command.
+ * tests/auxdir2.test: Likewise. Try to call automake also with
+ the `-a' option, so that it will not fail for spurious reasons.
+ * tests/auxdir3.test: Add an explanatory comment and a trailing
+ `:' command.
+ * tests/auxdir4.test: Prefer `$me' over hard-coded test name.
+ Make grepping of automake stderr slightly stricter. Also, now
+ this test just checks about Automake's reaction to unportable
+ auxiliary directory names (and it has been extended in this
+ respect). Moved the checks about non-existent auxiliary
+ directories to ...
+ * tests/auxdir5.test: ... this new test.
+ * tests/auxdir6.test: New test.
+ * tests/auxdir7.test: Likewise.
+ * tests/auxdir8.test: Likewise.
+ * tests/auxdir9.test: Likewise.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-12-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests: extend checks on remake rules.
+ This adds proper semantical tests (i.e. run make to check the
+ rebuild rules are correctly triggered) in addition to tentative
+ grepping of the generated Makefile.in(s).
+ * tests/remake.test: Enable `errexit' shell flag, and related
+ changes. Modernize `configure.in'. Add trailing `:' command.
+ Improve heading comments, and add a reference to new sister test
+ remake1a.test.
+ * tests/remake3.test: Likewise (but with sister test being
+ remake3a.test).
+ * tests/remake2.test: Improve heading comments. Enable `errexit'
+ shell flag, and related changes. Modernize `configure.in'. Make
+ grepping of `Makefile.in' slightly stricter. Add trailing `:'
+ command.
+ * tests/remake5.test: Also run the `distcheck' target. Add
+ trailing `:' command. Use proper m4 quoting in configure.in.
+ * tests/remake4.test: Prefer `$me' over hard-coded test name.
+ * tests/remake7.test: Use the `configure.in' stub created by
+ ./defs, rather than writing it from scratch.
+ * tests/remake6.test: Likewise. Also, add trailing `:' command,
+ and ensure verbose printing of captured make output.
+ * tests/remake1a.test: New test, sister of remake.test.
+ * tests/remake3a.test: New test, sister of remake3.test.
+ * tests/remake8a.test: New test.
+ * tests/remake8b.test: Likewise.
+ * tests/remake9a.test: Likewise.
+ * tests/remake9b.test: Likewise.
+ * tests/remake9c.test: Likewise.
+ * tests/remake9d.test: Likewise.
+ * tests/remake10a.test: Likewise.
+ * tests/remake10b.test: Likewise.
+ * tests/remake10c.test: Likewise.
+ * tests/remake11.test: Likewise.
+ * tests/remake12.test: Likewise.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-12-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Improve and extend tests on canonicalization.
+ * tests/canon-name.test: Add trailing `:' command. When writing
+ configure.in, prefer to use $me instead of hard-coding the test
+ name.
+ * tests/canon3.test: Prefer trailing `:' over trailing `Exit 0'.
+ * tests/canon4.test: Likewise. Make grepping of Makefile.in
+ stricter. Improve heading comment, and add reference to ...
+ * tests/canon6.test: ... this new test (sister test of the
+ previous one).
+ * tests/canon.test: Prefer cat + here-doc over echo to append
+ text to configure.in. Extend grepping of Automake stderr. Add
+ trailing `:' command.
+ * tests/canon5.test: Likewise.
+ * tests/canon7.test: New file, stress test on canonicalization.
+ * tests/canon8.test: New test, for better coverage (check that
+ the `@' character is not transliterated in canonicalizations).
+ * tests/Makefile.am: Updated.
+
+2010-12-13 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Libobj tests: refer to automake bug tracker for limitations.
+ * tests/libobj15b.test (configure.in): In the comment explaining
+ why an apparently redundant AC_OUTPUT is indeed needed, refer
+ to the relevant entry in the Automake bug tracker rather than
+ describing the bug in detail with a FIXME-style comment.
+ * tests/libobj15c.test: Likewise.
+ * tests/libobj20b.test: Likewise.
+
+ Libobj tests: do not use `##' automake comments in-line.
+ * tests/libobj19.test (Makefile.am): Do not use inline `##'
+ comments in the definition of AUTOMAKE_OPTIONS.
+ * tests/libobj20c.test: Likewise.
+ Report by Ralf Wildenhues.
+
+2010-12-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix testsuite failure of check12.test without DejaGNU.
+ * tests/check12.test: Require runtest.
+
+2010-12-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: more uses of $top_testsrcdir.
+ * tests/compile6.test: Use `$top_testsrcdir' instead of
+ `$testsrcdir/..'.
+
+2010-11-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests required tools: also try `-v' option for GNU compilers.
+ * tests/defs.in: In the loop on "$required" tools, for gcc
+ and g++, also run "gcc -v" (resp. "g++ -v"), to get more
+ information, and for consistency with gcj.
+
+2010-11-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Tests defs: avoid some useless subshells.
+ * tests/defs: In the loop on "$required" tools: avoid subshells
+ where not needed.
+
+2010-12-09 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Extend tests on AC_LIBOBJ and friends.
+ * tests/aclibobj.test: Removed, superseded by ...
+ * tests/libobj-basic.test: ... this new test, which runs autoconf,
+ ./configure and make, to ensure everything really works.
+ * tests/libobj3.test: Add trailing `:' command. Escape literal
+ dot in grep regexp.
+ * tests/libobj4.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Use proper m4 quoting.
+ * tests/ltlibobjs.test: Likewise.
+ * tests/libobj5.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Make more robust by using
+ longer filenames to be grepped.
+ * tests/libobj8.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Use the configure.in
+ stub provided by ./defs, rather than writing it from scratch.
+ * tests/libobj2.test: Likewise. Also, add calls to autoconf,
+ ./configure and make, to ensure everything really works.
+ * tests/libobj7.test: Likewise, and ensure that at least one
+ function listed in AC_REPLACE_FUNCTIONS is truly replaced.
+ * tests/libobj13.test: Make grepping of Automake stderr slightly
+ stricter. Add trailing `:' command.
+ * tests/libobj12.test: Likewise. Also, prefer "cat + here-doc"
+ over "echo" to append to Makefile.am, and some cosmetic changes
+ in spacing.
+ * tests/libobj14.test: Call `Exit 1' if sourcing of ./defs fails.
+ Slighty improve m4 quoting. Add trailing `:' command.
+ * tests/libobj10.test: Add calls to autoconf, ./configure and
+ make, to ensure everything really works. Also, remove tests that
+ nonexistent source for AC_LIBOBJ cause an Automake failure: this
+ is already checked by ...
+ * tests/libobj15a.test: ... this new test.
+ * tests/libobj15b.test: New test, sister test of libobj15a.test,
+ checks AC_LIBSOURCE instead of AC_LIBOBJ.
+ * tests/libobj15c.test: New test, sister test of libobj15a.test,
+ checks AC_LIBSOURCES instead of AC_LIBOBJ.
+ * tests/libobj11.test: Removed, superseded by ...
+ * tests/libobj16a.test: ... this new test.
+ * tests/libobj16b.test: New test, sister test of libobj16a.test,
+ but using oldish/deprecated idioms.
+ * tests/libobj17.test: New test.
+ * tests/libobj18.test: Likewise.
+ * tests/libobj19.test: Likewise.
+ * tests/libobj20a.test: Likewise.
+ * tests/libobj20b.test: Likewise.
+ * tests/libobj20c.test: Likewise.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-12-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Test `$(var:suf=rpl)' expansion in special automake variables.
+ * tests/posixsubst-data.test: New test.
+ * tests/posixsubst-extradist.test: Likewise.
+ * tests/posixsubst-ldadd.test: Likewise.
+ * tests/posixsubst-libraries.test: Likewise.
+ * tests/posixsubst-ltlibraries.test: Likewise.
+ * tests/posixsubst-programs.test: Likewise.
+ * tests/posixsubst-scripts.test: Likewise.
+ * tests/posixsubst-sources.test: Likewise.
+ * tests/posixsubst-tests.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+
+2010-12-07 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Make tests `colon*.test' more "semantic".
+ Prefer running configure and make over grepping the generated
+ files; this is both more correct and less fragile.
+ * tests/colon.test: Made more "semantic", as described above.
+ * tests/colon5.test: Likewise.
+ * tests/colon6.test: Likewise.
+ * tests/colon7.test: Likewise.
+ * tests/colon2.test: Likewise, and improve syncing with sister
+ test `colon3.test'.
+ * tests/colon3.test: Likewise (but with the sister test being
+ `colon2.test' here).
+
+2010-12-10 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Extend and improve tests on DejaGnu support.
+ * tests/dejagnu.test: Do not create useless dummy test script.
+ Add trailing `:' command. In heading comments, add reference
+ to ...
+ * tests/check12.test: ... this new "semantic" test, covering
+ concurrent use of dejagnu tests, simple tests and `check-local'
+ target.
+ * tests/dejagnu2.test: Make test more reliable, by avoid weak
+ grepping of make output. Prefer `cat' over `echo' to append
+ to configure.in. Quote literal dots in grep regexps. Prefer
+ `grep -c ...' over `grep ... | wc -l'. Make grepping of
+ automake stderr slightly stricter. Add trailing `:' command.
+ * tests/dejagnu3.test: Prefer `cat' over `echo' to append to
+ configure.in. Check stderr of expected-to-fail "make" call.
+ Remove extra blank lines from Makefile.am.
+ * tests/dejagnu4.test: Prefer `cat' over `echo' to append to
+ configure.in. Prefer `mv -f' over plain `mv' when the target
+ file already exists. Avoid extra mkdir calls by creating more
+ directories at once. Better use of blank lines. Check that
+ the `*.log' and `*.sum' files are created by runtest also when
+ "make check" fails.
+ * tests/dejagnu7.test: Prefer `cat' over `echo' to append to
+ configure.in. Better use of blank lines. Add a trailing `:'
+ command.
+ * tests/dejagnu6.test: Likewise, and give the dejagnu test a
+ more descriptive name.
+ * tests/dejagnu5.test: Likewise. Also, simply define package
+ name to `$me' rather than using a non-obvious sed script to
+ extract it from `AC_INIT', and write the Makefile.am with only
+ one command.
+ * tests/Makefile.am (TESTS): Updated.
+
2010-12-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Avoid running installed automake from 'libtool --help'.
@@ -616,6 +1607,151 @@
Together with fixed Libtool, this fixes check-coverage to not
invoke installed automake.
+2010-12-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Separate checks on target overriding into multiple test scripts.
+ * tests/overrid.test: Deleted, its contents separated into ...
+ * tests/override-suggest-local.test: ... this new test ...
+ * tests/override-html.test: ... and this new test ...
+ * tests/override-conditional-1.test: ... and this new test ...
+ * tests/override-conditional-2.test: ... and this new test (still
+ xfailing).
+ * tests/Makefile.am (TESTS, XFAIL_TESTS): Updated.
+
+ Enable `set -e' in more tests (plus some tweakings).
+ * tests/implicit.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command.
+ * tests/insh2.test: Likewise.
+ * tests/instman2.test: Likewise.
+ * tests/interp.test: Likewise.
+ * tests/interp2.test: Likewise.
+ * tests/library.test: Likewise.
+ * tests/mclean.test: Likewise.
+ * tests/info.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Remove useless chaff from
+ generated Makefile.am. Add a "FIXME" comment.
+ * tests/include.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Prefer cat + here-doc over
+ echo to append to configure.in. Make tests more robust by using
+ longer and less common names to grep. Remove an useless call to
+ echo. Remove an useless subshell.
+ * tests/header.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Add excerpts from the original
+ report of the bug tested for by this script.
+ * tests/gcj.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Add trailing `:' command.
+ * tests/gcj3.test: Likewise.
+ * tests/ldflags.test: Likewise.
+ * tests/libtool.test: Likewise.
+ * tests/listval.test: Likewise.
+ * tests/javaprim.test: Likewise, and prefer cat + here-doc over
+ echo to append to configure.in.
+ * tests/javasubst.test: Likewise.
+ * tests/discorver.test: Enable `errexit' shell flag. Prefer
+ trailing `:' over trailing `Exit 0'.
+ * tests/instdat.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Avoid usless subshell. Prefer
+ cat + here-doc over echo to append to configure.in.
+ * tests/libtool2.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Use the configure.in
+ stub provided by ./defs, rather than writing it from scratch.
+
+ Modernize, improve and/or tweak some test scripts.
+ * tests/maintclean.test: Use proper m4 quoting. Add trailing `:'
+ command.
+ * tests/sinclude.test: Likewise, and add a couple of blank lines,
+ for clarity.
+ * tests/make.test: Move setting of `errexit' shell flag earlier in
+ the script (just after inclusion of ./defs). Use the configure.in
+ stub created by ./defs, rather than writing it from scratch. Some
+ cosmetic changes in spacing. Ensure we wait enough time before
+ touching configure.in to trigger the rebuild rules.
+ * tests/makej.test: Use `$me' instead of hard-coding the test
+ name. Add trailing `:' command.
+ * tests/version7.test: Likewise.
+ * tests/space.test: Enable `errexit' shell flag, and related
+ changes.
+ * tests/makevars.test: Likewise. Also, prefer trailing `:' over
+ trailing `Exit 0', and be more tolerant of white spaces when
+ grepping Makefile.in.
+
+2010-12-02 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ * tests/silent8.test: Use "|| Exit 1" after ". ./defs".
+
+ Enable `set -e' in more tests (plus some tweakings).
+ * tests/mkinstall.test: Enable `errexit' shell flag, and related
+ changes. Add a trailing `:' command, if needed.
+ * tests/mdate2.test: Likewise.
+ * tests/objc.test: Likewise.
+ * tests/noinst.test: Likewise.
+ * tests/outdir.test: Likewise.
+ * tests/number.test: Likewise.
+ * tests/pluseq.test: Likewise.
+ * tests/req.test: Likewise.
+ * tests/rulepat.test: Likewise.
+ * tests/specflg6.test: Likewise.
+ * tests/spell3.test: Likewise.
+ * tests/parse.test: Likewise, and ...
+ (configure.in): Use the stub created by ./defs, rather than
+ writing it from scratch. Remove useless calls to AC_PROG_RANLIB
+ and AC_OUTPUT.
+ * tests/mdate4.test: Likewise.
+ * tests/mkinstall.test: Likewise, and ...
+ (configure.in): ... drop useless call to `AC_OUTPUT'.
+ * tests/output.test: Enable `errexit' shell flag, and related
+ changes. Add a trailing `:' command.
+ (configure.in): Modernize.
+ * tests/output2.test: Likewise.
+ * tests/output3.test: Likewise.
+ * tests/output4.test: Likewise.
+ * tests/mdate3.test: Enable `errexit' shell flag, and related
+ changes. Prefer `$me' over hard-coded test name. Do not move
+ non-existent or useless files in the build auxiliary directory.
+ * tests/nodistdir.test: Enable `errexit' shell flag, and related
+ changes. Prefer trailing `:' over trailing `Exit 0'.
+ * tests/nodist.test: Likewise. Also, prefer cat + here-doc over
+ echo to create input test files, and do not create useless dummy
+ C source files.
+ * tests/nodist2.test: Likewise.
+ * tests/ppf77.test: Enable `errexit' shell flag, with related
+ changes. Add a trailing `:' command. Do not create useless
+ dummy source files.
+ * tests/spelling.test: Enable `errexit' shell flag, with related
+ changes. Add a trailing `:' command. Also, grep Automake error
+ message.
+ * tests/specflg3.test: Enable `errexit' shell flag, with related
+ changes. Avoid unportable use of `-e' option of fgrep. Prefer
+ trailing `:' over trailing `Exit 0'. Remove extra empty lines,
+ and cosmetic changes to whitespaces.
+ * tests/obsolete.test: Enable `errexit' shell flag, with related
+ changes. Improve verbosity. Other miscellanous changes.
+
+2010-11-30 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Improve and extend tests on `:=' variable assignments.
+ * tests/colneq.test: Avoid redundant use of variable assignments
+ in Makefile.am. Use command-line automake options instead of
+ editing AUTOMAKE_OPTIONS in Makefile.am. Make grepping of the
+ generated Makefile.in slightly stricter. Add a trailing `:'
+ command.
+ * tests/colneq2.test: Do not create unneeded dummy files. Run
+ also autoconf, ./configure and make. Add trailing `:' command.
+ * tests/colneq3.test: New test, similar to colneq.test, but
+ running also autoconf, ./configure and make.
+ * tests/Makefile.am (TESTS): Update.
+
+2010-11-26 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Remove long-deprecated options --Werror and --Wno-error.
+ These options has been deprecated at least since commit
+ "Release-1-6-1b-35-gc037f20", dated 2002-07-06.
+ * automake.in (parse_arguments): Do not recognize anymore options
+ `--Werror' and `--Wno-error' as synonyms of respectively `-Werror'
+ and `-Wno-error'.
+ * tests/werror.test: Update: use `-Werror' instead of `--Werror'.
+ * NEWS: Update.
+
2010-11-25 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix spurious failures in `silent*.test' for $CC != gcc
@@ -705,6 +1841,31 @@
* config-ml.in: Add Go support: treat GOC and GOCFLAGS like other
compiler/flag environment variables.
+2010-11-20 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ release-stats: account for more generated tests.
+ * Makefile.am (release-stats): Be sure to take into account all
+ the generated tests, by grepping the test scripts to decide which
+ ones of them are automatically generated.
+
+2010-11-20 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Code cleanup after removal of option `--output-directory'.
+ * automake.in ($output_directory): Remove, it's unconditionally
+ defined to `.' and used only ...
+ (generate_makefile): ... in this subroutine, which now has been
+ edited and simplified accordingly.
+
+ Remove obsolete automake option `--output-directory'.
+ This option has been deprecated since version 1.7 (2002/2003).
+ * automake.in ($output_directory): Define to `.' unconditionally.
+ (parse_arguments): Remove handling of equivalent options `-o' and
+ `--output-directory'.
+ * tests/outdir.test: Removed.
+ * tests/no-outdir-option.test: New test.
+ * tests/Makefile.am (TESTS): Updated.
+ * NEWS: Updated.
+
2010-11-19 Stefano Lattarini <stefano.lattarini@gmail.com>
Automake::Config: remove extra trailing semicolon.
@@ -720,6 +1881,14 @@
`aclocal --help' work with configure.in and acinclude.m4 both
broken.
+2010-11-19 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ New test on repeated automake options.
+ * tests/repeated-options.test: New test, check that automake
+ does not complain on repeated options, nor generate broken or
+ incorrect makefiles.
+ * tests/Makefile.am (TESTS): Updated.
+
2010-11-17 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix spurious failures of silent-rules tests with Sun Fortran.
@@ -761,6 +1930,11 @@
2010-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ backcompat5.test: avoid '##'-style comments inside recipe commands.
+ * tests/backcompat5.test: Remove double-hash comments
+ from makefile rule commands, they are not part of the
+ Automake API. Fixes testsuite failure with Tru64 make.
+
tests: avoid '##'-style comments inside recipe commands.
* tests/confh.test, tests/confh8.test: Remove
double-hash comments from makefile rule commands, they
@@ -772,6 +1946,28 @@
* tests/color.test, tests/color2.test: Quote variable in case
pattern, to avoid skipping tests with dash 0.5.5.1.
+2010-11-16 Peter Rosin <peda@lysator.liu.se>
+
+ Skip MSVC oriented tests if the shell is not capable.
+ * tests/defs: New required entry 'xsi-shell'.
+ * tests/ar-lib.test, tests/compile3.test, tests/compile6.test:
+ Require a XSI capable shell.
+ Reported by Ralf Wildenhues.
+
+2010-11-15 Peter Rosin <peda@lysator.liu.se>
+
+ compile: clear the `eat' variable earlier.
+ * lib/compile: Clear the `eat' variable earlier.
+ ($scriptversion): Update.
+ * tests/compile3.test: Prevent regressions.
+
+2010-11-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ More stable configure output from sanity check.
+ * m4/sanity.m4 (AM_SANITY_CHECK): Always print check line
+ about ensuring newer files, even if we don't actually need
+ to wait any more.
+
2010-11-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Rebuild menus in the manual.
@@ -791,6 +1987,142 @@
* tests/yaccdry.test: Require bison.
Found by NixOS Hydra.
+2010-11-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix bug in test `backcompat6.test' (MSYS portability).
+ * tests/backcompat6.test (Makefile.am): Grep the output from the
+ test program, rather than diffing it, to avoid spurious failures
+ on MinGW/MSYS due to LF vs. CRLF line endings.
+ Reported by Ralf Wildenhues.
+
+2010-11-13 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Deprecate obsolete macro AM_WITH_REGEX.
+ * m4/regex.m4: Document the `AM_WITH_REGEX' macro as obsolete,
+ and state that it should be removed two years from now.
+ (AM_WITH_REGEX): Raise an m4-time warning of the "obsolete"
+ category when this macro is used.
+ * doc/automake.texi (Public Macros): Move description of
+ `AM_WITH_REGEX' from here ...
+ (Obsolete Macros): ... to here, and declare it as obsolete
+ and "to be removed in a future version".
+ * tests/regex-obsolete.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
+2010-11-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Improve and extend tests on man pages support.
+ * tests/man.test: Enable `errexit' shell flag, and related changes.
+ Make grepping of generated Makefile.in slightly stricter.
+ * tests/man3.test: Add trailing `:' command.
+ * tests/man5.test: Prefer cat + here-doc over echo to append to
+ configure.in.
+ * tests/man2.test: Likewise, and add trailing `:' command.
+ * tests/man4.test: More thorough and consistent checking of make
+ error messages. Place fake `help2man' program in a new `bin'
+ directory rather than in `.'. Move the checks using the real
+ `help2man' program to ...
+ * tests/man6.test: ... this new test, and extend them. This test
+ passes with GNU make and Solaris make, still fails with BSD make.
+ * tests/man7.test: New test, extracted from old man4.test, which
+ checks for a bug in maintainer-clean w.r.t. generated manpages.
+ * tests/man8.test: New test, extracted from old man4.test, which
+ checks for a bug in distcheck w.r.t. generated manpages. Passes
+ with GNU make and Solaris make, still fails with BSD make.
+
+2010-11-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Minor improvements and extensions to various tests.
+ * tests/defun.test: Also run autoconf and grep the generated
+ configure to make sure that aclocal truly picks up all the
+ required macros.
+ * tests/compile_f_c_cxx.test: Prefer trailing `:' over trailing
+ `Exit 0'. Do not create useless dummy source files. Do not set
+ useless `$(foo_LDADD)' variable in `Makefile.am'. Do not call
+ useless macro `AC_F77_LIBRARY_LDFLAGS' in `configure.in'.
+ * tests/compile_f90_c_cxx.test: Likewise.
+ * tests/suffix10.test: Slightly stricter grepping of make output.
+ * tests/compile.test: Add trailing `:' command.
+ * tests/defun2.test: Likewise.
+ * tests/vars3.test: Likewise.
+ * tests/vartar.test: Likewise.
+ * tests/vars.test: Likewise. Also, extend test by checking
+ that the definition of `MY_FLAGS*' variables is preserved in
+ the generated `Makefile.in'.
+ * tests/stamph2.test: Prefer trailing `:' over trailing `Exit 0'.
+ Use proper m4 quoting in `configure.in'.
+
+2010-11-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: improve messages for skipped tests.
+ * tests/defs: Give meaningful messages about the reasons of a
+ test skip; this is especially useful as this file is run without
+ verbose xtraces on. Related reorderings in the code and new
+ comments.
+
+2010-11-10 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: move static definitions in a new file `defs-static'.
+ The new file is meant to be idempotent w.r.t. multiple inclusions.
+ * tests/defs.in: Removed, its contents split among ...
+ * tests/defs-static.in: ... this new file ...
+ * tests/defs: ... and this new file, including the former.
+ * configure.ac (AC_CONFIG_FILES): Remove `tests/defs', add
+ `tests/defs-static'.
+ (AC_CONFIG_LINKS): Add `tests/defs'.
+ * tests/Makefile.am ($(parallel_tests)): Update.
+ ($(instspc_tests)): Likewise.
+ * tests/.gitignore: Update.
+
+ Tests defs: $testsbuilddir is now AC_SUBST'ed.
+ * tests/defs.in ($testsbuilddir): Substitute from @abs_builddir@.
+ Add sanity check on $testsbuilddir, similar to those on
+ $testsrcdir and $top_testsrcdir.
+
+ Tests defs: do not print message "Running test $0" anymore.
+ * tests/defs.in: Printing the message "=== Running test $0" at
+ the beginning of each tests made sense when Automake used the old
+ test-driver, which sent all the output directly to stdout/stderr.
+ Now that the parallel test-driver is used, which saves output of
+ each test in its corresponding log file, that old message is just
+ useless noise.
+
+ Tests defs: rename $curdir -> $testbuilddir
+ * tests/defs.in: Rename $curdir to $testbuildir, for clarity and
+ consistency with $testsrcdir and $top_testsrcdir.
+
+ Tests defs: prefer "$curdir" over "`pwd`".
+ * tests/defs.in: We already save the value of `pwd` in $curdir
+ early in the file, so there no need to recalculate it later, when
+ the current working directory is not changed.
+
+ Tests defs: use `$me' in more error messages.
+ * tests/defs.in: Also use `$me' in error messages referring to
+ missing `defs' or `defs.in', since that variable is now defined
+ before those checks.
+
+ Tests defs: do not use `Exit' where plain `exit' suffices.
+ * tests/defs.in: Use "exit 77" rather than "Exit 77" to skip the
+ test when required libtool/gettext macros are not found, since
+ such skips would take place before the exit trap is installed.
+
+ Tests defs: improve and extends comments.
+ * tests/defs.in: Improve and extends some comments, especially in
+ relation with the changes introduced by the previous reordering.
+
+ Tests defs: various reorderings.
+ * tests/defs.in: Reordered various snippets of code in a
+ clearer way.
+
+2010-11-09 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix bug in test `backcompat4.test' (stale autom4te cache).
+ * tests/backcompat4.test: Remove stale autom4te cache directory
+ before re-running aclocal and automake. Also, since we are at
+ it, be more verbose in displaying contents of generated files,
+ to ease debuggability.
+ Reported by Ralf Wildenhues.
+
2010-11-07 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix a bug in variable concatenation with `+='.
@@ -804,6 +2136,46 @@
* tests/Makefile.am (TESTS): Update.
Reported by Andy Wingo.
+2010-11-07 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Modernize, improve and/or tweak various test scripts.
+ * tests/stamph2.test: Improve m4 quoting in `configure.in', and
+ prefer trailing `:' over trailing `Exit 0'.
+ * tests/syntax.test: Escape literal dots in grep regexps.
+ * tests/copy.test: Enable `errexit' shell flag. Extend test by
+ checking with `test' utility that the script `install-sh' is
+ copied, but not symlinked.
+ * tests/depdist.test: Move setting of `errexit' shell flag earlier
+ in the script (just after inclusion of ./defs). Avoid obsoleted
+ constructs in generated `configure.in'. Prefer to do our checks
+ by running configure and make over grepping Makefile.in.
+ * tests/target-cflags: Move setting of `errexit' shell flag
+ earlier in the script (just after inclusion of ./defs). Use the
+ `configure.in' stub created by `./defs', rather than writing it
+ from scratch.
+ * tests/target-clash: Do not uselessly run autoconf.
+ * tests/ctarget1.test: Renamed ...
+ * tests/cond-basic.test: ... to this. Use the `configure.in' stub
+ created by `./defs', rather than writing it from scratch.
+ Move setting of `errexit' shell flag earlier in the script (just
+ after inclusion of ./defs). Other minor cosmetic changes.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-11-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ New tests on obsoleted usages of automake/autoconf macros (such
+ as AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT).
+ * tests/backcompat.test: New test script.
+ * tests/backcompat2.test: Likewise.
+ * tests/backcompat3.test: Likewise.
+ * tests/backcompat4.test: Likewise.
+ * tests/backcompat5.test: Likewise.
+ * tests/backcompat6.test: Likewise.
+ * tests/init.test: Extended and improved, esp. by trying more
+ combinations of calls to AC_INIT and AM_INIT_AUTOMAKE with few
+ arguments.
+ * tests/Makefile.am (TESTS): Updated.
+
2010-11-06 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix bug in rules for creating vala vapi/header files.
@@ -830,12 +2202,86 @@
New tests.
* tests/Makefile.am (TESTS): Update.
+2010-11-05 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix potential bug in generated tests `instpc-*.test'.
+ This bug is due to the changes introduced by the recently-merged
+ "tests-init" branch. In that branch, `tests/defs' didn't define
+ anymore `$srcdir', instead defining directly `$testsrcdir'; but
+ the generated tests were using `$srcdir', hence the bug.
+ Luckily, since the Automake parallel test driver automatically
+ exports `srcdir' to a proper value, that prevented the bug from
+ manifesting itself.
+ * tests/Makefile.am ($(instspc_tests)): In the generated test
+ scripts, use `$testsrcdir', not `$srcdir'.
+
+2010-11-03 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Overhauled and modularized tests in `instspc.test'.
+ The test `instspc.test' was way too big and fragile. Its running
+ time was very long. It also produced a log that was nearly
+ unreadable due to its length, making it very difficult to find
+ out the reason for failures.
+ Also, it was too much monolithic, with a single (maybe spurious)
+ failure in a corner case causing the whole test to fail (even if
+ everything worked as expected in the other 99% of cases).
+ The present change should solve these problems, by separating
+ `instspc.test' into many smaller, self-contained, auto-generated
+ tests.
+ * tests/instspc.test: Removed.
+ * tests/instspc-tests.sh: New script, fulfilling a double role:
+ 1. it generates a Makefile.am snippet `tests/instspc-tests.am',
+ containing the definition of a list of new tests which will take
+ over the older `instspc.test', and
+ 2. it is sourced by said generated tests with proper parameters
+ pre-set, to run the "meat" of the checks.
+ This apparent abuse is indeed required because the test generation
+ code and test execution code are inevitably intertwined.
+ * tests/Makefile.am ($(srcdir)/instspc-tests.am): Include this
+ snippet, which (among the other things) defines ...
+ (instspc_tests): ... this new macro, containing the list of the
+ newly generated `instspc*.test' tests, and ...
+ (instspc_xfail_tests): ... this new macro, containing the list
+ of the `instspc*.test' tests expected to fail.
+ ($(instspc_tests)): New rule, generates the `instspc*.test' tests.
+ ($(instspc_tests:.test=.log)): New rule, registers the dependency
+ of all `instspc*.test' tests on the `instspc-tests.sh' script.
+ (TESTS): Add `$(instspc_tests)', remove `instspc.test'.
+ (XFAIL_TESTS): Add `$(xfail_instspc_tests)'.
+ (EXTRA_DIST): Distribute instspc-tests.sh.
+ (MAINTAINERCLEANFILES): Added $(instspc_tests).
+ Other minor cosmetic changes.
+ * bootstrap: Generate instspc-tests.am.
+ * tests/.gitignore: Updated.
+
2010-11-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Add FAQ entry for bug reporting instructions.
* doc/automake.texi (Reporting Bugs): New section.
(Introduction): Refer to it.
+2010-10-07 Peter Rosin <peda@lysator.liu.se>
+
+ depcomp: add new one-pass depmode for MSVC 7 and later.
+ * lib/depcomp: Add new depmodes 'msvc7' and 'msvc7msys' which
+ make use of the -showIncludes option added in MSVC 7.
+ * m4/depend.m4 (_AM_DEPENDENCIES): Handle the new depmodes
+ similarly to 'msvisualcpp' and 'msvcmsys' as MSVC does not
+ support the -o option.
+
+2010-10-05 Jim Meyering <meyering@redhat.com>
+
+ dist-xz, dist-bzip2: don't hard-code -9: honor envvar settings
+ * lib/am/distdir.am (dist-xz): Do not hard-code xz's -9: that
+ made it impossible to override. Instead, use its XZ_OPT envvar,
+ defaulting to -9 if not defined. Thus no change in behavior
+ when XZ_OPT is not set, and now, this rule honors the setting
+ of that envvar when it is set. Suggested by Lasse Collin.
+ (dist-bzip2): Likewise for it's corresponding envvar: BZIP2.
+ * NEWS (Miscellaneous changes): Mention it.
+ * doc/automake.texi (The Types of Distributions): Describe the
+ newly enabled environment variables.
+
2010-10-04 Stefano Lattarini <stefano.lattarini@gmail.com>
Add support for newer python versions.
@@ -871,6 +2317,18 @@
2010-10-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ tests: fix ar-lib.test for echo that interprets backslashes.
+ * tests/ar-lib.test: Use printf instead of echo. Avoid test -a.
+ More robust quoting.
+
+2010-10-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ maintainer-check coverage for variables before rules.
+ * Makefile.am (sc_ensure_testsuite_has_run): Suggest keeping
+ around the test directories.
+ (sc_tests_makefile_variable_order): New rule with a heuristic to
+ catch ordering violations.
+
Document and fix expansion of variables before rules.
* doc/automake.texi (General Operation): Document that variables
are expanded before rules.
@@ -880,6 +2338,45 @@
2010-10-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Coverage and minor fixes for variable typo detection.
+ * automake.in (check_typos): Remove `EXTRA_' prefix when
+ computing canonical name.
+ * tests/vartypo2.test, tests/vartypos.test: New tests.
+ * tests/Makefile.am (TESTS): Update.
+
+ Implement EXTRA_maude_DEPENDENCIES for programs and libraries.
+ * automake.in (handle_programs, handle_libraries)
+ (handle_ltlibraries): Mark EXTRA_*_DEPENDENCIES as recognized.
+ * doc/automake.texi (Linking, Program and Library Variables)
+ (LIBOBJS): Document EXTRA_*_DEPENDENCIES.
+ * lib/am/library.am (%LIBRARY%): Also depend on
+ $(EXTRA_%XLIBRARY%_DEPENDENCIES).
+ * lib/am/ltlibrary.am (%LTLIBRARY%): Also depend on
+ (%XLTLIBRARY%_DEPENDENCIES).
+ * lib/am/program.am (%PROGRAM%%EXEEXT%): Also depend on
+ $(EXTRA_%XPROGRAM%_DEPENDENCIES).
+ * tests/extradep.test, tests/extradep2.test: New tests.
+ * tests/Makefile.am (TESTS): Update.
+ * NEWS: Update.
+ Suggested by Eric Blake.
+
+ tests: avoid running into timing issues due to sanity change.
+ * tests/acloca10.test, tests/acloca18.test, tests/aclocal9.test:
+ Insert strategic sleep before aclocal reruns, to ensure files
+ are newer.
+ * tests/python11.test: Use --force for repeated autotools runs.
+ Reports from the NixOS Hydra build daemon via Ludovic Courtès.
+
+ Fix timestamp issues by ensuring configure takes at least a second.
+ * m4/sanity.m4 (AM_SANITY_CHECK): If we didn't sleep here,
+ start a sleep in the background and wait for it to finish
+ before creating config.status, hopefully fixing all spurious
+ testsuite failures involving botched time stamps.
+ * NEWS: Update.
+ Reports by Ludovic Courtès, Peter Breitenlohner, and others.
+
+2010-10-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
Revert "parallel-tests: avoid command-line length limit issue."
This reverts commit 24e3b4ee2f8cb9f72dd94a05a893f3d4e88b7835,
because it re-opened the bug fixed by v1.11-10-g218e678.
@@ -986,6 +2483,20 @@
seems to have been removed, substituted by multiple release
tarballs now).
+2010-09-21 Peter Rosin <peda@lysator.liu.se>
+
+ compile: implement library search to support MSVC static linking
+ * lib/compile (func_cl_wrapper): Implement library search and
+ -static option so that the user can select whether to prefer
+ dll import libraries or static libraries. This enables MSVC to
+ link against dlls generated by libtool without requiring libtool
+ or workarounds such as -lfoo.dll etc. Makes the tests/static.at
+ test case in libtool pass.
+ * tests/compile3.test: Don't trip up if there happens to exist
+ a "foo" library in the library search path.
+ * tests/compile6.test: New test, verifying the library search.
+ * tests/Makefile.am (TESTS): Update.
+
2010-09-17 Eric Blake <eblake@redhat.com>
Avoid triple-space after period.
@@ -1024,6 +2535,13 @@
* HACKING: Hint at old commits with `git describe' output.
+2010-09-14 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Prefer `$(am__cd)' to plain `cd' in our Makefiles.
+ * Makefile.am (recheck, dist-hook, git-dist, path-check, fetch)
+ (release-stats): Use `$(am__cd)' rather than plain `cd'.
+ * tests/Makefile.am ($(srcdir)/parallel-tests.am): Likewise.
+
2010-09-12 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix regression in test `colon4.test'.
@@ -1045,6 +2563,19 @@
* tests/pr9.test: Likewise.
From a suggestion by Ralf Wildenhues.
+2010-09-09 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Use AS_HELP_STRING in AM_SILENT_RULES.
+ * m4/silent.m4 (AM_SILENT_RULES): Use `AS_HELP_STRING' to format
+ help message regarding configure options `--enable-silent-rules'
+ and `--disable-silent-rules'. Also throw in a couple of cosmetic
+ changes in the related `case' statement (indentation, balancing
+ of parentheses).
+ * THANKS: Update.
+ From a report by Jeff A. Daily.
+
+2010-09-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
Make some `confh*.test' tests more "semantic" (plus tweakings).
* tests/confh.test: Run "autoconf", "configure" and "make check",
instead of munging/grepping the generated `Makefile.in'.
@@ -1059,6 +2590,8 @@
* tests/Makefile.am (TESTS): Updated.
Prompted by a report from Ralf Wildenhues.
+2010-09-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
Remove useless whitespace padding in XFAIL_TESTS definition.
* tests/Makefile.am (XFAIL_TESTS): Remove whitespace padding.
@@ -1078,6 +2611,49 @@
Posix 2008 requires make to set errexit.
* lib/am/check.am: Update comment.
+2010-09-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: remove variable $testaclocaldir.
+ * tests/defs.in ($testaclocaldir): Removed.
+ * tests/aclocal.test: Use `$top_testsrcdir/m4' directly, not
+ `$testaclocaldir'.
+
+ Tests defs: $srcdir and $top_srcdir renaming.
+ * tests/defs.in ($srcdir): Remove, define $testsrcdir directly.
+ * tests/Makefile.am ($(parallel_tests)): Generation of derived
+ tests updated.
+
+ Tests defs: new variable $top_testsrcdir.
+ * tests/defs.in ($top_testsrcdir): Define unconditionally
+ to @abs_top_srcdir@. Use it throughout.
+ * tests/ar-lib.test: Use `$top_testsrcdir' instead of
+ `$testsrcdir/..'.
+ * tests/auxdir.test: Likewise.
+ * tests/compile.test: Likewise.
+ * tests/compile2.test: Likewise.
+ * tests/compile3.test: Likewise.
+ * tests/compile5.test: Likewise.
+ * tests/mdate6.test: Likewise.
+ * tests/mkinst3.test: Likewise.
+ * tests/multlib.test: Likewise.
+ * tests/txinfo22.test: Likewise.
+
+ Tests defs: $srcdir is unconditionally substituted.
+ * tests/defs.in ($srcdir): Define unconditionally to @abs_srcdir@.
+ Remove code for $srcdir normalization, which is now useless.
+
+2010-09-02 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: make spacing more consistent.
+ * tests/defs.in: Make spacing more consistent in indentation.
+ Especially, indent using only spaces, not tabs. Also, move
+ a comment to a better position.
+
+ Improve code for requiring libtool and gettext in tests.
+ * tests/defs.in: Stricter (and more correct) detection of wheter
+ libtool, libtoolize and/or gettext are in $required.
+
+
2010-08-27 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix bug in test missing6.test.
@@ -1086,8 +2662,27 @@
that do not support $LINENO. Also throw in a couple of cosmetic
changes.
+2010-09-02 Peter Rosin <peda@lysator.liu.se>
+
+ Make ar-lib support backslashed files in archives.
+ * lib/ar-lib: If an archive member contains a backslash, make sure
+ it is escaped when the archive member is extracted.
+ * tests/ar-lib.test: Test the above.
+
+2010-08-31 Peter Rosin <peda@lysator.liu.se>
+
+ Do file name conversion for object files in the compile wrapper.
+ * lib/compile (func_cl_wrapper): Do file name conversion for object
+ files (i.e. extensions .obj, .OBJ, .o and .O) if needed.
+ * tests/compile4.test: Test the above.
+
2010-08-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Speed up removal of auxiliary linker output files for ltlibraries.
+ * lib/am/ltlib.am (clean-%DIR%LTLIBRARIES): Rewrite using just
+ one `rm' invocation.
+ Report by Bob Friesenhahn.
+
Improve robustness of mdate-sh script.
* lib/mdate-sh: Sanitize zsh behavior on startup, to ensure
$ls_command is word-split properly upon invocation.
@@ -1121,6 +2716,33 @@
Don't hide the table of contents.
* doc/automake.texi: Move the table of contents to the beginning.
+2010-08-16 Peter Rosin <peda@lysator.liu.se>
+
+ Optimize compile script on MSYS.
+ * lib/compile (func_file_conv): Add new argument 'lazy' which
+ takes an optional list of conversion types where the requested
+ conversion isn't needed.
+ (func_cl_wrapper): Take advantage of the above for cases where
+ MSYS is doing the conversion for us.
+ Suggested by Ralf Wildenhues.
+
+2010-08-16 Peter Rosin <peda@lysator.liu.se>
+
+ Support more C++ file extensions for MSVC in the compile script.
+ * lib/compile (func_cl_wrapper): MSVC only recognizes the .cpp
+ file extension as C++, unless it's given a hint. So hint about
+ .cc, .CC, .cxx, .CXX, c++ and C++. Also do path conversion on
+ .c, .cpp, .CPP, .lib, .LIB and .Lib files.
+ * tests/compile3.test: Test the C++ hinting.
+
+2010-08-12 Peter Rosin <peda@lysator.liu.se>
+
+ Enable the use of "link -lib" as the wrapped archiver.
+ * lib/ar-lib: Enable the use of "link -lib" as the wrapped
+ archiver, as well as allowing some other options to be passed
+ through to the wrapped archiver.
+ * tests/ar-lib.test: Test the above.
+
2010-08-10 Stefano Lattarini <stefano.lattarini@gmail.com>
Tweak and/or extend some `acloca*.test' tests.
@@ -1407,6 +3029,25 @@
* tests/ar2.test: Likewise, and make grepping of generated
Makefile.in stricter.
+2010-08-06 Peter Rosin <peda@lysator.liu.se>
+
+ Add new auxiliary 'ar-lib' script, wrapping Microsoft lib.
+ * lib/ar-lib: New auxiliary script.
+ * lib/Makefile.am: Add above.
+ * tests/ar-lib.test: New test.
+ * tests/Makefile.am: Add above.
+ * automake.in (@common_files): Distribute the 'ar-lib' script.
+ * doc/automake.texi (Auxiliary Programs): Mention the new
+ 'ar-lib' script.
+ (Optional): Mention 'ar-lib' in AC_CONFIG_AUX_DIR.
+ * NEWS: Update.
+
+2010-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix shell pattern negation in compile script.
+ * lib/compile (func_file_conv): Use `!' not `^' for pattern
+ negation.
+
2010-08-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Fix maintainer-check failure.
@@ -1430,6 +3071,24 @@
* tests/cond5.test: Add delay before the first kill attempt to
cater for problems with MSYS bash.
+2010-08-01 Peter Rosin <peda@lysator.liu.se>
+
+ Wrap some MSVC options in the compile script.
+ * lib/compile: MSVC supports naming the output file, the option
+ is just not called -o, so transform -o into the appropriate form
+ for MSVC. Also wrap some other options while at it (-L, -l, -Wl,
+ -Xlinker and -I) and convert file names to windows form where
+ needed for those options to make MSVC more usable in an
+ autotooled environment.
+ * doc/automake.texi (Auxiliary Programs): Document the above
+ extension of the compile script.
+ * NEWS: Updated.
+ * tests/defs.in: New required entry 'cl'.
+ * tests/compile3.test: New test.
+ * tests/compile4.test: New test.
+ * tests/compile5.test: New test.
+ * tests/Makefile.am: Update.
+
2010-07-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Add example git work flow; discuss merge --log in HACKING.
@@ -1669,6 +3328,8 @@
* tests/ext.test: Add a comment explaining why an apparently
useless `if' statement is indeed required.
+2010-06-13 Stefano Lattarini <stefano.lattarini@gmail.com>
+
Add useful comment in test script obsolete.test.
* tests/obsolete.test: Add a comment explaining why we need
an indirection in adding $AUTOUPDATE to $required.
@@ -1677,6 +3338,15 @@
* tests/Makefile.am (TESTS): Use only spaces, not tabs, in the
definition of this variable.
+ Parallel tests generation: improve comments (tiny change).
+ * tests/Makefile.am ($(parallel_tests)): Added useful comment to
+ generated tests.
+
+ Tests defs: truly get rid of `$am_defs_included' (unused variable)
+ * tests/defs.in ($am_defs_included): Remove, its now unused. It
+ should have been removed in a previous changeset, but the removal
+ was done only partially (oversight).
+
2010-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Remove a couple of unneeded conditionals from tests.
@@ -1736,6 +3406,13 @@
* tests/pluseq9.test: Slightly extended w.r.t. the grepping of
Automake stderr. Some unrelated cosmetic changes.
+2010-06-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ cscope.test: ensure verbose printing of captured stderr.
+ * tests/cscope.test: Print captured stderr before failing.
+
+2010-06-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+
Testsuite: ensure verbose printing of captured stderr.
* tests/acloca18.test: Print captured stderr before either failing
or grepping it. Be sure to send captured stderr to stderr, not to
@@ -1850,6 +3527,19 @@
Enable `errexit' shell flag.
2010-06-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix error in generation of parallel tests.
+ * tests/defs.in ($am_skip_defs): New variable, to be used when
+ ./defs must be sourced multiple times. If set, unset it and
+ only define $srcdir; otherwise, also go through the rest of
+ the script.
+ ($am_defs_included): Remove, no more needed.
+ * tests/Makefile.am ($(parallel_tests)): Update accordingly,
+ using only $srcdir from defs.
+ Fixes potential test failures of tests that use $required.
+
+2010-06-08 Stefano Lattarini <stefano.lattarini@gmail.com>
Enable `errexit' shell flag in some test scripts.
* tests/subcond.test: Enabled `errexit' shell flag, and related
@@ -1872,6 +3562,33 @@
* tests/version2.test: Likewise, and avoid deprecated constructs
in the generated `configure.in'.
+2010-06-07 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Improve declaration of dependencies in the testsuite.
+ * tests/Makefile.am (check_SCRIPTS): Remove. Instead, let ...
+ ($(TEST_LOGS)): ... all test logs depend on the scripts.
+ * test/gen-parallel-tests: For each parallel test foo-p.test,
+ let `foo-p.log' also depend on `foo.test', since it is sourced.
+
+2010-06-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Coverage for TAGS_DEPENDENCIES warning.
+ * tests/tags2.test: New test.
+ * tests/Makefile.am: Update.
+
+ Coverage for use of anachronistic variables.
+ * tests/oldvars.test: New test.
+ * tests/Makefile.am: Update.
+
+ Testsuite coverage for bogus macro file serial numbers.
+ * tests/acloca18.test: Also test ill-formed serial numbers
+ and serial numbers after macro definitions.
+
+ Coverage for aclocal diagnosing underquoted macros.
+ * tests/acloca23.test: New test.
+ * tests/Makefile.am: Update.
+
2010-06-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Prefer AUTOMAKE_fails over `$AUTOMAKE | grep' in tests.
@@ -1880,6 +3597,30 @@
* tests/mdate.test: Likewise.
Prompted by Stefano Lattarini's change to discover.test.
+2010-06-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ More minor message fixes.
+ * aclocal.in (scan_file): Fix recommended info command line.
+ * automake.in (handle_lib_objects): No need to prepend function
+ name to prog_error message.
+ (handle_tags): Add missing word and missing space in error
+ message.
+ (handle_dist): Add missing closing single quote in message.
+ Line-wrap one long message for readability.
+
+2010-06-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix distcheck failure with distributed generated parallel tests.
+ * tests/Makefile.am ($(parallel_tests)): Cope with $(srcdir)
+ being different from the value at developer `make dist' time.
+ * tests/defs.in: Protect against mutiple inclusion, by using ...
+ ($am_defs_included): ... this new variable.
+ ($srcdir): Do not compute, but simply define to `@abs_srcdir@'
+ as substituted by configure.
+ Report, suggestions and first fix by Ralf Wildenhues, final
+ patch by Stefano Lattarini.
+
2010-06-06 Stefano Lattarini <stefano.lattarini@gmail.com>
Improve tests link*.test (enable `errexit' shell flag).
@@ -1987,6 +3728,10 @@
2010-06-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Tiny fix in silent8.test (display output of `make' command).
+ * tests/silent8.test: Make sure that the captured output of `make'
+ command is always displayed.
+
Make tests on user extensibility of silent-rules mode stricter.
* tests/silent6.test: Made stricter w.r.t. the grepping of the
output produced by `make'.
@@ -2036,28 +3781,6 @@
* tests/silent5.test: Likewise.
* tests/silent9.test: Likewise.
-2010-01-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- Fix silent-rules output for disabled dependency tracking.
- * lib/am/depend2.am [!%FASTDEP%]: Rework silent-rules variable
- expansion code to also work in the case where %AMDEP% expands
- to FALSE at config.status time, using new substitution string
- %VERBOSE-NODEP%.
- * automake.in (verbose_nodep_flag): New function, appending
- `@am__nodep@' to the verbose-variable name.
- (handle_languages): If dependencies are not disabled, use it to
- set %VERBOSE-NODEP%.
- * m4/depend.m4: Substitute am__nodep as '_no', so the second
- verbose-variable will always expand to an empty string, if
- dependencies are enabled.
- * tests/silent5.test: Also test --disable-dependency-tracking;
- also test per-target flags for non-C language files.
- * tests/silent9.test: New test, like silent4.test but disable
- dependency tracking.
- * tests/Makefile.am: Adjust.
- * NEWS, THANKS: Update.
- Report by Dmitry V. Levin <ldv@altlinux.org>.
-
2010-05-23 Stefano Lattarini <stefano.lattarini@gmail.com>
Extend test on `nostdinc' automake option.
@@ -2088,6 +3811,14 @@
2010-05-23 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Fix truncated comment in Makefile.am.
+ * Makefile.am (sc_tests_logs_duplicate_prefixes): Fix unfinished
+ sentence in comment.
+ Report by Stefano Lattarini.
+
+ Relax silent8.test for NetBSD make.
+ * tests/silent8.test: Accept ./foo.info in output as well.
+
Fix unportable sed script in maintainer-check test.
* Makefile.am (sc_tests_Exit_not_exit): Rewrite sed script to
not contain semicolon after 'b' or brace commands, for NetBSD.
@@ -2115,6 +3846,45 @@
2010-04-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Warning and error message formatting cleanups.
+ * aclocal.in (parse_arguments, main): Remove trailing period or
+ newline in error or warning messages, avoid capitalization of
+ the first word of a message.
+ * automake.in (check_user_variables, handle_languages)
+ (handle_ltlibraries, scan_aclocal_m4, scan_autoconf_config_files)
+ (scan_autoconf_files, cond_stack_if, require_file_internal)
+ (usage, generate_makefile, parse_arguments): Likewise.
+ * lib/Automake/ChannelDefs.pm (set_strictness): Likewise.
+ * lib/Automake/Configure_ac.pm (find_configure_ac): Likewise.
+ * lib/Automake/Options.pm (set_strictness): Likewise.
+ * lib/Automake/Rule.pm (define): Likewise.
+ * lib/Automake/Variable.pm (define, variables_dump): Likewise.
+ * tests/ltinstloc.test, tests/suffix11.test: Adjust expected
+ error message.
+ * lib/Automake/Channels.pm (setup_channel): Reword error message
+ to be the same as in msg.
+
+ Fix placing of ellipses in English text and synopses.
+ * Makefile.am: Be sure to add a space before `...' in natural
+ language text.
+ * automake.in (scan_autoconf_traces): Likewise.
+ * lib/Automake/Rule.pm (define): Likewise.
+ * lib/Automake/Variable.pm (define): Likewise.
+ * lib/am/dejagnu.am: Likewise.
+ * lib/am/progs.am: Likewise.
+ * lib/gnupload (dprint, upload): Likewise.
+ * tests/confdeps.test: Likewise.
+ * tests/location.test: Adjust expected output.
+ * automake.in (usage): In synopsis, use singular for OPTION,
+ * remove space before ellipsis.
+ * aclocal.in (usage): Likewise. Also, fix indentation.
+
+ Fix more duplicate message prefixes.
+ * lib/Automake/XFile.pm (seek): Do not prepend $me.
+ ($me): Remove now-unused package-global.
+ * aclocal.in (check_acinclude): Remove duplicate 'warning: '
+ prefix.
+
Fix typo in manual.
* doc/automake.texi (Simple Tests using parallel-tests): Add
missing closing parenthesis.
@@ -2123,7 +3893,7 @@
* automake.in (read_main_am_file): Call variables_dump, not
macros_dump. Print actual error before list of variables.
-2010-04-25 Stefano Lattarini <stefano.lattarini@gmail.com>
+2010-04-22 Stefano Lattarini <stefano.lattarini@gmail.com>
Minor improvements in comments of test `silent3.test'.
* tests/silent3.test: Tell to keep it in sync with `silent9.test'
@@ -2198,6 +3968,57 @@
2010-04-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Print 'warnings are treated as errors' note if needed.
+ * lib/Automake/Channels.pm: Fix typo in comment.
+ (_print_message): If -Werror is enabled, print a 'warnings are
+ treated as errors' note before the first such warning.
+ * tests/warnopts.test: Adjust comment to mention expected warning.
+ Adjust code to ignore 'warnings are treated as errors' note.
+ * tests/location.test: Adjust expected output with -Werror.
+ * tests/werror4.test: New test.
+ * tests/Makefile.am: Update.
+ * NEWS: Update.
+
+ Ensure we don't print 'warning:' or 'error:' twice.
+ * Makefile.am (sc_ensure_testsuite_has_run): New helper rule.
+ (sc_tests_logs_duplicate_prefixes): New rule, to check for
+ wrong-looking warning and error messages in the test suite logs.
+ * aclocal.in (scan_configure_dep, scan_file): Remove duplicate
+ `warning: ' prefix.
+ * tests/vars3.test: Rename variable to avoid false positive.
+
+ Prepend type to warning, error, and fatal messages.
+ For the first part of messages of types `error' or `fatal',
+ prepend `error: ' to the message. Prepend `warning: ' to
+ warning messages, whatever the setting of -Werror.
+ * lib/Automake/Channels.pm (partial): Move up definition.
+ (_format_message): Emit `header' and `footer' strings only with
+ the first resp. last part of a set of partial messages.
+ * lib/Automake/ChannelDefs.pm: Add missing '1;' statement at the
+ end of the module.
+ (Automake::ChannelDefs): Setup warning channels with header
+ `warning: ', error and fatal messages with header `error: '.
+ * tests/condinc2.test, tests/ltinstloc.test: Adjust expected
+ error messages.
+ * tests/comment5.test: Likewise. Also, include stack notes
+ should not start with `error:'.
+ * tests/location.test: Likewise. Also, try both -Werror and
+ -Wno-error.
+ * NEWS: Update.
+ Report by Bruno Haible.
+
+ Fix capitalization of error messages, reword one message.
+ * lib/Automake/Variable.pm (define): Do not capitalize the first
+ word in the error message.
+ * automake.in (require_file_internal): Likewise. Also, reword
+ and line-wrap for better readability.
+ * tests/distcom7.test, tests/pluseq5.test, tests/pluseq9.test:
+ Adjust tests.
+
+ Fix connected warnings about obsolete exeext override.
+ * lib/Automake/Rule.pm (define): Merge two warnings that belong
+ together, by setting the 'partial' flag for the first one.
+
Fix per-Makefile.am setting of -Werror.
Before this patch, 'AUTOMAKE_OPTIONS = -Werror' in one
Makefile.am would carry over to other Makefile.am files
@@ -2233,6 +4054,24 @@
* NEWS, THANKS: Update.
Report by Pavel Sanda.
+2010-04-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Avoid possible false negatives in cond46.test.
+ * tests/cond46.test: Enable shell `errexit' flag (and bumped
+ copyright years). Due to this change, the testcase should now
+ fail on unexpected failures in calls to $ACLOCAL/$AUTOMAKE (whose
+ outcomes were previously unchecked), and on failures in grepping
+ the expected diagnostic in Automake stderr.
+
+2010-04-04 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Generated tests are now just a thin layer around other tests.
+ * tests/Makefile.am: Rewrite the rule to generate the `*-p.test'
+ test scripts so that any of them simply includes the corresponding
+ `*.test' script (after setting `$parallel_tests' to `yes').
+ * tests/.gitignore: Add wildcard for temporary files used in the
+ generation of `*-p.test' tests.
+
2010-03-30 Stefano Lattarini <stefano.lattarini@gmail.com>
Avoid an unportable use of `$status' shell variable.
@@ -2314,6 +4153,30 @@
* tests/parallel-tests6.test: Likewise.
* tests/parallel-tests7.test: Likewise.
+2010-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix cscope test on systems without working Fortran compiler.
+ * tests/cscope.test: Skip remainder of test if `$MAKE all' fails.
+ * THANKS: Update.
+ Report by Peter Johansson.
+
+2010-02-24 Antonio Diaz Diaz <ant_diaz@teleline.es> (tiny change)
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Add lzip compression support.
+ * automake.in (handle_dist): Recognize dist-lzip.
+ (make_paragraphs): Map LZIP to dist-lzip.
+ * doc/automake.texi (Dist): Add dist-lzip.
+ (Options): Likewise.
+ * lib/Automake/Options.pm (_process_option_list): Add dist-lzip.
+ * lib/am/distdir.am
+ (dist dist-all): Add command to create an lzip-compressed tarball.
+ (distcheck): Handle lzip-compressed tarballs just like the others.
+ * tests/defs.in: Test for lzip, too.
+ * tests/lzip.test: New file, based on nogzip.test.
+ * tests/Makefile.am (TESTS): Add lzip.test.
+ * NEWS: Update.
+
2010-02-22 Karl Berry <karl@gnu.org>
Improve help message of mdate-sh.
@@ -2370,6 +4233,28 @@
Fix some typos in the manual
* doc/automake.texi (Nested Packages, Rebuilding): Fix typos.
+2010-01-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix silent-rules output for disabled dependency tracking.
+ * lib/am/depend2.am [!%FASTDEP%]: Rework silent-rules variable
+ expansion code to also work in the case where %AMDEP% expands
+ to FALSE at config.status time, using new substitution string
+ %VERBOSE-NODEP%.
+ * automake.in (verbose_nodep_flag): New function, appending
+ `@am__nodep@' to the verbose-variable name.
+ (handle_languages): If dependencies are not disabled, use it to
+ set %VERBOSE-NODEP%.
+ * m4/depend.m4: Substitute am__nodep as '_no', so the second
+ verbose-variable will always expand to an empty string, if
+ dependencies are enabled.
+ * tests/silent5.test: Also test --disable-dependency-tracking;
+ also test per-target flags for non-C language files.
+ * tests/silent9.test: New test, like silent4.test but disable
+ dependency tracking.
+ * tests/Makefile.am: Adjust.
+ * NEWS, THANKS: Update.
+ Report by Dmitry V. Levin <ldv@altlinux.org>.
+
2010-01-17 Stefano Lattarini <stefano.lattarini@gmail.com>
Slighty improve tests acoutbs.test and acoutbs2.test.
diff --git a/ChangeLog.09 b/ChangeLog.09
index 063c06ba2..7b07c363e 100644
--- a/ChangeLog.09
+++ b/ChangeLog.09
@@ -33,6 +33,10 @@
* lib/gnupload: Mention ncftpput in `--help' output.
Report by Bruce Korb.
+2009-12-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * NEWS: Update.
+
2009-12-05 Antonio Diaz Diaz <ant_diaz@teleline.es>
Replace unlzma, gunzip, bunzip2 with pack tool -d invocation.
@@ -63,6 +67,24 @@
current directory. Use it instead of `pwd` command substitution,
to avoid Heirloom/Solaris Sh bug with `set -e'.
+2009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix requirements of silent8.test.
+ * tests/silent8.test: Require makeinfo --html, tex, texi2dvi -o,
+ dvips.
+
+2009-12-04 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ File `automake.in' is not meant to be executed (only to be
+ preprocessed into `automake'), so don't leave it executable.
+ * automake.in: Remove executable bit.
+
+2009-12-04 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Don't make the generated Automake's Config.pm executable.
+ * lib/Automake/Makefile.am (Config.pm): Don't make the generated
+ `Config.pm' file executable.
+
2009-11-28 Jim Meyering <meyering@redhat.com>
do not put world-writable directories in distribution tarballs
@@ -89,6 +111,37 @@
* Makefile.am (EXTRA_DIST): Add bootstrap.
Report by Jan Engelhardt.
+2009-11-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Coverage for corner cases in derive_suffix.
+ Ensure unrelatex SUFFIXES entries and unrelated inference rules
+ are ignored silently.
+ * tests/ext3.test: New test.
+ * tests/Makefile.am: Update.
+
+ Coverage for user-provided _LINK variables.
+ * tests/link_override.test: New test.
+ * tests/Makefile.am: Adjust.
+
+ Coverage: warn about substitutions that need EXTRA_PRIMARY.
+ * tests/extra9.test: New test.
+ * tests/Makefile.am: Adjust.
+
+ Coverage: warn about configure substitution in EXTRA_PRIMARY.
+ * tests/subst5.test: New test.
+ * tests/Makefile.am: Update.
+
+ Coverage for syntax errors with conditionals in included fragments.
+ * tests/condinc2.test: Amend test.
+
+ Coverage: diagnose variables with forbidden dist_ prefix.
+ * tests/candist.test: New test.
+ * tests/Makefile.am: Update.
+
+ Coverage for conditional `else' and `endif' arguments.
+ * tests/cond46.test: New test.
+ * tests/Makefile.am: Update.
+
2009-10-31 Jim Meyering <meyering@redhat.com>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
@@ -102,8 +155,122 @@
* tests/subdir10.test: New test.
* tests/Makefile.am: Update.
+2009-10-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Simplify Variable::_check_ambiguous_condition.
+ * lib/Automake/Variable.pm (_check_ambiguous_condition): No need
+ to check for $def since ambiguous_p returns an empty $message if
+ there is no other condition which is ambiguous to $cond.
+
+ Coverage for DisjConditions.pm.
+ * lib/Automake/tests/DisjConditions.pl (test_basics): Increase
+ test coverage: test ->human, ->merge, ->simplify, ->multiply.
+ * lib/Automake/tests/DisjConditions-t.pl (test_basics): Likewise
+ changes, but including state copies across thread creation.
+ * lib/Automake/tests/DisjCon2.pl: New test.
+ * lib/Automake/tests/DisjCon3.pl: Likewise.
+ * lib/Automake/tests/Makefile.am (TESTS, XFAIL_TESTS): Adjust.
+
+ Coverage and fixes for Condition.pm.
+ * lib/Automake/Condition.pm (new): Catch common programming
+ errors better by checking type of passed argument before
+ munging them to all be strings through split.
+ * lib/Automake/tests/Condition.pl (test_basics): Also test
+ ->human.
+ (test_merge): New function, test ->merge, ->merge_conds,
+ ->strip.
+ * lib/Automake/tests/Condition-t.pl (test_basics, test_merge):
+ Likewise changes, but including state copies across thread
+ creation.
+ * lib/Automake/tests/Cond2.pl: New test for programming error.
+ * lib/Automake/tests/Cond3.pl: Likewise.
+ * lib/Automake/tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
+
+ Coverage for Wrap.pm.
+ * lib/Automake/tests/Wrap.pl (@tests): Add test for word with
+ trailing space.
+ (test_makefile_wrap, @makefile_tests): New function, new list of
+ tests, to test makefile_wrap.
+
+ Coverage for Version.pm.
+ * lib/Automake/tests/Version.pl (test_version_compare): Also
+ try Automake::Version::check for the version pairs, taking into
+ account the special-case naming of code forks.
+ (@tests): Add more test cases.
+ (test_bad_versions, @bad_versions): New function, new test cases,
+ to ensure bad version strings are rejected.
+ * lib/Automake/tests/Version2.pl: New test.
+ * lib/Automake/tests/Version3.pl: Likewise.
+ * lib/Automake/tests/Makefile.am (TESTS): Add tests here ...
+ (XFAIL_TESTS): ... and here, new.
+
+ Pod coverage for Perl modules.
+ * lib/Automake/ChannelDefs.pm (parse_warnings): Fix
+ typo in Pod documentation.
+ * lib/Automake/Condition.pm: Add a couple of missing `=back'
+ lines.
+ (_has): Renamed from ...
+ (has): ... this, as this is an internal method.
+ (strip, false, true_when): Adjust callers.
+ * lib/Automake/Configure_ac.pm: Add Pod `Functions' section with
+ documentation for find_configure_ac and require_configure_ac.
+ * lib/Automake/Location.pm: Fix typo in Pod. Add `Methods'
+ section, document methods.
+ * lib/Automake/RuleDef.pm: New `Methods' Pod section.
+ * lib/Automake/VarDef.pm: Document `raw_value'.
+ * lib/Automake/Wrap.pm (_tab_length): Rename from ...
+ (tab_length): ... this, as this is an internal method.
+ (wrap): Adjust callers.
+ * lib/Automake/XFile.pm: Reorganize Pod a bit, add `Methods'
+ section.
+
2009-10-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Perl coverage support using Devel::Cover.
+ This introduces makefile rules to run the testsuite with Perl
+ coverage enabled. It skips tests that use perl ithreads, by
+ unsetting AUTOMAKE_JOBS and setting WANT_NO_THREADS to make the
+ threaded tests skip.
+ * Makefile.am (PERL_COVERAGE_DB, PERL_COVERAGE_FLAGS)
+ (PERL_COVER): New variables.
+ (check-coverage, recheck-coverage, clean-coverage): New phony
+ targets.
+ (check-coverage-run, recheck-coverage-run): New phony helper
+ targets.
+ (clean-local): New, depend on clean-coverage.
+ * lib/Automake/tests/Condition-t.pl: Skip if WANT_NO_THREADS is
+ set.
+ * lib/Automake/tests/DisjConditions-t.pl: Likewise.
+ * tests/defs.in: New required entry 'perl-threads'.
+ * tests/parallel-am.test: Use it to skip if WANT_NO_THREADS is
+ set.
+ * tests/parallel-am2.test: Likewise.
+ * tests/parallel-am3.test: Likewise.
+
+ Add convenience `recheck' target to our toplevel Makefile.am.
+ * Makefile.am (recheck): New convenience target.
+ * tests/README: Give examples for running only failed or
+ outdated or otherwise selected tests.
+
+ dist: allow running several compressors in parallel.
+ * lib/am/distdir.am (am__post_remove_distdir): New internal
+ variable.
+ (DIST_TARGETS): New variable, set to list of chosen distribution
+ formats. Order formats by expected duration, slowest first, for
+ better parallelism.
+ (dist-gzip, dist-bzip2, dist-lzma, dist-xz, dist-tarZ)
+ (dist-shar, dist-zip): Use $(am__post_remove_distdir).
+ (dist, dist-all): Do not depend on distdir. Instead of
+ replicating each compression command, use a recursive invocation
+ to allow running all $(DIST_TARGETS) in parallel.
+ * NEWS: Update.
+ Report by Peter Breitenlohner.
+
+ Fix license headers of cscope tests to be GPLv2+.
+ * tests/cscope.test: Revert to GPL version 2.
+ * tests/cscope2.test: Likewise.
+ * tests/cscope3.test: Likewise.
+
Sync auxiliary files from upstream.
* INSTALL, lib/INSTALL, lib/config.guess, lib/config.sub,
lib/texinfo.tex: Sync from upstream.
@@ -197,6 +364,77 @@
`--no-function-argzero', since the latter does not work with
versions 3.x of Zsh.
+2009-09-26 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fixups and tests for cscope functionality.
+ It seems cscope is not able to take into account relative
+ file names of included cscope.files files, but it is able to
+ canonicalize file names containing '../' sequences.
+ This patch makes the cscope references relative again, and
+ fixes some corner cases.
+ * NEWS: Reword a bit.
+ * THANKS: Update.
+ * automake.in (handle_tags): Use $(am__cd). Provide default
+ empty rule for the `cscope' target, for empty sources.
+ * lib/am/tags.am (cscopelist): Construct relative path to files
+ in $(srcdir) if $(srcdir) is relative.
+ [TOPDIR_P] (cscope): Do not depend on cscope-clean. Only invoke
+ $(CSCOPE) if cscope.files is nonemtpy.
+ (clean-cscope): Rename from ...
+ (cscopeclean): ... this.
+ (cscope.files): Depend on clean-cscope.
+ (distclean-tags) [!TOPDIR_P]: No need to remove cscope files
+ here.
+ * tests/cscope.test, tests/cscope2.test, tests/cscope3.test: New
+ tests.
+ * tests/Makefile.am: Adjust.
+
+2009-09-25 Debarshi Ray <rishi@gnu.org>
+
+ New target to generate cscope database.
+ * automake.in (handle_tags): Handle cscope.
+ * doc/automake.texi (Tags): Document cscope.
+ * lib/am/tags.am (CSCOPE): New macro.
+ [TOPDIR_P] (AM_RECURSIVE_TARGETS): Add cscope.
+ (cscope): New target.
+ (cscopeclean): Likewise.
+ (cscope.files): Likewise.
+ (cscopelist): Likewise.
+ (distclean-tags): Remove `cscope.out', `cscope.in.out',
+ `cscope.po.out' and `cscope.files'.
+ * NEWS: Update.
+ Based upon earlier patch from Jesse Barnes.
+
+2009-09-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Use silent-rules for building the Automake package.
+ * configure.ac (AM_INIT_AUTOMAKE): Add silent-rules option.
+ * Makefile.am (automake, aclocal, INSTALL): Add silencing
+ variables to recipe.
+ * doc/Makefile.am (update_mans, $(srcdir)/aclocal.1)
+ ($(srcdir)/automake.1, $(srcdir)/amhello-1.0.tar.gz): Likewise.
+ * lib/Automake/Makefile.am (Config.pm): Likewise.
+ * tests/Makefile.am ($(srcdir)/parallel-tests.am)
+ ($(parallel_tests), defs-p): Likewise.
+
+2009-09-25 Jack Kelly <endgame.dos@gmail.com>
+
+ Add silent rules support for texinfo outputs.
+ * automake.in (define_verbose_texinfo): Define several new verbose
+ tagvars and verbose vars.
+ (define_verbose_tagvar): Increase spacing to 8 to accommodate
+ MAKEINFO, TEXI2DVI, TEXI2PDF.
+ (handle_texinfo): Additional substitution for silencing dvips.
+ (output_texinfo_build_rules): Additional substitutions for
+ silencing texi2dvi and texi2pdf.
+ * lib/am/texibuild.am: Add silencing to makeinfo, makeinfo --html,
+ texi2dvi and texi2pdf rules.
+ * lib/am/texinfos.am: Add silencing to .dvi.ps rule.
+ * tests/Makefile.am: Add silent8.test.
+ * tests/silent8.test: New test: tests that silent texinfo rules
+ produce quiet messages.
+ * NEWS: Update.
+
2009-09-18 Peter Johansson <trojkan@gmail.com> (tiny change)
Fix link to "Recursive Make Considered Harmful" paper.
@@ -351,6 +589,11 @@
2009-05-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Post-release version bump.
+ * configure.ac, NEWS: Bump version to 1.11a.
+
+2009-05-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
Automake 1.11.
* configure.ac: Bump version to 1.11.
* doc/automake.texi (Releases): Add line for 1.11. Remove line
diff --git a/HACKING b/HACKING
index a3e37f066..dc727d369 100644
--- a/HACKING
+++ b/HACKING
@@ -175,6 +175,9 @@
* Use `keep_testdirs=yes' to keep test directories for successful
tests also.
+* Use perl coverage information to ensure your new code is thoroughly
+ tested by your new tests.
+
* See file `tests/README' for more information.
================================================================
diff --git a/Makefile.am b/Makefile.am
index 316619f3e..cf4e0d083 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,17 +86,35 @@ do_subst = sed \
automake: automake.in
aclocal: aclocal.in
automake aclocal: Makefile
- rm -f $@ $@.tmp
- $(do_subst) $(srcdir)/$@.in >$@.tmp
- chmod +x $@.tmp
- chmod a-w $@.tmp
- mv -f $@.tmp $@
+ $(AM_V_GEN)rm -f $@ $@.tmp
+ $(AM_V_at)$(do_subst) $(srcdir)/$@.in >$@.tmp
+ $(AM_V_at)chmod +x $@.tmp
+ $(AM_V_at)chmod a-w $@.tmp
+ $(AM_V_at)mv -f $@.tmp $@
## The master location for INSTALL is lib/INSTALL.
## This is where `make fetch' will install new versions.
## Make sure we also update this copy.
INSTALL: lib/INSTALL
- cp $(srcdir)/lib/INSTALL $@
+ $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
+
+## recheck: convenience proxy target for the test suites.
+TEST_SUBDIRS = lib/Automake/tests tests
+
+.PHONY: recheck
+recheck:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ for subdir in $(TEST_SUBDIRS); do \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \
+ || eval $$failcom; \
+ done; \
+ test -z "$$fail"
################################################################
##
@@ -106,7 +124,42 @@ INSTALL: lib/INSTALL
# Ensure tests are world-executable
dist-hook:
- cd $(distdir)/tests && chmod a+rx *.test
+ $(am__cd) $(distdir)/tests && chmod a+rx *.test
+
+
+# Perl coverage statistics.
+PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
+PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
+PERL_COVER = cover
+
+check-coverage-run recheck-coverage-run: all
+ $(mkinstalldirs) $(PERL_COVERAGE_DB)
+ PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
+ WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
+ $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
+
+check-coverage-report:
+ @if test ! -d "$(PERL_COVERAGE_DB)"; then \
+ echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \
+ echo "Please run \`make check-coverage' first" >&2; \
+ exit 1; \
+ fi
+ $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
+
+# We don't use direct dependencies here because we'd like to be able
+# to invoke the report even after interrupted check-coverage.
+check-coverage: check-coverage-run
+ $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+recheck-coverage: recheck-coverage-run
+ $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+clean-coverage:
+ rm -rf "$(PERL_COVERAGE_DB)"
+clean-local: clean-coverage
+
+.PHONY: check-coverage recheck-coverage check-coverage-run \
+ recheck-coverage-run check-coverage-report clean-coverage
# Some simple checks, and then ordinary check. These are only really
# guaranteed to work on my machine.
@@ -142,6 +195,8 @@ sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
sc_tests_PATH_SEPARATOR \
+sc_tests_logs_duplicate_prefixes \
+sc_tests_makefile_variable_order \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
@@ -348,7 +403,7 @@ sc_tests_make_without_am_makeflags:
## Tests should never call make directly.
sc_tests_plain_make:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*make'; then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | $(EGREP) ':[ ]*make( |$$)'; then \
echo 'Do not run "make" in the above tests. Use "$$MAKE" instead.' 1>&2; \
exit 1; \
fi
@@ -471,6 +526,43 @@ sc_tests_plain_egrep_fgrep:
exit 1; \
fi
+## Rule to ensure that the testsuite has been run before. We don't depend on `check'
+## here, because that would be very wasteful in the common case. We could run
+## `make check RECHECK_LOGS=' and avoid toplevel races with AM_RECURSIVE_TARGETS.
+## Suggest keeping test directories around for greppability of the Makefile.in files.
+sc_ensure_testsuite_has_run:
+ @if test ! -f tests/test-suite.log; then \
+ echo "Run \`env keep_testdirs=yes make check' before \`maintainer-check'" >&2; \
+ exit 1; \
+ fi
+.PHONY: sc_ensure_testsuite_has_run
+
+## Ensure our warning and error messages do not contain duplicate 'warning:' prefixes.
+## This test actually depends on the testsuite having been run before.
+sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
+ @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
+ echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
+ exit 1; \
+ fi
+
+## Ensure variables are listed before rules in Makefile.in files we generate.
+sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
+ @for file in `find tests -name Makefile.in -print`; do \
+ latevars=`sed -n \
+ -e :x -e 's/#.*//' \
+ -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
+## Literal TAB.
+ -e '1,/^ /d' \
+## Allow @ so we match conditionals.
+ -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \
+ if test -n "$$latevars"; then \
+ echo 'Ensure variables are expanded before rules' >&2; \
+ echo "Variables are expanded too late in $$file:" >&2; \
+ echo "$$latevars" | sed 's/^/ /' >&2; \
+ exit 1; \
+ fi; \
+ done
+
## Using `:' as a PATH separator is not portable.
sc_tests_PATH_SEPARATOR:
@if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
@@ -528,7 +620,7 @@ git-dist: maintainer-check
## Finally, if anything was successful, commit the last changes and tag
## the release in the repository. We don't use RCS keywords so it's OK
## to distribute the files before they were committed.
- cd $(srcdir) && git commit -a -s && \
+ $(am__cd) $(srcdir) && git commit -a -s && \
git tag -s "v$(VERSION)" -m "Release $(VERSION)"
git-release: git-dist
@@ -550,7 +642,7 @@ git-diff:
## Check our path lengths.
path-check: distdir
- (cd $(distdir) && \
+ ($(am__cd) $(distdir) && \
## FIXME there's got to be a better way! pathchk should take the list
## of files on stdin, at least.
find . -print | xargs pathchk -p); \
@@ -582,7 +674,7 @@ fetch:
rm -rf Fetchdir > /dev/null 2>&1
mkdir Fetchdir
## If a get fails then that is a problem.
- (cd Fetchdir && \
+ ($(am__cd) Fetchdir && \
$(WGET_SV_GIT_CF)config.guess -O config.guess && \
$(WGET_SV_GIT_CF)config.sub -O config.sub && \
$(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
@@ -596,7 +688,7 @@ fetch:
>>Fetchdir/update.patch 2>/dev/null; then :; \
else \
stat=1; \
- echo "Updating $(srcdir)/lib/$$file..."; \
+ echo "Updating $(srcdir)/lib/$$file ..."; \
cp Fetchdir/$$file $(srcdir)/lib/$$file; \
fi; \
done; \
@@ -619,7 +711,7 @@ release-stats: ps
aml=`cat $$dot_am_files | wc -l` && \
m4f=`ls -1 $(srcdir)/m4/*.m4 | wc -l` && \
m4l=`cat $(srcdir)/m4/*.m4 | wc -l` && \
- doc_text=`cd doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
+ doc_text=`$(am__cd) doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
echo "$$doc_text" && \
rm -f doc/unused.ps && \
doc=`echo "$$doc_text" | sed -n 's/.*Wrote \([1-9][0-9]*\) pages.*/\1/p'` && \
@@ -627,7 +719,7 @@ release-stats: ps
if test . != '$(srcdir)'; then tests="$$tests $(srcdir)/tests/*.test"; \
else :; fi && \
t=`ls -1 $$tests | wc -l` && \
- tgen=`ls -1 $$tests | grep '.-p\.test' | wc -l` && \
+ tgen=`grep 'GENERATED AUTOMATICALLY' $$tests | wc -l` && \
today=`date +%Y-%m-%d` && \
echo "add this to the table in doc/automake.texi after verification:" && \
printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s @tab %4d %-4s @tab %3d @tab %d %-4s\n' \
diff --git a/Makefile.in b/Makefile.in
index ec327ed5b..e2f796fa3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -59,9 +59,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
- $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+ $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -92,6 +92,12 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(bindir)"
SCRIPTS = $(bin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -105,9 +111,10 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir dist dist-all distcheck
+ cscope distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
+CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
@@ -116,6 +123,7 @@ am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
+am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -143,10 +151,12 @@ am__relativize = \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
+DIST_TARGETS = dist-bzip2 dist-gzip
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -265,6 +275,12 @@ do_subst = sed \
-e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \
-e 's,[@]datadir[@],$(datadir),g'
+TEST_SUBDIRS = lib/Automake/tests tests
+
+# Perl coverage statistics.
+PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
+PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
+PERL_COVER = cover
# Some simple checks, and then ordinary check. These are only really
# guaranteed to work on my machine.
@@ -300,6 +316,8 @@ sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
sc_tests_PATH_SEPARATOR \
+sc_tests_logs_duplicate_prefixes \
+sc_tests_makefile_variable_order \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
@@ -510,6 +528,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -573,8 +595,32 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+ -rm -f cscope.files
+
+cscope.files: clean-cscope cscopelist-recursive cscopelist
+
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
@@ -653,36 +699,39 @@ distdir: $(DISTFILES)
else :; fi
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -9 -c >$(distdir).tar.lz
+ $(am__post_remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-xz: distdir
- tardir=$(distdir) && $(am__tar) | xz -9 -c >$(distdir).tar.xz
- $(am__remove_distdir)
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--9} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
@@ -695,6 +744,8 @@ distcheck: dist
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -737,7 +788,7 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
@@ -800,7 +851,7 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
-clean-am: clean-generic mostlyclean-am
+clean-am: clean-generic clean-local mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -869,26 +920,27 @@ ps-am:
uninstall-am: uninstall-binSCRIPTS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-exec-am install-strip tags-recursive \
- uninstall-am
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am \
+ install-exec-am install-strip tags-recursive uninstall-am
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-am clean clean-generic \
- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
- distcheck distclean distclean-generic distclean-tags \
- distcleancheck distdir distuninstallcheck dvi dvi-am html \
- html-am info info-am install install-am install-binSCRIPTS \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-exec-hook install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \
- uninstall-hook
+ all all-am am--refresh check check-am clean clean-cscope \
+ clean-generic clean-local cscope cscopelist \
+ cscopelist-recursive ctags ctags-recursive dist dist-all \
+ dist-bzip2 dist-gzip dist-hook dist-lzip dist-lzma dist-shar \
+ dist-tarZ dist-xz dist-zip distcheck distclean \
+ distclean-generic distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-binSCRIPTS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-exec-hook install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-binSCRIPTS uninstall-hook
install-exec-hook:
@@ -911,20 +963,64 @@ uninstall-hook:
automake: automake.in
aclocal: aclocal.in
automake aclocal: Makefile
- rm -f $@ $@.tmp
- $(do_subst) $(srcdir)/$@.in >$@.tmp
- chmod +x $@.tmp
- chmod a-w $@.tmp
- mv -f $@.tmp $@
+ $(AM_V_GEN)rm -f $@ $@.tmp
+ $(AM_V_at)$(do_subst) $(srcdir)/$@.in >$@.tmp
+ $(AM_V_at)chmod +x $@.tmp
+ $(AM_V_at)chmod a-w $@.tmp
+ $(AM_V_at)mv -f $@.tmp $@
INSTALL: lib/INSTALL
- cp $(srcdir)/lib/INSTALL $@
+ $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
+
+.PHONY: recheck
+recheck:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ for subdir in $(TEST_SUBDIRS); do \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \
+ || eval $$failcom; \
+ done; \
+ test -z "$$fail"
################################################################
# Ensure tests are world-executable
dist-hook:
- cd $(distdir)/tests && chmod a+rx *.test
+ $(am__cd) $(distdir)/tests && chmod a+rx *.test
+
+check-coverage-run recheck-coverage-run: all
+ $(mkinstalldirs) $(PERL_COVERAGE_DB)
+ PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
+ WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
+ $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
+
+check-coverage-report:
+ @if test ! -d "$(PERL_COVERAGE_DB)"; then \
+ echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \
+ echo "Please run \`make check-coverage' first" >&2; \
+ exit 1; \
+ fi
+ $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
+
+# We don't use direct dependencies here because we'd like to be able
+# to invoke the report even after interrupted check-coverage.
+check-coverage: check-coverage-run
+ $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+recheck-coverage: recheck-coverage-run
+ $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+clean-coverage:
+ rm -rf "$(PERL_COVERAGE_DB)"
+clean-local: clean-coverage
+
+.PHONY: check-coverage recheck-coverage check-coverage-run \
+ recheck-coverage-run check-coverage-report clean-coverage
.PHONY: $(syntax_check_rules)
$(syntax_check_rules): automake aclocal
@@ -1051,7 +1147,7 @@ sc_tests_make_without_am_makeflags:
fi
sc_tests_plain_make:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*make'; then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | $(EGREP) ':[ ]*make( |$$)'; then \
echo 'Do not run "make" in the above tests. Use "$$MAKE" instead.' 1>&2; \
exit 1; \
fi
@@ -1154,6 +1250,34 @@ sc_tests_plain_egrep_fgrep:
exit 1; \
fi
+sc_ensure_testsuite_has_run:
+ @if test ! -f tests/test-suite.log; then \
+ echo "Run \`env keep_testdirs=yes make check' before \`maintainer-check'" >&2; \
+ exit 1; \
+ fi
+.PHONY: sc_ensure_testsuite_has_run
+
+sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
+ @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
+ echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
+ exit 1; \
+ fi
+
+sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
+ @for file in `find tests -name Makefile.in -print`; do \
+ latevars=`sed -n \
+ -e :x -e 's/#.*//' \
+ -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
+ -e '1,/^ /d' \
+ -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \
+ if test -n "$$latevars"; then \
+ echo 'Ensure variables are expanded before rules' >&2; \
+ echo "Variables are expanded too late in $$file:" >&2; \
+ echo "$$latevars" | sed 's/^/ /' >&2; \
+ exit 1; \
+ fi; \
+ done
+
sc_tests_PATH_SEPARATOR:
@if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 1>&2; \
@@ -1202,7 +1326,7 @@ git-dist: maintainer-check
exit 1; \
fi
$(MAKE) $(AM_MAKEFLAGS) distcheck
- cd $(srcdir) && git commit -a -s && \
+ $(am__cd) $(srcdir) && git commit -a -s && \
git tag -s "v$(VERSION)" -m "Release $(VERSION)"
git-release: git-dist
@@ -1223,7 +1347,7 @@ git-diff:
> $(PACKAGE)-$$prevno-$(VERSION).diff
path-check: distdir
- (cd $(distdir) && \
+ ($(am__cd) $(distdir) && \
find . -print | xargs pathchk -p); \
estatus=$$?; \
find $(distdir) -type d '!' -perm -200 -exec chmod u+w {} ';'; \
@@ -1233,7 +1357,7 @@ path-check: distdir
fetch:
rm -rf Fetchdir > /dev/null 2>&1
mkdir Fetchdir
- (cd Fetchdir && \
+ ($(am__cd) Fetchdir && \
$(WGET_SV_GIT_CF)config.guess -O config.guess && \
$(WGET_SV_GIT_CF)config.sub -O config.sub && \
$(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
@@ -1245,7 +1369,7 @@ fetch:
>>Fetchdir/update.patch 2>/dev/null; then :; \
else \
stat=1; \
- echo "Updating $(srcdir)/lib/$$file..."; \
+ echo "Updating $(srcdir)/lib/$$file ..."; \
cp Fetchdir/$$file $(srcdir)/lib/$$file; \
fi; \
done; \
@@ -1265,7 +1389,7 @@ release-stats: ps
aml=`cat $$dot_am_files | wc -l` && \
m4f=`ls -1 $(srcdir)/m4/*.m4 | wc -l` && \
m4l=`cat $(srcdir)/m4/*.m4 | wc -l` && \
- doc_text=`cd doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
+ doc_text=`$(am__cd) doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
echo "$$doc_text" && \
rm -f doc/unused.ps && \
doc=`echo "$$doc_text" | sed -n 's/.*Wrote \([1-9][0-9]*\) pages.*/\1/p'` && \
@@ -1273,7 +1397,7 @@ release-stats: ps
if test . != '$(srcdir)'; then tests="$$tests $(srcdir)/tests/*.test"; \
else :; fi && \
t=`ls -1 $$tests | wc -l` && \
- tgen=`ls -1 $$tests | grep '.-p\.test' | wc -l` && \
+ tgen=`grep 'GENERATED AUTOMATICALLY' $$tests | wc -l` && \
today=`date +%Y-%m-%d` && \
echo "add this to the table in doc/automake.texi after verification:" && \
printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s @tab %4d %-4s @tab %3d @tab %d %-4s\n' \
diff --git a/NEWS b/NEWS
index 3132b16f7..d368eec3b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,52 @@
-New in 1.11.0a:
+New in 1.11a:
+
+* Changes to automake:
+
+ - automake now generates silenced rules for texinfo outputs.
+
+ - The deprecated options `--output-dir', `--Werror' and `--Wno-error'
+ have been removed.
+
+* New targets:
+
+ - New `cscope' target to build a cscope database for the source tree.
* Miscellaneous changes:
+ - The `dist' and `dist-all' targets now can run compressors in parallel.
+
- The `lzma' compression scheme and associated automake option `dist-lzma'
is obsoleted by `xz' and `dist-xz' due to upstream changes.
-Bugs fixed in 1.11.0a:
+ - "make dist" can now create lzip-compressed tarballs.
+
+ - You may adjust the compression options used in dist-xz and dist-bzip2.
+ The default is still -9 for each, but you may specify a different
+ level via the XZ_OPT and BZIP2 envvars respectively. E.g.,
+ "make dist-xz XZ_OPT=-7" or "make dist-xz BZIP2=-5"
+
+ - Messages of types warning or error from `automake' and `aclocal' are now
+ prefixed with the respective type, and presence of -Werror is noted.
+
+ - The `compile' script now converts some options for MSVC for a better
+ user experience. Similarly, the new `ar-lib' script wraps Microsoft lib.
+
+ - Automake's early configure-time sanity check now tries to avoid sleeping
+ for a second, which slowed down cached configure runs noticeably. In that
+ case, it will check back at the end of the configure script to ensure that
+ at least one second has passed, to avoid time stamp issues with makefile
+ rules rerunning autotools programs.
+
+ - For programs and libraries, automake now detects EXTRA_foo_DEPENDENCIES and
+ adds them to the normal list of dependencies, but without overwriting the
+ foo_DEPENDENCIES variable, which is normally computed by automake.
+
+ - C source and header files derived from non-distributed Yacc sources are
+ now removed by "make clean", not only by "make maintainer-clean".
+
+Bugs fixed in 1.11a:
+
+ - Lots of minor bugfixes.
* Bugs introduced by 1.11:
@@ -36,6 +77,11 @@ Bugs fixed in 1.11.0a:
- AM_PROG_GCJ uses AC_CHECK_TOOLS to look for `gcj' now, so that prefixed
tools are preferred in a cross-compile setup.
+ - The distribution is tarred up with mode 755 now by the `dist*' targets.
+ This fixes a race condition where untrusted users could modify files
+ in the $(PACKAGE)-$(VERSION) distdir before packing if the toplevel
+ build directory was world-searchable. This is CVE-2009-4029.
+
- Several scripts as well as the parallel-tests testsuite driver now
exit with the right exit status upon receiving a signal.
@@ -54,6 +100,24 @@ Bugs fixed in 1.11.0a:
make bug triggered by sources containing repeated slashes when the
`subdir-objects' option was used.
+ - Automake now detects the presence of the `-d' flag in the various
+ `*YFLAGS' variables even when their definitions involve indirections
+ through other variables, such as in:
+ foo_opts = -d
+ AM_YFLAGS = $(foo_opts)
+
+ - Automake now complains if a `*YFLAGS' variable has any conditional
+ content, not only a conditional definition.
+
+ - Explicit enabling and/or disabling of Automake warning categories
+ through the `-W...' options now always takes precedence over the
+ implicit warning level implied by Automake strictness (foreign, gnu
+ or gnits), regardless of the order in which such strictness and
+ warning flags appear. For example, a setting like:
+ AUTOMAKE_OPTIONS = -Wall --foreign
+ will cause the warnings in category `portability' to be enabled, even
+ if those warnings are by default disabled in `foreign' strictness.
+
- The parallel-tests driver now does not produce erroneous results
with Tru64/OSF 5.1 sh upon unreadable log files any more.
diff --git a/THANKS b/THANKS
index 040da9857..9a76e7f1b 100644
--- a/THANKS
+++ b/THANKS
@@ -67,6 +67,7 @@ danbp danpb@nospam.postmaster.co.uk
Daniel Jacobowitz drow@false.org
Daniel Kahn Gillmor dkg@fifthhorseman.net
Daniel Richard G. danielg@teragram.com
+Debarshi Ray rishi@gnu.org
Dave Brolley brolley@redhat.com
Dave Korn dave.korn.cygwin@googlemail.com
Dave Morrison dave@bnl.gov
@@ -146,6 +147,7 @@ Jared Davis abiword@aiksaurus.com
Jason Duell jcduell@lbl.gov
Jason Molenda crash@cygnus.co.jp
Jeff Bailey Jbailey@phn.ca
+Jeff A. Daily jeff.daily@pnl.gov
Jeff Garzik jgarzik@pobox.com
Jeff Squyres jsquyres@lam-mpi.org
Jens Elkner elkner@imsgroup.de
@@ -273,6 +275,7 @@ Per Oyvind Hvidsten poeh@enter.vg
Peter Breitenlohner peb@mppmu.mpg.de
Peter Eisentraut peter_e@gmx.net
Peter Gavin pgavin@debaser.kicks-ass.org
+Peter Johansson trojkan@gmail.com
Peter Mattis petm@scam.XCF.Berkeley.EDU
Peter Muir iyhi@yahoo.com
Peter O'Gorman peter@pogma.com
diff --git a/aclocal.in b/aclocal.in
index 2210fe3ad..11bb9ee3d 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -184,8 +184,7 @@ sub check_acinclude ()
foreach my $key (keys %map)
{
# FIXME: should print line number of acinclude.m4.
- msg ('syntax', "warning: macro `$key' defined in "
- . "acinclude.m4 but never used")
+ msg ('syntax', "macro `$key' defined in acinclude.m4 but never used")
if $map{$key} eq 'acinclude.m4' && ! exists $macro_seen{$key};
}
}
@@ -436,7 +435,7 @@ sub scan_configure_dep ($)
# Make this just a warning, because we do not know whether
# the macro is actually used (it could be called conditionally).
msg ('unsupported', "$file:$line",
- "warning: macro `$2' not found in library");
+ "macro `$2' not found in library");
}
}
@@ -508,7 +507,7 @@ sub scan_file ($$$)
if ($number !~ /$serial_number_rx/go)
{
msg ('syntax', "$file:$.",
- "warning: ill-formed serial number `$number', "
+ "ill-formed serial number `$number', "
. "expecting a version string with only digits and dots");
}
elsif ($defun_seen)
@@ -560,8 +559,8 @@ sub scan_file ($$$)
$defun_seen = 1;
if (! defined $1)
{
- msg ('syntax', "$file:$.", "warning: underquoted definition of $2"
- . "\n run info '(automake)Extending aclocal'\n"
+ msg ('syntax', "$file:$.", "underquoted definition of $2"
+ . "\n run info Automake 'Extending aclocal'\n"
. " or see http://sources.redhat.com/automake/"
. "automake.html#Extending-aclocal")
unless $underquoted_manual_once;
@@ -872,14 +871,14 @@ sub usage ($)
{
my ($status) = @_;
- print "Usage: aclocal [OPTIONS] ...
+ print "Usage: aclocal [OPTION]...
Generate `aclocal.m4' by scanning `configure.ac' or `configure.in'
Options:
--acdir=DIR directory holding config files (for debugging)
--diff[=COMMAND] run COMMAND [diff -u] on M4 files that would be
- changed (implies --install and --dry-run)
+ changed (implies --install and --dry-run)
--dry-run pretend to, but do not actually update any file
--force always update output file
--help print this help, then exit
@@ -987,13 +986,13 @@ sub parse_arguments ()
}
if (exists $argopts{$ARGV[0]})
{
- fatal ("option `$ARGV[0]' requires an argument\n"
- . "Try `$0 --help' for more information.");
+ fatal ("option `$ARGV[0]' requires an argument.\n"
+ . "Try `$0 --help' for more information");
}
else
{
fatal ("unrecognized option `$ARGV[0]'\n"
- . "Try `$0 --help' for more information.");
+ . "Try `$0 --help' for more information");
}
}
@@ -1014,7 +1013,7 @@ sub parse_arguments ()
if ($install && !@user_includes)
{
fatal ("--install should copy macros in the directory indicated by the"
- . "\nfirst -I option, but no -I was supplied.");
+ . "\nfirst -I option, but no -I was supplied");
}
if (! -d $system_includes[0])
@@ -1065,7 +1064,7 @@ my $loop = 0;
while (1)
{
++$loop;
- prog_error "Too many loops." if $loop > 2;
+ prog_error "too many loops" if $loop > 2;
reset_maps;
scan_m4_files;
diff --git a/aclocal.m4 b/aclocal.m4
index f60cbdb94..068c1e85b 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
+# generated automatically by aclocal 1.11a -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
@@ -30,6 +30,7 @@ m4_include([m4/mkdirp.m4])
m4_include([m4/options.m4])
m4_include([m4/runlog.m4])
m4_include([m4/sanity.m4])
+m4_include([m4/silent.m4])
m4_include([m4/strip.m4])
m4_include([m4/substnot.m4])
m4_include([m4/tar.m4])
diff --git a/automake.in b/automake.in
index d74730dcc..f9a682141 100755..100644
--- a/automake.in
+++ b/automake.in
@@ -208,8 +208,6 @@ my $INCLUDE_PATTERN = ('^include\s+'
. '|(\$\(srcdir\)/' . $PATH_PATTERN . ')'
. '|([^/\$]' . $PATH_PATTERN . '))\s*(#.*)?' . "\$");
-# Match `-d' as a command-line argument in a string.
-my $DASH_D_PATTERN = "(^|\\s)-d(\\s|\$)";
# Directories installed during 'install-exec' phase.
my $EXEC_DIR_PATTERN =
'^(?:bin|sbin|libexec|sysconf|localstate|lib|pkglib|.*exec.*)' . "\$";
@@ -235,9 +233,9 @@ my @libtool_sometimes = qw(ltconfig ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh);
my @common_files =
(qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB
COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO
- ansi2knr.1 ansi2knr.c compile config.guess config.rpath config.sub
- depcomp elisp-comp install-sh libversion.in mdate-sh missing
- mkinstalldirs py-compile texinfo.tex ylwrap),
+ ansi2knr.1 ansi2knr.c ar-lib compile config.guess config.rpath
+ config.sub depcomp elisp-comp install-sh libversion.in mdate-sh
+ missing mkinstalldirs py-compile texinfo.tex ylwrap),
@libtool_files, @libtool_sometimes);
# Commonly used files we auto-include, but only sometimes. This list
@@ -330,10 +328,6 @@ my @config_headers = ();
# Names used in AC_CONFIG_LINKS call.
my @config_links = ();
-# Directory where output files go. Actually, output files are
-# relative to this directory.
-my $output_directory;
-
# List of Makefile.am's to process, and their corresponding outputs.
my @input_files = ();
my %output_files = ();
@@ -1207,11 +1201,25 @@ sub define_verbose_tagvar ($)
my ($name) = @_;
if (option 'silent-rules')
{
- define_verbose_var ($name, '@echo " '. $name . ' ' x (6 - length ($name)) . '" $@;');
+ define_verbose_var ($name, '@echo " '. $name . ' ' x (8 - length ($name)) . '" $@;');
define_verbose_var ('at', '@');
}
}
+# define_verbose_texinfo
+# ----------------------
+# Engage the needed `silent-rules' machinery for assorted texinfo commands.
+sub define_verbose_texinfo ()
+{
+ my @tagvars = ('DVIPS', 'MAKEINFO', 'INFOHTML', 'TEXI2DVI', 'TEXI2PDF');
+ foreach my $tag (@tagvars)
+ {
+ define_verbose_tagvar($tag);
+ }
+ define_verbose_var('texinfo', '-q');
+ define_verbose_var('texidevnull', '> /dev/null');
+}
+
# define_verbose_libtool
# ----------------------
# Engage the needed `silent-rules' machinery for `libtool --silent'.
@@ -1236,12 +1244,10 @@ sub handle_options
msg_var ('unsupported', $var,
"`AUTOMAKE_OPTIONS' cannot have conditional contents");
}
- foreach my $locvals ($var->value_as_list_recursive (cond_filter => TRUE,
- location => 1))
- {
- my ($loc, $value) = @$locvals;
- return 1 if (process_option_list ($loc, $value))
- }
+ my @options = map { { option => $_->[1], where => $_->[0] } }
+ $var->value_as_list_recursive (cond_filter => TRUE,
+ location => 1);
+ return 1 if process_option_list (@options);
}
# Override portability-recursive warning.
@@ -1313,7 +1319,7 @@ sub check_user_variables (@)
msg_cond_var ('gnu', $cond, $flag,
"`$flag' is a user variable, "
. "you should not override it;\n"
- . "use `AM_$flag' instead.");
+ . "use `AM_$flag' instead");
}
}
}
@@ -1573,7 +1579,7 @@ sub handle_languages
my $srcdir = dirname ($source);
if ($lang->ansi && $obj =~ /\$U/)
{
- prog_error "`$obj' contains \$U, but `$source' doesn't."
+ prog_error "`$obj' contains \$U, but `$source' doesn't"
if $source !~ /\$U/;
(my $source_ = $source) =~ s/\$U/_/g;
@@ -2322,9 +2328,9 @@ sub handle_lib_objects
my ($xname, $varname) = @_;
my $var = var ($varname);
- prog_error "handle_lib_objects: `$varname' undefined"
+ prog_error "`$varname' undefined"
unless $var;
- prog_error "handle_lib_objects: unexpected variable name `$varname'"
+ prog_error "unexpected variable name `$varname'"
unless $varname =~ /^(.*)(?:LIB|LD)ADD$/;
my $prefix = $1 || 'AM_';
@@ -2357,7 +2363,7 @@ sub handle_lib_objects
# FIXME: should display a stack of nested variables
# as context when $var != $subvar.
err_var ($var, "linker flags such as `$val' belong in "
- . "`${prefix}LDFLAGS");
+ . "`${prefix}LDFLAGS'");
}
return ();
}
@@ -2684,6 +2690,7 @@ sub handle_programs
"use `${xname}_LDADD', not `${xname}_LIBADD'");
set_seen ($xname . '_DEPENDENCIES');
+ set_seen ('EXTRA_' . $xname . '_DEPENDENCIES');
set_seen ($xname . '_LDFLAGS');
# Determine program to use for link.
@@ -2795,6 +2802,7 @@ sub handle_libraries
# Make sure we at look at this.
set_seen ($xlib . '_DEPENDENCIES');
+ set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
&handle_source_transform ($xlib, $onelib, $obj, $where,
NONLIBTOOL => 1, LIBTOOL => 0);
@@ -2900,7 +2908,7 @@ sub handle_ltlibraries
my $onlyone = ($dir ne $adir) ?
("\nLibtool libraries can be built for only one "
- . "destination.") : "";
+ . "destination") : "";
error ($liblocations{$val}{$acond},
"... and should also be $adirtxt$adircond.$onlyone");
@@ -2974,6 +2982,7 @@ sub handle_ltlibraries
# Make sure we look at these.
set_seen ($xlib . '_LDFLAGS');
set_seen ($xlib . '_DEPENDENCIES');
+ set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
# Generate support for conditional object inclusion in
# libraries.
@@ -3076,7 +3085,7 @@ sub check_typos ()
for my $cond ($var->conditions->conds)
{
- $varname =~ /^(?:nobase_)?(?:dist_|nodist_)?(.*)_[[:alnum:]]+$/;
+ $varname =~ /^(?:EXTRA_)?(?:nobase_)?(?:dist_|nodist_)?(.*)_[[:alnum:]]+$/;
msg_var ('syntax', $var, "variable `$varname' is defined but no"
. " program or\nlibrary has `$1' as canonical name"
. " (possible typo)")
@@ -3265,6 +3274,9 @@ sub output_texinfo_build_rules ($$$@)
$output_rules .= file_contents ('texibuild',
new Automake::Location,
+ AM_V_MAKEINFO => verbose_flag('MAKEINFO'),
+ AM_V_TEXI2DVI => verbose_flag('TEXI2DVI'),
+ AM_V_TEXI2PDF => verbose_flag('TEXI2PDF'),
DEPS => "@deps",
DEST_PREFIX => $dpfx,
DEST_INFO_PREFIX => $dipfx,
@@ -3274,12 +3286,15 @@ sub output_texinfo_build_rules ($$$@)
GENERIC_INFO => $generic_info,
INSRC => $insrc,
MAKEINFOFLAGS => $makeinfoflags,
+ SILENT => silent_flag(),
SOURCE => ($generic
? '$<' : $source),
SOURCE_INFO => ($generic_info
? '$<' : $source),
SOURCE_REAL => $source,
SOURCE_SUFFIX => $ssfx,
+ TEXIQUIET => verbose_flag('texinfo'),
+ TEXIDEVNULL => verbose_flag('texidevnull'),
);
return ($dirstamp, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html");
}
@@ -3588,6 +3603,7 @@ sub handle_texinfo ()
my ($mostlyclean, $clean, $maintclean) = ('', '', '');
if ($info_texinfos)
{
+ define_verbose_texinfo;
($mostlyclean, $clean, $maintclean) = handle_texinfo_helper ($info_texinfos);
chomp $mostlyclean;
chomp $clean;
@@ -3596,10 +3612,12 @@ sub handle_texinfo ()
$output_rules .= file_contents ('texinfos',
new Automake::Location,
+ AM_V_DVIPS => verbose_flag('DVIPS'),
MOSTLYCLEAN => $mostlyclean,
TEXICLEAN => $clean,
MAINTCLEAN => $maintclean,
- 'LOCAL-TEXIS' => !!$info_texinfos);
+ 'LOCAL-TEXIS' => !!$info_texinfos,
+ TEXIQUIET => verbose_flag('texinfo'));
}
@@ -3756,6 +3774,7 @@ sub handle_tags
{
my @tag_deps = ();
my @ctag_deps = ();
+ my @cscope_deps = ();
if (var ('SUBDIRS'))
{
$output_rules .= ("tags-recursive:\n"
@@ -3779,6 +3798,17 @@ sub handle_tags
push (@ctag_deps, 'ctags-recursive');
&depend ('.PHONY', 'ctags-recursive');
&depend ('.MAKE', 'ctags-recursive');
+
+ $output_rules .= ("cscopelist-recursive:\n"
+ . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do \\\n"
+ # Never fail here if a subdir fails; it
+ # isn't important.
+ . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
+ . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n"
+ . "\tdone\n");
+ push (@cscope_deps, 'cscopelist-recursive');
+ &depend ('.PHONY', 'cscopelist-recursive');
+ &depend ('.MAKE', 'cscopelist-recursive');
}
if (&saw_sources_p (1)
@@ -3801,13 +3831,14 @@ sub handle_tags
new Automake::Location,
CONFIG => "@config",
TAGSDIRS => "@tag_deps",
- CTAGSDIRS => "@ctag_deps");
+ CTAGSDIRS => "@ctag_deps",
+ CSCOPEDIRS => "@cscope_deps");
set_seen 'TAGS_DEPENDENCIES';
}
elsif (reject_var ('TAGS_DEPENDENCIES',
- "doesn't make sense to define `TAGS_DEPENDENCIES'"
- . "without\nsources or `ETAGS_ARGS'"))
+ "it doesn't make sense to define `TAGS_DEPENDENCIES'"
+ . " without\nsources or `ETAGS_ARGS'"))
{
}
else
@@ -3816,8 +3847,9 @@ sub handle_tags
# Otherwise, it would be possible for a top-level "make TAGS"
# to fail because some subdirectory failed.
$output_rules .= "tags: TAGS\nTAGS:\n\n";
- # Ditto ctags.
+ # Ditto ctags and cscope.
$output_rules .= "ctags: CTAGS\nCTAGS:\n\n";
+ $output_rules .= "cscope cscopelist:\n\n";
}
}
@@ -3927,9 +3959,9 @@ sub handle_dist ()
{
my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
$archive_defined ||=
- grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzma xz);
+ grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip lzma xz);
error (option 'no-dist-gzip',
- "no-dist-gzip specified but no dist-* specified, "
+ "no-dist-gzip specified but no dist-* specified,\n"
. "at least one archive format must be enabled")
unless $archive_defined;
}
@@ -4116,7 +4148,7 @@ sub scan_aclocal_m4 ()
push (@ac_deps, '$(ACLOCAL_M4_SOURCES)');
msg_var ('obsolete', 'ACLOCAL_M4_SOURCES',
"`ACLOCAL_M4_SOURCES' is obsolete.\n"
- . "It should be safe to simply remove it.");
+ . "It should be safe to simply remove it");
}
# Note that it might be possible that aclocal.m4 doesn't exist but
@@ -5208,8 +5240,8 @@ sub scan_autoconf_config_files ($$)
my ($local, @rest) = split (/:/);
@rest = ("$local.in",) unless @rest;
msg ('portability', $where,
- "Omit leading `./' from config file names such as `$local',"
- . "\nas not all make implementations treat `file' and `./file' equally.")
+ "omit leading `./' from config file names such as `$local',"
+ . "\nas not all make implementations treat `file' and `./file' equally")
if ($local =~ /^\.\//);
my $input = locate_am @rest;
if ($input)
@@ -5333,7 +5365,7 @@ sub scan_autoconf_traces ($)
if ($seen_init_automake)
{
error ($where, "AC_CONFIG_AUX_DIR must be called before "
- . "AM_INIT_AUTOMAKE...", partial => 1);
+ . "AM_INIT_AUTOMAKE ...", partial => 1);
error ($seen_init_automake, "... AM_INIT_AUTOMAKE called here");
}
$config_aux_dir = $args[1];
@@ -5444,9 +5476,9 @@ sub scan_autoconf_traces ($)
}
elsif (defined $args[1])
{
- exit $exit_code
- if (process_global_option_list ($where,
- split (' ', $args[1])));
+ my @opts = split (' ', $args[1]);
+ @opts = map { { option => $_, where => $where } } @opts;
+ exit $exit_code if process_global_option_list (@opts);
}
}
elsif ($macro eq 'AM_MAINTAINER_MODE')
@@ -5569,7 +5601,7 @@ sub scan_autoconf_files ()
. "should verify that $configure_ac invokes AM_INIT_AUTOMAKE,"
. "\nthat aclocal.m4 is present in the top-level directory,\n"
. "and that aclocal.m4 was recently regenerated "
- . "(using aclocal).");
+ . "(using aclocal)");
}
else
{
@@ -5580,7 +5612,7 @@ sub scan_autoconf_files ()
error ($seen_init_automake,
"your implementation of AM_INIT_AUTOMAKE comes from " .
"an\nold Automake version. You should recreate " .
- "aclocal.m4\nwith aclocal and run automake again.\n",
+ "aclocal.m4\nwith aclocal and run automake again",
# $? = 63 is used to indicate version mismatch to missing.
exit_code => 63);
}
@@ -5588,9 +5620,9 @@ sub scan_autoconf_files ()
{
error ($seen_init_automake,
"no proper implementation of AM_INIT_AUTOMAKE was " .
- "found,\nprobably because aclocal.m4 is missing...\n" .
+ "found,\nprobably because aclocal.m4 is missing.\n" .
"You should run aclocal to create this file, then\n" .
- "run automake again.\n");
+ "run automake again");
}
}
}
@@ -6073,12 +6105,29 @@ sub lang_yacc_target_hook
{
my ($self, $aggregate, $output, $input, %transform) = @_;
- my $flag = $aggregate . "_YFLAGS";
- my $flagvar = var $flag;
- my $YFLAGSvar = var 'YFLAGS';
- if (($flagvar && $flagvar->variable_value =~ /$DASH_D_PATTERN/o)
- || ($YFLAGSvar && $YFLAGSvar->variable_value =~ /$DASH_D_PATTERN/o))
- {
+ # If some relevant *YFLAGS variable contains the `-d' flag, we'll
+ # have to to generate special code.
+ my $yflags_contains_minus_d = 0;
+
+ foreach my $pfx ("", "${aggregate}_")
+ {
+ my $yflagsvar = var ("${pfx}YFLAGS");
+ next unless $yflagsvar;
+ # We cannot work reliably with conditionally-defined YFLAGS.
+ if ($yflagsvar->has_conditional_contents)
+ {
+ msg_var ('unsupported', $yflagsvar,
+ "`${pfx}YFLAGS' cannot have conditional contents");
+ }
+ else
+ {
+ $yflags_contains_minus_d = 1
+ if grep (/^-d$/, $yflagsvar->value_as_list_recursive);
+ }
+ }
+
+ if ($yflags_contains_minus_d)
+ {
(my $output_base = $output) =~ s/$KNOWN_EXTENSIONS_PATTERN$//;
my $header = $output_base . '.h';
@@ -6102,17 +6151,14 @@ sub lang_yacc_target_hook
&push_dist_common ($header)
if $transform{'DIST_SOURCE'};
- # If the files are built in the build directory, then we want
- # to remove them with `make clean'. If they are in srcdir
- # they shouldn't be touched. However, we can't determine this
- # statically, and the GNU rules say that yacc/lex output files
- # should be removed by maintainer-clean. So that's what we
- # do.
- $clean_files{$header} = MAINTAINER_CLEAN;
- }
- # Erase $OUTPUT on `make maintainer-clean' (by GNU standards).
+ # The GNU rules say that yacc/lex output files should be removed
+ # by maintainer-clean. However, if the files are not distributed,
+ # then we want to remove them with "make clean"; otherwise,
+ # "make distcheck" will fail.
+ $clean_files{$header} = $transform{'DIST_SOURCE'} ? MAINTAINER_CLEAN : CLEAN;
+ }
# See the comment above for $HEADER.
- $clean_files{$output} = MAINTAINER_CLEAN;
+ $clean_files{$output} = $transform{'DIST_SOURCE'} ? MAINTAINER_CLEAN : CLEAN;
}
# This is a lex helper which is called whenever we have decided to
@@ -6383,7 +6429,7 @@ sub cond_stack_if ($$$)
my $mac = $_am_macro_for_cond{$cond};
$text .= "\n The usual way to define `$cond' is to add ";
$text .= ($mac =~ / /) ? $mac : "`$mac'";
- $text .= "\n to `$configure_ac' and run `aclocal' and `autoconf' again.";
+ $text .= "\n to `$configure_ac' and run `aclocal' and `autoconf' again";
# These warnings appear in Automake files (depend2.am),
# so there is no need to display them more than once:
$scope = US_GLOBAL;
@@ -7079,6 +7125,7 @@ sub make_paragraphs ($%)
'XZ' => !! option 'dist-xz',
'LZMA' => !! option 'dist-lzma',
+ 'LZIP' => !! option 'dist-lzip',
'BZIP2' => !! option 'dist-bzip2',
'COMPRESS' => !! option 'dist-tarZ',
'GZIP' => ! option 'no-dist-gzip',
@@ -7860,7 +7907,7 @@ sub require_file_internal ($$$@)
$trailer2 = "\n Consider adding the COPYING file"
. " to the version control system"
. "\n for your code, to avoid questions"
- . " about which license your project uses.";
+ . " about which license your project uses";
}
# Windows Perl will hang if we try to delete a
@@ -7894,8 +7941,9 @@ sub require_file_internal ($$$@)
# the top level Makefile. Furthermore Automake
# hasn't been asked to create the Makefile.in
# that distributes the aux dir files.
- error ($where, 'Please make a full run of automake'
- . " so $fullfile gets distributed.");
+ error ($where, 'please rerun automake without '
+ . "Makefile arguments\n"
+ . "so $fullfile gets distributed");
}
}
}
@@ -8258,18 +8306,13 @@ sub generate_makefile ($$)
check_typos;
- my ($out_file) = $output_directory . '/' . $makefile_in;
-
if ($exit_code != 0)
{
- verb "not writing $out_file because of earlier errors";
+ verb "not writing $makefile_in because of earlier errors";
return;
}
- if (! -d ($output_directory . '/' . $am_relative_dir))
- {
- mkdir ($output_directory . '/' . $am_relative_dir, 0755);
- }
+ mkdir ($am_relative_dir, 0755) if ! -d $am_relative_dir;
# We make sure that `all:' is the first target.
my $output =
@@ -8288,25 +8331,25 @@ sub generate_makefile ($$)
# * other dependencies, specific to the Makefile.am being processed
# (such as the Makefile.am itself, or any Makefile fragment
# it includes).
- my $timestamp = mtime $out_file;
+ my $timestamp = mtime $makefile_in;
if (! $force_generation
&& $configure_deps_greatest_timestamp < $timestamp
&& $output_deps_greatest_timestamp < $timestamp
- && $output eq contents ($out_file))
+ && $output eq contents ($makefile_in))
{
- verb "$out_file unchanged";
+ verb "$makefile_in unchanged";
# No need to update.
return;
}
- if (-e $out_file)
+ if (-e $makefile_in)
{
- unlink ($out_file)
- or fatal "cannot remove $out_file: $!\n";
+ unlink ($makefile_in)
+ or fatal "cannot remove $makefile_in: $!";
}
- my $gm_file = new Automake::XFile "> $out_file";
- verb "creating $out_file";
+ my $gm_file = new Automake::XFile "> $makefile_in";
+ verb "creating $makefile_in";
print $gm_file $output;
}
@@ -8320,7 +8363,7 @@ sub generate_makefile ($$)
# Print usage information.
sub usage ()
{
- print "Usage: $0 [OPTION] ... [Makefile]...
+ print "Usage: $0 [OPTION]... [Makefile]...
Generate Makefile.in for configure from Makefile.am.
@@ -8431,31 +8474,26 @@ EOF
# Parse command line.
sub parse_arguments ()
{
- # Start off as gnu.
- set_strictness ('gnu');
+ my $strict = 'gnu';
+ my $cygnus = 0;
+ my $ignore_deps = 0;
+ my @warnings = ();
- my $cli_where = new Automake::Location;
my %cli_options =
(
'libdir=s' => \$libdir,
- 'gnu' => sub { set_strictness ('gnu'); },
- 'gnits' => sub { set_strictness ('gnits'); },
- 'cygnus' => sub { set_global_option ('cygnus', $cli_where); },
- 'foreign' => sub { set_strictness ('foreign'); },
- 'include-deps' => sub { unset_global_option ('no-dependencies'); },
- 'i|ignore-deps' => sub { set_global_option ('no-dependencies',
- $cli_where); },
+ 'gnu' => sub { $strict = 'gnu'; },
+ 'gnits' => sub { $strict = 'gnits'; },
+ 'foreign' => sub { $strict = 'foreign'; },
+ 'cygnus' => \$cygnus,
+ 'include-deps' => sub { $ignore_deps = 0; },
+ 'i|ignore-deps' => sub { $ignore_deps = 1; },
'no-force' => sub { $force_generation = 0; },
'f|force-missing' => \$force_missing,
- 'o|output-dir=s' => \$output_directory,
'a|add-missing' => \$add_missing,
'c|copy' => \$copy_missing,
'v|verbose' => sub { setup_channel 'verb', silent => 0; },
- 'W|warnings=s' => \&parse_warnings,
- # These long options (--Werror and --Wno-error) for backward
- # compatibility. Use -Werror and -Wno-error today.
- 'Werror' => sub { parse_warnings 'W', 'error'; },
- 'Wno-error' => sub { parse_warnings 'W', 'no-error'; },
+ 'W|warnings=s' => \@warnings,
);
use Getopt::Long;
Getopt::Long::config ("bundling", "pass_through");
@@ -8484,14 +8522,13 @@ sub parse_arguments ()
Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
or exit 1;
- if (defined $output_directory)
- {
- msg 'obsolete', "`--output-dir' is deprecated\n";
- }
- else
+ set_strictness ($strict);
+ my $cli_where = new Automake::Location;
+ set_global_option ('cygnus', $cli_where) if $cygnus;
+ set_global_option ('no-dependencies', $cli_where) if $ignore_deps;
+ for my $warning (@warnings)
{
- # In the next release we'll remove this entirely.
- $output_directory = '.';
+ &parse_warnings ('-W', $warning);
}
return unless @ARGV;
@@ -8513,20 +8550,20 @@ sub parse_arguments ()
}
elsif (exists $argopts{$ARGV[0]})
{
- fatal ("option `$ARGV[0]' requires an argument\n"
- . "Try `$0 --help' for more information.");
+ fatal ("option `$ARGV[0]' requires an argument.\n"
+ . "Try `$0 --help' for more information");
}
else
{
fatal ("unrecognized option `$ARGV[0]'.\n"
- . "Try `$0 --help' for more information.");
+ . "Try `$0 --help' for more information");
}
}
my $errspec = 0;
foreach my $arg (@ARGV)
{
- fatal ("empty argument\nTry `$0 --help' for more information.")
+ fatal ("empty argument\nTry `$0 --help' for more information")
if ($arg eq '');
# Handle $local:$input syntax.
diff --git a/bootstrap b/bootstrap
index 9f1a8d824..41f1f4e75 100755
--- a/bootstrap
+++ b/bootstrap
@@ -103,9 +103,10 @@ dosubst m4/amversion.in m4/amversion.m4
# Create temporary replacement for automake.
dosubst automake.in automake.tmp
-# Create tests/parallel-tests.am.
+# Create required makefile snippets.
cd tests
$BOOTSTRAP_SHELL ./gen-parallel-tests > parallel-tests.am
+$BOOTSTRAP_SHELL ./instspc-tests.sh --generate-makefile > instspc-tests.am
cd ..
# Run the autotools.
diff --git a/configure b/configure
index 5af3df868..e2add32d1 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for GNU Automake 1.11.
+# Generated by GNU Autoconf 2.68 for GNU Automake 1.11a.
#
# Report bugs to <bug-automake@gnu.org>.
#
@@ -560,8 +560,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU Automake'
PACKAGE_TARNAME='automake'
-PACKAGE_VERSION='1.11'
-PACKAGE_STRING='GNU Automake 1.11'
+PACKAGE_VERSION='1.11a'
+PACKAGE_STRING='GNU Automake 1.11a'
PACKAGE_BUGREPORT='bug-automake@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/automake/'
@@ -580,6 +580,8 @@ PERL_THREADS
PERL
pkgvdatadir
APIVERSION
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
am__untar
am__tar
AMTAR
@@ -650,6 +652,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_silent_rules
'
ac_precious_vars='build_alias
host_alias
@@ -1196,7 +1199,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNU Automake 1.11 to adapt to many kinds of systems.
+\`configure' configures GNU Automake 1.11a to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1265,10 +1268,17 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU Automake 1.11:";;
+ short | recursive ) echo "Configuration of GNU Automake 1.11a:";;
esac
cat <<\_ACEOF
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
+
Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <http://www.gnu.org/software/automake/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
@@ -1334,7 +1344,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU Automake configure 1.11
+GNU Automake configure 1.11a
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1351,7 +1361,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU Automake $as_me 1.11, which was
+It was created by GNU Automake $as_me 1.11a, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -1780,7 +1790,7 @@ am_AUTOCONF="${AUTOCONF-autoconf}"
am_AUTOHEADER="${AUTOHEADER-autoheader}"
-am__api_version='1.11'
+am__api_version='1.11a'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -1896,14 +1906,14 @@ esac
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
+ am_has_slept=no
for am_try in 1 2; do
- echo timestamp > conftest.file
+ echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
- rm -f conftest.file
if test "$*" != "X $srcdir/configure conftest.file" \
&& test "$*" != "X conftest.file $srcdir/configure"; then
@@ -1919,6 +1929,7 @@ if (
fi
# Just in case.
sleep 1
+ am_has_slept=yes
done
test "$2" = conftest.file
)
@@ -1931,6 +1942,16 @@ Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
@@ -2200,6 +2221,18 @@ else
fi
rmdir .tst 2>/dev/null
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+AM_BACKSLASH='\'
+
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
@@ -2222,7 +2255,7 @@ fi
# Define the identity of the package.
PACKAGE='automake'
- VERSION='1.11'
+ VERSION='1.11a'
cat >>confdefs.h <<_ACEOF
@@ -2750,7 +2783,9 @@ $as_echo "$as_me: WARNING: \`cd tests && ${MAKE-make} clean-local-check'" >&2;}
sh_errexit_works=$am_cv_sh_errexit_works
-ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile tests/Makefile tests/defs"
+ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile tests/Makefile tests/defs-static"
+
+ac_config_links="$ac_config_links tests/defs:tests/defs"
ac_config_files="$ac_config_files tests/aclocal-${APIVERSION}:tests/aclocal.in"
@@ -2902,6 +2937,14 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
: "${CONFIG_STATUS=./config.status}"
@@ -3312,7 +3355,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU Automake $as_me 1.11, which was
+This file was extended by GNU Automake $as_me 1.11a, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3335,6 +3378,7 @@ esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
+config_links="$ac_config_links"
_ACEOF
@@ -3359,6 +3403,9 @@ Usage: $0 [OPTION]... [TAG]...
Configuration files:
$config_files
+Configuration links:
+$config_links
+
Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <http://www.gnu.org/software/automake/>.
General help using GNU software: <http://www.gnu.org/gethelp/>."
@@ -3367,7 +3414,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU Automake config.status 1.11
+GNU Automake config.status 1.11a
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -3493,7 +3540,8 @@ do
"lib/am/Makefile") CONFIG_FILES="$CONFIG_FILES lib/am/Makefile" ;;
"m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
- "tests/defs") CONFIG_FILES="$CONFIG_FILES tests/defs" ;;
+ "tests/defs-static") CONFIG_FILES="$CONFIG_FILES tests/defs-static" ;;
+ "tests/defs") CONFIG_LINKS="$CONFIG_LINKS tests/defs:tests/defs" ;;
"tests/aclocal-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/aclocal-${APIVERSION}:tests/aclocal.in" ;;
"tests/automake-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/automake-${APIVERSION}:tests/automake.in" ;;
@@ -3508,6 +3556,7 @@ done
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -3696,7 +3745,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
-eval set X " :F $CONFIG_FILES "
+eval set X " :F $CONFIG_FILES :L $CONFIG_LINKS "
shift
for ac_tag
do
@@ -3916,7 +3965,38 @@ which seems to be undefined. Please make sure it is defined" >&2;}
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
+ :L)
+ #
+ # CONFIG_LINK
+ #
+
+ if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+ :
+ else
+ # Prefer the file from the source tree if names are identical.
+ if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+ ac_source=$srcdir/$ac_source
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
+$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
+ if test ! -r "$ac_source"; then
+ as_fn_error $? "$ac_source: file not found" "$LINENO" 5
+ fi
+ rm -f "$ac_file"
+
+ # Try a relative symlink, then a hard link, then a copy.
+ case $ac_source in
+ [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+ *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+ esac
+ ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+ ln "$ac_source" "$ac_file" 2>/dev/null ||
+ cp -p "$ac_source" "$ac_file" ||
+ as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+ fi
+ ;;
esac
diff --git a/configure.ac b/configure.ac
index de4583d67..577541cb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_INIT([GNU Automake], [1.11], [bug-automake@gnu.org])
+AC_INIT([GNU Automake], [1.11a], [bug-automake@gnu.org])
m4_ifndef([AC_PACKAGE_URL],
[AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/automake/])])
@@ -32,7 +32,8 @@ AC_CANONICAL_BUILD
AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
-AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests parallel-tests])
+AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests
+ parallel-tests silent-rules])
# The API version is the base version. We must guarantee
# compatibility for all releases with the same API version.
@@ -202,8 +203,9 @@ AC_CONFIG_FILES([
lib/am/Makefile
m4/Makefile
tests/Makefile
- tests/defs
+ tests/defs-static
])
+AC_CONFIG_LINKS([tests/defs:tests/defs])
AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
[chmod +x tests/aclocal-${APIVERSION}],
[APIVERSION=$APIVERSION])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index bb48fa238..01cf66306 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -27,12 +27,12 @@ dist_man1_MANS = \
$(srcdir)/automake-$(APIVERSION).1
MAINTAINERCLEANFILES = $(dist_man1_MANS)
update_mans = \
- PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
+ $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
export PATH && \
$(HELP2MAN) --output=$@
$(dist_man1_MANS): $(top_srcdir)/configure.ac
$(srcdir)/aclocal.1 $(srcdir)/automake.1:
- f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \
+ $(AM_V_GEN)f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \
echo ".so man1/$$f-$(APIVERSION).1" > $@
$(srcdir)/aclocal-$(APIVERSION).1: $(srcdir)/../aclocal.in
$(update_mans) aclocal-$(APIVERSION)
@@ -70,7 +70,7 @@ dist_doc_DATA = $(srcdir)/amhello-1.0.tar.gz
# aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
# configure in tests/.
$(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) $(top_srcdir)/configure.ac
- PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
+ $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
export PATH && \
cd $(srcdir)/amhello && \
ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \
diff --git a/doc/Makefile.in b/doc/Makefile.in
index c1739e546..7bc40a694 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -59,16 +59,43 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
- $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+ $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
+AM_V_DVIPS = $(am__v_DVIPS_$(V))
+am__v_DVIPS_ = $(am__v_DVIPS_$(AM_DEFAULT_VERBOSITY))
+am__v_DVIPS_0 = @echo " DVIPS " $@;
+AM_V_MAKEINFO = $(am__v_MAKEINFO_$(V))
+am__v_MAKEINFO_ = $(am__v_MAKEINFO_$(AM_DEFAULT_VERBOSITY))
+am__v_MAKEINFO_0 = @echo " MAKEINFO" $@;
+AM_V_INFOHTML = $(am__v_INFOHTML_$(V))
+am__v_INFOHTML_ = $(am__v_INFOHTML_$(AM_DEFAULT_VERBOSITY))
+am__v_INFOHTML_0 = @echo " INFOHTML" $@;
+AM_V_TEXI2DVI = $(am__v_TEXI2DVI_$(V))
+am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_$(AM_DEFAULT_VERBOSITY))
+am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@;
+AM_V_TEXI2PDF = $(am__v_TEXI2PDF_$(V))
+am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_$(AM_DEFAULT_VERBOSITY))
+am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@;
+AM_V_texinfo = $(am__v_texinfo_$(V))
+am__v_texinfo_ = $(am__v_texinfo_$(AM_DEFAULT_VERBOSITY))
+am__v_texinfo_0 = -q
+AM_V_texidevnull = $(am__v_texidevnull_$(V))
+am__v_texidevnull_ = $(am__v_texidevnull_$(AM_DEFAULT_VERBOSITY))
+am__v_texidevnull_0 = > /dev/null
INFO_DEPS = $(srcdir)/automake.info
TEXINFO_TEX = $(top_srcdir)/lib/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/lib
@@ -114,6 +141,7 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -212,7 +240,7 @@ dist_man1_MANS = \
MAINTAINERCLEANFILES = $(dist_man1_MANS)
update_mans = \
- PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
+ $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
export PATH && \
$(HELP2MAN) --output=$@
@@ -278,7 +306,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
.texi.info:
- restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+ $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
am__cwd=`pwd` && $(am__cd) $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
@@ -300,18 +328,18 @@ $(am__aclocal_m4_deps):
rm -rf $$backupdir; exit $$rc
.texi.dvi:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) $<
+ $(TEXI2DVI) $(AM_V_texinfo) $< $(AM_V_texidevnull)
.texi.pdf:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) $<
+ $(TEXI2PDF) $(AM_V_texinfo) $< $(AM_V_texidevnull)
.texi.html:
- rm -rf $(@:.html=.htp)
- if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
+ $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $(@:.html=.htp) $<; \
then \
rm -rf $@; \
@@ -346,8 +374,8 @@ mostlyclean-vti:
maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
.dvi.ps:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- $(DVIPS) -o $@ $<
+ $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) $(AM_V_texinfo) -o $@ $<
uninstall-dvi-am:
@$(NORMAL_UNINSTALL)
@@ -548,6 +576,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -785,24 +827,25 @@ uninstall-man: uninstall-man1
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-aminfo \
- clean-generic ctags dist-info distclean distclean-generic \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am \
- install-dist_docDATA install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-man1 install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-aminfo maintainer-clean-generic \
- maintainer-clean-vti mostlyclean mostlyclean-aminfo \
- mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am tags \
- uninstall uninstall-am uninstall-dist_docDATA uninstall-dvi-am \
- uninstall-html-am uninstall-info-am uninstall-man \
- uninstall-man1 uninstall-pdf-am uninstall-ps-am
+ clean-generic cscopelist ctags dist-info distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dist_docDATA install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man1 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-aminfo \
+ maintainer-clean-generic maintainer-clean-vti mostlyclean \
+ mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
+ pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-dist_docDATA uninstall-dvi-am uninstall-html-am \
+ uninstall-info-am uninstall-man uninstall-man1 \
+ uninstall-pdf-am uninstall-ps-am
$(dist_man1_MANS): $(top_srcdir)/configure.ac
$(srcdir)/aclocal.1 $(srcdir)/automake.1:
- f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \
+ $(AM_V_GEN)f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \
echo ".so man1/$$f-$(APIVERSION).1" > $@
$(srcdir)/aclocal-$(APIVERSION).1: $(srcdir)/../aclocal.in
$(update_mans) aclocal-$(APIVERSION)
@@ -814,7 +857,7 @@ $(srcdir)/automake-$(APIVERSION).1: $(srcdir)/../automake.in
# aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
# configure in tests/.
$(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) $(top_srcdir)/configure.ac
- PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
+ $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
export PATH && \
cd $(srcdir)/amhello && \
ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \
diff --git a/doc/automake.texi b/doc/automake.texi
index 3c4bdddc1..f89971b36 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -320,9 +320,14 @@ Support for test suites
* DejaGnu Tests:: Interfacing with the external testing framework
* Install Tests:: Running tests on installed packages
+Changing Automake's Behavior
+
+* Options generalities:: Semantics of Automake option
+* List of Automake options:: A comprehensive list of Automake options
+
Miscellaneous Rules
-* Tags:: Interfacing to etags and mkid
+* Tags:: Interfacing to cscope, etags and mkid
* Suffixes:: Handling new file extensions
* Multilibs:: Support for multilibs.
@@ -1899,7 +1904,9 @@ The valid strictness levels are:
Automake will check for only those things that are absolutely
required for proper operations. For instance, whereas GNU standards
dictate the existence of a @file{NEWS} file, it will not be required in
-this mode. The name comes from the fact that Automake is intended to be
+this mode. This strictness will also turn off some warnings by default
+(among them, portability warnings).
+The name comes from the fact that Automake is intended to be
used for GNU programs; these relaxed rules are not the standard mode of
operation.
@@ -2217,6 +2224,10 @@ copies are updated before each release, but we mention the original
source in case you need more recent versions.
@table @code
+@item ar-lib
+This is a wrapper primarily for the Microsoft lib archiver, to make
+it more POSIX-like.
+
@item ansi2knr.c
@itemx ansi2knr.1
These two files are used for de-ANSI-fication support (obsolete
@@ -2225,7 +2236,11 @@ These two files are used for de-ANSI-fication support (obsolete
@item compile
This is a wrapper for compilers that do not accept options @option{-c}
and @option{-o} at the same time. It is only used when absolutely
-required. Such compilers are rare.
+required. Such compilers are rare, with the Microsoft C/C++ Compiler
+as the most notable exception. This wrapper also makes the following
+common options available for that compiler, while performing file name
+translation where needed: @option{-I}, @option{-L}, @option{-l},
+@option{-Wl,} and @option{-Xlinker}.
@item config.guess
@itemx config.sub
@@ -2892,12 +2907,12 @@ The Autoconf Manual}.
Automake will look for various helper scripts, such as
@file{install-sh}, in the directory named in this macro invocation.
@c This list is accurate relative to version 1.8
-(The full list of scripts is: @file{config.guess}, @file{config.sub},
-@file{depcomp}, @file{elisp-comp}, @file{compile}, @file{install-sh},
-@file{ltmain.sh}, @file{mdate-sh}, @file{missing}, @file{mkinstalldirs},
-@file{py-compile}, @file{texinfo.tex}, and @file{ylwrap}.) Not all
-scripts are always searched for; some scripts will only be sought if the
-generated @file{Makefile.in} requires them.
+(The full list of scripts is: @file{ar-lib}, @file{config.guess},
+@file{config.sub}, @file{depcomp}, @file{elisp-comp}, @file{compile},
+@file{install-sh}, @file{ltmain.sh}, @file{mdate-sh}, @file{missing},
+@file{mkinstalldirs}, @file{py-compile}, @file{texinfo.tex}, and
+@file{ylwrap}.) Not all scripts are always searched for; some scripts
+will only be sought if the generated @file{Makefile.in} requires them.
If @code{AC_CONFIG_AUX_DIR} is not given, the scripts are looked for in
their standard locations. For @file{mdate-sh},
@@ -3967,19 +3982,6 @@ Add support for the @uref{http://dmalloc.com/, Dmalloc package}. If
the user runs @command{configure} with @option{--with-dmalloc}, then
define @code{WITH_DMALLOC} and add @option{-ldmalloc} to @code{LIBS}.
-@item AM_WITH_REGEX
-@acindex AM_WITH_REGEX
-@vindex WITH_REGEX
-@opindex --with-regex
-@cindex regex package
-@cindex rx package
-Adds @option{--with-regex} to the @command{configure} command line. If
-specified (the default), then the @samp{regex} regular expression
-library is used, @file{regex.o} is put into @code{LIBOBJS}, and
-@code{WITH_REGEX} is defined. If @option{--without-regex} is given, then
-the @code{rx} regular expression library is used, and @file{rx.o} is put
-into @code{LIBOBJS}.
-
@end table
@@ -4055,6 +4057,21 @@ system. If so, set the shell variable @code{am_cv_sys_posix_termios} to
@samp{yes}. If not, set the variable to @samp{no}. This macro is obsolete,
you should use Autoconf's @code{AC_SYS_POSIX_TERMIOS} instead.
+@item AM_WITH_REGEX
+@acindex AM_WITH_REGEX
+@vindex WITH_REGEX
+@opindex --with-regex
+@cindex regex package
+@cindex rx package
+Adds @option{--with-regex} to the @command{configure} command line. If
+specified (the default), then the @samp{regex} regular expression
+library is used, @file{regex.o} is put into @code{LIBOBJS}, and
+@code{WITH_REGEX} is defined. If @option{--without-regex} is given, then
+the @samp{rx} regular expression library is used, and @file{rx.o} is put
+into @code{LIBOBJS}. This macro is obsolete now (since @samp{rx} doesn't
+seem to be maintained), and will be removed in a future version of
+Automake. Consider using gnulib if you need regex functionality.
+
@end table
@@ -4745,11 +4762,12 @@ this purpose.
@cindex @code{_DEPENDENCIES}, defined
@vindex maude_DEPENDENCIES
+@vindex EXTRA_maude_DEPENDENCIES
It is also occasionally useful to have a program depend on some other
target that is not actually part of that program. This can be done
-using the @code{@var{prog}_DEPENDENCIES} variable. Each program
-depends on the contents of such a variable, but no further
-interpretation is done.
+using either the @code{@var{prog}_DEPENDENCIES} or the
+@code{EXTRA_@var{prog}_DEPENDENCIES} variable. Each program depends on
+the contents both variables, but no further interpretation is done.
Since these dependencies are associated to the link rule used to
create the programs they should normally list files used by the link
@@ -4772,6 +4790,10 @@ generated.
@ref{Conditional Sources} shows a situation where @code{_DEPENDENCIES}
may be used.
+The @code{EXTRA_@var{prog}_DEPENDENCIES} may be useful for cases where
+you merely want to augment the @command{automake}-generated
+@code{@var{prog}_DEPENDENCIES} rather than replacing it.
+
@cindex @code{LDADD} and @option{-l}
@cindex @option{-l} and @code{LDADD}
We recommend that you avoid using @option{-l} options in @code{LDADD}
@@ -5639,6 +5661,7 @@ option, so they should not be mode-specific options (those belong to
the compiler or linker flags). @xref{Libtool Flags}.
@item maude_DEPENDENCIES
+@itemx EXTRA_maude_DEPENDENCIES
It is also occasionally useful to have a target (program or library)
depend on some other file that is not actually part of that target.
This can be done using the @code{_DEPENDENCIES} variable. Each
@@ -5669,6 +5692,10 @@ compilation using an @code{AC_SUBST} variable that contains a list of
objects. @xref{Conditional Sources}, and @ref{Conditional Libtool
Sources}.
+The @code{EXTRA_*_DEPENDENCIES} variable may be useful for cases where
+you merely want to augment the @command{automake}-generated
+@code{_DEPENDENCIES} variable rather than replacing it.
+
@item maude_LINK
You can override the linker on a per-program basis. By default the
linker is chosen according to the languages used by the program. For
@@ -5879,9 +5906,10 @@ However there is no need to list the corresponding sources in
automatically adds @samp{$(LIBOBJS)} and @samp{$(ALLOCA)} to the
dependencies, and it will discover the list of corresponding source
files automatically (by tracing the invocations of the
-@code{AC_LIBSOURCE} Autoconf macros). However, if you have already
-defined @samp{*_DEPENDENCIES} explicitly for an unrelated reason, then
-you have to add these variables manually.
+@code{AC_LIBSOURCE} Autoconf macros). If you have already defined
+@samp{*_DEPENDENCIES} explicitly for an unrelated reason, then you
+either need to add these variables manually, or use
+@samp{EXTRA_*_DEPENDENCIES} instead of @samp{*_DEPENDENCIES}.
These variables are usually used to build a portability library that
is linked with all the programs of the project. We now review a
@@ -8504,15 +8532,24 @@ Automake generates rules to provide archives of the project for
distributions in various formats. Their targets are:
@table @asis
+@vindex BZIP2
@item @code{dist-bzip2}
Generate a bzip2 tar archive of the distribution. bzip2 archives are
frequently smaller than gzipped archives.
+By default, this rule makes @samp{bzip2} use a compression option of @option{-9}.
+To make it use a different one, set the @env{BZIP2} environment variable.
+For example, @samp{make dist-bzip2 BZIP2=-7}.
@trindex dist-bzip2
@item @code{dist-gzip}
Generate a gzip tar archive of the distribution.
@trindex dist-gzip
+@item @code{dist-lzip}
+Generate an @samp{lzip} tar archive of the distribution. @command{lzip}
+archives are frequently smaller than @command{bzip2}-compressed archives.
+@trindex dist-lzip
+
@item @code{dist-lzma}
Generate an @samp{lzma} tar archive of the distribution. @command{lzma}
archives are frequently smaller than @command{bzip2}-compressed archives.
@@ -8524,10 +8561,15 @@ instead.
Generate a shar archive of the distribution.
@trindex dist-shar
+@vindex XZ_OPT
@item @code{dist-xz}
Generate an @samp{xz} tar archive of the distribution. @command{xz}
archives are frequently smaller than @command{bzip2}-compressed archives.
The @samp{xz} format displaces the obsolete @samp{lzma} format.
+By default, this rule makes @samp{xz} use a compression option of @option{-9}.
+To make it use a different one, set the @env{XZ_OPT} environment variable.
+For example, run this command to use the default compression ratio, but
+with a progress indicator: @samp{make dist-xz XZ_OPT=-7e}.
@trindex dist-xz
@item @code{dist-zip}
@@ -9017,8 +9059,16 @@ will now be rerun each time the version number is bumped, when only
@node Options
@chapter Changing Automake's Behavior
+@menu
+* Options generalities:: Semantics of Automake option
+* List of Automake options:: A comprehensive list of Automake options
+@end menu
+
+@node Options generalities
+@section Options generalities
+
Various features of Automake can be controlled by options. Except where
-noted otherwise, options can be specified in one of several ways: Most
+noted otherwise, options can be specified in one of several ways. Most
options can be applied on a per-@file{Makefile} basis when listed in a
special @file{Makefile} variable named @code{AUTOMAKE_OPTIONS}. Some
of these options only make sense when specified in the toplevel
@@ -9028,7 +9078,43 @@ of these options only make sense when specified in the toplevel
require changes to the @command{configure} script can only be specified
there. These are annotated below.
-Currently understood options are:
+As a general rule, options specified in @code{AUTOMAKE_OPTIONS} take
+precedence over those specified in @code{AM_INIT_AUTOMAKE}, which in
+turn take precedence over those specified on the command line.
+
+Also, some care must be taken about the interactions among strictness
+level and warning categories. As a general rule, strictness-implied
+warnings are overridden by those specified by explicit options. For
+example, even if @samp{portability} warnings are disabled by default
+in @option{foreign} strictness, an usage like this will end up enabling
+them:
+
+@example
+AUTOMAKE_OPTIONS = -Wportability foreign
+@end example
+
+However, a strictness level specified in a higher-priority context
+will override all the explicit warnings specified in a lower-priority
+context. For example, if @file{configure.ac} contains:
+
+@example
+AM_INIT_AUTOMAKE([-Wportability])
+@end example
+
+@noindent
+and @file{Makefile.am} contains:
+
+@example
+AUTOMAKE_OPTIONS = foreign
+@end example
+
+@noindent
+then @samp{portability} warnings will be @emph{disabled} in
+@file{Makefile.am}.
+
+@node List of Automake options
+@section List of Automake options
+
@vindex AUTOMAKE_OPTIONS
@table @asis
@@ -9081,6 +9167,12 @@ Cause @command{dejagnu}-specific rules to be generated. @xref{DejaGnu Tests}.
Hook @code{dist-bzip2} to @code{dist}.
@trindex dist-bzip2
+@item @option{dist-lzip}
+@cindex Option, @option{dist-lzip}
+@opindex dist-lzip
+Hook @code{dist-lzip} to @code{dist}.
+@trindex dist-lzip
+
@item @option{dist-lzma}
@cindex Option, @option{dist-lzma}
@opindex dist-lzma
@@ -9353,7 +9445,8 @@ In order to use this option with C sources, you should add
These three mutually exclusive options select the tar format to use
when generating tarballs with @samp{make dist}. (The tar file created
is then compressed according to the set of @option{no-dist-gzip},
-@option{dist-bzip2}, @option{dist-xz} and @option{dist-tarZ} options in use.)
+@option{dist-bzip2}, @option{dist-lzip}, @option{dist-tarZ} and
+@option{dist-xz} options in use.)
These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
(@pxref{Macros}) because they can require additional configure checks.
@@ -9425,7 +9518,7 @@ the @code{AM_INIT_AUTOMAKE} macro in @file{configure.ac}.
There are a few rules and variables that didn't fit anywhere else.
@menu
-* Tags:: Interfacing to etags and mkid
+* Tags:: Interfacing to cscope, etags and mkid
* Suffixes:: Handling new file extensions
* Multilibs:: Support for multilibs.
@end menu
@@ -9487,6 +9580,14 @@ Automake will also generate an @code{ID} rule that will run
directory-by-directory basis.
@trindex id
+Similarly, the @code{cscope} rule will create a list of all the source
+files in the tree and run @command{cscope} to build an inverted index
+database. The variable @code{CSCOPE} is the name of the program to invoke
+(by default @command{cscope}); @code{CSCOPEFLAGS} and
+@code{CSCOPE_ARGS} can be used by the user to pass additional flags and
+file names respectively, while @code{AM_CSCOPEFLAGS} can be used by the
+@file{Makefile.am}.
+
Finally, Automake also emits rules to support the
@uref{http://www.gnu.org/software/global/, GNU Global Tags program}.
The @code{GTAGS} rule runs Global Tags and puts the
@@ -13121,4 +13222,4 @@ parentheses is the number of generated test cases.
@c LocalWords: LTALLOCA MALLOC malloc memcmp strdup alloca libcompat xyz DFOO
@c LocalWords: unprefixed buildable preprocessed DBAZ DDATADIR WARNINGCFLAGS
@c LocalWords: LIBFOOCFLAGS LIBFOOLDFLAGS ftable testSubDir obj LIBTOOLFLAGS
-@c LocalWords: barexec Pinard's automatize initialize lzma xz
+@c LocalWords: barexec Pinard's automatize initialize lzip lzma xz cscope
diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm
index aaca97920..470e6c72a 100644
--- a/lib/Automake/ChannelDefs.pm
+++ b/lib/Automake/ChannelDefs.pm
@@ -44,7 +44,7 @@ Automake::ChannelDefs - channel definitions for Automake and helper functions
verb ($MESSAGE, [%OPTIONS]);
switch_warning ($CATEGORY);
parse_WARNINGS ();
- parse_warning ($OPTION, $ARGUMENT);
+ parse_warnings ($OPTION, $ARGUMENT);
Automake::ChannelDefs::set_strictness ($STRICTNESS_NAME);
=head1 DESCRIPTION
@@ -163,6 +163,10 @@ register_channel 'verb', type => 'debug', silent => 1, uniq_part => UP_NONE,
ordered => 0;
register_channel 'note', type => 'debug', silent => 0;
+setup_channel_type 'warning', header => 'warning: ';
+setup_channel_type 'error', header => 'error: ';
+setup_channel_type 'fatal', header => 'error: ';
+
=head2 FUNCTIONS
=over 4
@@ -308,7 +312,7 @@ sub parse_WARNINGS ()
}
}
-=item C<parse_warning ($OPTION, $ARGUMENT)>
+=item C<parse_warnings ($OPTION, $ARGUMENT)>
Parse the argument of C<--warning=CATEGORY> or C<-WCATEGORY>.
@@ -365,7 +369,7 @@ sub set_strictness ($)
}
else
{
- prog_error "level `$name' not recognized\n";
+ prog_error "level `$name' not recognized";
}
}
@@ -381,6 +385,8 @@ Written by Alexandre Duret-Lutz E<lt>F<adl@gnu.org>E<gt>.
=cut
+1;
+
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
## perl-indent-level: 2
diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm
index 9a2732c89..06f044362 100644
--- a/lib/Automake/Channels.pm
+++ b/lib/Automake/Channels.pm
@@ -164,7 +164,7 @@ functions. The possible keys, with their default value are:
The type of the channel. One of C<'debug'>, C<'warning'>, C<'error'>, or
C<'fatal'>. Fatal messages abort the program when they are output.
Error messages update the exit status. Debug and warning messages are
-harmless, except that warnings can be treated as errors of
+harmless, except that warnings are treated as errors if
C<$warnings_are_errors> is set.
=item C<exit_code =E<gt> 1>
@@ -204,10 +204,14 @@ C<US_LOCAL>, and C<US_GLOBAL> constants above.
=item C<header =E<gt> ''>
A string to prepend to each message emitted through this channel.
+With partial messages, only the first part will have C<header>
+prepended.
=item C<footer =E<gt> ''>
A string to append to each message emitted through this channel.
+With partial messages, only the final part will have C<footer>
+appended.
=item C<backtrace =E<gt> 0>
@@ -399,20 +403,24 @@ sub _format_sub_message ($$)
return $leader . join ("\n" . $leader, split ("\n", $message)) . "\n";
}
+# Store partial messages here. (See the 'partial' option.)
+use vars qw ($partial);
+$partial = '';
+
# _format_message ($LOCATION, $MESSAGE, %OPTIONS)
# -----------------------------------------------
# Format the message. Return a string ready to print.
sub _format_message ($$%)
{
my ($location, $message, %opts) = @_;
- my $msg = '';
+ my $msg = ($partial eq '' ? $opts{'header'} : '') . $message
+ . ($opts{'partial'} ? '' : $opts{'footer'});
if (ref $location)
{
# If $LOCATION is a reference, assume it's an instance of the
# Automake::Location class and display contexts.
my $loc = $location->get || $me;
- $msg = _format_sub_message ("$loc: ", $opts{'header'}
- . $message . $opts{'footer'});
+ $msg = _format_sub_message ("$loc: ", $msg);
for my $pair ($location->get_contexts)
{
$msg .= _format_sub_message ($pair->[0] . ": ", $pair->[1]);
@@ -421,8 +429,7 @@ sub _format_message ($$%)
else
{
$location ||= $me;
- $msg = _format_sub_message ("$location: ", $opts{'header'}
- . $message . $opts{'footer'});
+ $msg = _format_sub_message ("$location: ", $msg);
}
return $msg;
}
@@ -484,10 +491,6 @@ sub _dequeue ($)
}
-# Store partial messages here. (See the 'partial' option.)
-use vars qw ($partial);
-$partial = '';
-
# _print_message ($LOCATION, $MESSAGE, %OPTIONS)
# ----------------------------------------------
# Format the message, check duplicates, and print it.
@@ -511,6 +514,9 @@ sub _print_message ($$%)
$partial = '';
}
+ msg ('note', '', 'warnings are treated as errors', uniq_scope => US_GLOBAL)
+ if ($opts{'type'} eq 'warning' && $warnings_are_errors);
+
# Check for duplicate message if requested.
my $to_filter;
if ($opts{'uniq_part'} ne UP_NONE)
@@ -674,7 +680,7 @@ Override the options of C<$channel> with those specified by C<%options>.
sub setup_channel ($%)
{
my ($name, %opts) = @_;
- confess "channel $name doesn't exist" unless exists $channels{$name};
+ confess "unknown channel $name" unless exists $channels{$name};
_merge_options %{$channels{$name}}, %opts;
}
diff --git a/lib/Automake/Condition.pm b/lib/Automake/Condition.pm
index 2d649f686..5c54b8beb 100644
--- a/lib/Automake/Condition.pm
+++ b/lib/Automake/Condition.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2001, 2002, 2003, 2006, 2008 Free Software
+# Copyright (C) 1997, 2001, 2002, 2003, 2006, 2008, 2009 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -180,18 +180,21 @@ sub new ($;@)
};
bless $self, $class;
- # Accept strings like "FOO BAR" as shorthand for ("FOO", "BAR").
- @conds = map { split (' ', $_) } @conds;
-
for my $cond (@conds)
{
- next if $cond eq 'TRUE';
-
# Catch some common programming errors:
# - A Condition passed to new
confess "`$cond' is a reference, expected a string" if ref $cond;
# - A Condition passed as a string to new
confess "`$cond' does not look like a condition" if $cond =~ /::/;
+ }
+
+ # Accept strings like "FOO BAR" as shorthand for ("FOO", "BAR").
+ @conds = map { split (' ', $_) } @conds;
+
+ for my $cond (@conds)
+ {
+ next if $cond eq 'TRUE';
# Detect cases when @conds can be simplified to FALSE.
if (($cond eq 'FALSE' && $#conds > 0)
@@ -250,7 +253,7 @@ except those of C<$minuscond>. This is the opposite of C<merge>.
sub strip ($$)
{
my ($self, $minus) = @_;
- my @res = grep { not $minus->has ($_) } $self->conds;
+ my @res = grep { not $minus->_has ($_) } $self->conds;
return new Automake::Condition @res;
}
@@ -274,7 +277,7 @@ sub conds ($ )
}
# Undocumented, shouldn't be needed outside of this class.
-sub has ($$)
+sub _has ($$)
{
my ($self, $cond) = @_;
return exists $self->{'hash'}{$cond};
@@ -289,7 +292,7 @@ Return 1 iff this condition is always false.
sub false ($ )
{
my ($self) = @_;
- return $self->has ('FALSE');
+ return $self->_has ('FALSE');
}
=item C<$cond-E<gt>true>
@@ -426,7 +429,7 @@ sub true_when ($$)
# exists in $WHEN.
foreach my $cond ($self->conds)
{
- return 0 unless $when->has ($cond);
+ return 0 unless $when->_has ($cond);
}
return 1;
}
@@ -518,6 +521,8 @@ sub multiply ($@)
return (values %res);
}
+=back
+
=head2 Other helper functions
=over 4
@@ -615,6 +620,8 @@ sub conditional_negate ($)
return $cond;
}
+=back
+
=head1 SEE ALSO
L<Automake::DisjConditions>.
diff --git a/lib/Automake/Configure_ac.pm b/lib/Automake/Configure_ac.pm
index e2bebef77..357403545 100644
--- a/lib/Automake/Configure_ac.pm
+++ b/lib/Automake/Configure_ac.pm
@@ -1,4 +1,5 @@
-# Copyright (C) 2003, 2005, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
+# Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -49,6 +50,20 @@ Automake::Configure_ac - Locate configure.ac or configure.in.
my $file_name = find_configure_ac ($dir);
my $file_name = require_configure_ac ($dir);
+=over 4
+
+=back
+
+=head2 Functions
+
+=over 4
+
+=item C<$configure_ac = find_configure_ac ([$directory])>
+
+Find a F<configure.ac> or F<configure.in> file in C<$directory>,
+defaulting to the current directory. Complain if both files are present.
+Return the name of the file found, or the former if neither is present.
+
=cut
sub find_configure_ac (;@)
@@ -66,7 +81,7 @@ sub find_configure_ac (;@)
{
msg ('unsupported',
"`$configure_ac' and `$configure_in' both present.\n"
- . "proceeding with `$configure_ac'.");
+ . "proceeding with `$configure_ac'");
}
return $configure_ac
}
@@ -78,6 +93,12 @@ sub find_configure_ac (;@)
}
+=item C<$configure_ac = require_configure_ac ([$directory])>
+
+Like C<find_configure_ac>, but fail if neither is present.
+
+=cut
+
sub require_configure_ac (;$)
{
my $res = find_configure_ac (@_);
diff --git a/lib/Automake/Location.pm b/lib/Automake/Location.pm
index 613dc80ab..1dc81dc7a 100644
--- a/lib/Automake/Location.pm
+++ b/lib/Automake/Location.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2008, 2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ Automake::Location - a class for location tracking, with a stack of contexts
...
}
- # Pop a context, and reset the location from the previous context.
+ # Pop a context, and reset the location to the previous context.
$where->pop_context;
# Clone a Location. Use this when storing the state of a location
@@ -84,6 +84,16 @@ You can pass a C<Location> to C<Automake::Channels::msg>.
=cut
+=head2 Methods
+
+=over
+
+=item C<$where = new Automake::Location ([$position])>
+
+Create and return a new Location object.
+
+=cut
+
sub new ($;$)
{
my ($class, $position) = @_;
@@ -95,18 +105,36 @@ sub new ($;$)
return $self;
}
+=item C<$location-E<gt>set ($position)>
+
+Change the location to be C<$position>.
+
+=cut
+
sub set ($$)
{
my ($self, $position) = @_;
$self->{'position'} = $position;
}
+=item C<$location-E<gt>get>
+
+Get the location (without context).
+
+=cut
+
sub get ($)
{
my ($self) = @_;
return $self->{'position'};
}
+=item C<$location-E<gt>push_context ($context)>
+
+Push a context to the location.
+
+=cut
+
sub push_context ($$)
{
my ($self, $context) = @_;
@@ -114,6 +142,12 @@ sub push_context ($$)
$self->set (undef);
}
+=item C<$where = $location-E<gt>pop_context ($context)>
+
+Pop a context, and reset the location to the previous context.
+
+=cut
+
sub pop_context ($)
{
my ($self) = @_;
@@ -122,12 +156,25 @@ sub pop_context ($)
return @{$pair};
}
+=item C<@contexts = $location-E<gt>get_contexts>
+
+Return the array of contexts.
+
+=cut
+
sub get_contexts ($)
{
my ($self) = @_;
return @{$self->{'contexts'}};
}
+=item C<$location = $location-E<gt>clone>
+
+Clone a Location. Use this when storing the state of a location
+that would otherwise be modified.
+
+=cut
+
sub clone ($)
{
my ($self) = @_;
@@ -140,6 +187,12 @@ sub clone ($)
return $other;
}
+=item C<$res = $location-E<gt>dump>
+
+Print the location and the stack of context (for debugging).
+
+=cut
+
sub dump ($)
{
my ($self) = @_;
@@ -152,6 +205,13 @@ sub dump ($)
return $res;
}
+=item C<@array = $location-E<gt>serialize>
+
+Serialize a Location object (for passing through a thread queue,
+for example).
+
+=cut
+
sub serialize ($)
{
my ($self) = @_;
@@ -166,6 +226,12 @@ sub serialize ($)
return @serial;
}
+=item C<new Automake::Location::deserialize ($queue)>
+
+De-serialize: recreate a Location object from a queue.
+
+=cut
+
sub deserialize ($)
{
my ($queue) = @_;
@@ -179,6 +245,8 @@ sub deserialize ($)
return $self;
}
+=back
+
=head1 SEE ALSO
L<Automake::Channels>
diff --git a/lib/Automake/Makefile.am b/lib/Automake/Makefile.am
index 0858b6875..e4c2572f1 100644
--- a/lib/Automake/Makefile.am
+++ b/lib/Automake/Makefile.am
@@ -64,10 +64,9 @@ do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
## $(datadir) or other do_subst'ituted variables change.
## Use chmod a-w to prevent people from editing the wrong file by accident.
Config.pm: Config.in Makefile
- rm -f Config.tmp Config.pm
- $(do_subst) $(srcdir)/Config.in >Config.tmp
- chmod +x Config.tmp
- chmod a-w Config.tmp
- mv -f Config.tmp Config.pm
+ $(AM_V_GEN)rm -f Config.tmp Config.pm
+ $(AM_V_at)$(do_subst) $(srcdir)/Config.in >Config.tmp
+ $(AM_V_at)chmod a-w Config.tmp
+ $(AM_V_at)mv -f Config.tmp Config.pm
EXTRA_DIST = Config.in
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index 5f051ed57..20b19572b 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -58,14 +58,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
- $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+ $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -134,6 +140,7 @@ am__relativize = \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -406,6 +413,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -469,6 +480,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -635,17 +660,18 @@ ps-am:
uninstall-am: uninstall-dist_perllibDATA uninstall-nodist_perllibDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am \
- install-dist_perllibDATA install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man \
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dist_perllibDATA install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
install-nodist_perllibDATA install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
@@ -655,11 +681,10 @@ uninstall-am: uninstall-dist_perllibDATA uninstall-nodist_perllibDATA
Config.pm: Config.in Makefile
- rm -f Config.tmp Config.pm
- $(do_subst) $(srcdir)/Config.in >Config.tmp
- chmod +x Config.tmp
- chmod a-w Config.tmp
- mv -f Config.tmp Config.pm
+ $(AM_V_GEN)rm -f Config.tmp Config.pm
+ $(AM_V_at)$(do_subst) $(srcdir)/Config.in >Config.tmp
+ $(AM_V_at)chmod a-w Config.tmp
+ $(AM_V_at)mv -f Config.tmp Config.pm
# 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.
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 9543aa592..778167aed 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -76,6 +76,12 @@ F<Makefile.am>s.
use vars '%_options'; # From AUTOMAKE_OPTIONS
use vars '%_global_options'; # from AM_INIT_AUTOMAKE or the command line.
+# Whether process_option_list has already been called for the current
+# Makefile.am.
+use vars '$_options_processed';
+# Whether process_global_option_list has already been called.
+use vars '$_global_options_processed';
+
=head2 Constants
=over 4
@@ -135,6 +141,7 @@ previous F<Makefile.am>.
sub reset ()
{
+ $_options_processed = 0;
%_options = %_global_options;
# The first time we are run,
# remember the current setting as the default.
@@ -222,29 +229,39 @@ sub unset_global_option ($)
}
-=item C<process_option_list ($where, @options)>
+=item C<process_option_list (@list)>
+
+=item C<process_global_option_list (@list)>
-=item C<process_global_option_list ($where, @options)>
+Process Automake's option lists. C<@list> should be a list of hash
+references with keys C<option> and C<where>, where C<option> is an
+option as they occur in C<AUTOMAKE_OPTIONS> or C<AM_INIT_AUTOMAKE>,
+and C<where> is the location where that option occurred.
-Process Automake's option lists. C<@options> should be a list of
-words, as they occur in C<AUTOMAKE_OPTIONS> or C<AM_INIT_AUTOMAKE>.
+These functions should be called at most once for each set of options
+having the same precedence; i.e., do not call it twice for two options
+from C<AM_INIT_AUTOMAKE>.
Return 1 on error, 0 otherwise.
=cut
# $BOOL
-# _process_option_list (\%OPTIONS, $WHERE, @OPTIONS)
-# --------------------------------------------------
-# Process a list of options. Return 1 on error, 0 otherwise.
-# \%OPTIONS is the hash to fill with options data, $WHERE is
-# the location where @OPTIONS occurred.
-sub _process_option_list (\%$@)
+# _process_option_list (\%OPTIONS, @LIST)
+# ------------------------------------------
+# Process a list of options. \%OPTIONS is the hash to fill with options
+# data. @LIST is a list of options as get passed to public subroutines
+# process_option_list() and process_global_option_list() (see POD
+# documentation above).
+sub _process_option_list (\%@)
{
- my ($options, $where, @list) = @_;
+ my ($options, @list) = @_;
+ my @warnings = ();
- foreach (@list)
+ foreach my $h (@list)
{
+ local $_ = $h->{'option'};
+ my $where = $h->{'where'};
$options->{$_} = $where;
if ($_ eq 'gnits' || $_ eq 'gnu' || $_ eq 'foreign')
{
@@ -260,7 +277,7 @@ sub _process_option_list (\%$@)
elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo'
|| $_ eq 'dist-shar' || $_ eq 'dist-zip'
|| $_ eq 'dist-tarZ' || $_ eq 'dist-bzip2'
- || $_ eq 'dist-lzma' || $_ eq 'dist-xz'
+ || $_ eq 'dist-lzip' || $_ eq 'dist-lzma' || $_ eq 'dist-xz'
|| $_ eq 'no-dist-gzip' || $_ eq 'no-dist'
|| $_ eq 'dejagnu' || $_ eq 'no-texinfo.tex'
|| $_ eq 'readme-alpha' || $_ eq 'check-news'
@@ -313,11 +330,8 @@ sub _process_option_list (\%$@)
}
elsif (/^(?:--warnings=|-W)(.*)$/)
{
- foreach my $cat (split (',', $1))
- {
- msg 'unsupported', $where, "unknown warning category `$cat'"
- if switch_warning $cat;
- }
+ my @w = map { { cat => $_, loc => $where} } split (',', $1);
+ push @warnings, @w;
}
else
{
@@ -326,19 +340,32 @@ sub _process_option_list (\%$@)
return 1;
}
}
+ # We process warnings here, so that any explicitly-given warning setting
+ # will take precedence over warning settings defined implicitly by the
+ # strictness.
+ foreach my $w (@warnings)
+ {
+ msg 'unsupported', $w->{'loc'},
+ "unknown warning category `$w->{'cat'}'"
+ if switch_warning $w->{cat};
+ }
return 0;
}
-sub process_option_list ($@)
+sub process_option_list (@)
{
- my ($where, @list) = @_;
- return _process_option_list (%_options, $where, @list);
+ prog_error "local options already processed"
+ if $_options_processed;
+ return _process_option_list (%_options, @_);
+ $_options_processed = 1;
}
-sub process_global_option_list ($@)
+sub process_global_option_list (@)
{
- my ($where, @list) = @_;
- return _process_option_list (%_global_options, $where, @list);
+ prog_error "global options already processed"
+ if $_global_options_processed;
+ return _process_option_list (%_global_options, @_);
+ $_global_options_processed = 1;
}
=item C<set_strictness ($name)>
@@ -369,7 +396,7 @@ sub set_strictness ($)
}
else
{
- prog_error "level `$strictness_name' not recognized\n";
+ prog_error "level `$strictness_name' not recognized";
}
}
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index 3184b24d2..6d437eda5 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -616,7 +616,8 @@ sub define ($$$$$)
msg ('obsolete', $tdef->location,
"deprecated feature: target `$noexe' overrides "
. "`$noexe\$(EXEEXT)'\n"
- . "change your target to read `$noexe\$(EXEEXT)'");
+ . "change your target to read `$noexe\$(EXEEXT)'",
+ partial => 1);
msg ('obsolete', $where, "target `$target' was defined here");
}
# Don't `return ()' now, as this might hide target clashes
@@ -658,7 +659,7 @@ sub define ($$$$$)
## is legitimate. (This is phony.test.)
# msg ('syntax', $where,
- # "redefinition of `$target'$condmsg...", partial => 1);
+ # "redefinition of `$target'$condmsg ...", partial => 1);
# msg_cond_rule ('syntax', $cond, $target,
# "... `$target' previously defined here");
}
@@ -694,7 +695,7 @@ sub define ($$$$$)
msg_cond_rule ('override', $cond, $target,
"user target `$target' defined here"
- . "$condmsg...", partial => 1);
+ . "$condmsg ...", partial => 1);
msg ('override', $where,
"... overrides Automake target `$oldname' defined here",
partial => $hint);
@@ -718,7 +719,7 @@ sub define ($$$$$)
my $oldsource = $tdef->source;
return () if $source eq $oldsource && $target eq $oldname;
- msg ('syntax', $where, "redefinition of `$target'$condmsg...",
+ msg ('syntax', $where, "redefinition of `$target'$condmsg ...",
partial => 1);
msg_cond_rule ('syntax', $cond, $target,
"... `$oldname' previously defined here");
@@ -726,7 +727,7 @@ sub define ($$$$$)
}
}
# Never reached.
- prog_error ("Unreachable place reached.");
+ prog_error ("unreachable place reached");
}
# Conditions for which the rule should be defined.
@@ -818,7 +819,7 @@ sub define ($$$$$)
# definitions of multiple inference rules. It's also
# disallowed to mix plain targets with inference rules.
msg ('portability', $where,
- "Inference rules can have only one target before the colon (POSIX).")
+ "inference rules can have only one target before the colon (POSIX)")
if $inference_rule_count > 0 && $target_count > 1;
return @conds;
diff --git a/lib/Automake/RuleDef.pm b/lib/Automake/RuleDef.pm
index 20bc10637..3bd506df2 100644
--- a/lib/Automake/RuleDef.pm
+++ b/lib/Automake/RuleDef.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -36,6 +36,7 @@ Automake::RuleDef - a class for rule definitions
=head1 DESCRIPTION
This class gathers data related to one Makefile-rule definition.
+It shouldn't be needed outside of F<Rule.pm>.
=head2 Constants
@@ -50,6 +51,20 @@ Possible owners for rules.
use constant RULE_AUTOMAKE => 0; # Rule defined by Automake.
use constant RULE_USER => 1; # Rule defined in the user's Makefile.am.
+=back
+
+=head2 Methods
+
+=over 4
+
+=item C<new Automake::RuleDef ($name, $comment, $location, $owner, $source)>
+
+Create a new rule definition with target C<$name>, with associated comment
+C<$comment>, Location C<$location> and owner C<$owner>, defined in file
+C<$source>.
+
+=cut
+
sub new ($$$$$)
{
my ($class, $name, $comment, $location, $owner, $source) = @_;
@@ -60,12 +75,24 @@ sub new ($$$$$)
return $self;
}
+=item C<$source = $rule-E<gt>source>
+
+Return the source of the rule.
+
+=cut
+
sub source ($)
{
my ($self) = @_;
return $self->{'source'};
}
+=item C<$name = $rule-E<gt>name>
+
+Return the name of the rule.
+
+=cut
+
sub name ($)
{
my ($self) = @_;
diff --git a/lib/Automake/VarDef.pm b/lib/Automake/VarDef.pm
index 568c82afa..033aa05d2 100644
--- a/lib/Automake/VarDef.pm
+++ b/lib/Automake/VarDef.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -195,6 +195,8 @@ sub append ($$$)
=item C<$def-E<gt>value>
+=item C<$def-E<gt>raw_value>
+
=item C<$def-E<gt>type>
=item C<$def-E<gt>pretty>
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 686847d4f..24d8be0ff 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -470,7 +470,7 @@ sub _check_ambiguous_condition ($$$)
# We allow silent variables to be overridden silently,
# by either silent or non-silent variables.
my $def = $self->def ($ambig_cond);
- if ($message && !($def && $def->pretty == VAR_SILENT))
+ if ($message && $def->pretty != VAR_SILENT)
{
msg 'syntax', $where, "$message ...", partial => 1;
msg_var ('syntax', $var, "... `$var' previously defined here");
@@ -881,10 +881,10 @@ sub define ($$$$$$$$)
{
error ($def->location,
"Automake variable `$var' was set with `"
- . $def->type . "=' here...", partial => 1);
+ . $def->type . "=' here ...", partial => 1);
error ($where, "... and is now set with `$type=' here.");
prog_error ("Automake variable assignments should be consistently\n"
- . "defined with the same sign.");
+ . "defined with the same sign");
}
# If Automake tries to override a value specified by the user,
@@ -896,7 +896,7 @@ sub define ($$$$$$$$)
my $condmsg = ($cond == TRUE
? '' : (" in condition `" . $cond->human . "'"));
msg_cond_var ('override', $cond, $var,
- "user variable `$var' defined here$condmsg...",
+ "user variable `$var' defined here$condmsg ...",
partial => 1);
msg ('override', $where,
"... overrides Automake variable `$var' defined here");
@@ -996,10 +996,10 @@ sub define ($$$$$$$$)
if (! $undef_cond->false)
{
error ($where,
- "Cannot apply `+=' because `$var' is not defined "
+ "cannot apply `+=' because `$var' is not defined "
. "in\nthe following conditions:\n "
. join ("\n ", map { $_->human } $undef_cond->conds)
- . "\nEither define `$var' in these conditions,"
+ . "\neither define `$var' in these conditions,"
. " or use\n`+=' in the same conditions as"
. " the definitions.");
}
@@ -1078,7 +1078,7 @@ For debugging.
sub variables_dump ()
{
- my $text = "All variables:\n{\n";
+ my $text = "all variables:\n{\n";
foreach my $var (sort { $a->name cmp $b->name } variables)
{
$text .= $var->dump;
diff --git a/lib/Automake/Wrap.pm b/lib/Automake/Wrap.pm
index 66213d1ee..59b3e5ac9 100644
--- a/lib/Automake/Wrap.pm
+++ b/lib/Automake/Wrap.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -48,10 +48,10 @@ maximum length allowed. (Ticket #17141, fixed in Perl 5.8.0.)
=cut
-# tab_length ($TXT)
-# -----------------
+# _tab_length ($TXT)
+# ------------------
# Compute the length of TXT, counting tab characters as 8 characters.
-sub tab_length($)
+sub _tab_length($)
{
my ($txt) = @_;
my $len = length ($txt);
@@ -78,16 +78,16 @@ sub wrap($$$$@)
my ($head, $fill, $eol, $max_len, @values) = @_;
my $result = $head;
- my $column = tab_length ($head);
+ my $column = _tab_length ($head);
- my $fill_len = tab_length ($fill);
- my $eol_len = tab_length ($eol);
+ my $fill_len = _tab_length ($fill);
+ my $eol_len = _tab_length ($eol);
my $not_first_word = 0;
foreach (@values)
{
- my $len = tab_length ($_);
+ my $len = _tab_length ($_);
# See if the new variable fits on this line.
# (The + 1 is for the space we add in front of the value.).
diff --git a/lib/Automake/XFile.pm b/lib/Automake/XFile.pm
index 46483e65a..4ba84ce02 100644
--- a/lib/Automake/XFile.pm
+++ b/lib/Automake/XFile.pm
@@ -68,18 +68,6 @@ methods C<close>, C<lock> (corresponding to C<flock>), C<new>,
C<open>, C<seek>, and C<truncate>. It also overrides the C<getline>
and C<getlines> methods to translate C<\r\n> to C<\n>.
-=head1 SEE ALSO
-
-L<perlfunc>,
-L<perlop/"I/O Operators">,
-L<IO::File>
-L<IO::Handle>
-L<IO::Seekable>
-
-=head1 HISTORY
-
-Derived from IO::File.pm by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>.
-
=cut
require 5.000;
@@ -110,12 +98,16 @@ eval {
push (@EXPORT, @O);
};
-# Used in croak error messages.
-my $me = basename ($0);
+=head2 Methods
+
+=over
+
+=item C<$fh = new Automake::XFile ([$expr, ...]>
-################################################
-## Constructor
-##
+Constructor a new XFile object. Additional arguments
+are passed to C<open>, if any.
+
+=cut
sub new
{
@@ -129,9 +121,12 @@ sub new
$fh;
}
-################################################
-## Open
-##
+=item C<$fh-E<gt>open ([$file, ...])>
+
+Open a file, passing C<$file> and further arguments to C<IO::File::open>.
+Die if opening fails. Store the name of the file. Use binmode for writing.
+
+=cut
sub open
{
@@ -156,9 +151,11 @@ sub open
binmode $fh if $file =~ /^\s*>/;
}
-################################################
-## Close
-##
+=item C<$fh-E<gt>close>
+
+Close the file, handling errors.
+
+=cut
sub close
{
@@ -172,9 +169,12 @@ sub close
}
}
-################################################
-## Getline
-##
+=item C<$line = $fh-E<gt>getline>
+
+Read and return a line from the file. Ensure C<\r\n> is translated to
+C<\n> on input files.
+
+=cut
# Some Win32/perl installations fail to translate \r\n to \n on input
# so we do that here.
@@ -187,9 +187,11 @@ sub getline
return $_;
}
-################################################
-## Getlines
-##
+=item C<@lines = $fh-E<gt>getlines>
+
+Slurp lines from the files.
+
+=cut
sub getlines
{
@@ -199,9 +201,11 @@ sub getlines
return @res;
}
-################################################
-## Name
-##
+=item C<$name = $fh-E<gt>name>
+
+Return the name of the file.
+
+=cut
sub name
{
@@ -209,9 +213,13 @@ sub name
return ${*$fh}{'autom4te_xfile_file'};
}
-################################################
-## Lock
-##
+=item C<$fh-E<gt>lock>
+
+Lock the file using C<flock>. If locking fails for reasons other than
+C<flock> being unsupported, then error out if C<$ENV{'MAKEFLAGS'}> indicates
+that we are spawned from a parallel C<make>.
+
+=cut
sub lock
{
@@ -243,9 +251,11 @@ sub lock
}
}
-################################################
-## Seek
-##
+=item C<$fh-E<gt>seek ($position, [$whence])>
+
+Seek file to C<$position>. Die if seeking fails.
+
+=cut
sub seek
{
@@ -254,13 +264,15 @@ sub seek
if (!seek ($fh, $_[0], $_[1]))
{
my $file = $fh->name;
- fatal "$me: cannot rewind $file with @_: $!";
+ fatal "cannot rewind $file with @_: $!";
}
}
-################################################
-## Truncate
-##
+=item C<$fh-E<gt>truncate ($len)>
+
+Truncate the file to length C<$len>. Die on failure.
+
+=cut
sub truncate
{
@@ -272,6 +284,22 @@ sub truncate
}
}
+=back
+
+=head1 SEE ALSO
+
+L<perlfunc>,
+L<perlop/"I/O Operators">,
+L<IO::File>
+L<IO::Handle>
+L<IO::Seekable>
+
+=head1 HISTORY
+
+Derived from IO::File.pm by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>.
+
+=cut
+
1;
### Setup "GNU" style for perl-mode and cperl-mode.
diff --git a/lib/Automake/tests/Cond2.pl b/lib/Automake/tests/Cond2.pl
new file mode 100644
index 000000000..4ad0e1c4d
--- /dev/null
+++ b/lib/Automake/tests/Cond2.pl
@@ -0,0 +1,6 @@
+# Catch common programming error:
+# A Condition passed as a string to 'new'.
+use Automake::Condition;
+
+my $cond = new Automake::Condition ('TRUE');
+new Automake::Condition ($cond);
diff --git a/lib/Automake/tests/Cond3.pl b/lib/Automake/tests/Cond3.pl
new file mode 100644
index 000000000..dc957af28
--- /dev/null
+++ b/lib/Automake/tests/Cond3.pl
@@ -0,0 +1,6 @@
+# Catch common programming error:
+# A Condition passed as a string to 'new'.
+use Automake::Condition;
+
+my $cond = new Automake::Condition ("COND1_TRUE");
+new Automake::Condition ("$cond");
diff --git a/lib/Automake/tests/Condition-t.pl b/lib/Automake/tests/Condition-t.pl
index 06eb34e92..99004acf2 100644
--- a/lib/Automake/tests/Condition-t.pl
+++ b/lib/Automake/tests/Condition-t.pl
@@ -1,4 +1,5 @@
-# Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2008, 2009 Free Software Foundation,
+# Inc.
#
# This file is part of GNU Automake.
#
@@ -18,7 +19,8 @@
BEGIN {
use Config;
if (eval { require 5.007_002; } # for CLONE support
- && $Config{useithreads})
+ && $Config{useithreads}
+ && !$ENV{WANT_NO_THREADS})
{
require threads;
import threads;
@@ -32,15 +34,15 @@ use Automake::Condition qw/TRUE FALSE/;
sub test_basics ()
{
- my @tests = (# [[Conditions], is_true?, is_false?, string, subst-string]
- [[], 1, 0, 'TRUE', ''],
- [['TRUE'], 1, 0, 'TRUE', ''],
- [['FALSE'], 0, 1, 'FALSE', '#'],
- [['A_TRUE'], 0, 0, 'A_TRUE', '@A_TRUE@'],
+ my @tests = (# [[Conditions], is_true?, is_false?, string, subst-string, human]
+ [[], 1, 0, 'TRUE', '', 'TRUE'],
+ [['TRUE'], 1, 0, 'TRUE', '', 'TRUE'],
+ [['FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
+ [['A_TRUE'], 0, 0, 'A_TRUE', '@A_TRUE@', 'A'],
[['A_TRUE', 'B_FALSE'],
- 0, 0, 'A_TRUE B_FALSE', '@A_TRUE@@B_FALSE@'],
- [['B_TRUE', 'FALSE'], 0, 1, 'FALSE', '#'],
- [['B_TRUE', 'B_FALSE'], 0, 1, 'FALSE', '#']);
+ 0, 0, 'A_TRUE B_FALSE', '@A_TRUE@@B_FALSE@', 'A and !B'],
+ [['B_TRUE', 'FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
+ [['B_TRUE', 'B_FALSE'], 0, 1, 'FALSE', '#', 'FALSE']);
for (@tests)
{
@@ -53,6 +55,7 @@ sub test_basics ()
return 1 if $_->[2] != ($a == FALSE);
return 1 if $_->[3] ne $a->string;
return 1 if $_->[4] ne $a->subst_string;
+ return 1 if $_->[5] ne $a->human;
})->join;
}
return 0;
@@ -281,7 +284,33 @@ sub test_reduce_or ()
return $failed;
}
-exit (test_basics || test_true_when || test_reduce_and || test_reduce_or);
+sub test_merge ()
+{
+ my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
+ return threads->new(sub {
+ my $other = new Automake::Condition "COND3_FALSE";
+ return threads->new(sub {
+ my $both = $cond->merge ($other);
+ return threads->new(sub {
+ my $both2 = $cond->merge_conds ("COND3_FALSE");
+ return threads->new(sub {
+ $cond = $both->strip ($other);
+ my @conds = $cond->conds;
+ return 1 if $both->string ne "COND1_TRUE COND2_FALSE COND3_FALSE";
+ return 1 if $cond->string ne "COND1_TRUE COND2_FALSE";
+ return 1 if $both != $both2;
+ })->join;
+ })->join;
+ })->join;
+ })->join;
+ return 0;
+}
+
+exit (test_basics
+ || test_true_when
+ || test_reduce_and
+ || test_reduce_or
+ || test_merge);
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
diff --git a/lib/Automake/tests/Condition.pl b/lib/Automake/tests/Condition.pl
index 86f174564..e330e5330 100644
--- a/lib/Automake/tests/Condition.pl
+++ b/lib/Automake/tests/Condition.pl
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -19,15 +19,15 @@ use Automake::Condition qw/TRUE FALSE/;
sub test_basics ()
{
- my @tests = (# [[Conditions], is_true?, is_false?, string, subst-string]
- [[], 1, 0, 'TRUE', ''],
- [['TRUE'], 1, 0, 'TRUE', ''],
- [['FALSE'], 0, 1, 'FALSE', '#'],
- [['A_TRUE'], 0, 0, 'A_TRUE', '@A_TRUE@'],
+ my @tests = (# [[Conditions], is_true?, is_false?, string, subst-string, human]
+ [[], 1, 0, 'TRUE', '', 'TRUE'],
+ [['TRUE'], 1, 0, 'TRUE', '', 'TRUE'],
+ [['FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
+ [['A_TRUE'], 0, 0, 'A_TRUE', '@A_TRUE@', 'A'],
[['A_TRUE', 'B_FALSE'],
- 0, 0, 'A_TRUE B_FALSE', '@A_TRUE@@B_FALSE@'],
- [['B_TRUE', 'FALSE'], 0, 1, 'FALSE', '#'],
- [['B_TRUE', 'B_FALSE'], 0, 1, 'FALSE', '#']);
+ 0, 0, 'A_TRUE B_FALSE', '@A_TRUE@@B_FALSE@', 'A and !B'],
+ [['B_TRUE', 'FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
+ [['B_TRUE', 'B_FALSE'], 0, 1, 'FALSE', '#', 'FALSE']);
for (@tests)
{
@@ -38,6 +38,7 @@ sub test_basics ()
return 1 if $_->[2] != ($a == FALSE);
return 1 if $_->[3] ne $a->string;
return 1 if $_->[4] ne $a->subst_string;
+ return 1 if $_->[5] ne $a->human;
}
return 0;
}
@@ -240,7 +241,25 @@ sub test_reduce_or ()
return $failed;
}
-exit (test_basics || test_true_when || test_reduce_and || test_reduce_or);
+sub test_merge ()
+{
+ my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
+ my $other = new Automake::Condition "COND3_FALSE";
+ my $both = $cond->merge ($other);
+ my $both2 = $cond->merge_conds ("COND3_FALSE");
+ $cond = $both->strip ($other);
+ my @conds = $cond->conds;
+ return 1 if $both->string ne "COND1_TRUE COND2_FALSE COND3_FALSE";
+ return 1 if $cond->string ne "COND1_TRUE COND2_FALSE";
+ return 1 if $both != $both2;
+ return 0;
+}
+
+exit (test_basics
+ || test_true_when
+ || test_reduce_and
+ || test_reduce_or
+ || test_merge);
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
diff --git a/lib/Automake/tests/DisjCon2.pl b/lib/Automake/tests/DisjCon2.pl
new file mode 100644
index 000000000..9edd8d589
--- /dev/null
+++ b/lib/Automake/tests/DisjCon2.pl
@@ -0,0 +1,8 @@
+# Catch common programming error:
+# A non-Condition reference passed to new.
+use Automake::Condition;
+use Automake::DisjConditions;
+
+my $cond = new Automake::Condition ('TRUE');
+my $cond2 = new Automake::DisjConditions ($cond);
+new Automake::DisjConditions ($cond2);
diff --git a/lib/Automake/tests/DisjCon3.pl b/lib/Automake/tests/DisjCon3.pl
new file mode 100644
index 000000000..8e69e2b1b
--- /dev/null
+++ b/lib/Automake/tests/DisjCon3.pl
@@ -0,0 +1,7 @@
+# Catch common programming error:
+# A non-reference passed to new.
+use Automake::Condition qw/TRUE FALSE/;
+use Automake::DisjConditions;
+
+my $cond = new Automake::Condition ("COND1_TRUE");
+new Automake::DisjConditions ("$cond");
diff --git a/lib/Automake/tests/DisjConditions-t.pl b/lib/Automake/tests/DisjConditions-t.pl
index 2fe275beb..4df511237 100644
--- a/lib/Automake/tests/DisjConditions-t.pl
+++ b/lib/Automake/tests/DisjConditions-t.pl
@@ -1,4 +1,5 @@
-# Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2008, 2009 Free Software Foundation,
+# Inc.
#
# This file is part of GNU Automake.
#
@@ -18,7 +19,8 @@
BEGIN {
use Config;
if (eval { require 5.007_002; } # for CLONE support
- && $Config{useithreads})
+ && $Config{useithreads}
+ && !$ENV{WANT_NO_THREADS})
{
require threads;
import threads;
@@ -33,18 +35,44 @@ use Automake::DisjConditions;
sub test_basics ()
{
+ my $true = new Automake::DisjConditions TRUE;
+ my $false = new Automake::DisjConditions FALSE;
my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
return threads->new (sub {
my $other = new Automake::Condition "COND3_FALSE";
+ my $another = new Automake::Condition "COND3_TRUE", "COND4_FALSE";
return threads->new (sub {
my $set1 = new Automake::DisjConditions $cond, $other;
return threads->new (sub {
my $set2 = new Automake::DisjConditions $other, $cond;
+ my $set3 = new Automake::DisjConditions FALSE, $another;
return 1 unless $set1 == $set2;
return 1 if $set1->false;
return 1 if $set1->true;
return 1 unless (new Automake::DisjConditions)->false;
return 1 if (new Automake::DisjConditions)->true;
+ return 1 unless $true->human eq 'TRUE';
+ return 1 unless $false->human eq 'FALSE';
+ return 1 unless $set1->human eq "(COND1 and !COND2) or (!COND3)";
+ return 1 unless $set2->human eq "(COND1 and !COND2) or (!COND3)";
+ my $one_cond_human = $set1->one_cond->human;
+ return 1 unless $one_cond_human eq "!COND3"
+ || $one_cond_human eq "COND1 and !COND2";
+ return 1 unless $set1->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+
+ my $merged1 = $set1->merge ($set2);
+ my $merged2 = $set1->merge ($cond);
+ my $mult1 = $set1->multiply ($set3);
+ return threads->new (sub {
+ my $mult2 = $set1->multiply ($another);
+ return threads->new (sub {
+ return 1 unless $merged1->simplify->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+ return 1 unless $merged2->simplify->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+ return 1 unless $mult1->string eq "COND1_TRUE COND2_FALSE COND3_TRUE COND4_FALSE";
+ return 1 unless $mult1 == $mult2;
+ return 0;
+ })->join;
+ })->join;
})->join;
})->join;
})->join;
diff --git a/lib/Automake/tests/DisjConditions.pl b/lib/Automake/tests/DisjConditions.pl
index 47dea8399..7ccac13f0 100644
--- a/lib/Automake/tests/DisjConditions.pl
+++ b/lib/Automake/tests/DisjConditions.pl
@@ -1,4 +1,5 @@
-# Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2008, 2009 Free Software Foundation,
+# Inc.
#
# This file is part of GNU Automake.
#
@@ -20,15 +21,38 @@ use Automake::DisjConditions;
sub test_basics ()
{
+ my $true = new Automake::DisjConditions TRUE;
+ my $false = new Automake::DisjConditions FALSE;
my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
my $other = new Automake::Condition "COND3_FALSE";
+ my $another = new Automake::Condition "COND3_TRUE", "COND4_FALSE";
my $set1 = new Automake::DisjConditions $cond, $other;
my $set2 = new Automake::DisjConditions $other, $cond;
+ my $set3 = new Automake::DisjConditions FALSE, $another;
return 1 unless $set1 == $set2;
return 1 if $set1->false;
return 1 if $set1->true;
return 1 unless (new Automake::DisjConditions)->false;
return 1 if (new Automake::DisjConditions)->true;
+ return 1 unless $true->human eq 'TRUE';
+ return 1 unless $false->human eq 'FALSE';
+ return 1 unless $set1->human eq "(COND1 and !COND2) or (!COND3)";
+ return 1 unless $set2->human eq "(COND1 and !COND2) or (!COND3)";
+ my $one_cond_human = $set1->one_cond->human;
+ return 1 unless $one_cond_human eq "!COND3"
+ || $one_cond_human eq "COND1 and !COND2";
+ return 1 unless $set1->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+
+ my $merged1 = $set1->merge ($set2);
+ my $merged2 = $set1->merge ($cond);
+ my $mult1 = $set1->multiply ($set3);
+ my $mult2 = $set1->multiply ($another);
+ return 1 unless $merged1->simplify->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+ return 1 unless $merged2->simplify->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+ return 1 unless $mult1->string eq "COND1_TRUE COND2_FALSE COND3_TRUE COND4_FALSE";
+ return 1 unless $mult1 == $mult2;
+
+ return 0;
}
sub build_set (@)
diff --git a/lib/Automake/tests/Makefile.am b/lib/Automake/tests/Makefile.am
index c5e53d2cf..b4f09f1c7 100644
--- a/lib/Automake/tests/Makefile.am
+++ b/lib/Automake/tests/Makefile.am
@@ -22,9 +22,23 @@ TEST_EXTENSIONS = .pl
TESTS = \
Condition.pl \
Condition-t.pl \
+Cond2.pl \
+Cond3.pl \
DisjConditions.pl \
DisjConditions-t.pl \
+DisjCon2.pl \
+DisjCon3.pl \
Version.pl \
+Version2.pl \
+Version3.pl \
Wrap.pl
+XFAIL_TESTS = \
+Cond2.pl \
+Cond3.pl \
+DisjCon2.pl \
+DisjCon3.pl \
+Version2.pl \
+Version3.pl
+
EXTRA_DIST = $(TESTS)
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index b4940db79..da92880dc 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -55,14 +55,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
- $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+ $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
# If stdout is a non-dumb tty, use colors. If test -t is not supported,
@@ -179,6 +185,7 @@ TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -273,11 +280,25 @@ TEST_EXTENSIONS = .pl
TESTS = \
Condition.pl \
Condition-t.pl \
+Cond2.pl \
+Cond3.pl \
DisjConditions.pl \
DisjConditions-t.pl \
+DisjCon2.pl \
+DisjCon3.pl \
Version.pl \
+Version2.pl \
+Version3.pl \
Wrap.pl
+XFAIL_TESTS = \
+Cond2.pl \
+Cond3.pl \
+DisjCon2.pl \
+DisjCon3.pl \
+Version2.pl \
+Version3.pl
+
EXTRA_DIST = $(TESTS)
all: all-am
@@ -319,6 +340,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__sh_e_setup); \
diff --git a/lib/Automake/tests/Version.pl b/lib/Automake/tests/Version.pl
index e49643519..bea91f0f0 100644
--- a/lib/Automake/tests/Version.pl
+++ b/lib/Automake/tests/Version.pl
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2009 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -42,6 +42,29 @@ sub test_version_compare
print "compare (\"$left\", \"$right\") = $res! (not $result?)\n";
$failed = 1;
}
+
+ my $check_expected = ($result == 0 || $result == 1) ? 0 : 1;
+ # Exception for 'foo' fork.
+ $check_expected = 1
+ if ($right =~ /foo/ && !($left =~ /foo/));
+
+ my $check = Automake::Version::check ($left, $right);
+ if ($check != $check_expected)
+ {
+ print "check (\"$left\", \"$right\") = $check! (not $check_expected?)\n";
+ $failed = 1;
+ }
+}
+
+sub test_bad_versions
+{
+ my ($ver) = @_;
+ my @version = Automake::Version::split ($ver);
+ if ($#version != -1)
+ {
+ print "shouldn't grok \"$ver\"\n";
+ $failed = 1;
+ }
}
my @tests = (
@@ -69,15 +92,24 @@ my @tests = (
['1.5a', '1.5.1f', 1],
['1.5', '1.5.1a', -1],
['1.5.1a', '1.5.1f', -1],
+ ['1.5.1f', '1.5.1a', 1],
+ ['1.5.1f', '1.5.1f', 0],
# special exceptions
['1.6-p5a', '1.6.5a', 0],
['1.6', '1.6-p5a', -1],
['1.6-p4b', '1.6-p5a', -1],
['1.6-p4b', '1.6-foo', 1],
- ['1.6-p4b', '1.6a-foo', -1]
+ ['1.6-p4b', '1.6a-foo', -1],
+ ['1.6-p5', '1.6.5', 0],
+ ['1.6a-foo', '1.6a-foo', 0],
+);
+
+my @bad_versions = (
+ '', 'a', '1', '1a', '1.2.3.4', '-1.2'
);
test_version_compare (@{$_}) foreach @tests;
+test_bad_versions ($_) foreach @bad_versions;
exit $failed;
diff --git a/lib/Automake/tests/Version2.pl b/lib/Automake/tests/Version2.pl
new file mode 100644
index 000000000..038466deb
--- /dev/null
+++ b/lib/Automake/tests/Version2.pl
@@ -0,0 +1,5 @@
+# prog_error due to invalid $VERSION.
+
+use Automake::Version;
+
+Automake::Version::check ('', '1.2.3');
diff --git a/lib/Automake/tests/Version3.pl b/lib/Automake/tests/Version3.pl
new file mode 100644
index 000000000..ebac23f91
--- /dev/null
+++ b/lib/Automake/tests/Version3.pl
@@ -0,0 +1,5 @@
+# prog_error due to invalid $REQUIRED.
+
+use Automake::Version;
+
+Automake::Version::check ('1.2.3', '');
diff --git a/lib/Automake/tests/Wrap.pl b/lib/Automake/tests/Wrap.pl
index 8d840fc30..b41540150 100644
--- a/lib/Automake/tests/Wrap.pl
+++ b/lib/Automake/tests/Wrap.pl
@@ -1,4 +1,4 @@
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2009 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-use Automake::Wrap 'wrap';
+use Automake::Wrap qw/wrap makefile_wrap/;
my $failed = 0;
@@ -31,6 +31,18 @@ sub test_wrap
}
}
+sub test_makefile_wrap
+{
+ my ($in, $exp_out) = @_;
+
+ my $out = &makefile_wrap (@$in);
+ if ($out ne $exp_out)
+ {
+ print STDERR "For: @$in\nGot:\n$out\nInstead of:\n$exp_out\n---\n";
+ ++$failed;
+ }
+}
+
my @tests = (
[["HEAD:", "NEXT:", "CONT", 13, "v" ,"a", "l", "ue", "s", "values"],
"HEAD:v aCONT
@@ -55,10 +67,32 @@ big continuation:diag3
"big header: END
cont: word1 END
cont: word2
+"],
+ [["big header:", "", " END", 16, "w1", "w2 ", "w3"],
+"big header: END
+w1 w2 w3
"]);
+my @makefile_tests = (
+ [["target:"],
+"target:
+"],
+ [["target:", "\t"],
+"target:
+"],
+ [["target:", "\t", "prereq1", "prereq2"],
+"target: prereq1 prereq2
+"],
+ [["target: ", "\t", "this is a long list of prerequisites ending in space",
+ "so that there is no need for another space before the backslash",
+ "unlike in the second line"],
+"target: this is a long list of prerequisites ending in space \\
+\tso that there is no need for another space before the backslash \\
+\tunlike in the second line
+"]);
test_wrap (@{$_}) foreach @tests;
+test_makefile_wrap (@{$_}) foreach @makefile_tests;
exit $failed;
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 627368de5..5bdc02e13 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2,7 +2,8 @@
## Makefile for Automake lib.
-# Copyright (C) 2001, 2003, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2009, 2010 Free Software Foundation,
+# Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +29,7 @@ dist_pkgvdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
scriptdir = $(pkgvdatadir)
dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile \
- symlink-tree
+ symlink-tree ar-lib
EXTRA_DIST = gnupload
diff --git a/lib/Makefile.in b/lib/Makefile.in
index d9e41e2d8..9195976e9 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,7 +15,8 @@
@SET_MAKE@
-# Copyright (C) 2001, 2003, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2009, 2010 Free Software Foundation,
+# Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -51,8 +52,8 @@ build_triplet = @build@
subdir = lib
DIST_COMMON = $(dist_pkgvdata_DATA) $(dist_script_DATA) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING INSTALL \
- ansi2knr.1 ansi2knr.c compile config.guess config.sub depcomp \
- elisp-comp install-sh mdate-sh missing mkinstalldirs \
+ ansi2knr.1 ansi2knr.c ar-lib compile config.guess config.sub \
+ depcomp elisp-comp install-sh mdate-sh missing mkinstalldirs \
py-compile texinfo.tex ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
@@ -60,14 +61,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
- $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+ $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -136,6 +143,7 @@ am__relativize = \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -231,7 +239,7 @@ dist_pkgvdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
scriptdir = $(pkgvdatadir)
dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile \
- symlink-tree
+ symlink-tree ar-lib
EXTRA_DIST = gnupload
all: all-recursive
@@ -377,6 +385,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -440,6 +452,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -606,22 +632,24 @@ ps-am:
uninstall-am: uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-data-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am \
+ install-data-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-data-hook \
- install-dist_pkgvdataDATA install-dist_scriptDATA install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installcheck-local \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-hook install-dist_pkgvdataDATA \
+ install-dist_scriptDATA install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installcheck-local installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am \
uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 352c64f41..059ae97c4 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -58,14 +58,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
- $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+ $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -94,6 +100,7 @@ DATA = $(dist_am_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -285,6 +292,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index 08de45c61..37f34ca44 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006
+## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006, 2010
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -73,7 +73,7 @@ check-DEJAGNU: site.exp
## the possibility of a corrupted site.exp if make is interrupted.
## Jim Meyering has some useful text on this topic.
site.exp: Makefile
- @echo 'Making a new site.exp file...'
+ @echo 'Making a new site.exp file ...'
@echo '## these variables are automatically generated by make ##' >site.tmp
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
@echo '# edit the last section' >>site.tmp
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index e0f3bce60..185d34cd9 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -26,7 +26,7 @@ am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
-
+am__post_remove_distdir = $(am__remove_distdir)
endif %?TOPDIR_P%
if %?SUBDIRS%
@@ -328,6 +328,10 @@ endif %?TOPDIR_P%
## with tar 1.11.2). We do not do anything specific w.r.t. this
## incompatibility since packages where empty directories need to be
## present in the archive are really unusual.
+##
+## We order DIST_TARGETS by expected duration of the compressors,
+## slowest first, for better parallelism in `make dist'. Do not
+## reorder DIST_ARCHIVES, users may expect gzip to be first.
if %?TOPDIR_P%
@@ -336,44 +340,59 @@ GZIP_ENV = --best
.PHONY: dist-gzip
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2
.PHONY: dist-bzip2
dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
+.PHONY: dist-lzip
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -9 -c >$(distdir).tar.lz
+ $(am__post_remove_distdir)
?LZMA?DIST_ARCHIVES += $(distdir).tar.lzma
.PHONY: dist-lzma
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
?XZ?DIST_ARCHIVES += $(distdir).tar.xz
.PHONY: dist-xz
dist-xz: distdir
- tardir=$(distdir) && $(am__tar) | xz -9 -c >$(distdir).tar.xz
- $(am__remove_distdir)
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--9} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
.PHONY: dist-tarZ
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
.PHONY: dist-shar
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
?ZIP?DIST_ARCHIVES += $(distdir).zip
.PHONY: dist-zip
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
+
+?LZMA?DIST_TARGETS += dist-lzma
+?LZIP?DIST_TARGETS += dist-lzip
+?XZ?DIST_TARGETS += dist-xz
+?SHAR?DIST_TARGETS += dist-shar
+?BZIP2?DIST_TARGETS += dist-bzip2
+?GZIP?DIST_TARGETS += dist-gzip
+?ZIP?DIST_TARGETS += dist-zip
+?COMPRESS?DIST_TARGETS += dist-tarZ
endif %?TOPDIR_P%
@@ -393,16 +412,9 @@ if %?SUBDIRS%
AM_RECURSIVE_TARGETS += dist dist-all
endif %?SUBDIRS%
-dist dist-all: distdir
-?GZIP? tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-?BZIP2? tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-?LZMA? tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-?XZ? tardir=$(distdir) && $(am__tar) | xz -9 -c >$(distdir).tar.xz
-?COMPRESS? tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-?SHAR? shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-?ZIP? -rm -f $(distdir).zip
-?ZIP? zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
endif %?TOPDIR_P%
@@ -429,6 +441,8 @@ distcheck: dist
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -505,7 +519,7 @@ distcheck: dist
## Cater to parallel BSD make (see above).
&& cd "$$am__cwd" \
|| exit 1
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
diff --git a/lib/am/library.am b/lib/am/library.am
index ce94e5e8f..db096c762 100644
--- a/lib/am/library.am
+++ b/lib/am/library.am
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1999, 2003, 2009 Free Software
+## Copyright (C) 1994, 1995, 1996, 1999, 2003, 2009, 2010 Free Software
## Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-%LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
+%LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) $(EXTRA_%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
%SILENT%-rm -f %LIBRARY%
%VERBOSE%$(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_LIBADD)
%SILENT%$(RANLIB) %LIBRARY%
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 29aa00ce7..55e53e176 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -104,9 +104,11 @@ clean-%DIR%LTLIBRARIES:
## `so_locations' files are created by some linkers (IRIX, OSF) when
## building a shared object. Libtool places these files in the
## directory where the shared object is created.
- @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(%DIR%_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
diff --git a/lib/am/ltlibrary.am b/lib/am/ltlibrary.am
index 945523468..3cd2941dc 100644
--- a/lib/am/ltlibrary.am
+++ b/lib/am/ltlibrary.am
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 2003, 2005, 2008, 2009 Free Software
+## Copyright (C) 1994, 1995, 1996, 2003, 2005, 2008, 2009, 2010 Free Software
## Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -14,5 +14,5 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-%LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
+%LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) $(EXTRA_%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
%VERBOSE%$(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_LIBADD) $(LIBS)
diff --git a/lib/am/program.am b/lib/am/program.am
index 7e568e79a..c0e188f96 100644
--- a/lib/am/program.am
+++ b/lib/am/program.am
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003, 2005, 2009
+## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003, 2005, 2009, 2010
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
+%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) $(EXTRA_%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
## Remove program before linking. Otherwise the link will fail if the
## program is running somewhere. FIXME: this could be a loss if
## you're using an incremental linker. Maybe we should think twice?
diff --git a/lib/am/progs.am b/lib/am/progs.am
index d39b23dbb..d26968a67 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -1,6 +1,6 @@
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
-## 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+## 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
## The following awk script turns that into one line containing directories
-## and then lines of 'type target_name_or_directory sources...', with type
+## and then lines of 'type target_name_or_directory sources ...', with type
## 'd' designating directories, and 'f' files.
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
diff --git a/lib/am/tags.am b/lib/am/tags.am
index 7463e2f65..7fa75c951 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -134,6 +134,43 @@ GTAGS:
&& gtags -i $(GTAGS_ARGS) "$$here"
+## ------- ##
+## cscope ##
+## ------- ##
+
+if %?TOPDIR_P%
+
+CSCOPE = cscope
+.PHONY: cscope clean-cscope
+AM_RECURSIVE_TARGETS += cscope
+
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+ -rm -f cscope.files
+
+cscope.files: clean-cscope %CSCOPEDIRS% cscopelist
+
+endif %?TOPDIR_P%
+
+.PHONY: cscopelist
+cscopelist: %CSCOPEDIRS% $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+
## ---------- ##
## Cleaning. ##
## ---------- ##
@@ -142,3 +179,6 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+if %?TOPDIR_P%
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+endif %?TOPDIR_P%
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index dca9ce1e2..4b1add76a 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -32,7 +32,7 @@
## to fail, the info files are not removed. (They are needed by the
## developer while he writes documentation.)
## *.iNN files are used on DJGPP. See the comments in install-info-am
- restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+ %AM_V_MAKEINFO%restore=: && backupdir="$(am__leading_dot)am$$$$" && \
?INSRC? am__cwd=`pwd` && $(am__cd) $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
## If makeinfo is not installed we must not backup the files so
@@ -62,23 +62,27 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
?GENERIC?%SOURCE_SUFFIX%.dvi:
?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ %AM_V_TEXI2DVI%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
## Do not use `-o' unless necessary: it is only supported since Texinfo 4.1.
-?GENERIC? $(TEXI2DVI) %SOURCE%
-?!GENERIC? $(TEXI2DVI) -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+## texi2dvi doesn't silence everything with -q, redirect to /dev/null instead.
+## We still want -q (%TEXIQUIET%) because it turns on batch mode.
+?GENERIC? $(TEXI2DVI) %TEXIQUIET% %SOURCE% %TEXIDEVNULL%
+?!GENERIC? $(TEXI2DVI) %TEXIQUIET% -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
?GENERIC?%SOURCE_SUFFIX%.pdf:
?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ %AM_V_TEXI2PDF%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
## Do not use `-o' unless necessary: it is only supported since Texinfo 4.1.
-?GENERIC? $(TEXI2PDF) %SOURCE%
-?!GENERIC? $(TEXI2PDF) -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+## texi2pdf doesn't silence everything with -q, redirect to /dev/null instead.
+## We still want -q (%TEXIQUIET%) because it turns on batch mode.
+?GENERIC? $(TEXI2PDF) %TEXIQUIET% %SOURCE% %TEXIDEVNULL%
+?!GENERIC? $(TEXI2PDF) %TEXIQUIET% -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
?GENERIC?%SOURCE_SUFFIX%.html:
?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
@@ -88,8 +92,8 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
## in the manual change, it may leave unused pages. Our fix
## is to build under a temporary name, and replace the target on
## success.
- rm -rf $(@:.html=.htp)
- if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
+ %AM_V_MAKEINFO%rm -rf $(@:.html=.htp)
+ %SILENT%if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
?GENERIC? -o $(@:.html=.htp) %SOURCE%; \
?!GENERIC? -o $(@:.html=.htp) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
then \
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index c9dcd9d7b..bfde66593 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -55,8 +55,8 @@ endif %?LOCAL-TEXIS%
if %?LOCAL-TEXIS%
DVIPS = dvips
.dvi.ps:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- $(DVIPS) -o $@ $<
+ %AM_V_DVIPS%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) %TEXIQUIET% -o $@ $<
endif %?LOCAL-TEXIS%
.PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
diff --git a/lib/ar-lib b/lib/ar-lib
new file mode 100755
index 000000000..4883fef74
--- /dev/null
+++ b/lib/ar-lib
@@ -0,0 +1,265 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2010-09-02.19; # UTC
+
+# Copyright (C) 2010 Free Software
+# Foundation, Inc.
+# Written by Peter Rosin <peda@lysator.liu.se>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+ echo "$me: $1" 1>&2
+ exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Win32 hosts.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv in
+ mingw)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+ operation=$2
+ archive=$3
+ at_file_contents=`cat "$1"`
+ eval set x "$at_file_contents"
+ shift
+
+ for member
+ do
+ $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+ done
+}
+
+case $1 in
+ '')
+ func_error "no command. Try \`$0 --help' for more information."
+ ;;
+ -h | --h*)
+ cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "$me, version $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test $# -lt 3; then
+ func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+replace=
+create=
+
+while test -n "$action"
+do
+ case $action in
+ d*) delete=yes ;;
+ x*) extract=yes ;;
+ t*) list=yes ;;
+ r*) replace=yes ;;
+ c*) create=yes ;;
+ u*) ;; # TODO: don't ignore the update modifier
+ *)
+ func_error "unknown action specified"
+ ;;
+ esac
+ action=${action#?}
+done
+
+case $delete$extract$list$replace in
+ yes)
+ ;;
+ yesyes*)
+ func_error "more than one action specified"
+ ;;
+ *)
+ func_error "no action specified"
+ ;;
+esac
+
+if test -n "$delete"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -REMOVE "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+
+elif test -n "$extract"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ if test $# -gt 0; then
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -EXTRACT "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+ else
+ $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
+ fi
+
+elif test -n "$replace"; then
+ if test ! -f "$orig_archive"; then
+ if test -z "$create"; then
+ echo "$me: creating $orig_archive"
+ fi
+ orig_archive=
+ else
+ orig_archive=$archive
+ fi
+
+ for member
+ do
+ case $1 in
+ @*)
+ func_file_conv "${1#@}"
+ set x "$@" "@$file"
+ ;;
+ *)
+ func_file_conv "$1"
+ set x "$@" "$file"
+ ;;
+ esac
+ shift
+ shift
+ done
+
+ if test -n "$orig_archive"; then
+ $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+ else
+ $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+ fi
+
+elif test -n "$list"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ $AR -NOLOGO -LIST "$archive" || exit $?
+fi
diff --git a/lib/compile b/lib/compile
index c0096a7b5..bac481cdc 100755
--- a/lib/compile
+++ b/lib/compile
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
-scriptversion=2009-10-06.20; # UTC
+scriptversion=2010-11-15.09; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010 Free Software
# Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
@@ -29,6 +29,171 @@ scriptversion=2009-10-06.20; # UTC
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Win32 hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l*)
+ lib=${1#-l}
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ set x "$@" "$dir/$lib.dll.lib"
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ set x "$@" "$dir/$lib.lib"
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ test "$found" != yes && set x "$@" "$lib.lib"
+ shift
+ ;;
+ -L*)
+ func_file_conv "${1#-L}"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
@@ -53,11 +218,13 @@ EOF
echo "compile $scriptversion"
exit $?
;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
esac
ofile=
cfile=
-eat=
for arg
do
diff --git a/lib/depcomp b/lib/depcomp
index df8eea7e4..c3163befc 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -1,10 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2010-10-07.20; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -90,10 +90,18 @@ if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
- cygpath_u="sed s,\\\\\\\\,/,g"
+ cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
@@ -405,6 +413,52 @@ tru64)
rm -f "$tmpdepfile"
;;
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test "$stat" = 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/ \1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/ /
+ G
+ p
+}' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
diff --git a/lib/gnupload b/lib/gnupload
index 5036752ca..edb4b56bb 100755
--- a/lib/gnupload
+++ b/lib/gnupload
@@ -188,7 +188,7 @@ done
dprint()
{
- echo "Running $*..."
+ echo "Running $* ..."
}
if $dry_run; then
@@ -252,7 +252,7 @@ echo
if test $# -ne 0; then
for file
do
- echo "Signing $file..."
+ echo "Signing $file ..."
rm -f $file.sig
echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file
done
@@ -391,7 +391,7 @@ for dest in $to
do
for file
do
- echo "Uploading $file to $dest..."
+ echo "Uploading $file to $dest ..."
stmt=
files="$file $file.sig"
destdir=`echo $dest | sed 's/[^:]*://'`
diff --git a/m4/Makefile.in b/m4/Makefile.in
index cd80415fb..e50884800 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -58,14 +58,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
- $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+ $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -94,6 +100,7 @@ DATA = $(dist_m4data_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -282,6 +289,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/m4/amversion.m4 b/m4/amversion.m4
index aae0c28a0..ff3a85e6d 100644
--- a/m4/amversion.m4
+++ b/m4/amversion.m4
@@ -12,10 +12,10 @@
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
+[am__api_version='1.11a'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11], [],
+m4_if([$1], [1.11a], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -31,7 +31,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
+[AM_AUTOMAKE_VERSION([1.11a])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
diff --git a/m4/cond.m4 b/m4/cond.m4
index fd248b2f7..7fa5dfd71 100644
--- a/m4/cond.m4
+++ b/m4/cond.m4
@@ -1,21 +1,21 @@
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008, 2011
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 9
+# serial 10
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
diff --git a/m4/depend.m4 b/m4/depend.m4
index 89d37b26d..cf1b3d880 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -6,7 +6,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 12
+# serial 14
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -31,12 +31,12 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
@@ -111,7 +111,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -170,9 +170,13 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
diff --git a/m4/dmalloc.m4 b/m4/dmalloc.m4
index aea5f9d0e..82743fd39 100644
--- a/m4/dmalloc.m4
+++ b/m4/dmalloc.m4
@@ -3,28 +3,29 @@
## From Franc,ois Pinard ##
## ----------------------------------- ##
-# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2010,
+# 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 6
AC_DEFUN([AM_WITH_DMALLOC],
[AC_MSG_CHECKING([if malloc debugging is wanted])
-AC_ARG_WITH(dmalloc,
-[ --with-dmalloc use dmalloc, as in http://www.dmalloc.com],
+AC_ARG_WITH([dmalloc],
+[AS_HELP_STRING([--with-dmalloc],
+ [use dmalloc, as in http://www.dmalloc.com])],
[if test "$withval" = yes; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(WITH_DMALLOC,1,
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([WITH_DMALLOC], [1],
[Define if using the dmalloc debugging malloc package])
LIBS="$LIBS -ldmalloc"
LDFLAGS="$LDFLAGS -g"
else
- AC_MSG_RESULT(no)
-fi], [AC_MSG_RESULT(no)])
+ AC_MSG_RESULT([no])
+fi], [AC_MSG_RESULT([no])])
])
AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
diff --git a/m4/gcj.m4 b/m4/gcj.m4
index 9e930e036..c53a1bfc6 100644
--- a/m4/gcj.m4
+++ b/m4/gcj.m4
@@ -1,18 +1,19 @@
# Check for Java compiler. -*- Autoconf -*-
# For now we only handle the GNU compiler.
-# Copyright (C) 1999, 2000, 2003, 2005, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2005, 2009, 2011 Free Software
+# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-AC_DEFUN([AM_PROG_GCJ],[
-AC_CHECK_TOOLS(GCJ, gcj, gcj)
+AC_DEFUN([AM_PROG_GCJ],
+[AC_CHECK_TOOLS([GCJ], [gcj], [gcj])
test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH])
if test "x${GCJFLAGS-unset}" = xunset; then
GCJFLAGS="-g -O2"
fi
-AC_SUBST(GCJFLAGS)
+AC_SUBST([GCJFLAGS])
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(GCJ)])
])
diff --git a/m4/init.m4 b/m4/init.m4
index 365c9ac89..ccc196548 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -1,13 +1,13 @@
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 16
+# serial 17
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -58,23 +58,25 @@ m4_ifval([$2],
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
@@ -88,17 +90,17 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
+ [_AM_DEPENDENCIES([CC])],
[define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
+ [_AM_DEPENDENCIES([CXX])],
[define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES(OBJC)],
+ [_AM_DEPENDENCIES([OBJC])],
[define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
diff --git a/m4/install-sh.m4 b/m4/install-sh.m4
index b15371521..a9b81e0c7 100644
--- a/m4/install-sh.m4
+++ b/m4/install-sh.m4
@@ -1,5 +1,6 @@
## -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -18,4 +19,4 @@ if test x"${install_sh}" != xset; then
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
diff --git a/m4/lex.m4 b/m4/lex.m4
index 022f6a8b6..501292679 100644
--- a/m4/lex.m4
+++ b/m4/lex.m4
@@ -1,20 +1,20 @@
## Replacement for AC_PROG_LEX. -*- Autoconf -*-
## by Alexandre Oliva <oliva@dcc.unicamp.br>
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2011 Free
+# Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 6
# AM_PROG_LEX
# -----------
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
# "missing" invocation, for better error output.
AC_DEFUN([AM_PROG_LEX],
-[AC_PREREQ(2.50)dnl
+[AC_PREREQ([2.50])dnl
AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
AC_REQUIRE([AC_PROG_LEX])dnl
if test "$LEX" = :; then
diff --git a/m4/lispdir.m4 b/m4/lispdir.m4
index 62c2daf67..bc1c831c4 100644
--- a/m4/lispdir.m4
+++ b/m4/lispdir.m4
@@ -10,7 +10,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 10
+# serial 11
# AM_PATH_LISPDIR
# ---------------
@@ -23,7 +23,8 @@ AC_DEFUN([AM_PATH_LISPDIR],
AC_ARG_VAR([EMACS], [the Emacs editor command])
AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path])
AC_ARG_WITH([lispdir],
- [ --with-lispdir override the default lisp directory],
+ [AS_HELP_STRING([--with-lispdir],
+ [override the default lisp directory])],
[ lispdir="$withval"
AC_MSG_CHECKING([where .elc files should go])
AC_MSG_RESULT([$lispdir])],
diff --git a/m4/maintainer.m4 b/m4/maintainer.m4
index 0b54e67ed..0d0bf7f3b 100644
--- a/m4/maintainer.m4
+++ b/m4/maintainer.m4
@@ -8,7 +8,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 6
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
@@ -25,10 +25,11 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
-[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- [USE_MAINTAINER_MODE=$enableval],
- [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
diff --git a/m4/multi.m4 b/m4/multi.m4
index 98417679f..bc01dcf7b 100644
--- a/m4/multi.m4
+++ b/m4/multi.m4
@@ -1,20 +1,22 @@
## -*- Autoconf -*-
-# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2011
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
+# serial 8
# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
# ---------------------------------------------------
# Add --enable-multilib to configure.
AC_DEFUN([AM_ENABLE_MULTILIB],
[# Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
+AC_ARG_ENABLE([multilib],
+[AS_HELP_STRING(
+ [--enable-multilib],
+ [build many library versions (default)])],
[case "$enableval" in
yes) multilib=yes ;;
no) multilib=no ;;
@@ -35,7 +37,7 @@ if test "$srcdir" = "."; then
else
multi_basedir="$srcdir/$2"
fi
-AC_SUBST(multi_basedir)
+AC_SUBST([multi_basedir])
# Even if the default multilib is not a cross compilation,
# it may be that some of the other multilibs are.
diff --git a/m4/options.m4 b/m4/options.m4
index 6824d84fa..efdc49d1c 100644
--- a/m4/options.m4
+++ b/m4/options.m4
@@ -1,13 +1,13 @@
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010, 2011 Free Software
# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 6
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -18,7 +18,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
# _AM_SET_OPTIONS(OPTIONS)
# ------------------------
diff --git a/m4/python.m4 b/m4/python.m4
index 655dcf3f0..413382380 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -3,8 +3,8 @@
## From Andrew Dalke
## Updated by James Henstridge
## ------------------------
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009,
+# 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -53,10 +53,11 @@ AC_DEFUN([AM_PATH_PYTHON],
dnl A version check is needed.
if test -n "$PYTHON"; then
# If the user set $PYTHON, use it and don't search something else.
- AC_MSG_CHECKING([whether $PYTHON version >= $1])
+ AC_MSG_CHECKING([whether $PYTHON version is >= $1])
AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
- [AC_MSG_RESULT(yes)],
- [AC_MSG_ERROR(too old)])
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Python interpreter is too old])])
am_display_PYTHON=$PYTHON
else
# Otherwise, try each interpreter until we find one that satisfies
diff --git a/m4/regex.m4 b/m4/regex.m4
index c05bb3814..a453930ea 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,18 +1,21 @@
## --------------------------------- ## -*- Autoconf -*-
## Check if --with-regex was given. ##
## --------------------------------- ##
-# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+# 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 7
+# serial 8
# AM_WITH_REGEX
# -------------
#
+# THIS MACRO IS OBSOLETE now, since rx doesn't seem to be maintained,
+# while regex is. This macro should be removed on 2013-01-01.
+#
# The idea is to distribute rx.[hc] and regex.[hc] together, for a
# while. The WITH_REGEX symbol is used to decide which of regex.h or
# rx.h should be included in the application. If `./configure
@@ -23,10 +26,9 @@
# package will use the system's rx which, on Linux at least, will
# result in a smaller executable file.
#
-# FIXME: This macro seems quite obsolete now since rx doesn't seem to
-# be maintained, while regex is.
AC_DEFUN([AM_WITH_REGEX],
[AC_PREREQ(2.50)dnl
+m4_warn([obsolete], [$0 is obsolete, since `rx' is unmantained now])dnl
AC_LIBSOURCES([rx.h, rx.c, regex.c, regex.h])dnl
AC_MSG_CHECKING([which of GNU rx or gawk's regex is wanted])
AC_ARG_WITH([regex],
diff --git a/m4/sanity.m4 b/m4/sanity.m4
index db87c8bb1..b718ac405 100644
--- a/m4/sanity.m4
+++ b/m4/sanity.m4
@@ -1,13 +1,13 @@
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
+# serial 9
# AM_SANITY_CHECK
# ---------------
@@ -32,14 +32,14 @@ esac
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
+ am_has_slept=no
for am_try in 1 2; do
- echo timestamp > conftest.file
+ echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
- rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
@@ -55,6 +55,7 @@ if (
fi
# Just in case.
sleep 1
+ am_has_slept=yes
done
test "$[2]" = conftest.file
)
@@ -65,4 +66,20 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
diff --git a/m4/silent.m4 b/m4/silent.m4
index 6d2a1a276..432dd4577 100644
--- a/m4/silent.m4
+++ b/m4/silent.m4
@@ -1,24 +1,29 @@
## -*- Autoconf -*-
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 2
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
# (`yes' being less verbose, `no' or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[ --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: `make V=1')])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: `make V=0')])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
diff --git a/tests/.gitignore b/tests/.gitignore
index 3c1f9903f..026e261e4 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,8 +1,12 @@
aclocal-*
automake-*
-defs
+defs-static
+instspc-tests.am
parallel-tests.am
*.dir
*.log
*.log-t
*-p.test
+instspc-*-build.test
+instspc-*-install.test
+*.test-t
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d4d947497..7f165ac46 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,29 +16,88 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+MAINTAINERCLEANFILES =
+EXTRA_DIST = ChangeLog-old
+
XFAIL_TESTS = \
all.test \
auxdir2.test \
cond17.test \
gcj6.test \
+override-conditional-2.test \
pr8365-remake-timing.test \
txinfo5.test
+
include $(srcdir)/parallel-tests.am
$(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
- (cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+ $(AM_V_GEN)($(am__cd) $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+
+$(parallel_tests): Makefile.am
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
+ { echo '#!/bin/sh'; \
+ echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+ echo; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
+ echo '. ./defs-static || exit 99'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
+ echo; \
+ echo "# Run the test with Automake's parallel-tests driver enabled."; \
+ echo 'parallel_tests=yes'; \
+ echo "# In the spirit of VPATH, we prefer a test in the build tree"; \
+ echo "# over one in the source tree."; \
+ echo "if test -f \"./$$input\"; then"; \
+ echo " . \"./$$input\""; \
+ echo 'else'; \
+ echo " . \"\$$testsrcdir/$$input\""; \
+ echo 'fi'; \
+ } > $@-t
+ $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
+
+MAINTAINERCLEANFILES += $(parallel_tests)
+EXTRA_DIST += gen-parallel-tests
+
-$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
- input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
- sed 's|^\. \./defs.*|parallel_tests=yes; &|' \
- < $(srcdir)/$$input >$@
- chmod a+rx $@
+include $(srcdir)/instspc-tests.am
+
+$(srcdir)/instspc-tests.am: instspc-tests.sh Makefile.am
+ $(AM_V_GEN)($(am__cd) $(srcdir) \
+ && $(SHELL) ./instspc-tests.sh --generate-makefile) >$@
+
+$(instspc_tests): Makefile.am
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN) :; \
+ base=`expr 'x/$@' : 'x.*/instspc-\(.*\)\.test$$'`; \
+ name=`expr x"$$base" : x'\(.*\)-'`; \
+ action=`expr x"$$base" : x'.*-\(.*\)'`; \
+ { \
+ echo '#!/bin/sh'; \
+ echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+ echo; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
+ echo '. ./defs-static || exit 99'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
+ echo; \
+ echo "instspc_test_name='$$name'"; \
+ echo "instspc_action='test-$$action'"; \
+ echo ". \$$testsrcdir/instspc-tests.sh"; \
+ } > $@-t
+ $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
+
+# All instspc-*.test tests work by sourcing the `instspc-tests.sh'
+# script. Also, they all use shared data generated by the helper
+# test `instspc-data.test', for reasons of speed.
+instspc-data.log: instspc-tests.sh
+$(instspc_tests:.test=.log): instspc-tests.sh instspc-data.log
+
+MAINTAINERCLEANFILES += $(instspc_tests)
+EXTRA_DIST += instspc-tests.sh
+XFAIL_TESTS += $(instspc_xfail_tests)
-MAINTAINERCLEANFILES = $(parallel_tests)
TESTS = \
-aclibobj.test \
aclocal.test \
aclocal3.test \
aclocal4.test \
@@ -60,6 +119,7 @@ acloca19.test \
acloca20.test \
acloca21.test \
acloca22.test \
+acloca23.test \
acoutnoq.test \
acoutpt.test \
acoutpt2.test \
@@ -78,6 +138,8 @@ alpha2.test \
amassign.test \
ammissing.test \
amopt.test \
+amopts-location.test \
+amopts-variable-expansion.test \
amsubst.test \
ansi.test \
ansi2.test \
@@ -90,6 +152,7 @@ ansi7.test \
ansi8.test \
ansi9.test \
ansi10.test \
+ar-lib.test \
ar.test \
ar2.test \
asm.test \
@@ -113,6 +176,17 @@ auxdir.test \
auxdir2.test \
auxdir3.test \
auxdir4.test \
+auxdir5.test \
+auxdir6.test \
+auxdir7.test \
+auxdir8.test \
+auxdir9.test \
+backcompat.test \
+backcompat2.test \
+backcompat3.test \
+backcompat4.test \
+backcompat5.test \
+backcompat6.test \
backsl.test \
backsl2.test \
backsl3.test \
@@ -122,11 +196,15 @@ badopt.test \
badprog.test \
block.test \
bsource.test \
+candist.test \
canon.test \
canon2.test \
canon3.test \
canon4.test \
canon5.test \
+canon6.test \
+canon7.test \
+canon8.test \
canon-name.test \
ccnoco.test \
ccnoco2.test \
@@ -142,6 +220,7 @@ check8.test \
check9.test \
check10.test \
check11.test \
+check12.test \
check-exported-srcdir.test \
check-tests-in-builddir.test \
check-tests_environment.test \
@@ -150,6 +229,7 @@ clean.test \
clean2.test \
colneq.test \
colneq2.test \
+colneq3.test \
colon.test \
colon2.test \
colon3.test \
@@ -173,8 +253,13 @@ commen11.test \
comments-in-var-def.test \
compile.test \
compile2.test \
+compile3.test \
+compile4.test \
+compile5.test \
+compile6.test \
compile_f90_c_cxx.test \
compile_f_c_cxx.test \
+cond-basic.test \
cond.test \
cond2.test \
cond3.test \
@@ -219,6 +304,7 @@ cond42.test \
cond43.test \
cond44.test \
cond45.test \
+cond46.test \
condd.test \
condhook.test \
condhook2.test \
@@ -247,7 +333,9 @@ confsub.test \
confvar.test \
confvar2.test \
copy.test \
-ctarget1.test \
+cscope.test \
+cscope2.test \
+cscope3.test \
cxx.test \
cxx2.test \
cxxansi.test \
@@ -256,6 +344,12 @@ cxxlibobj.test \
cxxlink.test \
cxxnoc.test \
cxxo.test \
+cygnus-check-without-all.test \
+cygnus-dependency-tracking.test \
+cygnus-imply-foreign.test \
+cygnus-no-dist.test \
+cygnus-no-installinfo.test \
+cygnus-requires-maintainer-mode.test \
cygwin32.test \
dash.test \
defun.test \
@@ -284,6 +378,7 @@ depend3.test \
depend4.test \
depend5.test \
depend6.test \
+deprecated-acinit.test \
destdir.test \
dirforbid.test \
dirlist.test \
@@ -322,6 +417,7 @@ exeext4.test \
exsource.test \
ext.test \
ext2.test \
+ext3.test \
extra.test \
extra2.test \
extra3.test \
@@ -330,9 +426,12 @@ extra5.test \
extra6.test \
extra7.test \
extra8.test \
+extra9.test \
extra10.test \
extra11.test \
extra12.test \
+extradep.test \
+extradep2.test \
f90only.test \
flavor.test \
flibs.test \
@@ -414,7 +513,8 @@ instman2.test \
instmany.test \
instmany-mans.test \
instmany-python.test \
-instspc.test \
+instspc-data.test \
+$(instspc_tests) \
interp.test \
interp2.test \
java.test \
@@ -429,10 +529,13 @@ lex2.test \
lex3.test \
lex4.test \
lex5.test \
+lexcpp.test \
+lexvpath.test \
lex-subobj-nodep.test \
lflags.test \
lflags2.test \
libexec.test \
+libobj-basic.test \
libobj2.test \
libobj3.test \
libobj4.test \
@@ -440,10 +543,20 @@ libobj5.test \
libobj7.test \
libobj8.test \
libobj10.test \
-libobj11.test \
libobj12.test \
libobj13.test \
libobj14.test \
+libobj15a.test \
+libobj15b.test \
+libobj15c.test \
+libobj16a.test \
+libobj16b.test \
+libobj17.test \
+libobj18.test \
+libobj19.test \
+libobj20a.test \
+libobj20b.test \
+libobj20c.test \
library.test \
library2.test \
library3.test \
@@ -467,6 +580,7 @@ link_fc.test \
link_fccxx.test \
link_fcxx.test \
link_f_only.test \
+link_override.test \
lisp2.test \
lisp3.test \
lisp4.test \
@@ -488,6 +602,7 @@ ltinstloc.test \
ltlibobjs.test \
ltlibsrc.test \
ltorder.test \
+lzip.test \
lzma.test \
m4-inclusion.test \
maintclean.test \
@@ -524,6 +639,7 @@ mkinst3.test \
mmode.test \
mmodely.test \
multlib.test \
+no-outdir-option.test \
nobase.test \
nobase-libtool.test \
nobase-python.test \
@@ -546,8 +662,8 @@ number.test \
objc.test \
objc2.test \
obsolete.test \
+oldvars.test \
order.test \
-outdir.test \
output.test \
output2.test \
output3.test \
@@ -562,7 +678,10 @@ output11.test \
output12.test \
output13.test \
output-order.test \
-overrid.test \
+override-conditional-1.test \
+override-conditional-2.test \
+override-html.test \
+override-suggest-local.test \
parallel-am.test \
parallel-am2.test \
parallel-am3.test \
@@ -593,6 +712,15 @@ pluseq8.test \
pluseq9.test \
pluseq10.test \
pluseq11.test \
+posixsubst-data.test \
+posixsubst-extradist.test \
+posixsubst-ldadd.test \
+posixsubst-libraries.test \
+posixsubst-ltlibraries.test \
+posixsubst-programs.test \
+posixsubst-scripts.test \
+posixsubst-sources.test \
+posixsubst-tests.test \
postproc.test \
ppf77.test \
pr2.test \
@@ -626,6 +754,7 @@ python2.test \
python3.test \
python4.test \
python5.test \
+python5b.test \
python6.test \
python7.test \
python8.test \
@@ -633,21 +762,46 @@ python9.test \
python10.test \
python11.test \
python12.test \
+python-dist.test \
+python-vars.test \
+python-virtualenv.test \
recurs.test \
recurs2.test \
remake.test \
+remake1a.test \
remake2.test \
remake3.test \
+remake3a.test \
remake4.test \
remake5.test \
remake6.test \
remake7.test \
+remake8a.test \
+remake8b.test \
+remake9a.test \
+remake9b.test \
+remake9c.test \
+remake9d.test \
+remake10a.test \
+remake10b.test \
+remake10c.test \
+remake11.test \
+remake12.test \
pr8365-remake-timing.test \
regex.test \
+regex-obsolete.test \
req.test \
reqd.test \
reqd2.test \
+repeated-options.test \
rulepat.test \
+self-check-cleanup.test \
+self-check-dir.test \
+self-check-exit.test \
+self-check-is_newest.test \
+self-check-me.test \
+self-check-sanity.test \
+self-check-unindent.test \
sanity.test \
scripts.test \
seenc.test \
@@ -657,6 +811,7 @@ silent3.test \
silent4.test \
silent6.test \
silent7.test \
+silent8.test \
silent9.test \
silentcxx.test \
silentf77.test \
@@ -667,6 +822,7 @@ silent-lex-gcc.test \
silent-lex-generic.test \
silent-yacc-gcc.test \
silent-yacc-generic.test \
+silent-nowarn.test \
srcsub.test \
srcsub2.test \
space.test \
@@ -688,6 +844,8 @@ stdinc.test \
stamph2.test \
stdlib.test \
stdlib2.test \
+strictness-override.test \
+strictness-precedence.test \
strip.test \
strip2.test \
strip3.test \
@@ -727,6 +885,7 @@ subst.test \
subst2.test \
subst3.test \
subst4.test \
+subst5.test \
substref.test \
substre2.test \
substtarg.test \
@@ -736,6 +895,8 @@ suffix3.test \
suffix4.test \
suffix5.test \
suffix6.test \
+suffix6b.test \
+suffix6c.test \
suffix7.test \
suffix8.test \
suffix9.test \
@@ -747,6 +908,7 @@ symlink.test \
symlink2.test \
syntax.test \
tags.test \
+tags2.test \
tagsub.test \
tar.test \
tar2.test \
@@ -783,6 +945,7 @@ txinfo30.test \
txinfo31.test \
txinfo32.test \
txinfo33.test \
+txinfo-unrecognized-extension.test \
transform.test \
transform2.test \
unused.test \
@@ -798,6 +961,8 @@ vala5.test \
vars.test \
vars3.test \
vartar.test \
+vartypos.test \
+vartypo2.test \
version.test \
version2.test \
version3.test \
@@ -810,32 +975,51 @@ vtexi.test \
vtexi2.test \
vtexi3.test \
vtexi4.test \
+warnings-override.test \
+warnings-precedence.test \
+warnings-strictness-interactions.test \
+warnings-unknown.test \
warnopts.test \
+warnings-win-over-strictness.test \
+warning-groups-win-over-strictness.test \
werror.test \
werror2.test \
werror3.test \
+werror4.test \
whoami.test \
xsource.test \
xz.test \
+yacc-basic.test \
+yacc-d-basic.test \
+yacc-clean.test \
yacc.test \
yacc2.test \
-yacc3.test \
yacc4.test \
yacc5.test \
yacc6.test \
yacc7.test \
yacc8.test \
yaccdry.test \
+yacc-dist-nobuild.test \
+yacc-nodist.test \
yaccpp.test \
yaccvpath.test \
+yacc-d-vpath.test \
yflags.test \
yflags2.test \
+yflags-cmdline-override.test \
+yflags-conditional.test \
+yflags-d-false-positives.test \
+yflags-force-override.test \
+yflags-force-conditional.test \
+yflags-var-expand.test \
$(parallel_tests)
-EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
+EXTRA_DIST += $(TESTS)
+
# Each test case depends on defs, aclocal, and automake.
-check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
+$(TEST_LOGS): defs aclocal-$(APIVERSION) automake-$(APIVERSION)
clean-local: clean-local-check
.PHONY: clean-local-check
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 4d4c21f8d..d1e3a73eb 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -49,7 +49,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in \
+ $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs \
+ $(srcdir)/defs-static.in $(srcdir)/instspc-tests.am \
$(srcdir)/parallel-tests.am
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -58,14 +59,21 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
- $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+ $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
-CONFIG_CLEAN_FILES = defs aclocal-${APIVERSION} automake-${APIVERSION}
-CONFIG_CLEAN_VPATH_FILES =
+CONFIG_CLEAN_FILES = defs-static aclocal-${APIVERSION} \
+ automake-${APIVERSION}
+CONFIG_CLEAN_VPATH_FILES = defs
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
# If stdout is a non-dumb tty, use colors. If test -t is not supported,
@@ -184,6 +192,7 @@ TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -272,43 +281,84 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-XFAIL_TESTS = \
-all.test \
-auxdir2.test \
-cond17.test \
-gcj6.test \
-pr8365-remake-timing.test \
-txinfo5.test
-
-parallel_tests = \
-check-exported-srcdir-p.test \
-check-tests-in-builddir-p.test \
-check-tests_environment-p.test \
-check-p.test \
-check10-p.test \
-check11-p.test \
-check2-p.test \
-check3-p.test \
-check4-p.test \
-check5-p.test \
-check6-p.test \
-check7-p.test \
-check8-p.test \
-check9-p.test \
-color-p.test \
-color2-p.test \
-comment9-p.test \
-dejagnu-p.test \
-exeext4-p.test \
-maken3-p.test \
-maken4-p.test \
-pr401-p.test \
-pr401b-p.test \
-pr401c-p.test
-
-MAINTAINERCLEANFILES = $(parallel_tests)
+MAINTAINERCLEANFILES = $(parallel_tests) $(instspc_tests)
+EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \
+ $(TESTS)
+XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \
+ override-conditional-2.test pr8365-remake-timing.test \
+ txinfo5.test $(instspc_xfail_tests)
+parallel_tests = backcompat5-p.test check-exported-srcdir-p.test \
+ check-tests-in-builddir-p.test check-tests_environment-p.test \
+ check-p.test check10-p.test check11-p.test check12-p.test \
+ check2-p.test check3-p.test check4-p.test check5-p.test \
+ check6-p.test check7-p.test check8-p.test check9-p.test \
+ color-p.test color2-p.test comment9-p.test dejagnu-p.test \
+ exeext4-p.test maken3-p.test maken4-p.test \
+ posixsubst-tests-p.test pr401-p.test pr401b-p.test \
+ pr401c-p.test
+instspc_tests = instspc-squote-build.test instspc-squote-install.test \
+ instspc-dquote-build.test instspc-dquote-install.test \
+ instspc-bquote-build.test instspc-bquote-install.test \
+ instspc-sharp-build.test instspc-sharp-install.test \
+ instspc-dollar-build.test instspc-dollar-install.test \
+ instspc-bang-build.test instspc-bang-install.test \
+ instspc-bslash-build.test instspc-bslash-install.test \
+ instspc-ampersand-build.test instspc-ampersand-install.test \
+ instspc-percent-build.test instspc-percent-install.test \
+ instspc-leftpar-build.test instspc-leftpar-install.test \
+ instspc-rightpar-build.test instspc-rightpar-install.test \
+ instspc-pipe-build.test instspc-pipe-install.test \
+ instspc-caret-build.test instspc-caret-install.test \
+ instspc-tilde-build.test instspc-tilde-install.test \
+ instspc-qmark-build.test instspc-qmark-install.test \
+ instspc-star-build.test instspc-star-install.test \
+ instspc-plus-build.test instspc-plus-install.test \
+ instspc-minus-build.test instspc-minus-install.test \
+ instspc-comma-build.test instspc-comma-install.test \
+ instspc-colon-build.test instspc-colon-install.test \
+ instspc-semicol-build.test instspc-semicol-install.test \
+ instspc-equal-build.test instspc-equal-install.test \
+ instspc-less-build.test instspc-less-install.test \
+ instspc-more-build.test instspc-more-install.test \
+ instspc-at-build.test instspc-at-install.test \
+ instspc-lqbrack-build.test instspc-lqbrack-install.test \
+ instspc-rqbrack-build.test instspc-rqbrack-install.test \
+ instspc-lcbrack-build.test instspc-lcbrack-install.test \
+ instspc-rcbrack-build.test instspc-rcbrack-install.test \
+ instspc-space-build.test instspc-space-install.test \
+ instspc-tab-build.test instspc-tab-install.test \
+ instspc-linefeed-build.test instspc-linefeed-install.test \
+ instspc-backspace-build.test instspc-backspace-install.test \
+ instspc-formfeed-build.test instspc-formfeed-install.test \
+ instspc-carriageret-build.test \
+ instspc-carriageret-install.test \
+ instspc-quadrigraph0-build.test \
+ instspc-quadrigraph0-install.test \
+ instspc-quadrigraph1-build.test \
+ instspc-quadrigraph1-install.test \
+ instspc-quadrigraph2-build.test \
+ instspc-quadrigraph2-install.test \
+ instspc-quadrigraph3-build.test \
+ instspc-quadrigraph3-install.test \
+ instspc-quadrigraph4-build.test \
+ instspc-quadrigraph4-install.test instspc-a_b-build.test \
+ instspc-a_b-install.test instspc-a__b-build.test \
+ instspc-a__b-install.test instspc-a_lf_b-build.test \
+ instspc-a_lf_b-install.test instspc-dotdotdot-build.test \
+ instspc-dotdotdot-install.test instspc-dosdrive-build.test \
+ instspc-dosdrive-install.test instspc-miscglob1-build.test \
+ instspc-miscglob1-install.test instspc-miscglob2-build.test \
+ instspc-miscglob2-install.test
+instspc_xfail_tests = instspc-squote-build.test \
+ instspc-dquote-build.test instspc-bquote-build.test \
+ instspc-sharp-build.test instspc-dollar-build.test \
+ instspc-bslash-build.test instspc-ampersand-build.test \
+ instspc-linefeed-build.test instspc-quadrigraph0-build.test \
+ instspc-a_lf_b-build.test instspc-squote-install.test \
+ instspc-dquote-install.test instspc-bquote-install.test \
+ instspc-sharp-install.test instspc-dollar-install.test \
+ instspc-linefeed-install.test instspc-a_lf_b-install.test
TESTS = \
-aclibobj.test \
aclocal.test \
aclocal3.test \
aclocal4.test \
@@ -330,6 +380,7 @@ acloca19.test \
acloca20.test \
acloca21.test \
acloca22.test \
+acloca23.test \
acoutnoq.test \
acoutpt.test \
acoutpt2.test \
@@ -348,6 +399,8 @@ alpha2.test \
amassign.test \
ammissing.test \
amopt.test \
+amopts-location.test \
+amopts-variable-expansion.test \
amsubst.test \
ansi.test \
ansi2.test \
@@ -360,6 +413,7 @@ ansi7.test \
ansi8.test \
ansi9.test \
ansi10.test \
+ar-lib.test \
ar.test \
ar2.test \
asm.test \
@@ -383,6 +437,17 @@ auxdir.test \
auxdir2.test \
auxdir3.test \
auxdir4.test \
+auxdir5.test \
+auxdir6.test \
+auxdir7.test \
+auxdir8.test \
+auxdir9.test \
+backcompat.test \
+backcompat2.test \
+backcompat3.test \
+backcompat4.test \
+backcompat5.test \
+backcompat6.test \
backsl.test \
backsl2.test \
backsl3.test \
@@ -392,11 +457,15 @@ badopt.test \
badprog.test \
block.test \
bsource.test \
+candist.test \
canon.test \
canon2.test \
canon3.test \
canon4.test \
canon5.test \
+canon6.test \
+canon7.test \
+canon8.test \
canon-name.test \
ccnoco.test \
ccnoco2.test \
@@ -412,6 +481,7 @@ check8.test \
check9.test \
check10.test \
check11.test \
+check12.test \
check-exported-srcdir.test \
check-tests-in-builddir.test \
check-tests_environment.test \
@@ -420,6 +490,7 @@ clean.test \
clean2.test \
colneq.test \
colneq2.test \
+colneq3.test \
colon.test \
colon2.test \
colon3.test \
@@ -443,8 +514,13 @@ commen11.test \
comments-in-var-def.test \
compile.test \
compile2.test \
+compile3.test \
+compile4.test \
+compile5.test \
+compile6.test \
compile_f90_c_cxx.test \
compile_f_c_cxx.test \
+cond-basic.test \
cond.test \
cond2.test \
cond3.test \
@@ -489,6 +565,7 @@ cond42.test \
cond43.test \
cond44.test \
cond45.test \
+cond46.test \
condd.test \
condhook.test \
condhook2.test \
@@ -517,7 +594,9 @@ confsub.test \
confvar.test \
confvar2.test \
copy.test \
-ctarget1.test \
+cscope.test \
+cscope2.test \
+cscope3.test \
cxx.test \
cxx2.test \
cxxansi.test \
@@ -526,6 +605,12 @@ cxxlibobj.test \
cxxlink.test \
cxxnoc.test \
cxxo.test \
+cygnus-check-without-all.test \
+cygnus-dependency-tracking.test \
+cygnus-imply-foreign.test \
+cygnus-no-dist.test \
+cygnus-no-installinfo.test \
+cygnus-requires-maintainer-mode.test \
cygwin32.test \
dash.test \
defun.test \
@@ -554,6 +639,7 @@ depend3.test \
depend4.test \
depend5.test \
depend6.test \
+deprecated-acinit.test \
destdir.test \
dirforbid.test \
dirlist.test \
@@ -592,6 +678,7 @@ exeext4.test \
exsource.test \
ext.test \
ext2.test \
+ext3.test \
extra.test \
extra2.test \
extra3.test \
@@ -600,9 +687,12 @@ extra5.test \
extra6.test \
extra7.test \
extra8.test \
+extra9.test \
extra10.test \
extra11.test \
extra12.test \
+extradep.test \
+extradep2.test \
f90only.test \
flavor.test \
flibs.test \
@@ -684,7 +774,8 @@ instman2.test \
instmany.test \
instmany-mans.test \
instmany-python.test \
-instspc.test \
+instspc-data.test \
+$(instspc_tests) \
interp.test \
interp2.test \
java.test \
@@ -699,10 +790,13 @@ lex2.test \
lex3.test \
lex4.test \
lex5.test \
+lexcpp.test \
+lexvpath.test \
lex-subobj-nodep.test \
lflags.test \
lflags2.test \
libexec.test \
+libobj-basic.test \
libobj2.test \
libobj3.test \
libobj4.test \
@@ -710,10 +804,20 @@ libobj5.test \
libobj7.test \
libobj8.test \
libobj10.test \
-libobj11.test \
libobj12.test \
libobj13.test \
libobj14.test \
+libobj15a.test \
+libobj15b.test \
+libobj15c.test \
+libobj16a.test \
+libobj16b.test \
+libobj17.test \
+libobj18.test \
+libobj19.test \
+libobj20a.test \
+libobj20b.test \
+libobj20c.test \
library.test \
library2.test \
library3.test \
@@ -737,6 +841,7 @@ link_fc.test \
link_fccxx.test \
link_fcxx.test \
link_f_only.test \
+link_override.test \
lisp2.test \
lisp3.test \
lisp4.test \
@@ -758,6 +863,7 @@ ltinstloc.test \
ltlibobjs.test \
ltlibsrc.test \
ltorder.test \
+lzip.test \
lzma.test \
m4-inclusion.test \
maintclean.test \
@@ -794,6 +900,7 @@ mkinst3.test \
mmode.test \
mmodely.test \
multlib.test \
+no-outdir-option.test \
nobase.test \
nobase-libtool.test \
nobase-python.test \
@@ -816,8 +923,8 @@ number.test \
objc.test \
objc2.test \
obsolete.test \
+oldvars.test \
order.test \
-outdir.test \
output.test \
output2.test \
output3.test \
@@ -832,7 +939,10 @@ output11.test \
output12.test \
output13.test \
output-order.test \
-overrid.test \
+override-conditional-1.test \
+override-conditional-2.test \
+override-html.test \
+override-suggest-local.test \
parallel-am.test \
parallel-am2.test \
parallel-am3.test \
@@ -863,6 +973,15 @@ pluseq8.test \
pluseq9.test \
pluseq10.test \
pluseq11.test \
+posixsubst-data.test \
+posixsubst-extradist.test \
+posixsubst-ldadd.test \
+posixsubst-libraries.test \
+posixsubst-ltlibraries.test \
+posixsubst-programs.test \
+posixsubst-scripts.test \
+posixsubst-sources.test \
+posixsubst-tests.test \
postproc.test \
ppf77.test \
pr2.test \
@@ -896,6 +1015,7 @@ python2.test \
python3.test \
python4.test \
python5.test \
+python5b.test \
python6.test \
python7.test \
python8.test \
@@ -903,21 +1023,46 @@ python9.test \
python10.test \
python11.test \
python12.test \
+python-dist.test \
+python-vars.test \
+python-virtualenv.test \
recurs.test \
recurs2.test \
remake.test \
+remake1a.test \
remake2.test \
remake3.test \
+remake3a.test \
remake4.test \
remake5.test \
remake6.test \
remake7.test \
+remake8a.test \
+remake8b.test \
+remake9a.test \
+remake9b.test \
+remake9c.test \
+remake9d.test \
+remake10a.test \
+remake10b.test \
+remake10c.test \
+remake11.test \
+remake12.test \
pr8365-remake-timing.test \
regex.test \
+regex-obsolete.test \
req.test \
reqd.test \
reqd2.test \
+repeated-options.test \
rulepat.test \
+self-check-cleanup.test \
+self-check-dir.test \
+self-check-exit.test \
+self-check-is_newest.test \
+self-check-me.test \
+self-check-sanity.test \
+self-check-unindent.test \
sanity.test \
scripts.test \
seenc.test \
@@ -927,6 +1072,7 @@ silent3.test \
silent4.test \
silent6.test \
silent7.test \
+silent8.test \
silent9.test \
silentcxx.test \
silentf77.test \
@@ -937,6 +1083,7 @@ silent-lex-gcc.test \
silent-lex-generic.test \
silent-yacc-gcc.test \
silent-yacc-generic.test \
+silent-nowarn.test \
srcsub.test \
srcsub2.test \
space.test \
@@ -958,6 +1105,8 @@ stdinc.test \
stamph2.test \
stdlib.test \
stdlib2.test \
+strictness-override.test \
+strictness-precedence.test \
strip.test \
strip2.test \
strip3.test \
@@ -997,6 +1146,7 @@ subst.test \
subst2.test \
subst3.test \
subst4.test \
+subst5.test \
substref.test \
substre2.test \
substtarg.test \
@@ -1006,6 +1156,8 @@ suffix3.test \
suffix4.test \
suffix5.test \
suffix6.test \
+suffix6b.test \
+suffix6c.test \
suffix7.test \
suffix8.test \
suffix9.test \
@@ -1017,6 +1169,7 @@ symlink.test \
symlink2.test \
syntax.test \
tags.test \
+tags2.test \
tagsub.test \
tar.test \
tar2.test \
@@ -1053,6 +1206,7 @@ txinfo30.test \
txinfo31.test \
txinfo32.test \
txinfo33.test \
+txinfo-unrecognized-extension.test \
transform.test \
transform2.test \
unused.test \
@@ -1068,6 +1222,8 @@ vala5.test \
vars.test \
vars3.test \
vartar.test \
+vartypos.test \
+vartypo2.test \
version.test \
version2.test \
version3.test \
@@ -1080,37 +1236,51 @@ vtexi.test \
vtexi2.test \
vtexi3.test \
vtexi4.test \
+warnings-override.test \
+warnings-precedence.test \
+warnings-strictness-interactions.test \
+warnings-unknown.test \
warnopts.test \
+warnings-win-over-strictness.test \
+warning-groups-win-over-strictness.test \
werror.test \
werror2.test \
werror3.test \
+werror4.test \
whoami.test \
xsource.test \
xz.test \
+yacc-basic.test \
+yacc-d-basic.test \
+yacc-clean.test \
yacc.test \
yacc2.test \
-yacc3.test \
yacc4.test \
yacc5.test \
yacc6.test \
yacc7.test \
yacc8.test \
yaccdry.test \
+yacc-dist-nobuild.test \
+yacc-nodist.test \
yaccpp.test \
yaccvpath.test \
+yacc-d-vpath.test \
yflags.test \
yflags2.test \
+yflags-cmdline-override.test \
+yflags-conditional.test \
+yflags-d-false-positives.test \
+yflags-force-override.test \
+yflags-force-conditional.test \
+yflags-var-expand.test \
$(parallel_tests)
-EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
-
-# Each test case depends on defs, aclocal, and automake.
-check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
all: all-am
.SUFFIXES:
.SUFFIXES: .html .log .test
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/parallel-tests.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/parallel-tests.am $(srcdir)/instspc-tests.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -1140,7 +1310,7 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-defs: $(top_builddir)/config.status $(srcdir)/defs.in
+defs-static: $(top_builddir)/config.status $(srcdir)/defs-static.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
aclocal-${APIVERSION}: $(top_builddir)/config.status $(srcdir)/aclocal.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
@@ -1152,6 +1322,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__sh_e_setup); \
@@ -1311,7 +1483,6 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile
@@ -1431,15 +1602,91 @@ uninstall-am:
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am recheck recheck-html uninstall uninstall-am
+backcompat5-p.log: backcompat5.test
+check-exported-srcdir-p.log: check-exported-srcdir.test
+check-tests-in-builddir-p.log: check-tests-in-builddir.test
+check-tests_environment-p.log: check-tests_environment.test
+check-p.log: check.test
+check10-p.log: check10.test
+check11-p.log: check11.test
+check12-p.log: check12.test
+check2-p.log: check2.test
+check3-p.log: check3.test
+check4-p.log: check4.test
+check5-p.log: check5.test
+check6-p.log: check6.test
+check7-p.log: check7.test
+check8-p.log: check8.test
+check9-p.log: check9.test
+color-p.log: color.test
+color2-p.log: color2.test
+comment9-p.log: comment9.test
+dejagnu-p.log: dejagnu.test
+exeext4-p.log: exeext4.test
+maken3-p.log: maken3.test
+maken4-p.log: maken4.test
+posixsubst-tests-p.log: posixsubst-tests.test
+pr401-p.log: pr401.test
+pr401b-p.log: pr401b.test
+pr401c-p.log: pr401c.test
$(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
- (cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+ $(AM_V_GEN)($(am__cd) $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+
+$(parallel_tests): Makefile.am
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
+ { echo '#!/bin/sh'; \
+ echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+ echo; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
+ echo '. ./defs-static || exit 99'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
+ echo; \
+ echo "# Run the test with Automake's parallel-tests driver enabled."; \
+ echo 'parallel_tests=yes'; \
+ echo "# In the spirit of VPATH, we prefer a test in the build tree"; \
+ echo "# over one in the source tree."; \
+ echo "if test -f \"./$$input\"; then"; \
+ echo " . \"./$$input\""; \
+ echo 'else'; \
+ echo " . \"\$$testsrcdir/$$input\""; \
+ echo 'fi'; \
+ } > $@-t
+ $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
+
+$(srcdir)/instspc-tests.am: instspc-tests.sh Makefile.am
+ $(AM_V_GEN)($(am__cd) $(srcdir) \
+ && $(SHELL) ./instspc-tests.sh --generate-makefile) >$@
-$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
- input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
- sed 's|^\. \./defs.*|parallel_tests=yes; &|' \
- < $(srcdir)/$$input >$@
- chmod a+rx $@
+$(instspc_tests): Makefile.am
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN) :; \
+ base=`expr 'x/$@' : 'x.*/instspc-\(.*\)\.test$$'`; \
+ name=`expr x"$$base" : x'\(.*\)-'`; \
+ action=`expr x"$$base" : x'.*-\(.*\)'`; \
+ { \
+ echo '#!/bin/sh'; \
+ echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+ echo; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
+ echo '. ./defs-static || exit 99'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
+ echo; \
+ echo "instspc_test_name='$$name'"; \
+ echo "instspc_action='test-$$action'"; \
+ echo ". \$$testsrcdir/instspc-tests.sh"; \
+ } > $@-t
+ $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
+
+# All instspc-*.test tests work by sourcing the `instspc-tests.sh'
+# script. Also, they all use shared data generated by the helper
+# test `instspc-data.test', for reasons of speed.
+instspc-data.log: instspc-tests.sh
+$(instspc_tests:.test=.log): instspc-tests.sh instspc-data.log
+
+# Each test case depends on defs, aclocal, and automake.
+$(TEST_LOGS): defs aclocal-$(APIVERSION) automake-$(APIVERSION)
clean-local: clean-local-check
.PHONY: clean-local-check
diff --git a/tests/README b/tests/README
index 93f9cbf89..2d8023649 100644
--- a/tests/README
+++ b/tests/README
@@ -5,15 +5,33 @@ User interface
==============
-Running all tests
+Running the tests
-----------------
- make check
+ To run all tests:
+
+ make -k check
You can use `-jN' for faster completion (it even helps on a
uniprocessor system, due to unavoidable sleep delays, as
noted below).
+ To rerun only failed tests:
+
+ make -k recheck
+
+ To run only tests that are newer than their last results:
+
+ make -k check RECHECK_LOGS=
+
+ To run only selected tests:
+
+ make -k check TESTS="foo.test bar.test"
+
+ For non-GNU make, you might have to use this instead:
+
+ env TESTS="foo.test bar.test" make -e -k check
+
Interpretation
--------------
@@ -52,17 +70,19 @@ Supported shells
should run with any decent Bourne-compatible shell.
However, some care must be used with Zsh, since, when not directly
- starting in Bourne-compatibility mode, it has some incompatibilities
- in the handling of `$0' which conflict with our usage, and which have
- no easy workaround. Thus, if you want to run a test script, say
- foo.test, with Zsh, you *can't* simply do `zsh foo.test', but you
- *must* resort to:
+ started in Bourne-compatibility mode, it has some incompatibilities
+ in the handling of `$0' which conflict with our usage. Our testsuite
+ can automatically work around these incompatibilities when a version
+ 4.3 or later of Zsh is used, but unfortunately not when an older
+ version of Zsh is used. Thus, if you want to run a test script, say
+ foo.test, with Zsh 4.2, you *can't* simply do `zsh foo.test', but
+ you *must* resort to:
zsh -o no_function_argzero foo.test
- Note that this problem does not occur if zsh is executed through a
- symlink with a basename of `sh', since in that case it starts
- in Bourne compatibility mode. So you should be perfectly safe when
- /bin/sh is zsh.
+ Note that this problem does not occur if Zsh is executed through
+ a symlink with a basename of `sh', since in that case Zsh starts
+ in Bourne compatibility mode. So you should be perfectly safe
+ when /bin/sh is Zsh, even a it's version < 4.3.
Reporting failures
@@ -111,14 +131,18 @@ Do
but do not output anything by default. If you need ./configure
to create Makefile, append AC_OUTPUT to configure.in.
- Use `set -e' to catch failures you might not have thought of.
+ By default, the testcases are run with the `errexit' shell flag on,
+ to make it easier to catch failures you might not have thought of.
+ If this is undesirable in some testcase, you can use `set +e' to
+ disable the `errexit' flag (but please do so only if you have a
+ very good reason).
End the test script with a `:' or `Exit 0'. Otherwise, when somebody
changes the test by adding a failing command after the last command,
- the test will spuriously fail because $? is nonzero at the end.
- Note that this is relevant also for tests using `set -e', if they
- contain commands like "grep ... Makefile.in && Exit 1" (and there
- are indeed a lot of such tests).
+ the test will spuriously fail because $? is nonzero at the end. Note
+ that this is relevant even if the `errexit' shell flag is on, in case
+ the test contains commands like "grep ... Makefile.in && Exit 1" (and
+ there are indeed a lot of such tests).
Use $ACLOCAL, $AUTOMAKE, $AUTOCONF, $AUTOUPDATE, $AUTOHEADER,
$PERL, $MAKE, $EGREP, and $FGREP, instead of the corresponding
@@ -127,12 +151,11 @@ Do
Use $sleep when you have to make sure that some file is newer
than another.
- Use `cat' or `grep' to display (part of) files that may be
- interesting for debugging, so that when a user send a verbose
- output we don't have to ask him for more details. Display stderr
- output on the stderr file descriptor. If some redirected command
- is likely to fail, and `set -e' is in effect, display its output
- even in the failure case, before exiting.
+ Use `cat' or `grep' to display (part of) files that may be interesting
+ for debugging, so that when a user send a verbose output we don't have
+ to ask him for more details. Display stderr output on the stderr file
+ descriptor. If some redirected command is likely to fail, display its
+ output even in the failure case, before exiting.
Use `Exit' rather than `exit' to abort a test.
diff --git a/tests/acloca10.test b/tests/acloca10.test
index 7716f2aa8..2501d516d 100755
--- a/tests/acloca10.test
+++ b/tests/acloca10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
MACRO2
MACRO1
@@ -55,6 +53,7 @@ grep MACRO3 aclocal.m4
test ! -f m4_1/macro.m4
test ! -f m4_2/macro.m4
+$sleep
$ACLOCAL -I m4_2 -I m4_1
$AUTOCONF
./configure
@@ -65,6 +64,7 @@ grep MACRO3 aclocal.m4
test ! -f m4_1/macro.m4
test ! -f m4_2/macro.m4
+$sleep
ACLOCAL_TESTSUITE_FLAGS='-I m4_1 -I m4_2'
$ACLOCAL --install
$AUTOCONF
@@ -77,6 +77,7 @@ test -f m4_1/macro.m4
test ! -f m4_2/macro.m4
cp aclocal.m4 copy.m4
+$sleep
echo '#GREPME' >>dirlist-test/macro.m4
$ACLOCAL --install
$AUTOCONF
diff --git a/tests/acloca11.test b/tests/acloca11.test
index 61e9e8a43..25e7a5015 100755
--- a/tests/acloca11.test
+++ b/tests/acloca11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
MACRO2
MACRO1
diff --git a/tests/acloca12.test b/tests/acloca12.test
index 14d699a87..2fb57e9dd 100755
--- a/tests/acloca12.test
+++ b/tests/acloca12.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
MACRO1
END
diff --git a/tests/acloca13.test b/tests/acloca13.test
index 56a54eb95..77b43fe3d 100755
--- a/tests/acloca13.test
+++ b/tests/acloca13.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
m4_include([somefile.m4])
AC_OUTPUT
diff --git a/tests/acloca14.test b/tests/acloca14.test
index 1bdf7c780..0371ef58f 100755
--- a/tests/acloca14.test
+++ b/tests/acloca14.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_PROG_LIBTOOL
AC_OUTPUT
diff --git a/tests/acloca15.test b/tests/acloca15.test
index dd612ec71..9cb70d184 100755
--- a/tests/acloca15.test
+++ b/tests/acloca15.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
# Start macros with AM_ because that causes aclocal to complain if it
# cannot find them.
diff --git a/tests/acloca16.test b/tests/acloca16.test
index 93bde8bf1..5f6dc60bd 100755
--- a/tests/acloca16.test
+++ b/tests/acloca16.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_SUBST([POM])
END
diff --git a/tests/acloca17.test b/tests/acloca17.test
index 884f24b51..c1355c54b 100755
--- a/tests/acloca17.test
+++ b/tests/acloca17.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
SOME_DEFS
END
diff --git a/tests/acloca18.test b/tests/acloca18.test
index 982689230..2b26d3f23 100755
--- a/tests/acloca18.test
+++ b/tests/acloca18.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2008, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,14 +19,12 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_MACRO1
AM_MACRO2
END
-mkdir 1 2 3 4
+mkdir 1 2 3 4 5 6
cat >1/m1.m4 <<EOF
#serial 1.8.1230.9
@@ -53,6 +52,17 @@ cat >4/mumble.m4 <<EOF
AC_DEFUN([AM_MACRO1], [echo macro14 >> foo])
EOF
+cat >5/ill-formed.m4 <<EOF
+#serial bla
+#serial .2
+#serial
+AC_DEFUN([AM_MACRO1], [echo macro15 >> foo])
+EOF
+
+cat >6/after-def.m4 <<EOF
+AC_DEFUN([AM_MACRO1], [echo macro16 >> foo])
+#serial 1
+EOF
ACLOCAL_TESTSUITE_FLAGS='-I 1 -I 2 -I 3 -I 4'
@@ -62,6 +72,7 @@ $AUTOCONF
grep macro11 foo
grep macro21 foo
+$sleep
rm -f foo
$ACLOCAL --install
$AUTOCONF
@@ -69,6 +80,7 @@ $AUTOCONF
grep macro12 foo
grep macro23 foo
+$sleep
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2 -I 3'
rm -f foo
$ACLOCAL --install --dry-run
@@ -77,6 +89,7 @@ $AUTOCONF
grep macro12 foo
grep macro23 foo
+$sleep
rm -f foo
$ACLOCAL --install
$AUTOCONF
@@ -84,12 +97,14 @@ $AUTOCONF
grep macro14 foo
grep macro23 foo
+$sleep
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
rm -f foo
$ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'macro.*AM_MACRO2.*not found' stderr
+$sleep
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
rm -f foo
$ACLOCAL --install
@@ -99,6 +114,7 @@ grep macro14 foo
grep macro21 foo
+$sleep
mkdir dirlist-test
cat >dirlist-test/m1.m4 <<EOF
#serial 456
@@ -117,4 +133,12 @@ grep '#serial 456' stdout
test ! -f 4/m1.m4
grep 'installing.*4/m1\.m4' stderr
+$ACLOCAL -I 5 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+test `grep -c 'ill-formed serial' stderr` -eq 3
+
+$ACLOCAL -I 6 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'serial.*before any macro definition' stderr
+
:
diff --git a/tests/acloca19.test b/tests/acloca19.test
index a198d9abc..10bae6b2c 100755
--- a/tests/acloca19.test
+++ b/tests/acloca19.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >configure.in <<'END'
AC_INIT([acloca19], [1.0])
m4_include([aconfig.ac])
diff --git a/tests/acloca20.test b/tests/acloca20.test
index 6408bef17..9f692f8e2 100755
--- a/tests/acloca20.test
+++ b/tests/acloca20.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >foo.m4 <<'END'
m4_define([FOO], [echo wrong foo])
END
diff --git a/tests/acloca21.test b/tests/acloca21.test
index 7b662797e..541892f42 100755
--- a/tests/acloca21.test
+++ b/tests/acloca21.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
dnl m4_include(__some_really_bogus_nonexistent_file__.m4)
# m4_include(__some_really_bogus_nonexistent_file__.m4)
diff --git a/tests/acloca22.test b/tests/acloca22.test
index 913e4d9bc..8fbd57f28 100755
--- a/tests/acloca22.test
+++ b/tests/acloca22.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
FOO
AC_OUTPUT
diff --git a/tests/acloca23.test b/tests/acloca23.test
new file mode 100755
index 000000000..5a05ed20c
--- /dev/null
+++ b/tests/acloca23.test
@@ -0,0 +1,35 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure we diagnose underquoted AC_DEFUN's.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+FOO
+END
+
+mkdir m4
+cat >m4/foo.m4 <<EOF
+AC_DEFUN(FOO, [echo foo])
+EOF
+
+$ACLOCAL -I m4 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'underquoted definition.*FOO' stderr
+grep 'warning.*warning' stderr && Exit 1
+
+:
diff --git a/tests/aclocal.test b/tests/aclocal.test
index da80d0887..64b72e156 100755
--- a/tests/aclocal.test
+++ b/tests/aclocal.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2004, 2008, 2010 Free Software
+# Copyright (C) 1998, 2001, 2002, 2004, 2008, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,28 +19,26 @@
# Alexandre Oliva.
. ./defs || Exit 1
-set -e
-
$ACLOCAL --output=fred
test -f fred
$ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'option.*--output.*an argument' stderr
+grep 'option.*--output.*requires an argument' stderr
grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'unrecognized.*--unknown-option' stderr
+grep 'unrecognized option.*--unknown-option' stderr
grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'unrecognized.*--ver' stderr
+grep 'unrecognized option.*--ver' stderr
grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --versi
-test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir"
+test x"`$ACLOCAL --print-ac-dir`" = x"$top_testsrcdir/m4"
:
diff --git a/tests/aclocal3.test b/tests/aclocal3.test
index a6aee0fc6..bd90782af 100755
--- a/tests/aclocal3.test
+++ b/tests/aclocal3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2002, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,8 +18,6 @@
# Test to make sure include of include detects missing macros
. ./defs || Exit 1
-set -e
-
echo GNOME_X_CHECKS >> configure.in
mkdir macros
diff --git a/tests/aclocal4.test b/tests/aclocal4.test
index 9fa96ece8..e18684b7c 100755
--- a/tests/aclocal4.test
+++ b/tests/aclocal4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_RANLIB
AC_PROG_CC
diff --git a/tests/aclocal5.test b/tests/aclocal5.test
index b206587aa..0f87e0001 100755
--- a/tests/aclocal5.test
+++ b/tests/aclocal5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required='GNUmake'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_TEST([GREPME])
AC_CONFIG_FILES([sub/Makefile])
diff --git a/tests/aclocal6.test b/tests/aclocal6.test
index ddf940104..905608c39 100755
--- a/tests/aclocal6.test
+++ b/tests/aclocal6.test
@@ -20,8 +20,6 @@
required='GNUmake'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
SOME_DEFS
AC_CONFIG_FILES([sub/Makefile])
diff --git a/tests/aclocal7.test b/tests/aclocal7.test
index e123a3fd8..20b90b982 100755
--- a/tests/aclocal7.test
+++ b/tests/aclocal7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
SOME_DEFS
AC_CONFIG_FILES([sub/Makefile])
diff --git a/tests/aclocal8.test b/tests/aclocal8.test
index d935f4f2c..2a1a51a82 100755
--- a/tests/aclocal8.test
+++ b/tests/aclocal8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
SOME_DEFS
END
diff --git a/tests/aclocal9.test b/tests/aclocal9.test
index 325f6ae46..b182a1af6 100755
--- a/tests/aclocal9.test
+++ b/tests/aclocal9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
MACRO1
MACRO2
@@ -42,6 +40,8 @@ $AUTOCONF
grep macro11 foo
grep macro21 foo
+$sleep
+
$ACLOCAL -I m4_2 -I m4_1
$AUTOCONF
./configure
diff --git a/tests/acoutbs.test b/tests/acoutbs.test
index 0ce981c32..232267d86 100755
--- a/tests/acoutbs.test
+++ b/tests/acoutbs.test
@@ -1,5 +1,6 @@
#!/bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
diff --git a/tests/acoutbs2.test b/tests/acoutbs2.test
index 5e03c08ba..cd1cd9daa 100755
--- a/tests/acoutbs2.test
+++ b/tests/acoutbs2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
diff --git a/tests/acoutnoq.test b/tests/acoutnoq.test
index 344905f74..d49f87887 100755
--- a/tests/acoutnoq.test
+++ b/tests/acoutnoq.test
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,8 +23,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
diff --git a/tests/acoutpt.test b/tests/acoutpt.test
index e18e4e449..12b642744 100755
--- a/tests/acoutpt.test
+++ b/tests/acoutpt.test
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
diff --git a/tests/acoutpt2.test b/tests/acoutpt2.test
index 2d0743c0f..d97298943 100755
--- a/tests/acoutpt2.test
+++ b/tests/acoutpt2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/acoutqnl.test b/tests/acoutqnl.test
index 75736f2eb..5cfac28fa 100755
--- a/tests/acoutqnl.test
+++ b/tests/acoutqnl.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
diff --git a/tests/acsilent.test b/tests/acsilent.test
index abbfc92b0..d4a543668 100755
--- a/tests/acsilent.test
+++ b/tests/acsilent.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2008, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2001, 2002, 2008, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >configure.in <<EOF
AC_INIT
AM_INIT_GUILE_MODULE
diff --git a/tests/acsubst.test b/tests/acsubst.test
index e8eaaceda..a02b34c23 100755
--- a/tests/acsubst.test
+++ b/tests/acsubst.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,8 +16,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_SUBST([FOOBAR_LDFLAGS],[blablabla])
diff --git a/tests/acsubst2.test b/tests/acsubst2.test
index b1c0bce04..cbbbfd803 100755
--- a/tests/acsubst2.test
+++ b/tests/acsubst2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,8 +16,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/all.test b/tests/all.test
index 791d081f6..6df139704 100755
--- a/tests/all.test
+++ b/tests/all.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2007, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2007, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
targets='all install-exec install-data uninstall'
echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
cat Makefile.am # might be useful for debugging
diff --git a/tests/all2.test b/tests/all2.test
index 38b6f8caf..f38167e0b 100755
--- a/tests/all2.test
+++ b/tests/all2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
$ACLOCAL
targets='all install-exec install-data uninstall'
diff --git a/tests/alloca.test b/tests/alloca.test
index 8a1e06e37..cff66413a 100755
--- a/tests/alloca.test
+++ b/tests/alloca.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'END'
AC_PROG_CC
END
diff --git a/tests/alloca2.test b/tests/alloca2.test
index caf11a34d..8ebdcd705 100755
--- a/tests/alloca2.test
+++ b/tests/alloca2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'END'
AC_PROG_CC
END
diff --git a/tests/alpha.test b/tests/alpha.test
index 1ee8ed6a3..a95e42d1d 100755
--- a/tests/alpha.test
+++ b/tests/alpha.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2008, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
# Jim Meyering.
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([alpha], [1.0a])
AM_INIT_AUTOMAKE
diff --git a/tests/alpha2.test b/tests/alpha2.test
index e12537705..b8ef266b0 100755
--- a/tests/alpha2.test
+++ b/tests/alpha2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([alpha], [1.0b])
AM_INIT_AUTOMAKE([readme-alpha])
diff --git a/tests/amassign.test b/tests/amassign.test
index af098d21a..bfc728e25 100755
--- a/tests/amassign.test
+++ b/tests/amassign.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CFLAGS=foo
AC_SUBST(AM_BAR)
diff --git a/tests/ammissing.test b/tests/ammissing.test
index 79d9fc2d1..97c425e91 100755
--- a/tests/ammissing.test
+++ b/tests/ammissing.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 2002, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2002, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo AM_ZARDOZ >> configure.in
$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
diff --git a/tests/amopt.test b/tests/amopt.test
index e83b800aa..568299a9c 100755
--- a/tests/amopt.test
+++ b/tests/amopt.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,17 +19,12 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<END
AM_CONDITIONAL([COND], [true])
END
mkdir sub
-# These two Makefile contain the same errors, but have different
-# warnings disabled.
-
cat >Makefile.am <<END
if COND
AUTOMAKE_OPTIONS = -Wall
@@ -38,4 +33,6 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep 'Makefile.am:2.*AUTOMAKE_OPTIONS.*conditional' stderr
+grep '^Makefile\.am:2.*AUTOMAKE_OPTIONS.*conditional' stderr
+
+:
diff --git a/tests/amopts-location.test b/tests/amopts-location.test
new file mode 100755
index 000000000..23b75c0ca
--- /dev/null
+++ b/tests/amopts-location.test
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that errors about AUTOMAKE_OPTIONS refers to correct
+# locations.
+
+. ./defs || Exit 1
+
+cat > Makefile.am <<'END'
+# comment \
+# continued
+include Makefile0.am
+END
+
+cat > Makefile0.am <<'END'
+#1
+#2
+#3
+include Makefile1.am
+END
+
+cat > Makefile1.am <<'END'
+AUTOMAKE_OPTIONS = tar-pax
+# comment
+END
+
+cat > Makefile2.am <<'END'
+## automake comment
+bar:
+ :
+line = \
+continued
+AUTOMAKE_OPTIONS = tar-ustar
+END
+
+cat > Makefile3.am <<'END'
+quux = a
+AUTOMAKE_OPTIONS =
+quux += b
+AUTOMAKE_OPTIONS += tar-v7
+zardoz = 1
+END
+
+cat >>configure.in <<'END'
+AC_CONFIG_FILES([Makefile2 Makefile3])
+END
+
+$ACLOCAL
+# Automake options 'tar-v7', 'tar-ustar' and 'tar-pax' can only be used
+# as argument to AM_INIT_AUTOMAKE, and not in AUTOMAKE_OPTIONS.
+AUTOMAKE_fails
+
+# Check that all the expected line numbers are correctly reported
+# in automake warning/error messages.
+grep '^Makefile1\.am:1:.*tar-pax' stderr
+grep '^Makefile2\.am:6:.*tar-ustar' stderr
+grep '^Makefile3\.am:2:.*tar-v7' stderr
+grep '^Makefile\.am:3:.*Makefile0\.am.*included from here' stderr
+grep '^Makefile0\.am:4:.*Makefile1\.am.*included from here' stderr
+
+# And also check that no botched line number is reported.
+cat stderr \
+ | grep -v '^Makefile\.am:3:' \
+ | grep -v '^Makefile0\.am:4:' \
+ | grep -v '^Makefile1\.am:1:' \
+ | grep -v '^Makefile2\.am:6:' \
+ | grep -v '^Makefile3\.am:2:' \
+ | grep . && Exit 1
+
+:
diff --git a/tests/amopts-variable-expansion.test b/tests/amopts-variable-expansion.test
new file mode 100755
index 000000000..7a746ea66
--- /dev/null
+++ b/tests/amopts-variable-expansion.test
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that AUTOMAKE_OPTIONS support variable expansion.
+
+. ./defs || Exit 1
+
+# We want complete control over automake options.
+AUTOMAKE=$original_AUTOMAKE
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([-Wall -Werror gnu])
+AC_CONFIG_FILES([Makefile])
+END
+
+cat > Makefile.am <<'END'
+# The following should expand to `-Wnone -Wno-error foreign -Wportability'.
+AUTOMAKE_OPTIONS = $(foo) foreign
+AUTOMAKE_OPTIONS += ${bar}
+foo = $(foo1)
+foo1 = ${foo2}
+foo2 = -Wnone
+foo2 += $(foo3)
+foo3 = -Wno-error
+bar = -Wportability
+## This will give a warning with `-Wportability'
+zardoz :=
+## This would give a warning with `-Woverride'.
+install:
+END
+
+$ACLOCAL
+AUTOMAKE_run 0
+grep '^Makefile\.am:.*:=.*not portable' stderr
+grep README stderr && Exit 1
+$EGREP '(install|override)' stderr && Exit 1
+
+:
diff --git a/tests/amsubst.test b/tests/amsubst.test
index 1fad2caeb..9bba8fa99 100755
--- a/tests/amsubst.test
+++ b/tests/amsubst.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_SUBST([backslash], "\\")
_AM_SUBST_NOTMAKE([backslash])
diff --git a/tests/ansi.test b/tests/ansi.test
index 7795f48d2..066337adb 100755
--- a/tests/ansi.test
+++ b/tests/ansi.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2010 Free
-# Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2010, 2011
+# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = ansi2knr
.PHONY: test1 test2
diff --git a/tests/ansi10.test b/tests/ansi10.test
index 88b8618f6..eabe544b5 100755
--- a/tests/ansi10.test
+++ b/tests/ansi10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CC_STDC
diff --git a/tests/ansi2.test b/tests/ansi2.test
index 77ca2c616..db6c64f0b 100755
--- a/tests/ansi2.test
+++ b/tests/ansi2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2010 Free Software
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = ansi2knr
bin_PROGRAMS = joe
diff --git a/tests/ansi3.test b/tests/ansi3.test
index e1e0c4297..ba05d719e 100755
--- a/tests/ansi3.test
+++ b/tests/ansi3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2010 Free Software
+# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -21,8 +21,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_C_PROTOTYPES
diff --git a/tests/ansi3b.test b/tests/ansi3b.test
index ad222ffe2..18bf628ac 100755
--- a/tests/ansi3b.test
+++ b/tests/ansi3b.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2010 Free Software
+# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -22,8 +22,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([hello], [0.24])
AM_INIT_AUTOMAKE([ansi2knr no-dependencies])
diff --git a/tests/ansi4.test b/tests/ansi4.test
index 63250a9ec..cb2c16210 100755
--- a/tests/ansi4.test
+++ b/tests/ansi4.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2008, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2008, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_C_PROTOTYPES
diff --git a/tests/ansi5.test b/tests/ansi5.test
index 2652cb7ab..09ffc5032 100755
--- a/tests/ansi5.test
+++ b/tests/ansi5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -63,8 +63,6 @@ main (int argc, char *argv[])
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
diff --git a/tests/ansi6.test b/tests/ansi6.test
index 10196ea12..d6f637b6f 100755
--- a/tests/ansi6.test
+++ b/tests/ansi6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -58,8 +58,6 @@ foo ()
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
diff --git a/tests/ansi7.test b/tests/ansi7.test
index e97f51744..02a768bf9 100755
--- a/tests/ansi7.test
+++ b/tests/ansi7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -60,8 +60,6 @@ foo ()
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
diff --git a/tests/ansi8.test b/tests/ansi8.test
index 33f17dca5..04563e2b7 100755
--- a/tests/ansi8.test
+++ b/tests/ansi8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = ansi2knr
bin_PROGRAMS = hello
diff --git a/tests/ansi9.test b/tests/ansi9.test
index 4eb182074..9023bf370 100755
--- a/tests/ansi9.test
+++ b/tests/ansi9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/ar-lib.test b/tests/ar-lib.test
new file mode 100755
index 000000000..7168ecd3a
--- /dev/null
+++ b/tests/ar-lib.test
@@ -0,0 +1,86 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure `ar-lib' wraps the Microsoft Library Manager (lib) correctly
+
+required=xsi-shell
+. ./defs || Exit 1
+
+cp "$top_testsrcdir/lib/ar-lib" .
+
+# Use a dummy lib, since lib isn't readily available on all systems.
+cat >lib <<'END'
+#! /bin/sh
+if test x"$2" = x-LIST && test x"$3" = xfake.lib; then
+ echo fake.obj
+elif test x"$2" = x-LIST && test x"$3" = xfake2.lib; then
+ printf "%s\n" "dir\\fake2.obj"
+else
+ printf "%s\n" "lib $*"
+fi
+END
+
+chmod +x ./lib
+
+# Check if ar-lib can create an archive with "cr"
+opts=`./ar-lib ./lib cr foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.obj"
+
+# Check if ar-lib can update an existing archive with "r"
+touch foo.lib
+opts=`./ar-lib ./lib r foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
+# Check if ar-lib passes on @FILE with "r"
+opts=`./ar-lib ./lib r foo.lib @list`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib @list"
+
+# Check if ar-lib can delete a member from an archive with "d"
+opts=`./ar-lib ./lib d foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
+
+# Check if ar-lib can delete members in an @FILE
+echo foo.obj > foolist
+opts=`./ar-lib ./lib d foo.lib @foolist`
+test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
+
+# Check if ar-lib can list archive members with "t"
+opts=`./ar-lib ./lib t foo.lib`
+test x"$opts" = x"lib -NOLOGO -LIST foo.lib"
+
+# Check if ar-lib can extract archive members with "x"
+touch fake.lib
+opts=`./ar-lib ./lib x fake.lib`
+test x"$opts" = x"lib -NOLOGO -EXTRACT:fake.obj fake.lib"
+
+# Check if ar-lib can extract specified archive members with "x"
+opts=`./ar-lib ./lib x foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -EXTRACT:foo.obj foo.lib"
+
+# Check if ar-lib can extract members in an @FILE
+opts=`./ar-lib ./lib x foo.lib @foolist`
+test x"$opts" = x"lib -NOLOGO -EXTRACT:foo.obj foo.lib"
+
+# Check if ar-lib passes -lib and -LTCG through to the wrappee
+opts=`./ar-lib ./lib -lib -LTCG x foo.lib foo.obj`
+test x"$opts" = x"lib -lib -LTCG -NOLOGO -EXTRACT:foo.obj foo.lib"
+
+# Check if ar-lib can extract backslashed members
+touch fake2.lib
+opts=`./ar-lib ./lib x fake2.lib`
+test x"$opts" = x"lib -NOLOGO -EXTRACT:dir\\fake2.obj fake2.lib"
+
+:
diff --git a/tests/ar.test b/tests/ar.test
index dbdf24657..4a69c34f4 100755
--- a/tests/ar.test
+++ b/tests/ar.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_SUBST([AR], ['echo it works'])
AC_SUBST([ARFLAGS], ['>'])
diff --git a/tests/ar2.test b/tests/ar2.test
index 329f80491..a6149496b 100755
--- a/tests/ar2.test
+++ b/tests/ar2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
diff --git a/tests/asm.test b/tests/asm.test
index f1bcb7637..ec6dbec9f 100755
--- a/tests/asm.test
+++ b/tests/asm.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
mv configure.in configure.stub
cat > Makefile.am << 'END'
diff --git a/tests/asm2.test b/tests/asm2.test
index ab141e7a9..e7c0396b9 100755
--- a/tests/asm2.test
+++ b/tests/asm2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2006, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
mv configure.in configure.stub
cat > Makefile.am << 'END'
diff --git a/tests/asm3.test b/tests/asm3.test
index 5c42c48cd..f2f40f2c0 100755
--- a/tests/asm3.test
+++ b/tests/asm3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2006, 2007 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 2006, 2007, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
mv configure.in configure.stub
cat > Makefile.am << 'END'
diff --git a/tests/autohdr.test b/tests/autohdr.test
index 9293bd121..3e0e23182 100755
--- a/tests/autohdr.test
+++ b/tests/autohdr.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_CONFIG_HEADERS([thisfile.h])
EOF
diff --git a/tests/autohdr2.test b/tests/autohdr2.test
index e2a71cf56..7facb2b67 100755
--- a/tests/autohdr2.test
+++ b/tests/autohdr2.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AM_CONFIG_HEADER([thisfile.h])
EOF
diff --git a/tests/autohdr3.test b/tests/autohdr3.test
index f5592954c..b75506bfd 100755
--- a/tests/autohdr3.test
+++ b/tests/autohdr3.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
m4_include([foo.m4])
AC_CONFIG_HEADERS([config.h:config.hin])
diff --git a/tests/autohdr4.test b/tests/autohdr4.test
index 24c57fbe7..bd753dab2 100755
--- a/tests/autohdr4.test
+++ b/tests/autohdr4.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_PROG_CC
AC_SUBST([BOT], [bot])
diff --git a/tests/autohdrdry.test b/tests/autohdrdry.test
index b501e7674..c77315464 100755
--- a/tests/autohdrdry.test
+++ b/tests/autohdrdry.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
diff --git a/tests/automake.test b/tests/automake.test
index f8b4fef76..98018a127 100755
--- a/tests/automake.test
+++ b/tests/automake.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,10 +17,6 @@
# Test Automake's command-line options.
. ./defs || Exit 1
-set -e
-
-$AUTOMAKE --help
-$AUTOMAKE --version
AUTOMAKE_fails --voo
grep 'unrecognized option.*--voo' stderr
# older perl has a buggy Getopt::Long which makes this fail.
@@ -39,3 +35,5 @@ grep 'unknown warning.*--help' stderr
AUTOMAKE_fails --ver
grep 'unrecognized option.*--ver' stderr
$AUTOMAKE --vers
+
+:
diff --git a/tests/auxdir.test b/tests/auxdir.test
index 95a7a20d9..04e69f8b0 100755
--- a/tests/auxdir.test
+++ b/tests/auxdir.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2007, 2010, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,9 +20,9 @@
. ./defs || Exit 1
# The "./." is here so we don't have to mess with subdirs.
-cat > configure.in << 'END'
-AC_INIT([auxdir], [1.0])
-AC_CONFIG_AUX_DIR(./.)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([./.])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
END
@@ -30,11 +31,13 @@ cat > Makefile.am << 'END'
pkgdata_DATA =
END
-cp "$testsrcdir/../lib/mkinstalldirs" .
+cp "$top_testsrcdir/lib/mkinstalldirs" .
# The "././" prefix confuses Automake into thinking it is doing a
# subdir build. Yes, this is hacky.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
grep '/\./\./mkinstalldirs' Makefile.in
+
+:
diff --git a/tests/auxdir2.test b/tests/auxdir2.test
index 590a5df72..491275100 100755
--- a/tests/auxdir2.test
+++ b/tests/auxdir2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,15 +19,19 @@
. ./defs || Exit 1
-# The "./." is here so we don't have to mess with subdirs.
-cat > configure.in << 'END'
-AC_INIT([auxdir2], [1.0])
-AC_CONFIG_AUX_DIR($foo)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([\$foo)
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
END
: > Makefile.am
-$ACLOCAL || Exit 1
+$ACLOCAL
+# Both these two invocations are meant.
+# They exercise both code paths concerning auxiliary files.
+$AUTOMAKE -a
$AUTOMAKE
+
+:
diff --git a/tests/auxdir3.test b/tests/auxdir3.test
index c828051bb..eb1a888ae 100755
--- a/tests/auxdir3.test
+++ b/tests/auxdir3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,10 +18,8 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
-AC_CONFIG_AUX_DIR(.)
+AC_CONFIG_AUX_DIR([.]) dnl this will appear after AM_INIT_AUTOMAKE
END
: > Makefile.am
@@ -29,3 +27,5 @@ END
$ACLOCAL
AUTOMAKE_fails
grep 'AC_CONFIG_AUX_DIR.*AM_INIT_AUTOMAKE' stderr
+
+:
diff --git a/tests/auxdir4.test b/tests/auxdir4.test
index 0447809e4..09bde4a8d 100755
--- a/tests/auxdir4.test
+++ b/tests/auxdir4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,14 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure we diagnose dangerous AC_CONFIG_AUX_DIR names.
+# Make sure we diagnose unportable AC_CONFIG_AUX_DIR names.
. ./defs || Exit 1
-set -e
-
-cat >configure.in <<'END'
-AC_INIT([auxdir4], [1.0])
+cat >configure.in <<END
+AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([aux])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
@@ -31,5 +29,11 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep 'configure.in:2:.*aux.*does not exist' stderr
-grep 'configure.in:2:.*aux.*W32' stderr
+grep '^configure\.in:2:.*aux.*W32' stderr
+
+if mkdir aux; then
+ AUTOMAKE_fails
+ grep '^configure\.in:2:.*aux.*W32' stderr
+fi
+
+:
diff --git a/tests/auxdir5.test b/tests/auxdir5.test
new file mode 100755
index 000000000..6c43295bf
--- /dev/null
+++ b/tests/auxdir5.test
@@ -0,0 +1,34 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure we diagnose non-existent AC_CONFIG_AUX_DIR names.
+
+. ./defs || Exit 1
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([nonesuch])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+
+: > Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails
+grep '^configure\.in:2:.*nonesuch.* not exist' stderr
+
+:
diff --git a/tests/auxdir6.test b/tests/auxdir6.test
new file mode 100755
index 000000000..bf63895eb
--- /dev/null
+++ b/tests/auxdir6.test
@@ -0,0 +1,50 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure AC_CONFIG_AUX_DIR works correctly.
+# This test calls AC_CONFIG_AUX_DIR with an explicit literal argument,
+# thus explicitly making the directory named by that argument the
+# config auxdir.
+# Keep this in sync with sister tests auxdir7.test and auxdir8.test.
+
+. ./defs || Exit 1
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile subdir/Makefile])
+END
+
+mkdir subdir auxdir
+
+cat > Makefile.am << 'END'
+pkgdata_DATA =
+END
+
+cp Makefile.am subdir/Makefile.am
+
+: > auxdir/mkinstalldirs
+: > auxdir/install-sh
+: > auxdir/missing
+
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP '$(top_srcdir)/auxdir/mkinstalldirs' Makefile.in
+$FGREP '$(top_srcdir)/auxdir/mkinstalldirs' subdir/Makefile.in
+
+:
diff --git a/tests/auxdir7.test b/tests/auxdir7.test
new file mode 100755
index 000000000..d346ad2f8
--- /dev/null
+++ b/tests/auxdir7.test
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure AC_CONFIG_AUX_DIR works correctly.
+# This test calls AC_CONFIG_AUX_DIR with a `.' argument, thus explicitly
+# making the top-level directory the config auxdir.
+# Keep this in sync with sister tests auxdir6.test and auxdir8.test.
+
+. ./defs || Exit 1
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile subdir/Makefile])
+END
+
+mkdir subdir
+
+cat > Makefile.am << 'END'
+pkgdata_DATA =
+END
+
+cp Makefile.am subdir/Makefile.am
+
+: > mkinstalldirs
+
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP '$(top_srcdir)/mkinstalldirs' Makefile.in
+$FGREP '$(top_srcdir)/mkinstalldirs' subdir/Makefile.in
+
+:
diff --git a/tests/auxdir8.test b/tests/auxdir8.test
new file mode 100755
index 000000000..1a5e5d9d4
--- /dev/null
+++ b/tests/auxdir8.test
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2007, 2011 Free Software
+# Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure AC_CONFIG_AUX_DIR works correctly.
+# This test tries without an explicit call to AC_CONFIG_AUX_DIR;
+# the config auxdir should be implicitly defined to `.' since
+# the install-sh, mkinstalldirs, etc., scripts are in the top-level
+# directory.
+# Keep this in sync with sister tests auxdir6.test and auxdir7.test.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
+END
+
+mkdir subdir
+
+cat > Makefile.am << 'END'
+pkgdata_DATA =
+END
+
+cp Makefile.am subdir/Makefile.am
+
+: > mkinstalldirs
+
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP '$(top_srcdir)/mkinstalldirs' Makefile.in
+$FGREP '$(top_srcdir)/mkinstalldirs' subdir/Makefile.in
+
+:
diff --git a/tests/auxdir9.test b/tests/auxdir9.test
new file mode 100755
index 000000000..715b7a86b
--- /dev/null
+++ b/tests/auxdir9.test
@@ -0,0 +1,130 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that, if AC_CONFIG_AUX_DIR is not specified, Automake tries
+# to use `.', `..' and `../..', in precisely that order.
+
+. ./defs || Exit 1
+
+nil=__no_such_program
+
+unset NONESUCH || :
+
+cat >>configure.in << END
+AM_MISSING_PROG([NONESUCH],[$nil])
+AC_OUTPUT
+END
+
+mkdir d3
+mkdir d3/d2
+mkdir d3/d2/d1
+mkdir d3/d2/d1/d0
+
+echo 'echo %%d3%% $*' > d3/missing
+chmod +x d3/missing
+echo 'echo %%d2%% $*' > d3/d2/missing
+chmod +x d3/d2/missing
+echo 'echo %%d1%% $*' > d3/d2/d1/missing
+chmod +x d3/d2/d1/missing
+echo 'echo %%d0%% $*' > d3/d2/d1/d0/missing
+chmod +x d3/d2/d1/d0/missing
+
+mv configure.in d3/d2/d1/d0/
+
+cd d3/d2/d1/d0
+
+cat > Makefile.am << 'EOF'
+.PHONY: test
+test:
+ $(NONESUCH) >$(out)
+EOF
+
+$ACLOCAL
+$AUTOCONF
+
+# ------------------------------------------- #
+: We must end up with AC_CONFIG_AUX_DIR = . #
+# ------------------------------------------- #
+
+: > install-sh
+$AUTOMAKE
+./configure
+out=out0 $MAKE test
+cat out0
+grep "%%d0%%.*$nil" out0
+grep '%%d[123]' out0 && Exit 1
+
+rm -f missing install-sh
+
+# -------------------------------------------- #
+: We must end up with AC_CONFIG_AUX_DIR = .. #
+# -------------------------------------------- #
+
+# Automake finds `install-sh' in `.', so it assumes that auxdir is `.';
+# but it won't find `missing' in `.', so it will fail.
+: > install-sh
+AUTOMAKE_fails
+grep 'required file.*[^.]\./missing.*not found' stderr
+rm -f install-sh
+
+# Now things should work.
+: > ../install-sh
+$AUTOMAKE
+./configure
+out=out1 $MAKE test
+cat out1
+grep "%%d1%%.*$nil" out1
+grep '%%d[023]' out1 && Exit 1
+
+rm -f ../missing ../install-sh
+
+# ----------------------------------------------- #
+: We must end up with AC_CONFIG_AUX_DIR = ../.. #
+# ----------------------------------------------- #
+
+# Automake finds `install-sh' in `.', so it assumes that auxdir is `.';
+# but it won't find `missing' in `.', so it will fail.
+: > install-sh
+AUTOMAKE_fails
+grep 'required file.*[^.]\./missing.*not found' stderr
+rm -f install-sh
+
+# Automake finds `install-sh' in `..', so it assumes that auxdir is `..';
+# but it won't find `missing' in `.', so it will fail.
+: > ../install-sh
+AUTOMAKE_fails
+grep 'required file.*[^.]\.\./missing.*not found' stderr
+rm -f ../install-sh
+
+# Now things should work.
+: > ../../install-sh
+$AUTOMAKE
+./configure
+out=out2 $MAKE test
+cat out2
+grep "%%d2%%.*$nil" out2
+grep '%%d[013]' out2 && Exit 1
+
+rm -f ../../missing ../../install-sh
+
+# --------------------------------------------------------- #
+: AC_CONFIG_AUX_DIR will not be found: automake must fail #
+# --------------------------------------------------------- #
+
+AUTOMAKE_fails
+grep 'required file.*missing.*not found' stderr
+
+:
diff --git a/tests/backcompat.test b/tests/backcompat.test
new file mode 100755
index 000000000..9ef4d4ce2
--- /dev/null
+++ b/tests/backcompat.test
@@ -0,0 +1,64 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test usage of AM_INIT_AUTOMAKE with two ot three arguments, for
+# backward-compatibility.
+
+. ./defs || Exit 1
+
+cat > Makefile.am <<'END'
+.PHONY: test display
+
+## Might be useful for debugging.
+display:
+ ## The following should be substituted by AM_INIT_AUTOMAKE.
+ @echo PACKAGE = $(PACKAGE)
+ @echo VERSION = $(VERSION)
+ ## The following should not be substituted, as we used the
+ ## old form of AC_INIT.
+ @echo PACKAGE_NAME = $(PACKAGE_NAME)
+ @echo PACKAGE_VERSION = $(PACKAGE_VERSION)
+ @echo PACKAGE_TARNAME = $(PACKAGE_TARNAME)
+ @echo PACKAGE_STRING = $(PACKAGE_STRING)
+
+test: display
+ test x'$(PACKAGE)' = x'FooBar'
+ test x'$(VERSION)' = x'0.7.1'
+ test x'$(PACKAGE_NAME)' = x
+ test x'$(PACKAGE_VERSION)' = x
+ test x'$(PACKAGE_TARNAME)' = x
+ test x'$(PACKAGE_STRING)' = x
+END
+
+for ac_init in 'AC_INIT' 'AC_INIT([Makefile.am])'; do
+ for am_extra_args in '' ', []' ', [:]' ', [false]'; do
+ rm -rf autom4te*.cache config* Makefile.in Makefile
+ cat > configure.in <<END
+$ac_init
+AM_INIT_AUTOMAKE([FooBar], [0.7.1]$am_extra_args)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+ cat configure.in # might be useful for debugging
+ $ACLOCAL
+ $AUTOCONF
+ $AUTOMAKE
+ ./configure
+ $MAKE test
+ done
+done
+
+:
diff --git a/tests/backcompat2.test b/tests/backcompat2.test
new file mode 100755
index 000000000..98336eac9
--- /dev/null
+++ b/tests/backcompat2.test
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: check that AM_INIT_AUTOMAKE with two or
+# three arguments does AC_DEFINE the symbols PACKAGE and VERSION iff the
+# third argument is empty or non-existent.
+
+. ./defs || Exit 1
+
+# A trick to make the test run muuuch faster, by avoiding repeated
+# runs of aclocal (one order of magnitude improvement in speed!).
+echo 'AC_INIT(x,0) AM_INIT_AUTOMAKE' > configure.in
+$ACLOCAL
+rm -rf configure.in autom4te.*
+
+cat > config.h.in <<'END'
+#undef PACKAGE
+#undef VERSION
+END
+
+for am_arg3 in ':' 'false' '#' ' '; do
+ cat > configure.in <<END
+AC_INIT
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([pkgname], [pkgversion], [$am_arg3])
+AC_OUTPUT
+END
+ cat configure.in # might be useful for debugging
+ $AUTOCONF
+ ./configure
+ cat config.h # might be useful for debugging
+ # The non-empty third argument should prevent PACKAGE and VERSION
+ # from being AC_DEFINE'd.
+ $EGREP 'pkg(name|version)' config.h && Exit 1
+done
+
+for am_extra_args in '' ',' ', []'; do
+ cat > configure.in <<END
+AC_INIT
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([pkgname], [pkgversion]$am_extra_args)
+AC_OUTPUT
+END
+ cat configure.in # might be useful for debugging
+ $AUTOCONF
+ ./configure
+ cat config.h # might be useful for debugging
+ grep '^ *# *define *PACKAGE *"pkgname" *$' config.h
+ grep '^ *# *define *VERSION *"pkgversion" *$' config.h
+done
+
+:
diff --git a/tests/backcompat3.test b/tests/backcompat3.test
new file mode 100755
index 000000000..437377f9a
--- /dev/null
+++ b/tests/backcompat3.test
@@ -0,0 +1,151 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: check what happens when AC_INIT and
+# AM_INIT_AUTOMAKE are both given two or more arguments.
+
+. ./defs || Exit 1
+
+empty=''
+
+cat > Makefile.am <<'END'
+## Leading `:;' here required to work around bugs of (at least) bash 3.2
+got: Makefile
+ @:; { \
+ echo 'PACKAGE = $(PACKAGE)'; \
+ echo 'VERSION = $(VERSION)'; \
+ echo 'PACKAGE_NAME = $(PACKAGE_NAME)'; \
+ echo 'PACKAGE_VERSION = $(PACKAGE_VERSION)'; \
+ echo 'PACKAGE_STRING = $(PACKAGE_STRING)'; \
+ echo 'PACKAGE_TARNAME = $(PACKAGE_TARNAME)'; \
+ echo 'PACKAGE_BUGREPORT = $(PACKAGE_BUGREPORT)'; \
+ echo 'PACKAGE_URL = $(PACKAGE_URL)'; \
+ } >$@
+END
+
+
+### Run 1 ###
+
+cat > configure.in <<END
+AC_INIT([ac_name], [ac_version])
+AM_INIT_AUTOMAKE([am_name], [am_version])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_name
+PACKAGE_BUGREPORT = $empty
+PACKAGE_URL = $empty
+END
+
+$MAKE got
+
+diff exp got
+
+
+### Run 2 ###
+
+cat > configure.in <<'END'
+dnl# `AC_INIT' in Autoconf <= 2.63 doesn't have an URL argument.
+dnl# Luckily, `AC_AUTOCONF_VERSION' and `m4_version_prereq' are
+dnl# both present in autoconf 2.62, which we require; so that we
+dnl# can at least use the following workaround.
+m4_version_prereq([2.64],
+ [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
+ [ac_url])],
+ [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname])
+ AC_SUBST([PACKAGE_URL], [ac_url])])
+AM_INIT_AUTOMAKE([am_name], [am_version])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_tarname
+PACKAGE_BUGREPORT = ac_bugreport
+PACKAGE_URL = ac_url
+END
+
+$MAKE got
+
+diff exp got
+
+
+### Run 3 ###
+
+cat > configure.in <<END
+AC_INIT([ac_name], [ac_version])
+AM_INIT_AUTOMAKE([am_name], [am_version], [am_foo_quux])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_name
+PACKAGE_BUGREPORT = $empty
+PACKAGE_URL = $empty
+END
+
+$MAKE got
+
+diff exp got
+
+$FGREP am_foo_quux Makefile.in Makefile configure config.status && Exit 1
+
+
+### Done ###
+
+:
diff --git a/tests/backcompat4.test b/tests/backcompat4.test
new file mode 100755
index 000000000..97f0e8c45
--- /dev/null
+++ b/tests/backcompat4.test
@@ -0,0 +1,66 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility: AC_OUTPUT with arguments.
+
+. ./defs || Exit 1
+
+mkdir sub
+: > Makefile.am
+: > zardoz
+: > foo.in
+: > foo1.in
+: > foo2.in
+: > foo3.in
+: > sub/bar.in
+
+ls -l # might be useful for debugging
+
+for args in \
+ 'foo' \
+ 'foo:foo1.in' \
+ 'foo:zardoz' \
+ 'foo:sub/bar.in' \
+ 'foo:foo1.in:foo2.in' \
+ 'foo:zardoz:zardoz' \
+ 'foo:foo1.in:foo2.in:foo3.in' \
+ 'foo:foo1.in:foo2.in:sub/bar.in:foo3.in' \
+; do
+ rm -rf autom4te*.cache aclocal.m4
+ cat >configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([$args])
+AC_OUTPUT
+END
+ cat configure.in # for debugging
+ $ACLOCAL
+ $AUTOMAKE Makefile
+ mv -f Makefile.in Makefile.acf
+ rm -rf autom4te*.cache aclocal.m4
+ cat >configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([$args])
+END
+ cat configure.in # for debugging
+ $ACLOCAL
+ $AUTOMAKE Makefile
+ mv -f Makefile.in Makefile.aco
+ diff Makefile.acf Makefile.aco
+done
+
+:
diff --git a/tests/backcompat5.test b/tests/backcompat5.test
new file mode 100755
index 000000000..2385ae483
--- /dev/null
+++ b/tests/backcompat5.test
@@ -0,0 +1,117 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: try to build and distribute a package
+# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
+# This script can also serve as mild stress-testing for Automke.
+# See also the similar test `backcompat6.test'.
+
+. ./defs || Exit 1
+
+# Yuck!
+cat > configure.in <<'END'
+dnl. Everything here is *deliberately* underquoted!
+AC_INIT(src/foo.input)
+AM_INIT_AUTOMAKE(foo, 1.0)
+AC_CONFIG_FILES(Makefile:mkfile.in)
+AC_OUTPUT(hacky/Makefile src/Makefile data/Makefile tests/Makefile)
+END
+
+distdir=foo-1.0
+
+cat > mkfile.am <<'END'
+SUBDIRS = src data tests hacky
+installcheck-local:
+ grep DataDataData $(DESTDIR)$(prefix)/data/$(PACKAGE)-$(VERSION)/bar
+END
+
+mkdir hacky src tests data
+
+echo 'This is a dummy package' > README
+
+cat > src/foo.input <<'END'
+#!sh
+echo Zardoz
+END
+
+cat > tests/a.test <<'END'
+#!/bin/sh
+"$srcdir/../src/foo" | grep Zardoz
+END
+chmod a+x tests/a.test
+
+cat > data/bar <<'END'
+line1
+line2
+line3
+END
+
+cat >hacky/Makefile.am <<'END'
+dist-hook:
+ find $(top_distdir) -print
+ chmod a+rx $(top_distdir)/tests/*.test
+END
+
+cat > src/Makefile.am <<'END'
+dist_bin_SCRIPTS = foo
+foo: foo.input
+ sed '1s,^#!.*$$,#!/bin/sh,' $(srcdir)/foo.input >$@
+ chmod a+x $@
+EXTRA_DIST = foo.input
+DISTCLEANFILES = foo
+END
+
+cat > data/Makefile.am <<'END'
+nodist_data_DATA = bar
+datadir = $(prefix)/data/$(PACKAGE)-$(VERSION)
+bar:
+ echo DataDataData >$@
+distclean-local:
+ rm -f bar
+END
+
+cat > tests/Makefile.am <<'END'
+TESTS = a.test
+EXTRA_DIST = $(TESTS)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+ls -l . hacky src data tests # useful for debugging
+test ! -f mkfile
+$MAKE
+$MAKE distdir
+test ! -f $distdir/Makefile.in
+test ! -f $distdir/data/bar
+test -f $distdir/src/foo
+diff README $distdir/README
+diff mkfile.in $distdir/mkfile.in
+diff tests/a.test $distdir/tests/a.test
+diff src/foo.input $distdir/src/foo.input
+
+$MAKE check
+$MAKE distcheck
+
+test -f $distdir.tar.gz
+
+chmod a-x tests/a.test
+# dist-hook should take care of making test files executables
+$MAKE distcheck
+
+:
diff --git a/tests/backcompat6.test b/tests/backcompat6.test
new file mode 100755
index 000000000..389bc4ba4
--- /dev/null
+++ b/tests/backcompat6.test
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: try to build and distribute a package
+# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
+# This script can also serve as mild stress-testing for Automke.
+# See also the similar test `backcompat5.test'.
+
+. ./defs || Exit 1
+
+# Anyone doing something like this in a real-life package probably
+# deserves to be killed.
+cat > configure.in <<'END'
+dnl. Everything here is *deliberately* underquoted!
+AC_INIT(quux.c)
+PACKAGE=nonesuch-zardoz
+VERSION=nonesuch-0.1
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_SUBST(one,1)
+two=2
+AC_SUBST(two, $two)
+three=3
+AC_SUBST(three)
+AC_PROG_CC
+AC_CONFIG_HEADERS(config.h:config.hin)
+AC_OUTPUT(Makefile foo.got:foo1.in:foo2.in:foo3.in)
+END
+
+echo @one@ > foo1.in
+echo @two@ > foo2.in
+echo @three@ > foo3.in
+
+cat >config.hin <<'END'
+#undef PACKAGE
+#undef VERSION
+END
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = quux.c
+check-local:
+ test x'$(PACKAGE)' = x'nonesuch-zardoz'
+ test x'$(VERSION)' = x'nonesuch-0.1'
+ ./foo
+ ## Do not anchor the regexps w.r.t. the end of line, because on
+ ## MinGW/MSYS, grep may assume LF line endings only, while our
+ ## `foo' program may generate CRLF line endings.
+ ./foo | grep '^PACKAGE = nonesuch-zardoz!'
+ ./foo | echo '^VERSION = nonesuch-0\.1!'
+END
+
+cat > quux.c <<'END'
+#include <config.h>
+#include <stdio.h>
+int main (void)
+{
+ printf("PACKAGE = %s!\nVERSION = %s!\n", PACKAGE, VERSION);
+ return 0;
+}
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+cat >foo.exp <<'END'
+1
+2
+3
+END
+
+diff foo.exp foo.got
+
+$MAKE
+$MAKE check
+
+distdir=nonesuch-zardoz-nonesuch-0.1
+$MAKE distdir
+test -f $distdir/quux.c
+test ! -f $distdir/foo.got
+
+$MAKE distcheck
+
+:
diff --git a/tests/backsl.test b/tests/backsl.test
index 3947cde6c..4e3943f04 100755
--- a/tests/backsl.test
+++ b/tests/backsl.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/backsl2.test b/tests/backsl2.test
index 35e9b9be1..f0116e320 100755
--- a/tests/backsl2.test
+++ b/tests/backsl2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
SUBDIRS = \
.
diff --git a/tests/backsl3.test b/tests/backsl3.test
index 76fdd9ab7..876c045ef 100755
--- a/tests/backsl3.test
+++ b/tests/backsl3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
foo = \
END
diff --git a/tests/backsl4.test b/tests/backsl4.test
index 16eab5f1e..7cfe73782 100755
--- a/tests/backsl4.test
+++ b/tests/backsl4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >>configure.in
# Note: trailing whitespace used during the test should not appear as
diff --git a/tests/badline.test b/tests/badline.test
index 7c636976a..18ad92944 100755
--- a/tests/badline.test
+++ b/tests/badline.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/badopt.test b/tests/badopt.test
index 2da53e99d..6f6d79210 100755
--- a/tests/badopt.test
+++ b/tests/badopt.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo 'AUTOMAKE_OPTIONS = zardoz' > Makefile.am
$ACLOCAL
diff --git a/tests/badprog.test b/tests/badprog.test
index 7a31b3ff7..87b7562df 100755
--- a/tests/badprog.test
+++ b/tests/badprog.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/block.test b/tests/block.test
index 862389eb0..0eda19044 100755
--- a/tests/block.test
+++ b/tests/block.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
#START
#a
diff --git a/tests/bsource.test b/tests/bsource.test
index 80066d8f6..38f8a43c7 100755
--- a/tests/bsource.test
+++ b/tests/bsource.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
noinst_SCRIPTS = hostname
include_HEADERS = gettext-po.h
diff --git a/tests/candist.test b/tests/candist.test
new file mode 100755
index 000000000..f75f4065a
--- /dev/null
+++ b/tests/candist.test
@@ -0,0 +1,32 @@
+#! /bin/sh
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure things that cannot be dist_'ed are diagnosed.
+
+. ./defs || Exit 1
+
+echo AC_OUTPUT >>configure.in
+
+cat > Makefile.am << 'END'
+dist_bin_PROGRAMS = foo
+dist_lib_LIBRARIES = libfoo.a
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+test 2 -eq `grep -c 'dist.*forbidden' stderr`
+
+Exit 0
diff --git a/tests/canon-name.test b/tests/canon-name.test
index aecda1720..2b9cd0aea 100755
--- a/tests/canon-name.test
+++ b/tests/canon-name.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,10 +19,8 @@
. ./defs || Exit 1
-set -e
-
-cat > configure.in << 'END'
-AC_INIT([canon-name], [1.0])
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([./gmakefile ./sub/gmakefile])
AC_OUTPUT
@@ -36,3 +34,5 @@ $ACLOCAL
AUTOMAKE_fails
grep 'leading.*\./.*\./gmakefile' stderr
grep 'leading.*\./.*\./sub/gmakefile' stderr
+
+:
diff --git a/tests/canon.test b/tests/canon.test
index 2b035d0aa..51e03b22c 100755
--- a/tests/canon.test
+++ b/tests/canon.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +19,9 @@
. ./defs || Exit 1
-set -e
-
-echo AC_PROG_CC >> configure.in
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
cat > Makefile.am << 'END'
bin_PROGRAMS = sniff-glue
@@ -29,4 +30,7 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep 'Makefile.am:2:.*sniff_glue_SOURCES' stderr
+grep 'Makefile\.am:2:.* bad .*variable.*sniff-glue_SOURCES' stderr
+grep 'Makefile\.am:2:.* use .*sniff_glue_SOURCES' stderr
+
+:
diff --git a/tests/canon2.test b/tests/canon2.test
index ab2861750..3085a7c09 100755
--- a/tests/canon2.test
+++ b/tests/canon2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
info_TEXINFOS = zar-doz.texi
zar_doz_TEXINFOS = frob.texi
diff --git a/tests/canon3.test b/tests/canon3.test
index 9d5a17238..c93f8ace3 100755
--- a/tests/canon3.test
+++ b/tests/canon3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
@@ -34,4 +33,5 @@ $ACLOCAL
$AUTOMAKE
$FGREP 'perm_number.c' Makefile.in && Exit 1
-Exit 0
+
+:
diff --git a/tests/canon4.test b/tests/canon4.test
index 52e968dc5..733ea7027 100755
--- a/tests/canon4.test
+++ b/tests/canon4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,12 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure name canonicalization happens for libraries.
+# Test to make sure name canonicalization happens for static libraries.
+# Keep this in sync with sister test `canon6.test'.
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
@@ -33,5 +33,6 @@ END
$ACLOCAL
$AUTOMAKE
-grep '^libx-y.*=' Makefile.in && Exit 1
-Exit 0
+grep '^ *libx-y.*=' Makefile.in && Exit 1
+
+:
diff --git a/tests/canon5.test b/tests/canon5.test
index 53cdeb2a2..43c098b29 100755
--- a/tests/canon5.test
+++ b/tests/canon5.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,9 +20,9 @@
. ./defs || Exit 1
-set -e
-
-echo AC_PROG_CC >> configure.in
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
$ACLOCAL
@@ -46,7 +46,8 @@ bin_PROGRAMS = ,foo
END
AUTOMAKE_fails
-grep 'Makefile.am:2:.*_foo_SOURCES' stderr
+grep 'Makefile\.am:2:.* bad .*variable.*,foo_SOURCES' stderr
+grep 'Makefile\.am:2:.* use .*_foo_SOURCES' stderr
cat > Makefile.am << 'END'
bin_PROGRAMS = ,foo
@@ -54,3 +55,5 @@ _foo_SOURCES = foo.c
END
$AUTOMAKE -Wno-portability
+
+:
diff --git a/tests/canon6.test b/tests/canon6.test
new file mode 100755
index 000000000..a24e2eb6f
--- /dev/null
+++ b/tests/canon6.test
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure name canonicalization happens for libtool libraries.
+# Keep this in sync with sister test `canon4.test'.
+
+required='libtoolize'
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+END
+
+cat > Makefile.am << 'END'
+noinst_LTLIBRARIES = libx-y.la
+libx_y_la_SOURCES = xy.c
+END
+
+: > ltmain.sh
+
+$ACLOCAL
+$AUTOMAKE -a
+
+grep '^ *libx-y.*=' Makefile.in && Exit 1
+
+:
diff --git a/tests/canon7.test b/tests/canon7.test
new file mode 100755
index 000000000..4e700df1e
--- /dev/null
+++ b/tests/canon7.test
@@ -0,0 +1,90 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Stress test on canonicalization.
+
+required='libtool libtoolize'
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB dnl: for static libraries
+AC_PROG_LIBTOOL dnl: for libtool libraries
+AC_OUTPUT
+END
+
+touch ,foo-bar libb.az+baz lib~zardoz,, || Exit 77
+rm -f ,foo-bar libb.az+baz lib~zardoz,,
+
+cat > Makefile.am << 'END'
+noinst_PROGRAMS = dummy_static dummy_dynamic ,foo-bar
+noinst_LIBRARIES = libb.az+baz.a
+noinst_LTLIBRARIES = lib~zardoz,,.la
+
+dummy_static_SOURCES = dummy.c lib.h
+dummy_dynamic_SOURCES = $(dummy_static_SOURCES)
+
+dummy_static_LDADD = $(noinst_LIBRARIES)
+dummy_dynamic_LDADD = $(noinst_LTLIBRARIES)
+
+_foo_bar_SOURCES = foobar.c
+libb_az_baz_a_SOURCES = libs.c
+lib_zardoz___la_SOURCES = libd.c
+
+check-local:
+ ls -l
+ ./,foo-bar
+ ./dummy_static
+ ./dummy_dynamic
+ ./,foo-bar | grep 'Hello, FooBar!'
+ ./dummy_static | grep 'Hello from Static!'
+ ./dummy_dynamic | grep 'Hello from Dynamic!'
+END
+
+cat > foobar.c << 'END'
+#include <stdio.h>
+int main(void)
+{
+ printf("Hello, FooBar!\n");
+ return 0;
+}
+END
+
+cat > dummy.c << 'END'
+#include <stdio.h>
+#include "lib.h"
+int main(void)
+{
+ printf("Hello from %s!\n", dummy_func());
+ return 0;
+}
+END
+
+echo 'const char *dummy_func(void);' > lib.h
+echo 'const char *dummy_func(void) { return "Dynamic"; }' > libd.c
+echo 'const char *dummy_func(void) { return "Static"; }' > libs.c
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/tests/canon8.test b/tests/canon8.test
new file mode 100755
index 000000000..5351345e4
--- /dev/null
+++ b/tests/canon8.test
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 1996, 1997, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that canonicalization does not transliterate the `@' charactrer.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foob@rquux
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+# The first grep is here mostly for debugging.
+grep foob.rquux Makefile.in
+grep foob@rquux Makefile.in
+grep 'foob[^@]rquux' Makefile.in && Exit 1
+
+:
diff --git a/tests/ccnoco.test b/tests/ccnoco.test
index d6ed136e4..fb22ba74f 100755
--- a/tests/ccnoco.test
+++ b/tests/ccnoco.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -68,9 +68,6 @@ END
chmod +x Mycomp
-set -e
-
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
@@ -95,3 +92,5 @@ for conf in configure.1 configure.3; do
cd ..
done
+
+:
diff --git a/tests/ccnoco2.test b/tests/ccnoco2.test
index 062fe6ba5..a724448f2 100755
--- a/tests/ccnoco2.test
+++ b/tests/ccnoco2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/ccnoco3.test b/tests/ccnoco3.test
index 2e9cd37d2..92ccf79b4 100755
--- a/tests/ccnoco3.test
+++ b/tests/ccnoco3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2008, 2009, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/check.test b/tests/check.test
index 0c258c5eb..54432eca9 100755
--- a/tests/check.test
+++ b/tests/check.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
TESTS = frob.test
END
diff --git a/tests/check10.test b/tests/check10.test
index ab9b5298c..7025b9863 100755
--- a/tests/check10.test
+++ b/tests/check10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/check11.test b/tests/check11.test
index 1fe6a4d3a..912b619f1 100755
--- a/tests/check11.test
+++ b/tests/check11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/check12.test b/tests/check12.test
new file mode 100755
index 000000000..4be4b807b
--- /dev/null
+++ b/tests/check12.test
@@ -0,0 +1,204 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure dejagnu tests, automake-style tests, and check-local
+# target can coexist.
+
+required=runtest
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS =
+EXTRA_DIST =
+CLEANFILES =
+END
+
+## Simple tests.
+
+cat > a.test << 'END'
+#!/bin/sh
+exit ${A_EXIT_STATUS-0}
+END
+cat > b.test << 'END'
+#!/bin/sh
+exit ${B_EXIT_STATUS-0}
+END
+chmod +x a.test b.test
+
+cat >> Makefile.am << 'END'
+TESTS = a.test b.test
+EXTRA_DIST += $(TESTS)
+END
+
+A_EXIT_STATUS=0; export A_EXIT_STATUS
+B_EXIT_STATUS=0; export B_EXIT_STATUS
+
+## DejaGnu tests.
+
+cat >> Makefile.am << 'END'
+AUTOMAKE_OPTIONS += dejagnu
+DEJATOOL = hammer spanner
+AM_RUNTESTFLAGS = HAMMER=$(srcdir)/hammer SPANNER=$(srcdir)/spanner
+EXTRA_DIST += hammer.test/hammer.exp
+EXTRA_DIST += spanner.test/spanner.exp
+END
+
+cat > hammer << 'END'
+#! /bin/sh
+echo "Everything looks like a ${NAIL-nail} to me!"
+END
+
+NAIL=nail; export NAIL
+
+cat > spanner << 'END'
+#! /bin/sh
+echo "I'm a right spanner!"
+END
+chmod +x hammer spanner
+
+mkdir hammer.test spanner.test
+
+cat > hammer.test/hammer.exp << 'END'
+set test test_hammer
+spawn $HAMMER
+expect {
+ "Everything looks like a nail to me!" { pass "$test" }
+ default { fail "$test" }
+}
+END
+
+cat > spanner.test/spanner.exp << 'END'
+set test test_spanner
+spawn $SPANNER
+expect {
+ "I'm a right spanner!" { pass "$test" }
+ default { fail "$test" }
+}
+END
+
+## User-defined extra tests.
+
+cat >> Makefile.am <<'END'
+check-local:
+ case $$CHECKLOCAL_EXIT_STATUS in \
+ 0) echo 'check-local succeded :-)';; \
+ *) echo 'check-local failed :-(';; \
+ esac >local.log
+ exit $$CHECKLOCAL_EXIT_STATUS
+CLEANFILES += local.log
+END
+CHECKLOCAL_EXIT_STATUS=0; export CHECKLOCAL_EXIT_STATUS
+
+## Go with the testcase execution.
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+for vpath in : false; do
+
+ if $vpath; then
+ srcdir=..
+ mkdir build_
+ cd build_
+ else
+ srcdir=.
+ fi
+
+ if test -f config.status; then
+ $MAKE distclean
+ fi
+
+ $srcdir/configure
+
+ $MAKE check
+ test -f hammer.log
+ test -f hammer.sum
+ test -f spanner.log
+ test -f spanner.sum
+ # This checks will be run only by the autogenerated `check12-p.test'.
+ if test x"$parallel_tests" = x"yes"; then
+ cat test-suite.log
+ grep '^PASS: a\.test (exit: 0)' a.log
+ grep '^PASS: b\.test (exit: 0)' b.log
+ else
+ :
+ fi
+ grep 'check-local succeded :-)' local.log
+
+ cp -f config.status config-status.sav
+
+ $MAKE distclean
+ test ! -r hammer.log
+ test ! -r hammer.sum
+ test ! -r spanner.log
+ test ! -r spanner.sum
+ test ! -r test-suite.log
+ test ! -r a.log
+ test ! -r b.log
+ test ! -r local.log
+
+ mv -f config-status.sav config.status
+ ./config.status
+
+ NAIL=screw $MAKE check && Exit 1
+ test -f hammer.log
+ test -f hammer.sum
+ test -f spanner.log
+ test -f spanner.sum
+ grep 'FAIL: test_hammer' hammer.sum
+ grep 'FAIL:' spanner.sum && Exit 1
+
+ B_EXIT_STATUS=1 $MAKE check && Exit 1
+ # This checks will be run only by the autogenerated `check12-p.test'.
+ if test x"$parallel_tests" = x"yes"; then
+ cat test-suite.log
+ grep '^PASS: a\.test (exit: 0)' a.log
+ grep '^FAIL: b\.test (exit: 1)' b.log
+ grep '^FAIL: b\.test (exit: 1)' test-suite.log
+ else :; fi
+
+ CHECKLOCAL_EXIT_STATUS=1 $MAKE check && Exit 1
+ grep 'check-local failed :-(' local.log
+
+ # Do not trust the exit status of `make -k'.
+ NAIL=screw B_EXIT_STATUS=23 CHECKLOCAL_EXIT_STATUS=1 $MAKE -k check || :
+ test -f hammer.log
+ test -f hammer.sum
+ test -f spanner.log
+ test -f spanner.sum
+ grep 'FAIL: test_hammer' hammer.sum
+ grep 'FAIL:' spanner.sum && Exit 1
+ # This checks will be run only by the autogenerated `check12-p.test'.
+ if test x"$parallel_tests" = x"yes"; then
+ cat test-suite.log
+ grep '^PASS: a\.test (exit: 0)' a.log
+ grep '^FAIL: b\.test (exit: 23)' b.log
+ grep '^FAIL: b\.test (exit: 23)' test-suite.log
+ else :; fi
+ grep 'check-local failed :-(' local.log
+
+ cd $srcdir
+
+done
+
+$MAKE distcheck
+
+:
diff --git a/tests/check2.test b/tests/check2.test
index 1db0454f4..9b8bfb1b5 100755
--- a/tests/check2.test
+++ b/tests/check2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([dir/Makefile])
AC_OUTPUT
diff --git a/tests/check3.test b/tests/check3.test
index 65705c404..be40e3fae 100755
--- a/tests/check3.test
+++ b/tests/check3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([dir/Makefile])
AC_OUTPUT
diff --git a/tests/check4.test b/tests/check4.test
index 70dc55a48..99adb23b7 100755
--- a/tests/check4.test
+++ b/tests/check4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([dir/Makefile])
AC_OUTPUT
diff --git a/tests/check5.test b/tests/check5.test
index 7113e1b3e..2db74d18d 100755
--- a/tests/check5.test
+++ b/tests/check5.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/check6.test b/tests/check6.test
index e32499cef..b3ba9d872 100755
--- a/tests/check6.test
+++ b/tests/check6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/check7.test b/tests/check7.test
index 1653a8dc5..5c5f4f34f 100755
--- a/tests/check7.test
+++ b/tests/check7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/check8.test b/tests/check8.test
index dc8d3dda7..4ff71a77a 100755
--- a/tests/check8.test
+++ b/tests/check8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/check9.test b/tests/check9.test
index c80d780b4..07ea4e42f 100755
--- a/tests/check9.test
+++ b/tests/check9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_SUBST([script_tests], ['subst-pass-script.test subst-xfail-script.test'])
diff --git a/tests/checkall.test b/tests/checkall.test
index 7dff8fc18..1981bc792 100755
--- a/tests/checkall.test
+++ b/tests/checkall.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2010 Free Software
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
bin_SCRIPTS = derived
check-local:
diff --git a/tests/clean.test b/tests/clean.test
index 23ab2acfc..b9ffbe0e9 100755
--- a/tests/clean.test
+++ b/tests/clean.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
: > Makefile.am
$ACLOCAL
diff --git a/tests/clean2.test b/tests/clean2.test
index 99e4c2ef8..1f9baff80 100755
--- a/tests/clean2.test
+++ b/tests/clean2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_MAINTAINER_MODE
AC_CONFIG_FILES([sub/Makefile])
@@ -29,6 +27,13 @@ END
cat > Makefile.am << 'END'
SUBDIRS = sub
+
+data_DATA = bar
+
+bar:
+ touch $@
+
+DISTCLEANFILES = bar
END
mkdir sub
@@ -48,6 +53,16 @@ $AUTOMAKE --cygnus
./configure
$MAKE
+ls -l
+test -f bar
test -f sub/foo
$MAKE distclean
-test ! -f sub/foo
+ls -l
+test ! -r bar
+test ! -r sub/foo
+test ! -r Makefile
+test ! -r config.status
+test -f Makefile.in
+test -f configure
+
+:
diff --git a/tests/colneq.test b/tests/colneq.test
index 59d2414b6..b60d5c040 100755
--- a/tests/colneq.test
+++ b/tests/colneq.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,17 +19,15 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
ICONS := $(wildcard *.xbm)
-data_DATA = $(ICONS)
END
$ACLOCAL
AUTOMAKE_fails
grep ':=.*not portable' stderr
-echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
-$AUTOMAKE
-grep 'ICONS :=' Makefile.in
+$AUTOMAKE -Wno-portability
+grep '^ICONS *:= *\$(wildcard \*\.xbm) *$' Makefile.in
+
+:
diff --git a/tests/colneq2.test b/tests/colneq2.test
index e454c4675..8f408eb2b 100755
--- a/tests/colneq2.test
+++ b/tests/colneq2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,16 +19,23 @@
. ./defs || Exit 1
-set -e
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
t = a b c
EXTRA_DIST = $(t:=.test)
+.PHONY: test
+test:
+ test x'$(EXTRA_DIST)' = x'a.test b.test c.test'
END
-: > a.test
-: > b.test
-: > c.test
-
$ACLOCAL
+$AUTOCONF
$AUTOMAKE
+
+./configure
+$MAKE test
+
+:
diff --git a/tests/colneq3.test b/tests/colneq3.test
new file mode 100755
index 000000000..96c02d7c6
--- /dev/null
+++ b/tests/colneq3.test
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that := definitions work as expected at make time.
+
+required=GNUmake
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+BAR := $(FOO)
+BAZ = $(FOO)
+FOO := foo
+.PHONY: test
+test:
+ test x'$(FOO)' = x'foo'
+ test x'$(BAZ)' = x'foo'
+ test x'$(BAR)' = x
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -Wno-portability
+
+./configure
+$MAKE test
+
+:
diff --git a/tests/colon.test b/tests/colon.test
index 22b5ed335..ff44e0b49 100755
--- a/tests/colon.test
+++ b/tests/colon.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,17 +20,28 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'END'
AC_CONFIG_FILES([foo.h:foo.hin])
AC_OUTPUT
END
-: > Makefile.am
: > foo.hin
+cat > Makefile.am <<'END'
+.PHONY: test
+test: distdir
+ ls -l . $(distdir)
+ test -f foo.h
+ test -f $(distdir)/foo.hin
+END
+
$ACLOCAL
$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+$MAKE test
+$MAKE distcheck
:
diff --git a/tests/colon2.test b/tests/colon2.test
index a52dfa865..10b270d9c 100755
--- a/tests/colon2.test
+++ b/tests/colon2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,11 +16,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure ":" works with files automake generates.
+# See also sister test `colon3.test'.
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
@@ -28,14 +27,54 @@ AC_CONFIG_FILES([Makefile:zardoz.in])
AC_OUTPUT
END
-echo 'dummy:' > zardoz.am
+cat > zardoz.am <<END
+.PHONY: dummy
+dummy:
+END
$ACLOCAL
$AUTOMAKE
-# We actually check several things here.
+# Automake should have created zardoz.in.
test -f zardoz.in
-grep '^zardoz:' zardoz.in && Exit 1
-grep '^dummy:' zardoz.in
+
+# The generated file should refer to zardoz.in and zardoz.am, but
+# never just "zardoz".
+$FGREP 'zardoz.am' zardoz.in
+$FGREP 'zardoz.in' zardoz.in
+sed -e 's|zardoz\.am|zrdz.am|g' \
+ -e 's|zardoz\.in|zrdz.in|g' \
+ <zardoz.in | $FGREP 'zardoz' && Exit 1
+
+# The configure-generated Makefile should depend on zardoz.in, two.in and
+# three.in. The automake-generated zardoz.in should depend on zardoz.am.
+# Let's do this check the right way by running configure and make.
+
+str='%% ZaR DoZ %%'
+
+$AUTOCONF
+./configure
+test -f Makefile # sanity check
+
+$MAKE dummy
+# Again, make sure that the generated Makefile do not unduly
+# refer to `zardoz' .
+$MAKE -n zardoz && Exit 1
+
+$sleep
+cat >> zardoz.am <<END
+check-local: testam testin testmk
+.PHONY: testam testin testmk
+testam:
+ grep '$str' \$(srcdir)/zardoz.am
+testin:
+ grep '$str' \$(srcdir)/zardoz.in
+testmk:
+ grep '$str' Makefile
+END
+$MAKE Makefile # for non-GNU make
+$MAKE testam testin testmk
+
+$MAKE distcheck
:
diff --git a/tests/colon3.test b/tests/colon3.test
index 151d0150a..8a830633a 100755
--- a/tests/colon3.test
+++ b/tests/colon3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2010, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,11 +17,10 @@
# Make sure ":" works with files automake generates.
# This test is for multiple ":"s.
+# See also sister test `colon2.test'.
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
@@ -29,7 +28,11 @@ AC_CONFIG_FILES([Makefile:zardoz.in:two.in:three.in])
AC_OUTPUT
END
-: > zardoz.am
+cat > zardoz.am <<END
+.PHONY: dummy
+dummy:
+END
+
: > two.in
: > three.in
@@ -41,21 +44,49 @@ test -f zardoz.in
# The generated file should refer to zardoz.in and zardoz.am, but
# never just "zardoz".
+$FGREP 'zardoz.am' zardoz.in
+$FGREP 'zardoz.in' zardoz.in
sed -e 's|zardoz\.am|zrdz.am|g' \
-e 's|zardoz\.in|zrdz.in|g' \
<zardoz.in | $FGREP 'zardoz' && Exit 1
-# FIXME: Do something like this after planned enahncements to tests/defs.
-# FIXME: Or even do proper functional testing.
-## Also, Makefile should depend on two.in and three.in.
-# extract_makefile_deps Makefile zardoz.in > deps
-#$FGREP ' $(srcdir)/two.in ' deps
-#$FGREP ' $(srcdir)/three.in ' deps
-#
-# FIXME: for the moment, we content ourselves with these inferior tests.
-# Makefile should depend on two.in.
-grep '^Makefile:.* \$(srcdir)/two.in' zardoz.in
-# Likewise three.in.
-grep '^Makefile:.* \$(srcdir)/three.in' zardoz.in
+# The configure-generated Makefile should depend on zardoz.in, two.in and
+# three.in. The automake-generated zardoz.in should depend on zardoz.am.
+# Let's do this check the right way by running configure and make.
+
+str='%% ZaR DoZ %%'
+str2='// 2_TwO_2 //'
+str3='== @thr33@ =='
+
+$AUTOCONF
+./configure
+test -f Makefile # sanity check
+
+$MAKE dummy
+# Again, make sure that the generated Makefile do not unduly
+# refer to `zardoz' .
+$MAKE -n zardoz && Exit 1
+
+$sleep
+cat >> zardoz.am <<END
+check-local: testam testin testmk test2 test3
+.PHONY: testam testin test2 testmk test3
+testam:
+ grep '$str' \$(srcdir)/zardoz.am
+testin:
+ grep '$str' \$(srcdir)/zardoz.in
+testmk:
+ grep '$str' Makefile
+test2:
+ grep '$str2' \$(srcdir)/two.in
+test3:
+ grep '$str3' \$(srcdir)/three.in
+END
+echo "# $str2" >> two.in
+echo "# $str3" >> three.in
+$MAKE Makefile # for non-GNU make
+$MAKE testam testin testmk test2 test3
+
+$MAKE distcheck
:
diff --git a/tests/colon4.test b/tests/colon4.test
index 9af6b4e8b..2c2638392 100755
--- a/tests/colon4.test
+++ b/tests/colon4.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<END
AC_CONFIG_FILES([zardoz:one:two:three])
AC_OUTPUT
diff --git a/tests/colon5.test b/tests/colon5.test
index 9dae9c8e4..ca5414c15 100755
--- a/tests/colon5.test
+++ b/tests/colon5.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
@@ -31,21 +29,44 @@ END
: > Makefile.dep
cat > Makefile.am <<'END'
-.PHONY: test
-test:
- case ' $(DIST_COMMON) ' in \
- *' $(srcdir)/Makefile.dep '*|*' Makefile.dep '*) exit 0;; \
- *) exit 1;; \
- esac
+.PHONY: test-fs-layout test-grep test-distcommon test-distdir
+check-local: test-fs-layout test-grep test-distcommon test-distdir
+test-fs-layout:
+ test x'$(srcdir)' = '.' || test ! -r Makefile.dep
+test-grep:
+## The use of $(empty) prevents spurious matches.
+ grep '=GrEp$(empty)Me_am=' $(srcdir)/Makefile.in
+ grep '=GrEp$(empty)Me_dep=' $(srcdir)/Makefile.dep
+ grep '=GrEp$(empty)Me_am=' Makefile
+ grep '=GrEp$(empty)Me_dep=' Makefile
+test-distcommon:
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]Makefile.dep '
+test-distdir: distdir
+ test -f $(distdir)/Makefile.dep
END
$ACLOCAL
+$AUTOCONF
$AUTOMAKE
-grep 'Makefile:Makefile\.in' Makefile.in
-grep '^Makefile:.* \$(srcdir)/Makefile\.dep' Makefile.in
+./configure
+
+grep '=GrEpMe_am=' Makefile && Exit 1 # sanity check
+grep '=GrEpMe_dep=' Makefile && Exit 1 # likewise
+
+$MAKE test-distcommon
+$MAKE test-distdir
+
+$sleep
+
+echo '# =GrEpMe_am=' >> Makefile.am
+echo '# =GrEpMe_dep=' >> Makefile.dep
+
+$MAKE Makefile # for non-GNU make
+$MAKE test-grep
+$MAKE test-distcommon
+$MAKE test-distdir
-sed -e '/@SET_MAKE@/d' -e "s!@SHELL@!$SHELL!g" <Makefile.in >Makefile.sed
-$MAKE -f Makefile.sed SHELL=$SHELL test
+$MAKE distcheck
:
diff --git a/tests/colon6.test b/tests/colon6.test
index 7c620d6d5..9c739b054 100755
--- a/tests/colon6.test
+++ b/tests/colon6.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,35 +19,86 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
+# With this, version.good should depend on version.gin, while
+# Makefile should not depend on either of them.
AC_CONFIG_FILES([demo/Makefile demo/version.good:demo/version.gin])
AC_OUTPUT
END
mkdir demo
-
: > demo/version.gin
-
-cat > demo/Makefile.am <<'END'
-.PHONY: test
-test:
- case ' $(DIST_COMMON) ' in \
- *' $(srcdir)/version.gin '*) exit 0;; \
- *) exit 1;; \
- esac
-END
+: > demo/Makefile.am
$ACLOCAL
$AUTOMAKE
+# These are older "grepping checks", kept mostly for backward-compatibility.
+# They might (unlikely, but possibly) require updating when automake
+# internals are changed. Just relax or remove if they become too fragile.
$EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && Exit 1
grep 'version\.good:.*version\.gin' demo/Makefile.in
-sed -e '/@SET_MAKE@/d' -e "s!@SHELL@!$SHELL!g" <demo/Makefile.in >Makefile.sed
-$MAKE -f Makefile.sed SHELL=$SHELL test
+$AUTOCONF
+
+for vpath in : false; do
+
+ if $vpath; then
+ srcdir=..
+ mkdir build
+ cd build
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+
+ test -f demo/version.good # sanity check
+ test ! -s demo/version.good # likewise
+
+ cd demo
+
+ $sleep
+ # HP-UX make considers targets with exact time stamps as one of their
+ # prerequisites out of date. Ensure Makefile is newer than config.status to
+ # avoid triggering the am--refresh rule in the (here-nonexistent) toplevel
+ # Makefile.
+ touch Makefile
+
+ # version.good should depend on version.gin.
+ echo "Rebuilt (srcdir=$srcdir)" > ../$srcdir/demo/version.gin
+ $MAKE version.good
+ $FGREP "Rebuilt (srcdir=$srcdir)" version.good
+
+ # Makefile should not depend on version.good.
+ rm -f version.good
+ $MAKE Makefile
+ test ! -r version.good
+
+ # version.good should be rebuilt from version.gin.
+ $MAKE version.good
+ test -f version.good
+
+ # Makefile should not depend on version.gin.
+ rm -f ../$srcdir/demo/version.gin
+ $MAKE Makefile
+ test ! -r ../$srcdir/demo/version.gin # sanity check
+
+ # version.good should depend on version.gin.
+ rm -f version.good
+ $MAKE version.good >output 2>&1 && { cat output; Exit 1; }
+ cat output
+ # Try to verify that we errored out for the right reason.
+ $FGREP version.gin output
+
+ cd .. # back in top builddir
+ cd $srcdir
+
+ # Re-create it for the next pass (if any).
+ : > demo/version.gin
+
+done
:
diff --git a/tests/colon7.test b/tests/colon7.test
index 4195188a2..2ab5a4877 100755
--- a/tests/colon7.test
+++ b/tests/colon7.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,13 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Another test for a failing ":" in AC_OUTPUT. Report from Maciej
-# Stachowiak.
+# Another test for a failing ":" in AC_OUTPUT.
+# Report from Maciej Stachowiak.
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([colon7], [1.0])
AM_INIT_AUTOMAKE
@@ -32,19 +30,26 @@ AC_OUTPUT(subdir/bar:subdir/foo \
)
END
-: > Makefile.am
-
mkdir subdir
-: > subdir/Makefile.am
+: > Makefile.am
: > subdir/foo
+cat > subdir/Makefile.am << 'END'
+.PHONY: test
+test:
+ ## DIST_COMMON should contain `foo', not `subdir/foo'.
+ case '$(DIST_COMMON)' in *subdir/foo*) exit 1;; *) exit 0;; esac
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]foo '
+END
$ACLOCAL
$AUTOMAKE
-# shouldn't have any bar.in
-grep 'bar.in' subdir/Makefile.in && Exit 1
+# Should nowhere refer to `bar.in'.
+$FGREP 'bar.in' Makefile.in subdir/Makefile.in && Exit 1
-# DIST_COMMON should have foo, not subdir/foo
-grep 'DIST_COMMON.*subdir/foo' subdir/Makefile.in && Exit 1
+$AUTOCONF
+./configure
+cd subdir
+$MAKE test
:
diff --git a/tests/color.test b/tests/color.test
index c1032fdc7..570b21d66 100755
--- a/tests/color.test
+++ b/tests/color.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
TERM=ansi
export TERM
diff --git a/tests/color2.test b/tests/color2.test
index 306aa040c..c3315deb4 100755
--- a/tests/color2.test
+++ b/tests/color2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
TERM=ansi
export TERM
diff --git a/tests/commen10.test b/tests/commen10.test
index d7148f800..79545e957 100755
--- a/tests/commen10.test
+++ b/tests/commen10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
SUBDIRS = foo \
# bar
diff --git a/tests/commen11.test b/tests/commen11.test
index 963f2f885..b092d3978 100755
--- a/tests/commen11.test
+++ b/tests/commen11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
# initial comment
variable = value-before-comment \
diff --git a/tests/comment.test b/tests/comment.test
index 761dbf59d..6092e74ca 100755
--- a/tests/comment.test
+++ b/tests/comment.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = #no such option
END
diff --git a/tests/comment2.test b/tests/comment2.test
index 97e6a2610..f8bd62c98 100755
--- a/tests/comment2.test
+++ b/tests/comment2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/comment3.test b/tests/comment3.test
index 14980c8fa..8903a97e8 100755
--- a/tests/comment3.test
+++ b/tests/comment3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
install-data-local:
# Tru64 Unix must die
diff --git a/tests/comment4.test b/tests/comment4.test
index f6e6a3f48..7c1f454c4 100755
--- a/tests/comment4.test
+++ b/tests/comment4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,6 @@ cat > Makefile.am << 'EOF'
mumble = UnIqUe_MUMBLE_VALUE
EOF
-set -e
$ACLOCAL
$AUTOMAKE
# UnIqUe_COPYRIGHT_BOILERPLATE should appear near the top of the file
diff --git a/tests/comment5.test b/tests/comment5.test
index 21b5e8768..8e1d1fea4 100755
--- a/tests/comment5.test
+++ b/tests/comment5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
AC_OUTPUT
EOF
@@ -37,7 +35,7 @@ EOF
$ACLOCAL
AUTOMAKE_fails
-grep '^Makefile.am:5: blank line following trailing backslash' stderr
+grep '^Makefile.am:5: error: blank line following trailing backslash' stderr
## Here is a second test because head comments are
@@ -54,7 +52,7 @@ var = foo
EOF
AUTOMAKE_fails
-grep '^Makefile.am:2: blank line following trailing backslash' stderr
+grep '^Makefile.am:2: error: blank line following trailing backslash' stderr
## Make sure we print an 'included' stack on errors.
@@ -66,8 +64,9 @@ cat > Makefile.inc << 'EOF'
EOF
AUTOMAKE_fails
-grep '^Makefile.inc:2: blank line following trailing backslash' stderr
+grep '^Makefile.inc:2: error: blank line following trailing backslash' stderr
grep '^Makefile.am:1: .*included from here' stderr
+grep -v '^Makefile.am:1: .*error:' stderr
## Make sure backslashes are still allowed within a comment.
diff --git a/tests/comment6.test b/tests/comment6.test
index efa8482a8..089576819 100755
--- a/tests/comment6.test
+++ b/tests/comment6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
AC_OUTPUT
EOF
diff --git a/tests/comment7.test b/tests/comment7.test
index f28b71162..7d869de54 100755
--- a/tests/comment7.test
+++ b/tests/comment7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
AM_CONDITIONAL([COND], [true])
EOF
diff --git a/tests/comment8.test b/tests/comment8.test
index 58ef56a03..a9d6eaa0d 100755
--- a/tests/comment8.test
+++ b/tests/comment8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
AM_CONDITIONAL([COND1], [true])
AM_CONDITIONAL([COND2], [true])
diff --git a/tests/comment9.test b/tests/comment9.test
index b106b3a4b..e95d99be0 100755
--- a/tests/comment9.test
+++ b/tests/comment9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
TESTS = \
1.test \
diff --git a/tests/comments-in-var-def.test b/tests/comments-in-var-def.test
index b00ee6b6f..3f5192e8b 100755
--- a/tests/comments-in-var-def.test
+++ b/tests/comments-in-var-def.test
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'END'
AC_OUTPUT
END
diff --git a/tests/compile.test b/tests/compile.test
index ef27afea0..8427bad09 100755
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,7 @@
. ./defs || Exit 1
-set -e
-
-cp "$testsrcdir/../lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
# -o 'a c' should not be stripped because 'a c' is not an object
# (it does not matter whether touch creates ./-- or not)
@@ -42,3 +40,5 @@ test -f a.c
./compile touch a.obj -- -o ac.obj a.c
test ! -f a.obj
test ac.obj
+
+:
diff --git a/tests/compile2.test b/tests/compile2.test
index 334f1548d..04fee9084 100755
--- a/tests/compile2.test
+++ b/tests/compile2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,7 @@
. ./defs || Exit 1
-set -e
-
-cp "$testsrcdir/../lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
cat >mycc <<'END'
source_seen=no
diff --git a/tests/compile3.test b/tests/compile3.test
new file mode 100755
index 000000000..f949d1c2d
--- /dev/null
+++ b/tests/compile3.test
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure `compile' wraps the Microsoft C/C++ compiler (cl) correctly
+
+required=xsi-shell
+. ./defs || Exit 1
+
+cp "$top_testsrcdir/lib/compile" .
+
+# Use a dummy cl, since cl isn't readily available on all systems
+cat >cl <<'END'
+#! /bin/sh
+echo "$@"
+END
+
+chmod +x ./cl
+
+# Check if compile handles "-o foo", -I, -l, -L, -Xlinker -Wl,
+opts=`LIB= ./compile ./cl foo.c -o foo -lbar -Lgazonk -Ibaz -Xlinker foobar -Wl,-foo,bar`
+test x"$opts" = x"foo.c -Fefoo bar.lib -Ibaz -link -LIBPATH:gazonk foobar -foo bar"
+
+# Check if compile handles "-o foo.obj"
+opts=`./compile ./cl -c foo.c -o foo.obj -Ibaz`
+test x"$opts" = x"-c foo.c -Fofoo.obj -Ibaz"
+
+# Check if compile handles "-o foo.o"
+opts=`./compile ./cl -c foo.c -o foo.o -Ibaz`
+test x"$opts" = x"-c foo.c -Fofoo.o -Ibaz"
+
+# Check if compile handles "foo.cc" as C++.
+opts=`./compile ./cl -c foo.cc -o foo.o -Ibaz`
+test x"$opts" = x"-c -Tpfoo.cc -Fofoo.o -Ibaz"
+
+# Check if compile clears the "eat" variable properly.
+opts=`eat=1 ./compile ./cl -c foo.c -o foo.obj -Ibaz`
+test x"$opts" = x"-c foo.c -Fofoo.obj -Ibaz"
+
+:
diff --git a/tests/compile4.test b/tests/compile4.test
new file mode 100755
index 000000000..cf8d6cb7d
--- /dev/null
+++ b/tests/compile4.test
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure `compile' wraps the Microsoft C/C++ compiler (cl) correctly
+# with respect to absolute paths.
+
+required='cl'
+. ./defs || Exit 1
+
+mkdir sub
+
+cat >sub/foo.c <<'EOF'
+int
+foo ()
+{
+ return 0;
+}
+EOF
+
+cat >main.c <<'EOF'
+extern int foo ();
+int
+main ()
+{
+ return foo ();
+}
+EOF
+
+absfoodir=`pwd`/sub
+absmainc=`pwd`/main.c
+absmainobj=`pwd`/main.obj
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_RANLIB
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+END
+
+cat > sub/Makefile.am << 'END'
+lib_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = foo.c
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+$MAKE
+
+./compile cl $CPPFLAGS $CFLAGS -c -o "$absmainobj" "$absmainc"
+
+# cl expects archives to be named foo.lib, not libfoo.a so
+# make a simple copy here if needed. This is a severe case
+# of badness, but ignore that since this is not what is
+# being tested here...
+if test -f sub/libfoo.a; then
+ cp sub/libfoo.a sub/foo.lib
+fi
+
+./compile cl $CFLAGS $LDFLAGS -L"$absfoodir" "$absmainobj" -o main -lfoo
+
+./main
+
+:
diff --git a/tests/compile5.test b/tests/compile5.test
new file mode 100755
index 000000000..6f4f4bdd2
--- /dev/null
+++ b/tests/compile5.test
@@ -0,0 +1,79 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure the file name translation in the `compile' script works
+# correctly
+
+. ./defs || Exit 1
+
+cp "$top_testsrcdir/lib/compile" .
+
+# Use a dummy cl, since cl isn't readily available on all systems
+cat >cl <<'END'
+#! /bin/sh
+echo "$@"
+END
+
+chmod +x ./cl
+
+cat >>configure.in << 'END'
+AC_CANONICAL_HOST
+AC_CONFIG_FILES([check_host], [chmod +x check_host])
+AC_OUTPUT
+END
+
+: >Makefile.am
+
+cat >check_host.in << 'END'
+#! /bin/sh
+case @host_os@ in
+ mingw*)
+ ;;
+ *)
+ exit 77
+ ;;
+esac
+case @build_os@ in
+ mingw* | cygwin*)
+ ;;
+ *)
+ winepath -w / || exit 77
+ ;;
+esac
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+./check_host
+
+pwd=`pwd`
+
+# Check if "compile cl" transforms absolute file names to
+# host format (e.g /somewhere -> c:/msys/1.0/somewhere).
+
+res=`./compile ./cl -L"$pwd" | sed -e 's/-link -LIBPATH://'`
+
+case $res in
+ ?:[\\/]*)
+ ;;
+ *)
+ Exit 1
+ ;;
+esac
+
+:
diff --git a/tests/compile6.test b/tests/compile6.test
new file mode 100755
index 000000000..02feb4b6d
--- /dev/null
+++ b/tests/compile6.test
@@ -0,0 +1,97 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure `compile' searches libraries correctly
+
+required=xsi-shell
+. ./defs || Exit 1
+
+cp "$top_testsrcdir/lib/compile" .
+
+# Use a dummy cl, since cl isn't readily available on all systems
+cat >cl <<'END'
+#! /bin/sh
+echo "$@"
+END
+
+chmod +x ./cl
+
+mkdir syslib
+:> syslib/foo.lib
+
+syslib=`pwd`/syslib
+LIB=$syslib
+export LIB
+
+mkdir lib
+:> lib/bar.lib
+:> lib/bar.dll.lib
+
+# Check if compile library search correctly
+opts=`./compile ./cl foo.c -o foo -Llib -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib"
+
+# Check if -static makes compile avoid bar.dll.lib
+opts=`./compile ./cl foo.c -o foo -Llib -static -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib/bar.lib $syslib/foo.lib -link -LIBPATH:lib"
+
+:> syslib/bar.lib
+:> syslib/bar.dll.lib
+
+# Check if compile finds bar.dll.lib in syslib
+opts=`./compile ./cl foo.c -o foo -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo $syslib/bar.dll.lib $syslib/foo.lib"
+
+# Check if compile prefers -L over $LIB
+opts=`./compile ./cl foo.c -o foo -Llib -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib"
+
+mkdir lib2
+:> lib2/bar.dll.lib
+
+# Check if compile avoids bar.dll.lib in lib2 when -static
+opts=`./compile ./cl foo.c -o foo -Llib2 -static -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo $syslib/bar.lib $syslib/foo.lib -link -LIBPATH:lib2"
+
+# Check if compile gets two different bar libraries when -static
+# is added in the middle
+opts=`./compile ./cl foo.c -o foo -Llib2 -Llib -lbar -static -lbar`
+test x"$opts" = x"foo.c -Fefoo lib2/bar.dll.lib lib/bar.lib -link -LIBPATH:lib2 -LIBPATH:lib"
+
+# Check if compile gets the correct bar.dll.lib
+opts=`./compile ./cl foo.c -o foo -Llib -Llib2 -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib -LIBPATH:lib2"
+
+# Check if compile gets the correct bar.dll.lib
+opts=`./compile ./cl foo.c -o foo -Llib2 -Llib -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib2/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib2 -LIBPATH:lib"
+
+mkdir "sys lib2"
+:> "sys lib2/foo.dll.lib"
+
+syslib2="`pwd`/sys lib2"
+LIB="$syslib2;$LIB"
+
+# Check if compile handles spaces in $LIB and that it prefers the order
+# in a multi-component $LIB.
+opts=`./compile ./cl foo.c -o foo -lfoo`
+test x"$opts" = x"foo.c -Fefoo $syslib2/foo.dll.lib"
+
+# Check if compile handles the 2nd directory in a multi-component $LIB.
+opts=`./compile ./cl foo.c -o foo -static -lfoo`
+test x"$opts" = x"foo.c -Fefoo $syslib/foo.lib"
+
+:
diff --git a/tests/compile_f90_c_cxx.test b/tests/compile_f90_c_cxx.test
index 21ed65da4..ec593ca4b 100755
--- a/tests/compile_f90_c_cxx.test
+++ b/tests/compile_f90_c_cxx.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,25 +21,17 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
AC_PROG_FC
-AC_FC_LIBRARY_LDFLAGS
END
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
foo_SOURCES = foo.f90 bar.c baz.cc
-foo_LDADD = @FLIBS@
END
-: > foo.f90
-: > bar.c
-: > baz.cc
-
$ACLOCAL
$AUTOMAKE
@@ -49,4 +41,4 @@ $FGREP ' $(COMPILE)' Makefile.in
$FGREP ' $(CXXCOMPILE)' Makefile.in
$FGREP ' $(FCCOMPILE)' Makefile.in
-Exit 0
+:
diff --git a/tests/compile_f_c_cxx.test b/tests/compile_f_c_cxx.test
index d1836fb9f..e3b51a421 100755
--- a/tests/compile_f_c_cxx.test
+++ b/tests/compile_f_c_cxx.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
@@ -33,12 +31,8 @@ END
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
foo_SOURCES = foo.f bar.c baz.cc
-foo_LDADD = @FLIBS@
END
-: > foo.f
-: > bar.c
-: > baz.cc
: > config.guess
: > config.sub
@@ -51,4 +45,4 @@ $FGREP ' $(COMPILE)' Makefile.in
$FGREP ' $(CXXCOMPILE)' Makefile.in
$FGREP ' $(F77COMPILE)' Makefile.in
-Exit 0
+:
diff --git a/tests/ctarget1.test b/tests/cond-basic.test
index d2191f687..2866aa601 100755
--- a/tests/ctarget1.test
+++ b/tests/cond-basic.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,11 +18,9 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONDITIONAL(TEST, true)
-AC_OUTPUT(Makefile)
+cat >> configure.in << 'END'
+AM_CONDITIONAL([TEST], [true])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -34,11 +32,11 @@ target: false
endif
END
-set -e
-
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
grep '^@TEST_TRUE@target: true' Makefile.in
grep '^@TEST_TRUE@ action' Makefile.in
grep '^@TEST_FALSE@target: false' Makefile.in
-Exit 0
+
+:
diff --git a/tests/cond.test b/tests/cond.test
index 586d80a3c..f4567f114 100755
--- a/tests/cond.test
+++ b/tests/cond.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2006, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL(TEST, true)
AC_OUTPUT
diff --git a/tests/cond10.test b/tests/cond10.test
index 974dfdc2f..49a3d6b7c 100755
--- a/tests/cond10.test
+++ b/tests/cond10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL(USE_A,[test x = y])
diff --git a/tests/cond11.test b/tests/cond11.test
index 15c6c2adb..1df840aab 100755
--- a/tests/cond11.test
+++ b/tests/cond11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([USE_A], [test -z "$two"])
diff --git a/tests/cond13.test b/tests/cond13.test
index e5f6be9c5..193b02d40 100755
--- a/tests/cond13.test
+++ b/tests/cond13.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
diff --git a/tests/cond14.test b/tests/cond14.test
index 09701f7b5..f5a5e2474 100755
--- a/tests/cond14.test
+++ b/tests/cond14.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([COND1], [true])
diff --git a/tests/cond15.test b/tests/cond15.test
index 0789074c3..fbd5e04e2 100755
--- a/tests/cond15.test
+++ b/tests/cond15.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([COND1], [true])
diff --git a/tests/cond16.test b/tests/cond16.test
index 467b7185a..9a60e029b 100755
--- a/tests/cond16.test
+++ b/tests/cond16.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -51,8 +51,6 @@ END
CFLAGS=
export CFLAGS
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
diff --git a/tests/cond17.test b/tests/cond17.test
index 7368d9a12..90a38e6ce 100755
--- a/tests/cond17.test
+++ b/tests/cond17.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -38,7 +38,5 @@ helldl_SOURCES = foo.c
endif
END
-set -e
-
$ACLOCAL
$AUTOMAKE -a
diff --git a/tests/cond18.test b/tests/cond18.test
index 311965858..545038933 100755
--- a/tests/cond18.test
+++ b/tests/cond18.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -57,8 +57,6 @@ END
CFLAGS=
export CFLAGS
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
diff --git a/tests/cond19.test b/tests/cond19.test
index 14dfb51d9..ef01c91a8 100755
--- a/tests/cond19.test
+++ b/tests/cond19.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -59,8 +59,6 @@ END
CFLAGS=
export CFLAGS
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
diff --git a/tests/cond2.test b/tests/cond2.test
index a548ef61d..b47e3245b 100755
--- a/tests/cond2.test
+++ b/tests/cond2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2003, 2004, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
diff --git a/tests/cond20.test b/tests/cond20.test
index d0557e5ee..f0e1dd8ea 100755
--- a/tests/cond20.test
+++ b/tests/cond20.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,8 +42,6 @@ helldl_SOURCES = $(var2)
bin_PROGRAMS = helldl
END
-set -e
-
$ACLOCAL
$AUTOCONF
AUTOMAKE_fails -a
diff --git a/tests/cond21.test b/tests/cond21.test
index 160c76f0c..5d1db769c 100755
--- a/tests/cond21.test
+++ b/tests/cond21.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -66,8 +66,6 @@ test:
@echo FOO: $(FOO) :FOO
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
diff --git a/tests/cond22.test b/tests/cond22.test
index 4ef19677b..335407724 100755
--- a/tests/cond22.test
+++ b/tests/cond22.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL(ONE, true)
diff --git a/tests/cond23.test b/tests/cond23.test
index e2b133c1a..7cb8292e2 100755
--- a/tests/cond23.test
+++ b/tests/cond23.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AM_CONDITIONAL([COND], [true])
AC_OUTPUT
diff --git a/tests/cond24.test b/tests/cond24.test
index e5482115b..7bfa89f58 100755
--- a/tests/cond24.test
+++ b/tests/cond24.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_SUBST([foo], [bar])
AM_CONDITIONAL([COND], [true])
diff --git a/tests/cond25.test b/tests/cond25.test
index 02614f92e..9d1686d04 100755
--- a/tests/cond25.test
+++ b/tests/cond25.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
AC_PROG_CC
diff --git a/tests/cond26.test b/tests/cond26.test
index 1d93cc02b..7252dbd0b 100755
--- a/tests/cond26.test
+++ b/tests/cond26.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
EOF
diff --git a/tests/cond27.test b/tests/cond27.test
index 250b1efe7..141723c47 100755
--- a/tests/cond27.test
+++ b/tests/cond27.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
EOF
diff --git a/tests/cond28.test b/tests/cond28.test
index 006ef573c..e5f254e1c 100755
--- a/tests/cond28.test
+++ b/tests/cond28.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
EOF
diff --git a/tests/cond29.test b/tests/cond29.test
index 8310eabd7..f2488504c 100755
--- a/tests/cond29.test
+++ b/tests/cond29.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >>configure.in
cat >Makefile.am <<EOF
diff --git a/tests/cond3.test b/tests/cond3.test
index e2dbdafa3..2a75d432c 100755
--- a/tests/cond3.test
+++ b/tests/cond3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2010, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
diff --git a/tests/cond30.test b/tests/cond30.test
index d1935f702..d15629761 100755
--- a/tests/cond30.test
+++ b/tests/cond30.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_PROG_CC
AM_CONDITIONAL(C1, [test -z "$two"])
diff --git a/tests/cond31.test b/tests/cond31.test
index 224d32ca2..7deb999a7 100755
--- a/tests/cond31.test
+++ b/tests/cond31.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_PROG_CC
AM_CONDITIONAL(C1, [test -z "$two"])
diff --git a/tests/cond32.test b/tests/cond32.test
index 6ec5a20d7..0e5e5d2a6 100755
--- a/tests/cond32.test
+++ b/tests/cond32.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_PROG_CC
AM_CONDITIONAL(C1, [test -z "$two"])
diff --git a/tests/cond33.test b/tests/cond33.test
index f327cb78a..6f822aa61 100755
--- a/tests/cond33.test
+++ b/tests/cond33.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_CONDITIONAL([INC], [test -z "$two"])
AC_OUTPUT
diff --git a/tests/cond34.test b/tests/cond34.test
index ecb16163c..9b951f54d 100755
--- a/tests/cond34.test
+++ b/tests/cond34.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_CONDITIONAL([TWO], test -n "$two")
AC_PROG_CC
diff --git a/tests/cond35.test b/tests/cond35.test
index 0f3b8cf8c..c3c5f0bb5 100755
--- a/tests/cond35.test
+++ b/tests/cond35.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,11 +17,9 @@
# Check rules output for parser defined conditionally.
# Report from Roman Fietze.
-required='flex bison gcc'
+required='flex yacc gcc'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_CONDITIONAL([CASE_A], test -z "$case_B")
AC_PROG_CC
diff --git a/tests/cond36.test b/tests/cond36.test
index 6826cd58f..06d5a604e 100755
--- a/tests/cond36.test
+++ b/tests/cond36.test
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_CONDITIONAL([CASE_A], test -z "$case_B")
AC_PROG_CC
diff --git a/tests/cond37.test b/tests/cond37.test
index a4ae07875..59923e8f8 100755
--- a/tests/cond37.test
+++ b/tests/cond37.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_CONDITIONAL([CASE_A], test -n "$case_A")
AC_OUTPUT
diff --git a/tests/cond38.test b/tests/cond38.test
index b1c303624..222007d5a 100755
--- a/tests/cond38.test
+++ b/tests/cond38.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_CONDITIONAL([CASE_A], :)
AM_CONDITIONAL([CASE_B], :)
diff --git a/tests/cond39.test b/tests/cond39.test
index c75c7b515..3deb1cfd4 100755
--- a/tests/cond39.test
+++ b/tests/cond39.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -21,8 +21,6 @@
# Build either as CONFIG_FILE or as PROGRAM.
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'END'
diff --git a/tests/cond4.test b/tests/cond4.test
index 6efc9ce71..76187dd1a 100755
--- a/tests/cond4.test
+++ b/tests/cond4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
required='GNUmake gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([ONE], [test "x$CONDITION1" = "xtrue"])
diff --git a/tests/cond40.test b/tests/cond40.test
index 8552cefbf..267d1eb31 100755
--- a/tests/cond40.test
+++ b/tests/cond40.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -21,8 +21,6 @@
# Test AM_COND_IF.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_DEFUN([FOO],
[AC_CONFIG_FILES([$1])])
diff --git a/tests/cond41.test b/tests/cond41.test
index dd9ffda13..b68573fca 100755
--- a/tests/cond41.test
+++ b/tests/cond41.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -21,8 +21,6 @@
# AM_COND_IF with an undefined condition should fail.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_COND_IF([COND],
[AC_CONFIG_FILES([file1])])
diff --git a/tests/cond42.test b/tests/cond42.test
index 428c02b4b..265ab2905 100755
--- a/tests/cond42.test
+++ b/tests/cond42.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -23,8 +23,6 @@
# but better to be safe.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_CONDITIONAL([COND], [:])
# next line needed so that cond-if.m4 is pulled in.
diff --git a/tests/cond43.test b/tests/cond43.test
index 1fa413d8a..befa165f9 100755
--- a/tests/cond43.test
+++ b/tests/cond43.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -21,8 +21,6 @@
# Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_CONDITIONAL([COND1], [:])
AM_CONDITIONAL([COND2], [:])
diff --git a/tests/cond44.test b/tests/cond44.test
index 4b5adc240..3d68a416e 100755
--- a/tests/cond44.test
+++ b/tests/cond44.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AM_CONDITIONAL([COND], [true])
AM_SUBST_NOTMAKE([libdir])
diff --git a/tests/cond45.test b/tests/cond45.test
index c70fecb47..ebaa2afd6 100755
--- a/tests/cond45.test
+++ b/tests/cond45.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_SUBST([foo], [bar])
AM_SUBST_NOTMAKE([foo])
diff --git a/tests/cond46.test b/tests/cond46.test
new file mode 100755
index 000000000..ffeebd23e
--- /dev/null
+++ b/tests/cond46.test
@@ -0,0 +1,108 @@
+#! /bin/sh
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure the right condition is listed after `else' and `endif'.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([USE_A],[test x = y])
+AM_CONDITIONAL([USE_B],[test x = z])
+AC_OUTPUT
+END
+
+$ACLOCAL
+
+cat > Makefile.am << 'END'
+if USE_A
+endif !USE_A
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+endif USE_B
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else
+endif USE_A
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else
+endif !USE_A
+END
+
+$AUTOMAKE
+
+cat > Makefile.am << 'END'
+if USE_A
+if USE_B
+else
+endif !USE_A
+endif
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else USE_A
+endif
+END
+
+AUTOMAKE_fails
+grep 'else.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else USE_B
+endif
+END
+
+AUTOMAKE_fails
+grep 'else.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+if USE_B
+else USE_A
+endif
+endif
+END
+
+AUTOMAKE_fails
+grep 'else.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else !USE_A
+endif
+END
+
+$AUTOMAKE
diff --git a/tests/cond5.test b/tests/cond5.test
index 50101a6fe..0af13f3ff 100755
--- a/tests/cond5.test
+++ b/tests/cond5.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([ONE], [true])
diff --git a/tests/cond6.test b/tests/cond6.test
index ec4003227..4a576b46f 100755
--- a/tests/cond6.test
+++ b/tests/cond6.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo 'AM_CONDITIONAL(FOO, true)' >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/cond7.test b/tests/cond7.test
index b11dddf18..d680577fd 100755
--- a/tests/cond7.test
+++ b/tests/cond7.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
compat=yes
AM_CONDITIONAL([Compatible], [test x$compat = xyes])
diff --git a/tests/cond8.test b/tests/cond8.test
index 0a45ad3bb..3a81a287a 100755
--- a/tests/cond8.test
+++ b/tests/cond8.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL(X, false)
diff --git a/tests/cond9.test b/tests/cond9.test
index e79809904..22792aeb5 100755
--- a/tests/cond9.test
+++ b/tests/cond9.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL(WRONG, [test x = y])
AC_OUTPUT
diff --git a/tests/condd.test b/tests/condd.test
index b70d69132..ef5f7c71f 100755
--- a/tests/condd.test
+++ b/tests/condd.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
dnl Define a macro with the same name as the conditional to exhibit
diff --git a/tests/condhook.test b/tests/condhook.test
index bf9225be3..8763ee6c3 100755
--- a/tests/condhook.test
+++ b/tests/condhook.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([TEST], [false])
AC_OUTPUT
diff --git a/tests/condhook2.test b/tests/condhook2.test
index 45e2d43fb..109dbb08e 100755
--- a/tests/condhook2.test
+++ b/tests/condhook2.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([TEST], [true])
AC_OUTPUT
diff --git a/tests/condinc.test b/tests/condinc.test
index cf9e35fce..09315cd31 100755
--- a/tests/condinc.test
+++ b/tests/condinc.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([TOBE], [false])
END
diff --git a/tests/condinc2.test b/tests/condinc2.test
index 900102888..a27fe83fe 100755
--- a/tests/condinc2.test
+++ b/tests/condinc2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([TOBE], [false])
END
@@ -38,6 +37,24 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep 'adjunct:3: too many conditionals closed' stderr
+grep 'adjunct:3: error: too many conditionals closed' stderr
+
+cat > adjunct << 'END'
+if TOBE
+target: dependency
+ rule
+END
+
+AUTOMAKE_fails
+grep 'unterminated conditionals' stderr
+
+cat > adjunct << 'END'
+if TOBE
+target: dependency
+ rule
+endif
+END
+
+$AUTOMAKE
:
diff --git a/tests/condlib.test b/tests/condlib.test
index b6c998d71..390de753f 100755
--- a/tests/condlib.test
+++ b/tests/condlib.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2008, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_RANLIB
AM_MAINTAINER_MODE
diff --git a/tests/condman.test b/tests/condman.test
index ee2d41b03..85840144c 100755
--- a/tests/condman.test
+++ b/tests/condman.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([FRED], [true])
END
diff --git a/tests/condman2.test b/tests/condman2.test
index c0e721676..ad863708b 100755
--- a/tests/condman2.test
+++ b/tests/condman2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
man_MANS = foo.1 foo.2
man5_MANS = foo.5
diff --git a/tests/condman3.test b/tests/condman3.test
index ff93daf9b..2482d8d55 100755
--- a/tests/condman3.test
+++ b/tests/condman3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([COND], [test x"$FOO" = x"true"])
AC_OUTPUT
diff --git a/tests/confdeps.test b/tests/confdeps.test
index b09f81667..606027d49 100755
--- a/tests/confdeps.test
+++ b/tests/confdeps.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,17 +18,15 @@
. ./defs || Exit 1
-set -e
-
echo "FOO = foo" > Makefile.am
$ACLOCAL
-echo "$me: Generated by aclocal..."
+echo "$me: Generated by aclocal ..."
$AUTOMAKE
grep '^\$(ACLOCAL_M4):' Makefile.in
-echo "$me: Not generated by aclocal..."
+echo "$me: Not generated by aclocal ..."
# Pretend it is not from aclocal (remove the signature),
# but keep it correct, i.e., with AM_INIT_AUTOMAKE etc.
sed -n '3,$p' aclocal.m4 >aclocal.m4t
diff --git a/tests/conff.test b/tests/conff.test
index dc6677cb6..1565271e2 100755
--- a/tests/conff.test
+++ b/tests/conff.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([bar/Makefile:bar/Makefile.in:Makefile.bot])
AC_OUTPUT
diff --git a/tests/conff2.test b/tests/conff2.test
index a0101e126..590169df7 100755
--- a/tests/conff2.test
+++ b/tests/conff2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
# We avoid using configure.in stub initialized by ./defs, since we need
# to keep track of line numbers (to grep for error messages).
cat > configure.in << END
diff --git a/tests/confh.test b/tests/confh.test
index 93badefd6..f900fd7d8 100755
--- a/tests/confh.test
+++ b/tests/confh.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010 Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONFIG_HEADER([include/config.h])
AC_OUTPUT
diff --git a/tests/confh4.test b/tests/confh4.test
index 8e36cfabf..20b2a9995 100755
--- a/tests/confh4.test
+++ b/tests/confh4.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,8 +25,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([include/Makefile])
AM_CONFIG_HEADER([include/config.h])
diff --git a/tests/confh5.test b/tests/confh5.test
index 9af83dcbf..f823af1f8 100755
--- a/tests/confh5.test
+++ b/tests/confh5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_SUBST([FOO], [NameToBeGrepped])
AC_CONFIG_FILES([include/config.h.in])
diff --git a/tests/confh6.test b/tests/confh6.test
index 532a2fdce..c00190fb6 100755
--- a/tests/confh6.test
+++ b/tests/confh6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2010 Free Software
+# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -22,8 +22,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONFIG_HEADER([subdir/config.h])
AC_OUTPUT
diff --git a/tests/confh7.test b/tests/confh7.test
index 4e4f7da2d..2ccb10c70 100755
--- a/tests/confh7.test
+++ b/tests/confh7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2010 Free Software
+# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONFIG_HEADER([config.h two.h])
END
diff --git a/tests/confh8.test b/tests/confh8.test
index 146d2f059..66b8a5493 100755
--- a/tests/confh8.test
+++ b/tests/confh8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONFIG_HEADER([one.h two.h])
AC_OUTPUT
diff --git a/tests/configure.test b/tests/configure.test
index 0773a00df..0e6290659 100755
--- a/tests/configure.test
+++ b/tests/configure.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >configure.ac <<EOF
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/confincl.test b/tests/confincl.test
index c4f0cdec3..235d7d6dc 100755
--- a/tests/confincl.test
+++ b/tests/confincl.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/conflnk.test b/tests/conflnk.test
index 8dfafbc6c..4052e241c 100755
--- a/tests/conflnk.test
+++ b/tests/conflnk.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo 'SUBDIRS = sdir' > Makefile.am
: > src
mkdir sdir
diff --git a/tests/conflnk2.test b/tests/conflnk2.test
index 8c68c38cc..1a3aa32ba 100755
--- a/tests/conflnk2.test
+++ b/tests/conflnk2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
SUBDIRS = sdir
.PHONY: test
diff --git a/tests/conflnk3.test b/tests/conflnk3.test
index 20f4786b1..78086077b 100755
--- a/tests/conflnk3.test
+++ b/tests/conflnk3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
SUBDIRS = sdir
.PHONY: test
diff --git a/tests/conflnk4.test b/tests/conflnk4.test
index fd96054da..7597087d3 100755
--- a/tests/conflnk4.test
+++ b/tests/conflnk4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2008, 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -23,8 +23,6 @@
. ./defs || Exit 1
-set -e
-
mkdir nonmk-subdir sdir sdir/mk-subdir
: > src
: > sdir/Makefile.am
diff --git a/tests/confsub.test b/tests/confsub.test
index a0d4fe394..43f0819df 100755
--- a/tests/confsub.test
+++ b/tests/confsub.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2010 Free
-# Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2010, 2011
+# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
diff --git a/tests/confvar.test b/tests/confvar.test
index 13cc7dd5f..cc0bd7e2e 100755
--- a/tests/confvar.test
+++ b/tests/confvar.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_SUBST([QBERT])
END
diff --git a/tests/confvar2.test b/tests/confvar2.test
index 1cfd2d352..ca11568c3 100755
--- a/tests/confvar2.test
+++ b/tests/confvar2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_SUBST([OTHER_SCRIPTS])
END
diff --git a/tests/copy.test b/tests/copy.test
index 770ae516a..714f7222a 100755
--- a/tests/copy.test
+++ b/tests/copy.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,5 +22,10 @@
: > Makefile.am
rm -f install-sh
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE -c -a
+
+test -f install-sh
+test ! -h install-sh
+
+:
diff --git a/tests/cscope.test b/tests/cscope.test
new file mode 100755
index 000000000..859653b2d
--- /dev/null
+++ b/tests/cscope.test
@@ -0,0 +1,107 @@
+#! /bin/sh
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test cscope functionality.
+
+required=
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_FC
+AM_PROG_GCJ
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+mkdir sub sub/subsub
+
+cat >Makefile.am <<'END'
+SUBDIRS = sub
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c bar.cpp baz.f90
+lisp_LISP = foo.el
+EXTRA_DIST = foo.el
+END
+
+cat >sub/Makefile.am <<'END'
+bin_PROGRAMS = bar
+bar_SOURCES = subsub/dist.c
+nodist_bar_SOURCES = subsub/gen.c
+subsub/gen.c:
+ $(MKDIR_P) subsub
+ echo 'int generated_subsub () { return 0; }' > $@
+CLEANFILES = subsub/gen.c
+END
+
+echo 'int foo_func () { return 0; }' > foo.c
+echo 'int main () { return 0; }' > bar.cpp
+cat > baz.f90 <<'END'
+ subroutine baz
+ end
+END
+: >foo.el
+echo 'int main () { return 0; }' > sub/subsub/dist.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+mkdir build
+cd build
+../configure || Exit 77
+
+$MAKE -n cscope
+
+: ${CSCOPE=cscope}
+( $CSCOPE --version ) >/dev/null 2>&1 || Exit 77
+
+$MAKE cscope 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'cannot find file' stderr && Exit 1
+
+test -f cscope.files
+$FGREP foo.c cscope.files
+$FGREP bar.cpp cscope.files
+$FGREP sub/subsub/dist.c cscope.files
+$FGREP sub/subsub/gen.c cscope.files
+
+cp cscope.files cscope.files1
+$MAKE cscope
+diff cscope.files cscope.files1
+
+$MAKE distclean
+test ! -f cscope.files
+test ! -f cscope.out
+test ! -f cscope.in.out
+test ! -f cscope.po.out
+
+
+`pwd`/../configure || Exit 77
+
+$MAKE cscope 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'cannot find file' stderr && Exit 1
+$MAKE || Exit 77
+$MAKE distclean
+
+cd ..
+./configure
+$MAKE distcheck
+
+:
diff --git a/tests/outdir.test b/tests/cscope2.test
index 4bafb4ef5..a7fa99317 100755
--- a/tests/outdir.test
+++ b/tests/cscope2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,19 +14,21 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to ensure that --output-dir works. Bug report from Joshua
-# Cowan.
+# The `cscope' target should not fail if there are no sources.
+required=
. ./defs || Exit 1
-cat > Makefile.am <<'END'
-pkgdata_DATA =
+cat >> configure.in << 'END'
+AC_OUTPUT
END
+: >Makefile.am
-mkdir zardir
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
-$ACLOCAL || Exit 1
-$AUTOMAKE -Wno-obsolete --output-dir=zardir || Exit 1
+./configure
+$MAKE cscope
-test -f Makefile.in && Exit 1
-test -f zardir/Makefile.in
+:
diff --git a/tests/cscope3.test b/tests/cscope3.test
new file mode 100755
index 000000000..e40c061d6
--- /dev/null
+++ b/tests/cscope3.test
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The `cscope' target should not fail if there are no sources in a subdir.
+# In practice this means `cscope' should not be invoked if cscope.files
+# is empty.
+
+required=cscope
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+mkdir sub
+echo 'SUBDIRS = sub' >Makefile.am
+: >sub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE cscope
+
+:
diff --git a/tests/cxx.test b/tests/cxx.test
index aa2f22575..5edad1673 100755
--- a/tests/cxx.test
+++ b/tests/cxx.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXX
END
diff --git a/tests/cxx2.test b/tests/cxx2.test
index 0b9e8809b..7606356e2 100755
--- a/tests/cxx2.test
+++ b/tests/cxx2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >>configure.in
cat >Makefile.am <<'END'
diff --git a/tests/cxxansi.test b/tests/cxxansi.test
index 8bbe9b278..150cc9ebf 100755
--- a/tests/cxxansi.test
+++ b/tests/cxxansi.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXX
AM_C_PROTOTYPES
diff --git a/tests/cxxcpp.test b/tests/cxxcpp.test
index 09bb4eb8c..b5e2bc3d7 100755
--- a/tests/cxxcpp.test
+++ b/tests/cxxcpp.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXXCPP
END
diff --git a/tests/cxxlibobj.test b/tests/cxxlibobj.test
index 5f5ee308d..30e7501fc 100755
--- a/tests/cxxlibobj.test
+++ b/tests/cxxlibobj.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXX
AC_PROG_CC
diff --git a/tests/cxxlink.test b/tests/cxxlink.test
index 66b3d2953..617234a2a 100755
--- a/tests/cxxlink.test
+++ b/tests/cxxlink.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
diff --git a/tests/cxxnoc.test b/tests/cxxnoc.test
index 9d5fa7b63..04a34a1ae 100755
--- a/tests/cxxnoc.test
+++ b/tests/cxxnoc.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2005, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXX
END
diff --git a/tests/cxxo.test b/tests/cxxo.test
index a69fb2ab1..2867218b2 100755
--- a/tests/cxxo.test
+++ b/tests/cxxo.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,8 +18,6 @@
# Make sure C++ files are rewritten to ".o" and not just "o".
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXX
END
diff --git a/tests/cygnus-check-without-all.test b/tests/cygnus-check-without-all.test
new file mode 100755
index 000000000..af15421bf
--- /dev/null
+++ b/tests/cygnus-check-without-all.test
@@ -0,0 +1,50 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that, in cygnus mode, target "check" does not depend target
+# "all".
+
+. ./defs || Exit 1
+
+cat >> configure.in <<'END'
+AM_MAINTAINER_MODE
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+all-local:
+ : > all-target-has-failed
+ exit 1
+check-local:
+ touch check-target-has-run
+END
+
+$ACLOCAL
+$AUTOMAKE --cygnus
+
+$EGREP '(^| )all.*(:|:.* )check' Makefile.in && Exit 1
+
+$AUTOCONF
+./configure
+
+$MAKE check
+test -f check-target-has-run
+test ! -r all-target-has-failed
+# sanity checks
+$MAKE && Exit 1
+test -f all-target-has-failed
+
+:
diff --git a/tests/cygnus-dependency-tracking.test b/tests/cygnus-dependency-tracking.test
new file mode 100755
index 000000000..1bfec252c
--- /dev/null
+++ b/tests/cygnus-dependency-tracking.test
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that cygnus mode disables automatic dependency tracking.
+# And check that this *cannot* be overridden.
+
+. ./defs || Exit 1
+
+cat >> configure.in <<'END'
+AM_MAINTAINER_MODE
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c
+.PHONY: test-nodeps
+test-nodeps:
+ test ! -d .deps
+ test ! -d _deps
+ test ! -d '$(DEPDIR)'
+END
+
+cat > foo.c <<'END'
+#include "bar.h"
+int main ()
+{
+ GIVE_BACK 0;
+}
+END
+
+cat > bar.sav <<'END'
+#define GIVE_BACK return
+END
+
+cp bar.sav bar.h
+
+$ACLOCAL
+$AUTOMAKE --include-deps --cygnus --include-deps
+$AUTOCONF
+
+# Unknown options should cause just warnings from configure.
+./configure --enable-dependency-tracking
+$MAKE
+$MAKE test-nodeps
+
+: > bar.h
+$MAKE
+$MAKE test-nodeps
+
+# Sanity check.
+$MAKE clean
+$MAKE >out 2>&1 && { cat out; Exit 1; }
+cat out
+# Not all compilers mention the undefined symbol in the error message.
+grep GIVE_BACK out || grep main out
+
+:
diff --git a/tests/cygnus-imply-foreign.test b/tests/cygnus-imply-foreign.test
new file mode 100755
index 000000000..9a20f21e0
--- /dev/null
+++ b/tests/cygnus-imply-foreign.test
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that 'cygnus' mode imply 'foreign' mode.
+
+. ./defs || Exit 1
+
+cat >> configure.in <<'END'
+# This is *required* in cygnus mode
+AM_MAINTAINER_MODE
+END
+
+$ACLOCAL
+
+: > Makefile.am
+
+# We want complete control automake flags, while honouring the
+# user overrides for $AUTOMAKE.
+AUTOMAKE=$original_AUTOMAKE
+
+# Sanity check: gnu mode must complain about missing files and
+# portability problems.
+AUTOMAKE_fails
+grep 'required file.*README' stderr
+
+# But cygnus mode should imply foreign mode, so no complaints.
+# And cygnus mode should by able to override gnu and gnits modes.
+$AUTOMAKE --cygnus -Werror
+$AUTOMAKE --gnu --cygnus -Werror
+$AUTOMAKE --gnits --cygnus -Werror
+
+# Try again, this time enabling cygnus mode from Makefile.am.
+cp Makefile.am Makefile.sav
+echo 'AUTOMAKE_OPTIONS = gnu cygnus' >> Makefile.am
+$AUTOMAKE -Werror
+mv -f Makefile.sav Makefile.am
+
+# Try again, this time enabling cygnus mode from configure.in.
+cp configure.in configure.sav
+sed 's/^AM_INIT_AUTOMAKE$/&([gnits cygnus])/' configure.sav >configure.in
+cmp configure.in configure.sav && Exit 99 # sanity check
+$ACLOCAL --force
+$AUTOMAKE -Werror
+mv -f configure.sav configure.in
+
+:
diff --git a/tests/cygnus-no-dist.test b/tests/cygnus-no-dist.test
new file mode 100755
index 000000000..acb5ec6bd
--- /dev/null
+++ b/tests/cygnus-no-dist.test
@@ -0,0 +1,84 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that cygnus mode forbids creation of distribution tarball.
+
+. ./defs || Exit 1
+
+echo AM_MAINTAINER_MODE >> configure.in
+mv -f configure.in configure.stub
+
+cat configure.stub - > configure.in <<'END'
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --cygnus
+
+./configure
+$MAKE
+
+for target in dist distdir distcheck dist-all dist-gzip; do
+ $MAKE -n $target >out 2>&1 && { cat out; Exit 1; }
+ cat out
+ grep $target out
+done
+
+# Now check that cygnus mode in a subdirectory disables
+# distribution-building in that subdirectory.
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2
+END
+
+mkdir sub1 sub2
+: > sub1/Makefile.am
+cat > sub2/Makefile.am <<'END'
+# The `-Wall' after `cygnus' should ensure no warning gets
+# unintentionally disabled. We are particularily interested
+# in override warnings, for when (below) we add the `distdir'
+# target.
+AUTOMAKE_OPTIONS = cygnus -Wall
+END
+
+cat configure.stub - > configure.in <<'END'
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+cd sub2
+$MAKE -n distdir >out 2>&1 && { cat out; Exit 1; }
+grep distdir out
+cd ..
+
+cat >> sub2/Makefile.am <<'END'
+distdir:
+END
+$AUTOMAKE sub2/Makefile
+./config.status sub2/Makefile
+
+$MAKE distdir
+$MAKE dist
+
+:
diff --git a/tests/cygnus-no-installinfo.test b/tests/cygnus-no-installinfo.test
new file mode 100755
index 000000000..25a8e7cae
--- /dev/null
+++ b/tests/cygnus-no-installinfo.test
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that cygnus mode enables the 'no-installinfo' option.
+
+required=makeinfo
+. ./defs || Exit 1
+
+cat >> configure.in <<'END'
+AM_MAINTAINER_MODE
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+info_TEXINFOS = foo.texi
+END
+
+cat > foo.texi <<'END'
+@setfilename foo.info
+END
+
+$ACLOCAL
+# FIXME: -Wno-override works around a buglet in definition of $(MAKEINFO)
+# in cygnus mode; see also xfailing test `txinfo5.test'.
+$AUTOMAKE --cygnus -Wno-override
+$AUTOCONF
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd"/_inst
+$MAKE
+$MAKE install
+test ! -d _inst
+test ! -r foo.info
+test ! -d _inst/share/info
+$MAKE install-info
+ls -l _inst
+test -f foo.info
+test -f _inst/share/info/foo.info
+
+:
diff --git a/tests/cygnus-requires-maintainer-mode.test b/tests/cygnus-requires-maintainer-mode.test
new file mode 100755
index 000000000..86e33a1d0
--- /dev/null
+++ b/tests/cygnus-requires-maintainer-mode.test
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that, in cygnus mode, maintainer mode is required.
+
+. ./defs || Exit 1
+
+: > Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails --cygnus
+grep '^configure\.in:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
+
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+END
+
+mkdir sub
+cat > sub/Makefile.am <<'END'
+AUTOMAKE_OPTIONS = cygnus
+END
+
+rm -rf autom4te.cache
+$ACLOCAL
+AUTOMAKE_fails
+grep '^configure\.in:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
+
+cat >> configure.in <<'END'
+AM_MAINTAINER_MODE
+END
+
+rm -rf autom4te.cache
+$ACLOCAL
+$AUTOMAKE --cygnus
+
+:
diff --git a/tests/cygwin32.test b/tests/cygwin32.test
index ec3f43db3..ed9fcd15c 100755
--- a/tests/cygwin32.test
+++ b/tests/cygwin32.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1997, 1999, 2001, 2002, 2008, 2010 Free Software
+# Copyright (C) 1997, 1999, 2001, 2002, 2008, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/dash.test b/tests/dash.test
index 335b891c1..ef8a176de 100755
--- a/tests/dash.test
+++ b/tests/dash.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
include Make-lang
END
diff --git a/tests/defs.in b/tests/defs
index fb57dfd38..f6237d33b 100644
--- a/tests/defs.in
+++ b/tests/defs
@@ -1,8 +1,8 @@
# -*- shell-script -*-
-# @configure_input@
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,22 +17,31 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Defines for Automake testing environment.
-# Tom Tromey <tromey@cygnus.com>
-
-# Be more Bourne compatible.
-# (Snippet copied from configure's initialization in Autoconf 2.64)
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
+## -------------------------------------------------------- ##
+## Source static setup and definitions for the testsuite. ##
+## -------------------------------------------------------- ##
+
+# This code needs to be 'set -e' clean.
+
+# Ensure we are running from the right directory.
+test -f ./defs-static || {
+ echo "$0: ./defs-static: not found in current directory" >&2
+ exit 99
+}
+
+# Source the shell sanitization and variables' definitions.
+. ./defs-static || exit 99
+
+# The name of the current test (without the `.test' suffix.)
+# Guard against failure to spawn sed (seen on MSYS), or empty $argv0.
+me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//'` \
+ && test -n "$me" \
+ || { echo "$argv0: failed to define \$me" >&2; exit 99; }
+
+
+## ---------------------------------------- ##
+## Sanity checks and environment cleanup. ##
+## ---------------------------------------- ##
# A single whitespace character.
sp=' '
@@ -46,76 +55,158 @@ nl='
# is defined initially, so that saving and restoring $IFS works.
IFS=$sp$tab$nl
-# Ensure we are running from the right directory.
-test -f ./defs || {
- echo "defs: not found in current directory" 1>&2
- exit 1
+# Ensure $testsrcdir is set correctly.
+test -f "$testsrcdir/defs-static.in" || {
+ echo "$me: $testsrcdir/defs-static.in not found, check \$testsrcdir" >&2
+ exit 99
+}
+
+# Ensure $testbuilddir is set correctly.
+test -f "$testbuilddir/defs-static" || {
+ echo "$me: $testbuilddir/defs-static not found, check \$testbuilddir" >&2
+ exit 99
+}
+
+# Unset some MAKE... variables that may cause $MAKE to act like a
+# recursively invoked sub-make. Any $MAKE invocation in a test is
+# conceptually an independent invocation, not part of the main
+# 'automake' build.
+unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
+# Unset verbosity flag.
+unset V
+# Also unset variables that will let `make -e install' divert
+# files into unwanted directories.
+unset DESTDIR
+unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
+unset htmldir includedir infodir libdir libexecdir localedir mandir
+unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
+# The tests call `make -e' but we do not want $srcdir from the environment
+# to override the definition from the Makefile.
+unset srcdir
+# Also unset variables that control our test driver. While not
+# conceptually independent, they cause some changed semantics we
+# need to control (and test for) in some of the tests to ensure
+# backward-compatible behavior.
+unset TESTS_ENVIRONMENT
+unset DISABLE_HARD_ERRORS
+unset TESTS
+unset TEST_LOG_COMPILER
+unset TEST_LOGS
+unset RECHECK_LOGS
+unset VERBOSE
+
+
+## ---------------------------- ##
+## Auxiliary shell functions. ##
+## ---------------------------- ##
+
+# We use a trap below for cleanup. This requires us to go through
+# hoops to get the right exit status transported through the signal.
+# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit ()
+{
+ set +e
+ (exit $1)
+ exit $1
+}
+
+# is_newest FILE FILES
+# --------------------
+# Return false if any file in FILES is newer than FILE.
+# Resolve ties in favor of FILE.
+is_newest ()
+{
+ is_newest_files=`find "$@" -newer "$1"`
+ test -z "$is_newest_files"
+}
+
+# AUTOMAKE_run status [options...]
+# --------------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_run ()
+{
+ expected_exitcode=$1
+ shift
+ exitcode=0
+ $AUTOMAKE ${1+"$@"} >stdout 2>stderr || exitcode=$?
+ cat stderr >&2
+ cat stdout
+ test $exitcode = $expected_exitcode || Exit 1
}
-if test -z "$srcdir"; then
- # compute $srcdir.
- srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
- test "$srcdir" = $0 && srcdir=.
-else :; fi
+# AUTOMAKE_fails [options...]
+# ---------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_fails ()
+{
+ AUTOMAKE_run 1 ${1+"$@"}
+}
-# Ensure $srcdir is set correctly.
-test -f "$srcdir/defs.in" || {
- echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
- exit 1
+commented_sed_unindent_prog='
+ /^$/b # Nothing to do for empty lines.
+ x # Get x<indent> into pattern space.
+ /^$/{ # No prior x<indent>, go prepare it.
+ g # Copy this 1st non-blank line into pattern space.
+ s/^\(['"$tab"' ]*\).*/x\1/ # Prepare x<indent> in pattern space.
+ } # Now: x<indent> in pattern and <line> in hold.
+ G # Build x<indent>\n<line> in pattern space, and
+ h # duplicate it into hold space.
+ s/\n.*$// # Restore x<indent> in pattern space, and
+ x # exchange with the above duplicate in hold space.
+ s/^x\(.*\)\n\1// # Remove leading <indent> from <line>.
+ s/^x.*\n// # Restore <line> when there is no leading <indent>.
+'
+
+# unindent [input files...]
+# -------------------------
+# Remove the "proper" amount of leading whitespace from the given files,
+# and output the result on stdout. That amount is determined by looking
+# at the leading whitespace of the first non-blank line in the input
+# files. If no input file is specified, standard input is implied.
+unindent ()
+{
+ if test x"$sed_unindent_prog" = x; then
+ sed_unindent_prog=`printf '%s\n' "$commented_sed_unindent_prog" | sed -e "s/ *# .*//"`
+ fi
+ sed "$sed_unindent_prog" ${1+"$@"}
}
-me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
-
-APIVERSION='@APIVERSION@'
-PATH_SEPARATOR='@PATH_SEPARATOR@'
-
-# Make sure we override the user shell.
-SHELL='@SHELL@'
-export SHELL
-# User can override various tools used.
-test -z "$PERL" && PERL='@PERL@'
-test -z "$MAKE" && MAKE=make
-test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
-test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
-test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
-test -z "$MISSING" && MISSING=`pwd`/../lib/missing
-# Use -Werror because this also turns some Perl warnings into error.
-# (Tests for which this is inappropriate should use -Wno-error.)
-test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
-# Extra flags to pass to aclocal before all other flags added by this script.
-ACLOCAL_TESTSUITE_FLAGS=
-export ACLOCAL_TESTSUITE_FLAGS
-
-# See how Automake should be run. We put --foreign as the default
-# strictness to avoid having to create lots and lots of files. A test
-# can override this by specifying a different strictness. Use -Wall
-# -Werror by default. Tests for which this is inappropriate
-# (e.g. when testing that a warning is enabled by a specific switch)
-# should use -Wnone or/and -Wno-error
-test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
-
-PATH="`pwd`$PATH_SEPARATOR$PATH"
+
+## ----------------------------------------------------------- ##
+## Checks for required tools, and additional setups (if any) ##
+## required by them. ##
+## ----------------------------------------------------------- ##
+
+# Print it here, so that the user will see it also if the test
+# will be skipped due to some tool missing in $PATH itslef.
echo "$PATH"
-# Some shells forget to export modified environment variables.
-# (See note about `export' in the Autoconf manual.)
-export PATH
+# Look for (and maybe set up) required tools and/or system features; skip
+# the current test if they are not found.
for tool in : $required
do
# Check that each required tool is present.
case $tool in
:) ;;
- bison)
- # Since bison is required, we pick YACC for ./configure.
- YACC='bison -y'
- export YACC
- echo "$me: running bison --version"
- ( bison --version ) || exit 77
- ;;
bzip2)
# Do not use --version, bzip2 still tries to compress stdin.
echo "$me: running bzip2 --help"
- ( bzip2 --help ) || exit 77
+ bzip2 --help || exit 77
+ ;;
+ cl)
+ CC=cl
+ export CC
+ echo "$me: running $CC -?"
+ $CC -? || exit 77
+ ;;
+ cscope)
+ # Sun cscope is interactive without redirection.
+ echo "$me: running cscope --version </dev/null"
+ cscope --version </dev/null || exit 77
;;
etags)
# Exuberant Ctags will create a TAGS file even
@@ -123,7 +214,7 @@ do
# does not have such problem.) Use -o /dev/null
# to make sure we do not pollute the tests/ directory.
echo "$me: running etags --version -o /dev/null"
- ( etags --version -o /dev/null ) || exit 77
+ etags --version -o /dev/null || exit 77
;;
GNUmake)
# Use --version AND -v, because SGI Make doesn't fail on --version.
@@ -140,20 +231,25 @@ do
CC=gcc
export CC
echo "$me: running $CC --version"
- ( $CC --version ) || exit 77
+ $CC --version || exit 77
+ echo "$me: running $CC -v"
+ $CC -v || exit 77
;;
gcj)
GCJ=gcj
export GCJ
echo "$me: running $GCJ --version"
- ( $GCJ --version ) || exit 77
- ( $GCJ -v ) || exit 77
+ $GCJ --version || exit 77
+ echo "$me: running $GCJ -v"
+ $GCJ -v || exit 77
;;
g++)
CXX=g++
export CXX
echo "$me: running $CXX --version"
- ( $CXX --version ) || exit 77
+ $CXX --version || exit 77
+ echo "$me: running $CXX -v"
+ $CXX -v || exit 77
;;
icc)
CC=icc
@@ -163,140 +259,254 @@ do
# it will try link *nothing* and complain it cannot find
# main(); funny). Use -help so it does not try linking anything.
echo "$me: running $CC -V -help"
- ( $CC -V -help ) || exit 77
+ $CC -V -help || exit 77
;;
makedepend)
echo "$me: running makedepend -f-"
- ( makedepend -f- ) || exit 77
+ makedepend -f- || exit 77
;;
makeinfo-html)
# Make sure makeinfo understands --html.
echo "$me: running makeinfo --html --version"
- ( makeinfo --html --version ) || exit 77
+ makeinfo --html --version || exit 77
;;
non-root)
# Skip this test case if the user is root.
# We try to append to a read-only file to detect this.
priv_check_temp=priv-check.$$
- touch $priv_check_temp || exit 1
- chmod a-w $priv_check_temp || exit 1
+ touch $priv_check_temp || exit 99
+ chmod a-w $priv_check_temp || exit 99
(echo foo >> $priv_check_temp) >/dev/null 2>&1
overwrite_status=$?
rm -f $priv_check_temp
- test $overwrite_status = 0 && exit 77
+ if test $overwrite_status -eq 0; then
+ echo "$me: cannot drop file write permissions" >&2
+ exit 77
+ fi
+ unset priv_check_temp overwrite_status
+ ;;
+ perl-threads)
+ if test "$WANT_NO_THREADS" = "yes"; then
+ echo "$me: skip with Devel::Cover: cannot cope with threads" >&2
+ exit 77
+ fi
;;
python)
# Python doesn't support --version, it has -V
echo "$me: running python -V"
- ( python -V ) || exit 77
+ python -V || exit 77
;;
ro-dir)
# Skip this test case if read-only directories aren't supported
# (e.g., under DOS.)
ro_dir_temp=ro_dir.$$
- mkdir $ro_dir_temp || exit 1
- chmod a-w $ro_dir_temp || exit 1
+ mkdir $ro_dir_temp || exit 99
+ chmod a-w $ro_dir_temp || exit 99
(: > $ro_dir_temp/probe) >/dev/null 2>/dev/null
create_status=$?
rm -rf $ro_dir_temp
- test $create_status = 0 && exit 77
+ if test $create_status -eq 0; then
+ echo "$me: cannot drop directory write permissions" >&2
+ exit 77
+ fi
+ unset ro_dir_temp create_status
;;
rst2html)
# Try the variants that are tried in check.am.
while :; do
- for r2h in $RST2HTML rst2html rst2html.py; do
- echo "$me: running $r2h --version"
- $r2h --version && break 2
- done
- exit 77
+ for r2h in $RST2HTML rst2html rst2html.py; do
+ echo "$me: running $r2h --version"
+ $r2h --version && break 2
+ done
+ echo "$me: no proper rst2html program found" >&2
+ exit 77
done
+ unset r2h
;;
runtest)
# DejaGnu's runtest program. We rely on being able to specify
# the program on the runtest command-line. This requires
# DejaGnu 1.4.3 or later.
- echo "$me: running runtest --version"
- (runtest SOMEPROGRAM=someprogram --version) || exit 77
+ echo "$me: running runtest SOMEPROGRAM=someprogram --version"
+ runtest SOMEPROGRAM=someprogram --version || exit 77
;;
tex)
# No all versions of Tex support `--version', so we use
# a configure check.
- test -n "@TEX@" || exit 77
+ if test -z "$TEX"; then
+ echo "$me: TeX is required, but it wasn't found by configure" >&2
+ exit 77
+ fi
;;
texi2dvi-o)
# Texi2dvi supports `-o' since Texinfo 4.1.
echo "$me: running texi2dvi -o /dev/null --version"
- ( texi2dvi -o /dev/null --version ) || exit 77
+ texi2dvi -o /dev/null --version || exit 77
+ ;;
+ xsi-shell)
+ # Try some XSI features.
+ # Keep this in sync with libtool.m4:_LT_CHECK_SHELL_FEATURES.
+ echo "$me: trying some XSI constructs"
+ ( _am_dummy="a/b/c"
+ test "${_am_dummy##*/},${_am_dummy%/*},${_am_dummy#??}"${_am_dummy%"$_am_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_am_dummy}" -eq 5' ) || exit 77
+ ;;
+ yacc)
+ if test x"$YACC" = x"no"; then
+ # The user has explicitly told he doesn't want a yacc program
+ # to be used.
+ echo "$me: \$YACC is \"no\", skipping test" >&2
+ exit 77
+ elif test -z "$YACC"; then
+ # The user hasn't explicitly specified any yacc program in the
+ # environment, so we try to use bison, skipping the test if it's
+ # not found.
+ YACC='bison -y'
+ export YACC
+ echo "$me: running bison --version"
+ bison --version || exit 77
+ fi
;;
- # Generic case: the tool must support --version.
*)
+ # Generic case: the tool must support --version.
echo "$me: running $tool --version"
+ # It is not likely but possible that $tool is a special builtin,
+ # in which case the shell is allowed to exit after an error.
+ # So, please leave the subshell here.
( $tool --version ) || exit 77
;;
esac
done
-
-# Always use an absolute srcdir. Otherwise symlinks made in subdirs
-# of the test dir just won't work.
-case "$srcdir" in
- [\\/]* | ?:[\\/]*)
+# Using just `$testbuilddir' for the check here is ok, since the
+# further temporary subdirectory where the test will be run is
+# ensured not to contain any whitespace character.
+case $testbuilddir in
+ *\ *|*\ *)
+ case " $required " in
+ *' libtool '* | *' libtoolize '* )
+ echo "$me: libtool/libtoolized cannot cope correctly" >&2
+ echo "$me: with spaces in the build tree" >&2
+ exit 77
+ ;;
+ esac
;;
+esac
+
+# This test is necessary, although Automake's configure script bails out
+# when $srcdir contains spaces. This is because $testsrcdir is in not
+# configure-time $srcdir, but is instead configure-time $abs_srcdir, and
+# that is allowed to contain spaces.
+case $testsrcdir in
+ *\ * |*\ *)
+ case " $required " in
+ *' libtool '* | *' libtoolize '* | *' gettext '* )
+ echo "$me: our testsuite setup cannot cope correctly with spaces" >&2
+ echo "$me: in the source tree for libtool/gettext tests" >&2
+ exit 77
+ ;;
+ esac
+ ;;
+esac
+
+# We might need extra macros, e.g., from Libtool or Gettext.
+# Find them on the system.
+# Use `-I $top_testsrcdir/m4' in addition to `--acdir=$top_testsrcdir/m4',
+# because the other `-I' directories added for libtool and gettext might
+# contain files from an old version of Automake that we don't want to use.
+# Use `-Wno-syntax' because we do not want our test suite to fail because
+# some third-party .m4 file is underquoted.
+case " $required " in
+ *' libtool '* | *' libtoolize '* | *' gettext '* )
+ aclocaldir=$testprefix/share/aclocal
+ extra_includes=""
+ if test -f $aclocaldir/dirlist; then
+ extra_includes=`
+ <$aclocaldir/dirlist \
+ sed 's/#.*//;s/[ ][ ]*$//g' \
+ | while read dir; do test ! -d "$dir" || echo "-I $dir"; done`
+ else :; fi
- *)
- srcdir=`CDPATH=: && cd "$srcdir" && pwd`
+ libtool_found=no
+ gettext_found=no
+ for d in $extra_includes $aclocaldir ; do
+ test "x$d" != x-I || continue
+ if test -f "$d/libtool.m4"; then
+ libtool_found=yes
+ fi
+ if test -f "$d/gettext.m4"; then
+ gettext_found=yes
+ fi
+ done
+ case " $required " in
+ *' libtool '*|*' libtoolize '*)
+ if test $libtool_found != yes; then
+ echo "$me: libtool/libtoolize is required, but libtool.m4 wasn't" >&2
+ echo "$me: found in directories $aclocaldir $extra_includes" >&2
+ exit 77
+ fi
+ ;;
+ *' gettext '*)
+ if test $gettext_found != yes; then
+ echo "$me: gettext is required, but gettext.m4 wasn't found" >&2
+ echo "$me: in directories $aclocaldir $extra_includes" >&2
+ exit 77
+ fi
+ ;;
+ esac
+ ACLOCAL="$ACLOCAL -Wno-syntax -I $top_testsrcdir/m4 $extra_includes -I $aclocaldir"
+ unset libtool_found gettext_found
+ unset extra_includes aclocaldir
;;
esac
-# We use a trap below for cleanup. This requires us to go through
-# hoops to get the right exit status transported through the signal.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
-# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
-# sh inside this function.
-Exit ()
-{
- set +e
- (exit $1)
- exit $1
-}
-curdir=`pwd`
+## ---------------------------------------------------------------- ##
+## Create and set up of the temporary directory used by the test. ##
+## Set up of the exit trap for cleanup of said directory. ##
+## ---------------------------------------------------------------- ##
+
+# The subdirectory where the current test script will run and write its
+# temporary/data files. This will be created shortly, and will be removed
+# by the cleanup trap below if the test passes. If the test doesn't pass,
+# this directory will be kept, to facilitate debugging.
testSubDir=$me.dir
+
test ! -d $testSubDir || {
find $testSubDir -type d ! -perm -700 -exec chmod u+rwx {} ";"
rm -rf $testSubDir
}
mkdir $testSubDir
-sh_errexit_works=@sh_errexit_works@
+cd ./$testSubDir
+
if test "$sh_errexit_works" = yes; then
trap 'exit_status=$?
set +e
- cd "$curdir"
+ cd "$testbuilddir"
case $exit_status,$keep_testdirs in
0,)
find $testSubDir -type d ! -perm -700 -exec chmod u+rwx {} ";"
rm -rf $testSubDir
;;
esac
- test "$signal" != 0 &&
- echo "$me: caught signal $signal"
+ test "$signal" != 0 && echo "$me: caught signal $signal"
echo "$me: exit $exit_status"
exit $exit_status
' 0
for signal in 1 2 13 15; do
- trap 'signal='$signal'; { Exit 1; }' $signal
+ trap 'signal='$signal'; { Exit 99; }' $signal
done
+ signal=0
fi
-signal=0
# Copy in some files we need.
for file in install-sh missing depcomp; do
- cp "$srcdir/../lib/$file" "$testSubDir/$file" || Exit 1
+ cp "$top_testsrcdir/lib/$file" . || Exit 99
done
-cd ./$testSubDir
-
# Build appropriate environment in test directory. Eg create
# configure.in, touch all necessary files, etc.
# Don't use AC_OUTPUT, but AC_CONFIG_FILES so that appending
@@ -312,164 +522,11 @@ cd ./$testSubDir
echo "AC_CONFIG_FILES([Makefile])"
} >configure.in
-# Unset some MAKE... variables that may cause $MAKE to act like a
-# recursively invoked sub-make. Any $MAKE invocation in a test is
-# conceptually an independent invocation, not part of the main
-# 'automake' build.
-unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
-# Unset verbosity flag.
-unset V
-# Also unset variables that will let `make -e install' divert
-# files into unwanted directories.
-unset DESTDIR
-unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
-unset htmldir includedir infodir libdir libexecdir localedir mandir
-unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
-# Also unset variables that control our test driver. While not
-# conceptually independent, they cause some changed semantics we
-# need to control (and test for) in some of the tests to ensure
-# backward-compatible behavior.
-unset TESTS_ENVIRONMENT
-unset DISABLE_HARD_ERRORS
-unset TESTS
-unset TEST_LOG_COMPILER
-unset TEST_LOGS
-unset RECHECK_LOGS
-unset VERBOSE
-
-echo "=== Running test $0"
-
-# We might need extra macros, e.g., from Libtool or Gettext.
-# Find them on the system.
-# Use `-I $srcdir/../m4' in addition to `--acdir=$srcdir/../m4', because the
-# other `-I' directories added for libtool and gettext might contain
-# files from an old version of Automake that we don't want to use.
-# Use `-Wno-syntax' because we do not want our test suite to fail because
-# some third-party .m4 file is underquoted.
-case $required in
- *libtool* | *gettext* )
- aclocaldir='@prefix@/share/aclocal'
- extra_includes=""
- if test -f $aclocaldir/dirlist; then
- extra_includes=`
- <$aclocaldir/dirlist \
- sed 's/#.*//;s/[ ][ ]*$//g' \
- | while read dir; do test ! -d "$dir" || echo "-I $dir"; done`
- else :; fi
-
- libtool_found=no
- gettext_found=no
- for d in $extra_includes $aclocaldir ; do
- test "x$d" != x-I || continue
- if test -f "$d/libtool.m4"; then
- libtool_found=yes
- fi
- if test -f "$d/gettext.m4"; then
- gettext_found=yes
- fi
- done
- case $required in
- *libtool* ) test $libtool_found = yes || Exit 77 ;;
- *gettext* ) test $gettext_found = yes || Exit 77 ;;
- esac
- # Libtool cannot cope with spaces in the build tree. Our testsuite setup
- # cannot cope with spaces in the source tree name for Libtool and gettext
- # tests.
- case $srcdir,`pwd` in
- *\ * | *\ *) Exit 77 ;;
- esac
- ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I $aclocaldir"
- ;;
-esac
-
-testaclocaldir='@abs_top_srcdir@/m4'
-
-# POSIX no longer requires 'egrep' and 'fgrep',
-# but some hosts lack 'grep -E' and 'grep -F'.
-EGREP='@EGREP@'
-FGREP='@FGREP@'
-
-# The amount we should wait after modifying files depends on the platform.
-# For instance, Windows '95, '98 and ME have 2-second granularity
-# and can be up to 3 seconds in the future w.r.t. the system clock.
-sleep='sleep @MODIFICATION_DELAY@'
-
-# The tests call `make -e' but we do not want $srcdir from the environment
-# to override the definition from the Makefile.
-testsrcdir=$srcdir
-unset srcdir
-
-# An old timestamp that can be given to a file, in "touch -t" format.
-# The time stamp should be portable to all file systems of interest.
-# Just for fun, choose the exact time of the announcement of the GNU project
-# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
-old_timestamp=198309271735.59
-
-# is_newest FILE FILES
-# --------------------
-# Return false if any file in FILES is newer than FILE.
-# Resolve ties in favor of FILE.
-is_newest ()
-{
- is_newest_files=`find "$@" -newer "$1"`
- test -z "$is_newest_files"
-}
-
-
-# AUTOMAKE_run status [options...]
-# --------------------------------
-# Run Automake with OPTIONS, and fail if automake
-# does not exit with STATUS.
-AUTOMAKE_run ()
-{
- expected_exitcode=$1
- shift
- exitcode=0
- $AUTOMAKE ${1+"$@"} >stdout 2>stderr || exitcode=$?
- cat stderr >&2
- cat stdout
- test $exitcode = $expected_exitcode || Exit 1
-}
-
-# AUTOMAKE_fails [options...]
-# ---------------------------
-# Run Automake with OPTIONS, and fail if automake
-# does not exit with STATUS.
-AUTOMAKE_fails ()
-{
- AUTOMAKE_run 1 ${1+"$@"}
-}
-
-commented_sed_unindent_prog='
- /^$/b # Nothing to do for empty lines.
- x # Get x<indent> into pattern space.
- /^$/{ # No prior x<indent>, go prepare it.
- g # Copy this 1st non-blank line into pattern space.
- s/^\(['"$tab"' ]*\).*/x\1/ # Prepare x<indent> in pattern space.
- } # Now: x<indent> in pattern and <line> in hold.
- G # Build x<indent>\n<line> in pattern space, and
- h # duplicate it into hold space.
- s/\n.*$// # Restore x<indent> in pattern space, and
- x # exchange with the above duplicate in hold space.
- s/^x\(.*\)\n\1// # Remove leading <indent> from <line>.
- s/^x.*\n// # Restore <line> when there is no leading <indent>.
-'
-
-# unindent [input files...]
-# -------------------------
-# Remove the "proper" amount of leading whitespace from the given files,
-# and output the result on stdout. That amount is determined by looking
-# at the leading whitespace of the first non-blank line in the input
-# files. If no input file is specified, standard input is implied.
-unindent ()
-{
- if test x"$sed_unindent_prog" = x; then
- sed_unindent_prog=`printf '%s\n' "$commented_sed_unindent_prog" | sed -e "s/ *# .*//"`
- fi
- sed "$sed_unindent_prog" ${1+"$@"}
-}
+## ---------------- ##
+## Ready to go... ##
+## ---------------- ##
-# Turn on shell traces.
set -x
+set -e
pwd
diff --git a/tests/defs-static.in b/tests/defs-static.in
new file mode 100644
index 000000000..901620712
--- /dev/null
+++ b/tests/defs-static.in
@@ -0,0 +1,141 @@
+# -*- shell-script -*-
+# @configure_input@
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Defines and minimal setup for Automake testing environment.
+# Multiple inclusions of this file should be idempotent!
+# This code needs to be 'set -e' clean.
+
+# Be more Bourne compatible.
+# (Snippet inspired to configure's initialization in Autoconf 2.64)
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+ # If Zsh is not started directly in Bourne-compatibility mode, it has
+ # some incompatibilities in the handling of `$0' that conflict with
+ # our usage: i.e., `$0' inside a file sourced with the `.' builtin is
+ # temporarily set to the name of the sourced file.
+ # Work around this when possible, otherwise abort the script.
+ # Note that a bug in some versions of Zsh prevents us from resetting $0
+ # in a sourced script, so the use of $argv0. For more info see:
+ # <http://www.zsh.org/mla/workers/2009/msg01140.html>
+ # Note: the apparently useless 'eval' below are needed by at least
+ # dash 0.5.2, to prevent it from bailing out with an error like
+ # "Syntax error: Bad substitution"
+ if eval '[[ "$0" = *."test" ]]'; then
+ # Good, FUNCTION_ARGZERO option was already off when this file was
+ # sourced. Thus we've nothing to do.
+ argv0=$0
+ elif eval 'test -n "${functrace[-1]}"'; then
+ # FUNCTION_ARGZERO option was on, but we have a easy workaround.
+ eval 'argv0=${functrace[-1]%:*}'
+ else
+ # Give up.
+ echo "$0: cannot determine the path of running test script" >&2
+ echo "$0: test was running with Zsh version $ZSH_VERSION" >&2
+ echo "$0: did you enable the NO_FUNCTION_ARGZERO option?" >&2
+ exit 99
+ fi
+else
+ argv0=$0
+ # Avoid command substitution failure, for Tru64 sh -e and instspc*.test.
+ case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
+fi
+
+testsrcdir='@abs_srcdir@'
+top_testsrcdir='@abs_top_srcdir@'
+testbuilddir='@abs_builddir@'
+testprefix='@prefix@'
+
+APIVERSION='@APIVERSION@'
+PATH_SEPARATOR='@PATH_SEPARATOR@'
+
+# Make sure we override the user shell.
+SHELL='@SHELL@'; export SHELL
+# User can override various tools used.
+test -z "$PERL" && PERL='@PERL@'
+test -z "$MAKE" && MAKE=make
+test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
+test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
+test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
+test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
+
+# Use -Werror because this also turns some Perl warnings into error.
+# Tests for which this is inappropriate should use -Wno-error.
+# Tests who want complete control over aclocal command-line options
+# should use $original_ACLOCAL.
+# Note: the first `test -z' conditional below is to ensure defs-static
+# really remains idempotent.
+if test -z "$original_ACLOCAL"; then
+ original_ACLOCAL=${ACLOCAL-"aclocal-$APIVERSION"}
+fi
+test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
+# Extra flags to pass to aclocal before all other flags added by this script.
+ACLOCAL_TESTSUITE_FLAGS=''; export ACLOCAL_TESTSUITE_FLAGS
+
+# See how Automake should be run. We put --foreign as the default
+# strictness to avoid having to create lots and lots of files. A test
+# can override this by specifying a different strictness. Use -Wall
+# -Werror by default. Tests for which this is inappropriate (e.g. when
+# testing that a warning is enabled by a specific switch) should use
+# -Wnone or/and -Wno-error. Tests who want complete control over
+# automake command-line options should use $original_AUTOMAKE.
+# Note: the first `test -z' conditional below is to ensure defs-static
+# really remains idempotent.
+if test -z "$original_AUTOMAKE"; then
+ original_AUTOMAKE=${AUTOMAKE-"automake-$APIVERSION"}
+fi
+test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
+
+# POSIX no longer requires 'egrep' and 'fgrep',
+# but some hosts lack 'grep -E' and 'grep -F'.
+EGREP='@EGREP@'
+FGREP='@FGREP@'
+
+# No all versions of Tex support `--version', so we use a configure
+# check to decide if tex is available. This decision is embodied in
+# this variable.
+TEX='@TEX@'
+
+# Whether /bin/sh has working 'set -e' with exit trap.
+sh_errexit_works='@sh_errexit_works@'
+
+# The amount we should wait after modifying files depends on the platform.
+# For instance, Windows '95, '98 and ME have 2-second granularity
+# and can be up to 3 seconds in the future w.r.t. the system clock.
+sleep='sleep @MODIFICATION_DELAY@'
+
+# An old timestamp that can be given to a file, in "touch -t" format.
+# The time stamp should be portable to all file systems of interest.
+# Just for fun, choose the exact time of the announcement of the GNU project
+# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
+old_timestamp=198309271735.59
+
+# Make our wrapper scripts accessible by default. And avoid to uselessly
+# extend $PATH multiple times if this file is sourced multiple times.
+case $PATH in
+ "$testbuilddir$PATH_SEPARATOR"*) ;;
+ *) PATH="$testbuilddir$PATH_SEPARATOR$PATH";;
+esac
+export PATH
diff --git a/tests/defun.test b/tests/defun.test
index 5ffb9a11b..44b3d805c 100755
--- a/tests/defun.test
+++ b/tests/defun.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,11 +19,18 @@
. ./defs || Exit 1
-set -e
-
cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_FUNC_TWO])
+AC_DEFUN([AM_FUNC_THREE])
+AC_DEFUN([AM_FUNC_TWO], [@!GrepThisString!@AM_FUNC_THREE])
AC_DEFUN([AM_FUNC_ONE], [AC_REQUIRE([AM_FUNC_TWO])])
END
+cat >>configure.in << 'END'
+AM_FUNC_ONE
+END
+
$ACLOCAL
+$AUTOCONF
+grep '^@!GrepThisString!@$' configure
+
+:
diff --git a/tests/defun2.test b/tests/defun2.test
index 6c10a8f21..3aed35797 100755
--- a/tests/defun2.test
+++ b/tests/defun2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
dnl if buggy this will require getloadavg.c
AC_PROG_CC
@@ -38,3 +37,5 @@ END
$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/dejagnu.test b/tests/dejagnu.test
index a27377072..df385b033 100755
--- a/tests/dejagnu.test
+++ b/tests/dejagnu.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,21 +15,20 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure dejagnu tests and automake-style tests can coexist.
+# Superficial test to check that dejagnu tests and automake-style
+# tests can coexist. See also related deeper test `check12.test'.
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
TESTS = frob.test
END
-: > frob.test
-
$ACLOCAL
$AUTOMAKE
grep '^check-TESTS' Makefile.in
grep '^check-DEJAGNU' Makefile.in
+
+:
diff --git a/tests/dejagnu2.test b/tests/dejagnu2.test
index 531f74487..154c08771 100755
--- a/tests/dejagnu2.test
+++ b/tests/dejagnu2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,28 +19,29 @@
. ./defs || Exit 1
-set -e
-
-echo 'AC_OUTPUT' >> configure.in
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
site.exp:
- @echo foo
+ echo :GREP:ME: > $@
END
$ACLOCAL
$AUTOCONF
$AUTOMAKE -Wno-override
-grep site.exp Makefile.in
-test `grep '^site\.exp:' Makefile.in | wc -l` -eq 1
+grep 'site\.exp' Makefile.in
+test `grep -c '^site\.exp:' Makefile.in` -eq 1
./configure
-$MAKE site.exp >stdout
-cat stdout
-grep foo stdout
+$MAKE site.exp
+grep ':GREP:ME:' site.exp
AUTOMAKE_fails
-grep 'Makefile.am:3:.*site.exp' stderr
+grep '^Makefile\.am:3:.*site\.exp' stderr
+
+:
diff --git a/tests/dejagnu3.test b/tests/dejagnu3.test
index d812ac49e..42529c0ed 100755
--- a/tests/dejagnu3.test
+++ b/tests/dejagnu3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=runtest
. ./defs || Exit 1
-set -e
-
cat > hammer << 'END'
#! /bin/sh
echo "Everything looks like a nail to me!"
@@ -28,15 +26,14 @@ END
chmod +x hammer
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
-
DEJATOOL = hammer
-
AM_RUNTESTFLAGS = HAMMER=$(srcdir)/hammer
-
EXTRA_DIST = hammer hammer.test/hammer.exp
END
@@ -65,5 +62,9 @@ $MAKE distcheck
# Ensure that the envvar RUNTESTFLAGS is used.
# Report from Mark Mitchell.
-RUNTESTFLAGS=--unknown-option $MAKE check && Exit 1
-Exit 0
+RUNTESTFLAGS=--unknown-runtest-option $MAKE check >output 2>&1 \
+ && { cat output; Exit 1; }
+cat output
+$FGREP 'unknown-runtest-option' output
+
+:
diff --git a/tests/dejagnu4.test b/tests/dejagnu4.test
index 5fdda107c..0d6a1bde2 100755
--- a/tests/dejagnu4.test
+++ b/tests/dejagnu4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,23 +20,21 @@
required=runtest
. ./defs || Exit 1
-set -e
-
cat > hammer << 'END'
#! /bin/sh
echo "Everything looks like a nail to me!"
END
-
chmod +x hammer
cat > spanner << 'END'
#! /bin/sh
echo "I'm a right spanner!"
END
-
chmod +x spanner
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
@@ -49,8 +47,7 @@ EXTRA_DIST = hammer hammer.test/hammer.exp
EXTRA_DIST += spanner spanner.test/spanner.exp
END
-mkdir hammer.test
-mkdir spanner.test
+mkdir hammer.test spanner.test
cat > hammer.test/hammer.exp << 'END'
set test test
@@ -86,8 +83,14 @@ $MAKE distcheck
# Test for PR 488.
sed 's/E\(verything\)/Not e\1/' hammer > thammer
-mv thammer hammer
+mv -f thammer hammer
chmod +x hammer
+rm -f hammer.log hammer.sum spanner.log spanner.sum
$MAKE check && Exit 1
+test -f hammer.log
+test -f hammer.sum
+test -f spanner.log
+test -f spanner.sum
+
:
diff --git a/tests/dejagnu5.test b/tests/dejagnu5.test
index 0095958a3..9eb51f1ff 100755
--- a/tests/dejagnu5.test
+++ b/tests/dejagnu5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,32 +20,27 @@
required=runtest
. ./defs || Exit 1
-set -e
-
-# Get the package name from configure.in.
-package=`$FGREP AC_INIT configure.in | sed -e 's:^[^[]*\[\([^]]*\)\].*$:\1:'`
+package=$me
cat > $package << 'END'
#! /bin/sh
echo "Ah, we have been expecting you, Mr. Blond."
END
-
chmod +x $package
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << END
AUTOMAKE_OPTIONS = dejagnu
-
EXTRA_DIST = $package $package.test/$package.exp
+AM_RUNTESTFLAGS = PACKAGE=\$(srcdir)/$package
END
-echo "AM_RUNTESTFLAGS = PACKAGE=\$(srcdir)/$package" >> Makefile.am
-
mkdir $package.test
-
cat > $package.test/$package.exp << 'END'
-set test "test"
+set test "a_dejagnu_test"
spawn $PACKAGE
expect {
"Ah, we have been expecting you, Mr. Blond." { pass "$test" }
@@ -64,3 +59,5 @@ test -f $package.log
test -f $package.sum
$MAKE distcheck
+
+:
diff --git a/tests/dejagnu6.test b/tests/dejagnu6.test
index 25a1f1fc2..eba687ea9 100755
--- a/tests/dejagnu6.test
+++ b/tests/dejagnu6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,29 +19,25 @@
required=runtest
. ./defs || Exit 1
-set -e
-
cat > faildeja << 'END'
#! /bin/sh
echo whatever
END
-
chmod +x faildeja
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
-
DEJATOOL = faildeja
-
AM_RUNTESTFLAGS = FAILDEJA=$(srcdir)/faildeja
END
mkdir faildeja.test
-
cat > faildeja.test/faildeja.exp << 'END'
-set test test
+set test failing_deja_test
spawn $FAILDEJA
expect {
default { fail "$test" }
@@ -57,4 +53,6 @@ $AUTOMAKE --add-missing
$MAKE check && Exit 1
test -f faildeja.log
test -f faildeja.sum
-$FGREP 'FAIL: test' faildeja.sum
+$FGREP 'FAIL: failing_deja_test' faildeja.sum
+
+:
diff --git a/tests/dejagnu7.test b/tests/dejagnu7.test
index 552c2caa1..d2f36e155 100755
--- a/tests/dejagnu7.test
+++ b/tests/dejagnu7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=runtest
. ./defs || Exit 1
-set -e
-
# Check whether DejaGnu supports --status
runtest --help | grep '.*--status' || Exit 77
@@ -29,21 +27,19 @@ cat > failtcl << 'END'
#! /bin/sh
echo whatever
END
-
chmod +x failtcl
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
-
DEJATOOL = failtcl
-
AM_RUNTESTFLAGS = --status FAILTCL=$(srcdir)/failtcl
END
mkdir failtcl.test
-
cat > failtcl.test/failtcl.exp << 'END'
set test test
spawn $FAILTCL
@@ -62,3 +58,5 @@ $MAKE check && Exit 1
test -f failtcl.log
test -f failtcl.sum
$FGREP 'missing close-brace' failtcl.sum
+
+:
diff --git a/tests/depacl2.test b/tests/depacl2.test
index d085a503c..86af8c1fe 100755
--- a/tests/depacl2.test
+++ b/tests/depacl2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2002, 2003, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_C_PROTOTYPES
FOO
diff --git a/tests/depcomp.test b/tests/depcomp.test
index d5b6c7835..f4d5acf90 100755
--- a/tests/depcomp.test
+++ b/tests/depcomp.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/depcomp2.test b/tests/depcomp2.test
index e8e4a6728..2efa2ad0e 100755
--- a/tests/depcomp2.test
+++ b/tests/depcomp2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([subdir/Makefile])
AC_PROG_CC
diff --git a/tests/depcomp3.test b/tests/depcomp3.test
index 649fada34..8a77f0568 100755
--- a/tests/depcomp3.test
+++ b/tests/depcomp3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/depcomp4.test b/tests/depcomp4.test
index 4f2df974c..b995c0836 100755
--- a/tests/depcomp4.test
+++ b/tests/depcomp4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='libtoolize gcc makedepend'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/depcomp5.test b/tests/depcomp5.test
index 4fe7e1689..586a98b60 100755
--- a/tests/depcomp5.test
+++ b/tests/depcomp5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='icc'
. ./defs || Exit 1
-set -e
-
# Automake supports icc since version 7.0 through a dedicated depcomp mode.
# icc 8.0 and greater understand gcc options, so depmode is set to gcc.
if icc -V -help 2>&1 | grep 'Version 7'; then
diff --git a/tests/depcomp6.test b/tests/depcomp6.test
index ea15e20ad..b937b9fe8 100755
--- a/tests/depcomp6.test
+++ b/tests/depcomp6.test
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/depcomp7.test b/tests/depcomp7.test
index 47f09fc4a..f404039ea 100755
--- a/tests/depcomp7.test
+++ b/tests/depcomp7.test
@@ -19,8 +19,6 @@
required='libtoolize'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/depcomp8a.test b/tests/depcomp8a.test
index b4a0e3ac3..3ac45fe22 100755
--- a/tests/depcomp8a.test
+++ b/tests/depcomp8a.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test
index 1ae745961..3ab524337 100755
--- a/tests/depcomp8b.test
+++ b/tests/depcomp8b.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required=libtoolize
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/depdist.test b/tests/depdist.test
index f36eb471b..338763a65 100755
--- a/tests/depdist.test
+++ b/tests/depdist.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,34 +23,51 @@ rm -f configure.in
mkdir config
for i in *; do
- if test $i != "config"; then
- mv $i config
+ if test "$i" != "config"; then
+ mv -f "$i" config
fi
done
-cat > configure.in << 'END'
-AC_INIT(subdir/foo.c)
-AC_CONFIG_AUX_DIR(config)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([config])
+AM_INIT_AUTOMAKE
AC_PROG_CC
-AC_OUTPUT(subdir/Makefile Makefile)
+AC_CONFIG_FILES([subdir/Makefile Makefile])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
SUBDIRS = subdir
+check-local: test1 test2
+.PHONY: test1 test2
+test1:
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]config/depcomp '
+test2: distdir
+ ls -l $(distdir)/*
+ test -f $(distdir)/config/depcomp
END
mkdir subdir
-: > subdir/foo.c
+cat > subdir/foo.c << 'END'
+int main(void)
+{
+ return 0;
+}
+END
cat > subdir/Makefile.am << 'END'
bin_PROGRAMS = foo
foo_SOURCES = foo.c
END
-set -e
-
$ACLOCAL
-$AUTOMAKE --add-missing
$AUTOCONF
-grep config/depcomp Makefile.in
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/tests/depend.test b/tests/depend.test
index 5714c98f6..98b13070d 100755
--- a/tests/depend.test
+++ b/tests/depend.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2001, 2002, 2004, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/depend2.test b/tests/depend2.test
index 57d87d763..dd8fe6e1d 100755
--- a/tests/depend2.test
+++ b/tests/depend2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2010, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/depend3.test b/tests/depend3.test
index f12e460ec..1c7b29769 100755
--- a/tests/depend3.test
+++ b/tests/depend3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2010 Free Software
+# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_SUBST(DEPS)
diff --git a/tests/depend4.test b/tests/depend4.test
index 451c0181a..b1ca76eee 100755
--- a/tests/depend4.test
+++ b/tests/depend4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >> configure.in
$ACLOCAL
diff --git a/tests/depend5.test b/tests/depend5.test
index 0d9be3be1..bd14c72d5 100755
--- a/tests/depend5.test
+++ b/tests/depend5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << END
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/depend6.test b/tests/depend6.test
index de2adf91e..d75a4a628 100755
--- a/tests/depend6.test
+++ b/tests/depend6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << END
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/deprecated-acinit.test b/tests/deprecated-acinit.test
new file mode 100755
index 000000000..a25d32cef
--- /dev/null
+++ b/tests/deprecated-acinit.test
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that automake and autoconf complain about an old-style AC_INIT
+# call used with a new-style AM_AUTOMAKE_INIT call.
+
+. ./defs || Exit 1
+
+: > Makefile.am
+
+# We'll need a proper aclocal.m4, but aclocal is expected to fail
+# later, so get and store it now.
+$ACLOCAL
+mv aclocal.m4 aclocal-m4.sav
+
+errmsg='AC_INIT should be called with package and version argument'
+
+for ac_init in AC_INIT 'AC_INIT([Makefile.am])'; do
+ for am_init_automake in AM_INIT_AUTOMAKE 'AM_INIT_AUTOMAKE([1.11])'; do
+ rm -rf autom4te*.cache aclocal.m4
+ unindent > configure.in <<END
+ $ac_init
+ $am_init_automake
+ AC_CONFIG_FILES([Makefile])
+END
+ cat configure.in # might be useful for debugging
+ $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+ cat stderr >&2
+ grep "^configure\\.in:.* $errmsg" stderr
+ cp aclocal-m4.sav aclocal.m4
+ $AUTOCONF 2>stderr && { cat stderr >&2; Exit 1; }
+ cat stderr >&2
+ grep "^configure\\.in:.* $errmsg" stderr
+ AUTOMAKE_fails
+ grep "^configure\\.in:.* $errmsg" stderr
+ done
+done
+
+:
diff --git a/tests/destdir.test b/tests/destdir.test
index 951a4b104..0633ce215 100755
--- a/tests/destdir.test
+++ b/tests/destdir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,8 +23,6 @@ required='ro-dir'
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
AC_OUTPUT
EOF
diff --git a/tests/dirforbid.test b/tests/dirforbid.test
index 3ab319d2a..7601929aa 100755
--- a/tests/dirforbid.test
+++ b/tests/dirforbid.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'END'
AC_PROG_CC
END
diff --git a/tests/dirlist.test b/tests/dirlist.test
index cfa1ed9aa..89183c6be 100755
--- a/tests/dirlist.test
+++ b/tests/dirlist.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<EOF
AC_INIT
AM_INIT_GUILE_MODULE
diff --git a/tests/dirlist2.test b/tests/dirlist2.test
index 5f4961404..e7c2c93f1 100755
--- a/tests/dirlist2.test
+++ b/tests/dirlist2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<EOF
AC_INIT
AM_INIT_GUILE_MODULE
diff --git a/tests/discover.test b/tests/discover.test
index 0e4faa3b1..e54daff77 100755
--- a/tests/discover.test
+++ b/tests/discover.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2010 Free Software
+# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -39,4 +39,4 @@ AUTOMAKE_fails
grep 'automatically discovered.*fsusage\.c.*explicitly mentioned' stderr
-Exit 0
+:
diff --git a/tests/dist-included-parent-dir.test b/tests/dist-included-parent-dir.test
index b028a2c79..9a75963fb 100755
--- a/tests/dist-included-parent-dir.test
+++ b/tests/dist-included-parent-dir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
diff --git a/tests/distcleancheck.test b/tests/distcleancheck.test
index 0f32e33c4..b27ab07a1 100755
--- a/tests/distcleancheck.test
+++ b/tests/distcleancheck.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/distcom2.test b/tests/distcom2.test
index 23841c615..e093e069e 100755
--- a/tests/distcom2.test
+++ b/tests/distcom2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2006, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2004, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/distcom3.test b/tests/distcom3.test
index 9cc62eadf..fc0c5e24e 100755
--- a/tests/distcom3.test
+++ b/tests/distcom3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2010 Free Software
+# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
README:
echo 'I bet you are reading me.' > README
diff --git a/tests/distcom4.test b/tests/distcom4.test
index 5dde663ff..1cbc78337 100755
--- a/tests/distcom4.test
+++ b/tests/distcom4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
[chmod +x tests/autoconf])
diff --git a/tests/distcom5.test b/tests/distcom5.test
index 7cadfd5cb..974ab75f7 100755
--- a/tests/distcom5.test
+++ b/tests/distcom5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
extract_distcommon ()
{
sed -n -e '/^DIST_COMMON =.*\\$/ {
diff --git a/tests/distcom6.test b/tests/distcom6.test
index ca715714f..fd7f0abbc 100755
--- a/tests/distcom6.test
+++ b/tests/distcom6.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +23,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/distcom7.test b/tests/distcom7.test
index 3ea509605..129bb5763 100755
--- a/tests/distcom7.test
+++ b/tests/distcom7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([subdir/Makefile])
AC_PROG_CC
@@ -42,6 +40,6 @@ END
$ACLOCAL
AUTOMAKE_fails --add-missing subdir/Makefile
-grep 'full run' stderr
+grep 'without.*Makefile.*arguments' stderr
:
diff --git a/tests/distdir.test b/tests/distdir.test
index 04ba36389..a576e3da5 100755
--- a/tests/distdir.test
+++ b/tests/distdir.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007, 2009, 2010 Free
-# Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007, 2009, 2010, 2011
+# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,8 +24,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/distlinks.test b/tests/distlinks.test
index 268cfcbb1..3021cae13 100755
--- a/tests/distlinks.test
+++ b/tests/distlinks.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo text > file
ln -s file lnk || {
diff --git a/tests/distlinksbrk.test b/tests/distlinksbrk.test
index 2314408ce..45755717d 100755
--- a/tests/distlinksbrk.test
+++ b/tests/distlinksbrk.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
# We need, for our broken symlinks, names that make it hard to get false
# positives when grepping make output to look for them.
lnk_base=BrknSymlnk
diff --git a/tests/distname.test b/tests/distname.test
index 117d98684..f940045a6 100755
--- a/tests/distname.test
+++ b/tests/distname.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_SRCDIR([a.c])
AC_PROG_CC
diff --git a/tests/dmalloc.test b/tests/dmalloc.test
index 629c9494e..38716164f 100755
--- a/tests/dmalloc.test
+++ b/tests/dmalloc.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_HEADERS([config.h])
AM_WITH_DMALLOC
diff --git a/tests/dollar.test b/tests/dollar.test
index 77b512981..81d4cbc4b 100755
--- a/tests/dollar.test
+++ b/tests/dollar.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,8 +23,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am <<'EOF'
diff --git a/tests/dollarvar.test b/tests/dollarvar.test
index 7105cb092..918599028 100755
--- a/tests/dollarvar.test
+++ b/tests/dollarvar.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,8 +24,6 @@
. ./defs || Exit 1
-set -e
-
cat >Makefile.am <<'EOF'
x = 1
foo$x = 1
diff --git a/tests/dollarvar2.test b/tests/dollarvar2.test
index 6fc27379b..e1ac766c8 100755
--- a/tests/dollarvar2.test
+++ b/tests/dollarvar2.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >Makefile.am <<'EOF'
x = 1
bla = $(foo$(x))
diff --git a/tests/double.test b/tests/double.test
index b4e9c50f7..047308c3b 100755
--- a/tests/double.test
+++ b/tests/double.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/dup2.test b/tests/dup2.test
index 654d99bcf..a1516fc37 100755
--- a/tests/dup2.test
+++ b/tests/dup2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_FUNC_STRTOD
END
diff --git a/tests/else.test b/tests/else.test
index 32cf81aaf..9a881b764 100755
--- a/tests/else.test
+++ b/tests/else.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo 'AM_CONDITIONAL(FOO, true)' >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/empty.test b/tests/empty.test
index db5af8721..8ca73cf9c 100755
--- a/tests/empty.test
+++ b/tests/empty.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2007
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2007, 2011
# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >>configure.in
echo 'data_DATA =' >Makefile.am
diff --git a/tests/empty2.test b/tests/empty2.test
index efebb7012..293adbd07 100755
--- a/tests/empty2.test
+++ b/tests/empty2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/empty3.test b/tests/empty3.test
index e88152fa6..a9dfd7b6a 100755
--- a/tests/empty3.test
+++ b/tests/empty3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/empty4.test b/tests/empty4.test
index 71c7552da..958b48d25 100755
--- a/tests/empty4.test
+++ b/tests/empty4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_SUBST(ZOO_OBJ)
diff --git a/tests/exdir.test b/tests/exdir.test
index 013b80a77..1929af8a8 100755
--- a/tests/exdir.test
+++ b/tests/exdir.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
htmldir = $(prefix)/html
html_DATA = zot.html
diff --git a/tests/exdir2.test b/tests/exdir2.test
index aca14975c..bd1471271 100755
--- a/tests/exdir2.test
+++ b/tests/exdir2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2004, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
quuz_DATA = zot.html
pkgdata_DATA = qbert
diff --git a/tests/exdir3.test b/tests/exdir3.test
index d51bdf9cd..529215423 100755
--- a/tests/exdir3.test
+++ b/tests/exdir3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_SUBST([pkgdatadir], ["FOO"])
AC_OUTPUT
diff --git a/tests/exeext.test b/tests/exeext.test
index 3fd42a81e..70d7efa2e 100755
--- a/tests/exeext.test
+++ b/tests/exeext.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,8 +24,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([WANT_MT], [test -z "$revert"])
diff --git a/tests/exeext2.test b/tests/exeext2.test
index fc0571228..c81503487 100755
--- a/tests/exeext2.test
+++ b/tests/exeext2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2008, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/exeext3.test b/tests/exeext3.test
index 28a7d5ebb..637cc585c 100755
--- a/tests/exeext3.test
+++ b/tests/exeext3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/exeext4.test b/tests/exeext4.test
index e6cfe7df6..c3f968c42 100755
--- a/tests/exeext4.test
+++ b/tests/exeext4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([COND], [test -n "$cond"])
AC_SUBST([programs], ['prg1$(EXEEXT) prg2$(EXEEXT)'])
diff --git a/tests/exsource.test b/tests/exsource.test
index 2747f6e89..daa5b0130 100755
--- a/tests/exsource.test
+++ b/tests/exsource.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2004
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2004, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/ext.test b/tests/ext.test
index af2eab281..5ac3cd1ab 100755
--- a/tests/ext.test
+++ b/tests/ext.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2006, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_F77
AC_PROG_FC
diff --git a/tests/ext2.test b/tests/ext2.test
index 185b7085a..ef218ae39 100755
--- a/tests/ext2.test
+++ b/tests/ext2.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CXX
EOF
diff --git a/tests/ext3.test b/tests/ext3.test
new file mode 100755
index 000000000..191a34e81
--- /dev/null
+++ b/tests/ext3.test
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Cover corner cases of derive_suffix wrt. file extensions:
+# - extension declared with SUFFIXES but with no suffix rule for it
+# - extension with a suffix rule but none that leads us to $(OBJEXT)
+# In both cases, we don't try to create a rule; but we shouldn't
+# fail either, because magic might be happening behind our back.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = foo.goo
+SUFFIXES = .goo
+bar_SOURCES = bar.woo
+.woo.zoo: ; making a zoo $@ from a woo $<
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+Exit 0
diff --git a/tests/extra.test b/tests/extra.test
index 134e875e2..da41d141e 100755
--- a/tests/extra.test
+++ b/tests/extra.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +22,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/extra10.test b/tests/extra10.test
index 7bd655665..f44b1e2fb 100755
--- a/tests/extra10.test
+++ b/tests/extra10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am <<'END'
diff --git a/tests/extra11.test b/tests/extra11.test
index a0c55ca25..fb7c5594f 100755
--- a/tests/extra11.test
+++ b/tests/extra11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am <<'END'
diff --git a/tests/extra12.test b/tests/extra12.test
index db3bcc759..af079b048 100755
--- a/tests/extra12.test
+++ b/tests/extra12.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
diff --git a/tests/extra2.test b/tests/extra2.test
index e6c85a0f4..66608568e 100755
--- a/tests/extra2.test
+++ b/tests/extra2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/extra3.test b/tests/extra3.test
index aea67bc0c..557cb84e3 100755
--- a/tests/extra3.test
+++ b/tests/extra3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo 'AC_SUBST(CODICIL)' >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/extra4.test b/tests/extra4.test
index cf5e4a612..a52c158a4 100755
--- a/tests/extra4.test
+++ b/tests/extra4.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo 'AC_SUBST(CODICIL)' >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/extra5.test b/tests/extra5.test
index ebdda3225..e66198dac 100755
--- a/tests/extra5.test
+++ b/tests/extra5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/extra6.test b/tests/extra6.test
index 0dbf7354d..c68782895 100755
--- a/tests/extra6.test
+++ b/tests/extra6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/extra7.test b/tests/extra7.test
index 233cb0f84..a746a0809 100755
--- a/tests/extra7.test
+++ b/tests/extra7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/extra8.test b/tests/extra8.test
index eb9f9a14e..9d729ebca 100755
--- a/tests/extra8.test
+++ b/tests/extra8.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -24,8 +24,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/extra9.test b/tests/extra9.test
new file mode 100755
index 000000000..1446a4d45
--- /dev/null
+++ b/tests/extra9.test
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Ensure we warn about substitutions in bin_PROGRAMS if EXTRA_PROGRAMS
+# are missing; but only if the former is not AC_SUBSTed itself
+# (lib_LIBRARIES is in the same boat here).
+
+. ./defs || Exit 1
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_SUBST([lib_LIBRARIES])
+AC_SUBST([bins])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+bin_PROGRAMS = @bins@
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'bin_PROGRAMS.*contains configure substitution' stderr
+grep 'lib_LIBRARIES.*contains configure substitution' stderr && Exit 1
+
+Exit 0
diff --git a/tests/extradep.test b/tests/extradep.test
new file mode 100755
index 000000000..f17aeba48
--- /dev/null
+++ b/tests/extradep.test
@@ -0,0 +1,102 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test EXTRA_*_DEPENDENCIES. See extradep2 for libtool variant.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_SUBST([deps], [bardep])
+AM_CONDITIONAL([COND], [test -n "$cond"])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libfoo.a
+EXTRA_libfoo_a_DEPENDENCIES = libfoodep
+libfoodep:
+ @echo making $@
+ @: > $@
+CLEANFILES = libfoodep
+
+bin_PROGRAMS = foo bar
+EXTRA_foo_DEPENDENCIES = foodep
+if COND
+EXTRA_foo_DEPENDENCIES += foodep2
+endif
+bar_LDADD = libfoo.a
+EXTRA_bar_DEPENDENCIES = $(deps)
+
+EXTRA_DIST = foodep bardep
+
+bar-is-newer-than-libfoo.a:
+ test `ls -1t bar$(EXEEXT) libfoo.a | sed q` = bar$(EXEEXT)
+END
+
+cat >libfoo.c <<'END'
+int libfoo () { return 0; }
+END
+
+cat >foo.c <<'END'
+int main () { return 0; }
+END
+
+cat >bar.c <<'END'
+extern int libfoo ();
+int main () { return libfoo (); }
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure cond=yes
+
+# hypotheses:
+# EXTRA_*_DEPENDENCIES are honored.
+# conditionals and substitutions are honored.
+# *_DEPENDENCIES are not overwritten by their EXTRA_* counterparts.
+
+: >foodep
+: >foodep2
+: >bardep
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'making libfoodep' stdout
+
+rm -f foodep
+$MAKE && Exit 1
+: >foodep
+
+rm -f foodep2
+$MAKE && Exit 1
+: >foodep2
+
+rm -f bardep
+$MAKE && Exit 1
+: >bardep
+
+$MAKE
+$sleep
+touch libfoo.a
+$MAKE
+$MAKE bar-is-newer-than-libfoo.a
+
+$MAKE distcheck
+
+:
diff --git a/tests/extradep2.test b/tests/extradep2.test
new file mode 100755
index 000000000..ca8cf5fa4
--- /dev/null
+++ b/tests/extradep2.test
@@ -0,0 +1,84 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test EXTRA_*_DEPENDENCIES, libtool version; see extradep.test.
+
+required=libtoolize
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_SUBST([deps], [bardep])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LTLIBRARIES = libfoo.la
+EXTRA_libfoo_la_DEPENDENCIES = libfoodep
+libfoodep:
+ @echo making $@
+ @: > $@
+CLEANFILES = libfoodep
+
+bin_PROGRAMS = bar
+bar_LDADD = libfoo.la
+EXTRA_bar_DEPENDENCIES = $(deps)
+
+EXTRA_DIST = bardep
+
+bar-is-newer-than-libfoo.la:
+ test `ls -1t bar$(EXEEXT) libfoo.la | sed q` = bar$(EXEEXT)
+END
+
+cat >libfoo.c <<'END'
+int libfoo () { return 0; }
+END
+
+cat >bar.c <<'END'
+extern int libfoo ();
+int main () { return libfoo (); }
+END
+
+libtoolize
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+
+# hypothesis: EXTRA_*_DEPENDENCIES are honored.
+
+: >foodep
+: >foodep2
+: >bardep
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'making libfoodep' stdout
+
+rm -f bardep
+$MAKE && Exit 1
+: >bardep
+
+$MAKE
+$sleep
+touch libfoo.la
+$MAKE
+$MAKE bar-is-newer-than-libfoo.la
+
+$MAKE distcheck
+
+:
diff --git a/tests/f90only.test b/tests/f90only.test
index 83b9767b5..a2826737f 100755
--- a/tests/f90only.test
+++ b/tests/f90only.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_FC
END
diff --git a/tests/flavor.test b/tests/flavor.test
index a7e8f77b4..ca8e7557d 100755
--- a/tests/flavor.test
+++ b/tests/flavor.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_MAINTAINER_MODE
AC_OUTPUT
diff --git a/tests/flibs.test b/tests/flibs.test
index d35c4c627..6ca0d2b70 100755
--- a/tests/flibs.test
+++ b/tests/flibs.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_F77
AC_F77_LIBRARY_LDFLAGS
diff --git a/tests/fn99.test b/tests/fn99.test
index a63f2ca08..c2afd2e29 100755
--- a/tests/fn99.test
+++ b/tests/fn99.test
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat >Makefile.am <<'END'
diff --git a/tests/fn99subdir.test b/tests/fn99subdir.test
index 33ac6632c..a040e5801 100755
--- a/tests/fn99subdir.test
+++ b/tests/fn99subdir.test
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
# The name is so that 99 is exactly hit (including final \0).
subdirname='cnfsubdir'
diff --git a/tests/fnoc.test b/tests/fnoc.test
index d2d521cec..f25016898 100755
--- a/tests/fnoc.test
+++ b/tests/fnoc.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_F77
END
diff --git a/tests/fo.test b/tests/fo.test
index 93d7d3f17..a248f0f49 100755
--- a/tests/fo.test
+++ b/tests/fo.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_F77
END
diff --git a/tests/fonly.test b/tests/fonly.test
index b93b60290..a653bef20 100755
--- a/tests/fonly.test
+++ b/tests/fonly.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_F77
END
diff --git a/tests/forcemiss.test b/tests/forcemiss.test
index 4b9f63c7d..7ee186c67 100755
--- a/tests/forcemiss.test
+++ b/tests/forcemiss.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
rm -f install-sh
echo zot > install-sh
diff --git a/tests/forcemiss2.test b/tests/forcemiss2.test
index 408ea8ad1..0b6b77529 100755
--- a/tests/forcemiss2.test
+++ b/tests/forcemiss2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
rm -f install-sh
echo zot > foo
diff --git a/tests/fort1.test b/tests/fort1.test
index 930ae0236..347ec13ef 100755
--- a/tests/fort1.test
+++ b/tests/fort1.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >Makefile.am <<END
bin_PROGRAMS = hello
hello_SOURCES = hello.f foo.f95
diff --git a/tests/fort2.test b/tests/fort2.test
index 70d13f25e..b3c994c17 100755
--- a/tests/fort2.test
+++ b/tests/fort2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'END'
diff --git a/tests/fort4.test b/tests/fort4.test
index 84df399f6..fbeaedb07 100755
--- a/tests/fort4.test
+++ b/tests/fort4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required='g77 gfortran'
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >hello.f <<'END'
diff --git a/tests/fort5.test b/tests/fort5.test
index d6151a714..c4a4b55ed 100755
--- a/tests/fort5.test
+++ b/tests/fort5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required='libtoolize g77 gfortran'
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >hello.f <<'END'
diff --git a/tests/fortdep.test b/tests/fortdep.test
index 585e7c15a..e70ee987a 100755
--- a/tests/fortdep.test
+++ b/tests/fortdep.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_SRCDIR([foo.f])
AC_PROG_F77
diff --git a/tests/gcj.test b/tests/gcj.test
index c32a1b25e..5e6ab3374 100755
--- a/tests/gcj.test
+++ b/tests/gcj.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,8 @@
. ./defs || Exit 1
cat >> configure.in << 'END'
-_AM_DEPENDENCIES(GCJ)
-AC_SUBST(GCJ)
+_AM_DEPENDENCIES([GCJ])
+AC_SUBST([GCJ])
END
cat > Makefile.am << 'END'
@@ -28,7 +29,9 @@ bin_PROGRAMS = convert
convert_SOURCES = x/y/convert.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^x/y/convert' Makefile.in
+
+:
diff --git a/tests/gcj2.test b/tests/gcj2.test
index 3e3af603d..3d60cfff9 100755
--- a/tests/gcj2.test
+++ b/tests/gcj2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
_AM_DEPENDENCIES(GCJ)
AC_SUBST(GCJ)
diff --git a/tests/gcj3.test b/tests/gcj3.test
index 7d8a981f0..f2f74606f 100755
--- a/tests/gcj3.test
+++ b/tests/gcj3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,8 @@
. ./defs || Exit 1
cat >> configure.in << 'END'
-_AM_DEPENDENCIES(GCJ)
-AC_SUBST(GCJ)
+_AM_DEPENDENCIES([GCJ])
+AC_SUBST([GCJ])
END
cat > Makefile.am << 'END'
@@ -28,8 +28,10 @@ bin_PROGRAMS = convert
convert_SOURCES = x/y/convert.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
num=`grep depcomp Makefile.in | wc -l`
test $num -gt 1
+
+:
diff --git a/tests/gcj4.test b/tests/gcj4.test
index f3828ea42..d5dedd6c7 100755
--- a/tests/gcj4.test
+++ b/tests/gcj4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,8 +29,6 @@ bin_PROGRAMS = convert
convert_SOURCES = convert.java
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE
@@ -47,3 +45,5 @@ test `wc -l < filt` = 1
# Accept any outcome but `none'
# (at the time of writing it should be gcc or gcc3).
grep -v none filt
+
+:
diff --git a/tests/gcj5.test b/tests/gcj5.test
index 6ef171d96..f63a8d442 100755
--- a/tests/gcj5.test
+++ b/tests/gcj5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
_AM_DEPENDENCIES(GCJ)
END
diff --git a/tests/gcj6.test b/tests/gcj6.test
index be5f49c35..347afd15c 100755
--- a/tests/gcj6.test
+++ b/tests/gcj6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='gcj'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_PROG_GCJ
AC_OUTPUT
diff --git a/tests/gen-parallel-tests b/tests/gen-parallel-tests
index 39f5d1e2f..d2a5c1370 100755
--- a/tests/gen-parallel-tests
+++ b/tests/gen-parallel-tests
@@ -35,8 +35,18 @@ while read tst; do
|| grep "parallel_tests=['\"]yes" $tst >/dev/null
then :; else echo $tst; fi;
done |
+sed -e 's/\.test$//' |
{
echo "## Generated by gen-parallel-tests. Edit Makefile.am instead of this."
- echo "parallel_tests = \\"
- sed 's,\.test$,-p.test,; $!s,$, \\,'
+ echo "parallel_tests ="
+ # Since `foo-p.test' sources `foo.test', `foo-p.log' also depends on
+ # `foo.test'.
+ sed -e '
+ h
+ s/^/parallel_tests += /
+ s/$/-p.test/
+ p
+ x
+ s/.*/&-p.log: &.test/
+ '
}
diff --git a/tests/getopt.test b/tests/getopt.test
index bc829846f..9889e3dff 100755
--- a/tests/getopt.test
+++ b/tests/getopt.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
# This is expected to fail ...
AUTOMAKE_fails -Wnonexistent
grep ':.*nonexistent' stderr
diff --git a/tests/gettext.test b/tests/gettext.test
index b0bb2d224..98c2a4553 100755
--- a/tests/gettext.test
+++ b/tests/gettext.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='gettext'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<END
AM_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION([0.14.3])
diff --git a/tests/gettext2.test b/tests/gettext2.test
index a8c95ad36..dad775a15 100755
--- a/tests/gettext2.test
+++ b/tests/gettext2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
required='gettext'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<END
AM_GNU_GETTEXT([external])
AC_OUTPUT
diff --git a/tests/gettext3.test b/tests/gettext3.test
index a25af8747..46b3cbc8c 100755
--- a/tests/gettext3.test
+++ b/tests/gettext3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='gettext'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<END
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_INTL_SUBDIR
diff --git a/tests/gnits.test b/tests/gnits.test
index 897d0abe7..7803a2ac4 100755
--- a/tests/gnits.test
+++ b/tests/gnits.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [3.5.3.2])
AM_INIT_AUTOMAKE
diff --git a/tests/gnits2.test b/tests/gnits2.test
index 4c5d54feb..b5e750fcb 100755
--- a/tests/gnits2.test
+++ b/tests/gnits2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2007, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -90,8 +91,6 @@ chmod +x sub/scriptnok.sh
# (alpha.test checks the case where it must be distributed.)
: > README-alpha
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -106,5 +105,7 @@ cd build
$MAKE all
$MAKE test-install
$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
-cat stderr
+cat stderr >&2
$MAKE grep-stderr
+
+:
diff --git a/tests/gnits3.test b/tests/gnits3.test
index 7a08fb852..d9965eee4 100755
--- a/tests/gnits3.test
+++ b/tests/gnits3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -70,8 +70,6 @@ chmod +x sub/nok.sh
: > ChangeLog
: > THANKS
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -83,14 +81,19 @@ cd build
../configure "--prefix=`pwd`/../inst-dir" --program-prefix=p
$MAKE
$MAKE install
+$MAKE installcheck && Exit 1
$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
-cat stderr
+cat stderr >&2
$MAKE grep-stderr
# Make sure there is no more error when all targets are exempted.
cd ..
-echo 'AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += sub/nok$(EXEEXT) sub/nok.sh' >> Makefile.am
+cat >> Makefile.am <<'END'
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += sub/nok$(EXEEXT) sub/nok.sh
+END
$AUTOMAKE
cd build
./config.status # Don't rely on the rebuild rules (they need GNU make).
$MAKE installcheck
+
+:
diff --git a/tests/gnumake.test b/tests/gnumake.test
index 72bfa663d..f5f299fd7 100755
--- a/tests/gnumake.test
+++ b/tests/gnumake.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([sub/GNUmakefile])
AC_OUTPUT
diff --git a/tests/gnuwarn.test b/tests/gnuwarn.test
index 9c8aeb402..3db7e857c 100755
--- a/tests/gnuwarn.test
+++ b/tests/gnuwarn.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +18,8 @@
. ./defs || Exit 1
-set -e
+# We need (almost) complete control over automake options.
+AUTOMAKE="$original_AUTOMAKE -Werror"
cat >> configure.in << 'END'
AC_PROG_CC
@@ -40,12 +41,14 @@ END
$ACLOCAL
# Don't warn in foreign mode
-$AUTOMAKE -Wnone --add-missing --foreign
+$AUTOMAKE --add-missing --foreign
# Warn in gnu mode
-AUTOMAKE_fails -Wnone --add-missing --gnu
-grep 'Makefile.am:1:.*CFLAGS' stderr
-grep 'Makefile.am:2:.*LDFLAGS' stderr
+AUTOMAKE_fails --add-missing --gnu
+grep '^Makefile\.am:1:.*CFLAGS' stderr
+grep '^Makefile\.am:2:.*LDFLAGS' stderr
# No reason to warn about CXXFLAGS since it's not used.
grep CXXFLAGS stderr && Exit 1
# Don't warn if -Wno-gnu.
-$AUTOMAKE -Wnone --gnu -Wno-gnu
+$AUTOMAKE --gnu -Wno-gnu
+
+:
diff --git a/tests/gnuwarn2.test b/tests/gnuwarn2.test
index 0227e3a8f..b59f566c7 100755
--- a/tests/gnuwarn2.test
+++ b/tests/gnuwarn2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([gnuwarn2], [1.0])
AM_INIT_AUTOMAKE([no-installman])
diff --git a/tests/hdr-vars-defined-once.test b/tests/hdr-vars-defined-once.test
index 350f8fcc9..2b272b9d2 100755
--- a/tests/hdr-vars-defined-once.test
+++ b/tests/hdr-vars-defined-once.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2005, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,22 +20,23 @@
. ./defs || Exit 1
-echo AC_OUTPUT >> configure.in
+cat >> configure.in <<END
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
-include foo
+include Will_Be_Included_In_Makefile
END
-: > foo
+: > Will_Be_Included_In_Makefile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-len="`grep '^srcdir' Makefile.in | wc -l`"
-echo "len = $len"
-test $len -eq 1 || Exit 1
+$ACLOCAL
+$AUTOMAKE
+len=`grep '^srcdir' Makefile.in | wc -l`
+test $len -eq 1
# Also make sure include file is distributed.
-(sed -n -e '/^DIST_COMMON =.*\\$/ {
+sed -n -e '/^DIST_COMMON =.*\\$/ {
:loop
p
n
@@ -44,4 +46,6 @@ test $len -eq 1 || Exit 1
t loop
p
n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep foo)
+ }' -e '/^DIST_COMMON =/ p' Makefile.in | grep Will_Be_Included_In_Makefile
+
+:
diff --git a/tests/header.test b/tests/header.test
index 2ad273515..9d16747b2 100755
--- a/tests/header.test
+++ b/tests/header.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,11 +16,18 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for PR 68.
+#
+# == Report ==
+# If an autoconf substitution variable of the form "*_HEADERS" --
+# for example "MY_HEADERS" -- is used in an "include_" variable
+# in conjunction with EXTRA_HEADERS, $(MY_HEADERS) gets included
+# in the HEADERS variable for *all* generated Makefile.ins in the
+# project.
. ./defs || Exit 1
cat >> configure.in << 'END'
-AC_SUBST(MY_HEADERS)
+AC_SUBST([MY_HEADERS])
AC_PROG_CC
END
@@ -31,8 +39,8 @@ END
: > joe.c
: > qq.h
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '[^@]MY_HEADERS' Makefile.in && Exit 1
Exit 0
diff --git a/tests/help-depend.test b/tests/help-depend.test
index e676e5e62..e25f264ce 100755
--- a/tests/help-depend.test
+++ b/tests/help-depend.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_DEP_TRACK
diff --git a/tests/help-depend2.test b/tests/help-depend2.test
index 6bad661dd..0eb5447e6 100755
--- a/tests/help-depend2.test
+++ b/tests/help-depend2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/help-dmalloc.test b/tests/help-dmalloc.test
index 51b3ba4be..708805bdd 100755
--- a/tests/help-dmalloc.test
+++ b/tests/help-dmalloc.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_WITH_DMALLOC
diff --git a/tests/help-init.test b/tests/help-init.test
index fdd9fa04d..769862361 100755
--- a/tests/help-init.test
+++ b/tests/help-init.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/help-lispdir.test b/tests/help-lispdir.test
index 5eb7ab9bb..a30802130 100755
--- a/tests/help-lispdir.test
+++ b/tests/help-lispdir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_PATH_LISPDIR
diff --git a/tests/help-maintainer.test b/tests/help-maintainer.test
index 6933d0c65..a4b2d8521 100755
--- a/tests/help-maintainer.test
+++ b/tests/help-maintainer.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_MAINTAINER_MODE
diff --git a/tests/help-multilib.test b/tests/help-multilib.test
index 1657c345b..e0bf6c782 100755
--- a/tests/help-multilib.test
+++ b/tests/help-multilib.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_ENABLE_MULTILIB
diff --git a/tests/help-regex.test b/tests/help-regex.test
index 3eff5f984..aecfed973 100755
--- a/tests/help-regex.test
+++ b/tests/help-regex.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_WITH_REGEX
diff --git a/tests/help-silent.test b/tests/help-silent.test
index e59f2f1cb..e41d166f3 100755
--- a/tests/help-silent.test
+++ b/tests/help-silent.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_SILENT_RULES
diff --git a/tests/help-upc.test b/tests/help-upc.test
index 8f5ff5feb..a30c84cf0 100755
--- a/tests/help-upc.test
+++ b/tests/help-upc.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_PROG_UPC
diff --git a/tests/help.test b/tests/help.test
index dd8b3b45f..f0eeed283 100755
--- a/tests/help.test
+++ b/tests/help.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,15 +19,14 @@
. ./defs || Exit 1
-set -e
-
# Ensure we run in an empty directory.
mkdir emptydir
cd emptydir
-# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+# Honour user overrides for $ACLOCAL and $AUTOMAKE, but without
+# adding extra options.
+ACLOCAL=$original_ACLOCAL
+AUTOMAKE=$original_AUTOMAKE
$ACLOCAL --version
$ACLOCAL --help
diff --git a/tests/help2.test b/tests/help2.test
index b74f30a6a..f01635982 100755
--- a/tests/help2.test
+++ b/tests/help2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,15 +18,14 @@
# contains a broken configure.in and a broken acinclude.m4.
. ./defs || Exit 1
-set -e
-
# Ensure we run in a new, clean directory.
mkdir cleandir
cd cleandir
-# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+# Honour user overrides for $ACLOCAL and $AUTOMAKE, but without
+# adding extra options.
+ACLOCAL=$original_ACLOCAL
+AUTOMAKE=$original_AUTOMAKE
echo '[' > configure.in
echo '[' > acinclude.m4
diff --git a/tests/help3.test b/tests/help3.test
index 72399e3dc..9d026d080 100755
--- a/tests/help3.test
+++ b/tests/help3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,15 +18,14 @@
. ./defs || Exit 1
-set -e
-
# We must have full control over the content of the current directory.
mkdir cleandir
cd cleandir
-# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+# Honour user overrides for $ACLOCAL and $AUTOMAKE, but without
+# adding extra options.
+ACLOCAL=$original_ACLOCAL
+AUTOMAKE=$original_AUTOMAKE
cat > configure.in <<END
AC_INIT([$me], [1.0])
diff --git a/tests/help4.test b/tests/help4.test
index 1b7de4161..34866880f 100755
--- a/tests/help4.test
+++ b/tests/help4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,15 +19,14 @@
. ./defs || Exit 1
-set -e
-
# Ensure we run in an empty directory.
mkdir emptydir
cd emptydir
-# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+# Honour user overrides for $ACLOCAL and $AUTOMAKE, but without
+# adding extra options.
+ACLOCAL=$original_ACLOCAL
+AUTOMAKE=$original_AUTOMAKE
escape_dots () { sed 's/\./\\./g'; } # avoid issues with `\' in backquotes
apiversion_rx=`echo "$APIVERSION" | escape_dots`
diff --git a/tests/hfs.test b/tests/hfs.test
index 8f0c5ccd6..cf0a2434a 100755
--- a/tests/hfs.test
+++ b/tests/hfs.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
# Report from Peter O'Gorman.
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >>configure.in
: >CHANGELOG
diff --git a/tests/hosts.test b/tests/hosts.test
index 2df150b43..ec5f12eb6 100755
--- a/tests/hosts.test
+++ b/tests/hosts.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
: >Makefile.am
$ACLOCAL
diff --git a/tests/implicit.test b/tests/implicit.test
index 210b2dc98..64feca762 100755
--- a/tests/implicit.test
+++ b/tests/implicit.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,7 +28,9 @@ cat > Makefile.am << 'END'
noinst_PROGRAMS = libapp_1
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^libapp_1_OBJECTS' Makefile.in | $FGREP '.$(OBJEXT)'
+
+:
diff --git a/tests/info.test b/tests/info.test
index 2cde52442..cf03cbd62 100755
--- a/tests/info.test
+++ b/tests/info.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,21 +16,20 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test to make sure info files are distributed correctly.
+# FIXME: This test is probably obsoleted, or wrong. The generated
+# Makefile.in seems not to define any `INFOS' variable!
. ./defs || Exit 1
cat > Makefile.am << 'END'
info_TEXINFOS = foo.texi
-
-magic:
- @echo $(INFOS)
END
echo '@setfilename foo.info' > foo.texi
: > texinfo.tex
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
for i in `grep '^INFOS =' Makefile.in | sed -e 's/^INFOS = //'`; do
echo $i
@@ -41,3 +41,5 @@ for i in `grep '^INFOS =' Makefile.in | sed -e 's/^INFOS = //'`; do
;;
esac
done
+
+:
diff --git a/tests/init.test b/tests/init.test
index 38ec681a7..0e2da06ad 100755
--- a/tests/init.test
+++ b/tests/init.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,20 +14,25 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure we give a sensible error message when neither AC_INIT nor
-# AM_INIT_AUTOMAKE are given arguments.
+# Make sure we give a sensible error message when AC_INIT and
+# AM_INIT_AUTOMAKE are both given less than two arguments.
. ./defs || Exit 1
-set -e
-
-cat >configure.in <<END
-AC_INIT
-AM_INIT_AUTOMAKE
+for ac_init_args in '' '([x])'; do
+ for am_init_args in '' '([1.10])'; do
+ rm -rf aclocal.m4 autom4te*.cache
+ cat >configure.in <<END
+AC_INIT$ac_init_args
+AM_INIT_AUTOMAKE$am_init_args
END
+ cat configure.in # might be useful for debugging
+ # The error message should mention AC_INIT, not AC_PACKAGE_VERSION.
+ ($ACLOCAL && $AUTOCONF) 2>stderr && { cat stderr >&2; Exit 1; }
+ cat stderr >&2
+ $FGREP AC_PACKAGE_VERSION stderr && Exit 1
+ grep 'configure\.in:.* AC_INIT .*arguments' stderr
+ done
+done
-# The error message should mension AC_INIT, not AC_PACKAGE_VERSION.
-($ACLOCAL && $AUTOCONF) 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep AC_PACKAGE_VERSION stderr && Exit 1
-grep AC_INIT stderr
+:
diff --git a/tests/init2.test b/tests/init2.test
index 31631d707..9e069ebb7 100755
--- a/tests/init2.test
+++ b/tests/init2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >configure.in <<END
AC_INIT([init2], [1.0])
AM_INIT_AUTOMAKE([nosuchoption])
diff --git a/tests/insh2.test b/tests/insh2.test
index c64f1f7d0..e0a6bcd2f 100755
--- a/tests/insh2.test
+++ b/tests/insh2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2010, 2011
# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -25,8 +25,10 @@ magic:
@echo $(DISTFILES)
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
$MAKE -s -f Makefile.sed SHELL=$SHELL magic | grep install-sh
+
+:
diff --git a/tests/install2.test b/tests/install2.test
index 3cc71f552..2afdd375d 100755
--- a/tests/install2.test
+++ b/tests/install2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010 Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
dnl Prevent automake from looking in .. and ../..
diff --git a/tests/installdir.test b/tests/installdir.test
index b09f49534..ff4ced5ce 100755
--- a/tests/installdir.test
+++ b/tests/installdir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
installdirs-local:
@echo here
diff --git a/tests/instdat.test b/tests/instdat.test
index a6ec01ab9..544b6cb6d 100755
--- a/tests/instdat.test
+++ b/tests/instdat.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,12 +20,14 @@
. ./defs || Exit 1
-echo 'AC_SUBST(INSTALL_DATA)' >> configure.in
+cat >> configure.in <<END
+AC_SUBST([INSTALL_DATA])
+END
: > Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-(grep '^DATA =' Makefile.in | grep INSTALL_DATA) && Exit 1
+grep '^DATA =' Makefile.in | grep 'INSTALL_DATA' && Exit 1
Exit 0
diff --git a/tests/instdat2.test b/tests/instdat2.test
index 966f0cf69..7dd911a73 100755
--- a/tests/instdat2.test
+++ b/tests/instdat2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -62,7 +62,6 @@ pkgdata_SCRIPTS = script
##pkginclude_SCRIPTS = script
EOF
-set -e
$ACLOCAL || Exit 1
$AUTOMAKE
diff --git a/tests/instdir-java.test b/tests/instdir-java.test
index 6adc82e3e..5831f2772 100755
--- a/tests/instdir-java.test
+++ b/tests/instdir-java.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
($HAS_JAVAC 77); $HAS_JAVAC 77
diff --git a/tests/instdir-lisp.test b/tests/instdir-lisp.test
index 475e93583..5cfbf0436 100755
--- a/tests/instdir-lisp.test
+++ b/tests/instdir-lisp.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=emacs
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_PATH_LISPDIR
AC_OUTPUT
diff --git a/tests/instdir-ltlib.test b/tests/instdir-ltlib.test
index 1fb4f37a8..a90536dbd 100755
--- a/tests/instdir-ltlib.test
+++ b/tests/instdir-ltlib.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,18 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# If $(libdir) is the empty string, then nothing should be installed there.
+# If $(libdir) or $(pyexecdir) is the empty string, then nothing should
+# be installed there.
# This test exercises the libtool code paths.
required=libtoolize
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
+AM_PATH_PYTHON
AC_OUTPUT
END
@@ -37,6 +37,8 @@ bin_PROGRAMS = p
nobase_bin_PROGRAMS = np sub/np
lib_LTIBRARIES = libfoo.la
nobase_lib_LTLIBRARIES = libnfoo.la sub/libnfoo.la
+pyexec_LTIBRARIES = libpy.la
+nobase_pyexec_LTLIBRARIES = libnpy.la sub/libnpy.la
END
cat >p.c <<'END'
@@ -47,6 +49,9 @@ cp p.c sub/np.c
cp p.c libfoo.c
cp p.c libnfoo.c
cp p.c sub/libnfoo.c
+cp p.c libpy.c
+cp p.c libnpy.c
+cp p.c sub/libnpy.c
libtoolize
$ACLOCAL
@@ -57,11 +62,13 @@ instdir=`pwd`/inst
destdir=`pwd`/dest
mkdir build
cd build
-../configure --prefix="$instdir"
+../configure --prefix="$instdir" PYTHON="echo" \
+ am_cv_python_pythondir="$instdir/python" \
+ am_cv_python_pyexecdir="$instdir/pyexec"
$MAKE
-bindir= libdir=
-export bindir libdir
+bindir= libdir= pyexecdir=
+export bindir libdir pyexecdir
$MAKE -e install
test ! -d "$instdir"
$MAKE -e install DESTDIR="$destdir"
@@ -69,6 +76,9 @@ test ! -d "$instdir"
test ! -d "$destdir"
$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
cat stdout
-grep 'rm -f' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir"
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+
:
diff --git a/tests/instdir-prog.test b/tests/instdir-prog.test
index 6a73b7572..eb52933ae 100755
--- a/tests/instdir-prog.test
+++ b/tests/instdir-prog.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,17 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# If $(bindir) is the empty string, then nothing should be installed there.
+# If $(bindir), $(libdir) or $(pyexecdir) is the empty string, then
+# nothing should be installed there.
# This test exercises the prog and libs code paths.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_RANLIB
+AM_PATH_PYTHON
AC_OUTPUT
END
@@ -36,6 +36,8 @@ bin_PROGRAMS = p
nobase_bin_PROGRAMS = np sub/np
lib_LIBRARIES = libfoo.a
nobase_lib_LIBRARIES = libnfoo.a sub/libnfoo.a
+pyexec_PROGRAMS = py
+nobase_pyexec_PROGRAMS = npy sub/npy
END
cat >p.c <<'END'
@@ -46,6 +48,9 @@ cp p.c sub/np.c
cp p.c libfoo.c
cp p.c libnfoo.c
cp p.c sub/libnfoo.c
+cp p.c py.c
+cp p.c npy.c
+cp p.c sub/npy.c
$ACLOCAL
$AUTOCONF
@@ -55,11 +60,13 @@ instdir=`pwd`/inst
destdir=`pwd`/dest
mkdir build
cd build
-../configure --prefix="$instdir"
+../configure --prefix="$instdir" PYTHON="echo" \
+ am_cv_python_pythondir="$instdir/python" \
+ am_cv_python_pyexecdir="$instdir/pyexec"
$MAKE
-bindir= libdir=
-export bindir libdir
+bindir= libdir= pyexecdir=
+export bindir libdir pyexecdir
$MAKE -e install
test ! -d "$instdir"
$MAKE -e install DESTDIR="$destdir"
@@ -67,6 +74,9 @@ test ! -d "$instdir"
test ! -d "$destdir"
$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
cat stdout
-grep 'rm -f' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir"
+grep 'rm ' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm ' stdout && Exit 1
+
:
diff --git a/tests/instdir-python.test b/tests/instdir-python.test
index 2af2408cf..21b550ebb 100755
--- a/tests/instdir-python.test
+++ b/tests/instdir-python.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=python
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_PATH_PYTHON
AC_OUTPUT
diff --git a/tests/instdir-texi.test b/tests/instdir-texi.test
index 8210535b9..9de8428c2 100755
--- a/tests/instdir-texi.test
+++ b/tests/instdir-texi.test
@@ -23,8 +23,6 @@ required='makeinfo-html tex texi2dvi'
dvips --help || Exit 77
pdfetex --help || pdftex --help || Exit 77
-set -e
-
cat >>configure.in <<'END'
AC_OUTPUT
END
diff --git a/tests/instdir.test b/tests/instdir.test
index 1132738d6..89e795045 100755
--- a/tests/instdir.test
+++ b/tests/instdir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_SUBST([foodir], ['${datadir}'/foo])
AC_OUTPUT
diff --git a/tests/instdir2.test b/tests/instdir2.test
index b0b78b764..fd9ab0579 100755
--- a/tests/instdir2.test
+++ b/tests/instdir2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_SUBST([foodir], ['${datadir}'/foo])
AC_OUTPUT
diff --git a/tests/instexec.test b/tests/instexec.test
index 411f867d9..f3f5a5d5d 100755
--- a/tests/instexec.test
+++ b/tests/instexec.test
@@ -1,5 +1,6 @@
#!/bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
: > Makefile.am
$ACLOCAL
diff --git a/tests/instfail-info.test b/tests/instfail-info.test
index 70d46574c..becf59b00 100755
--- a/tests/instfail-info.test
+++ b/tests/instfail-info.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required='makeinfo'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<END
AC_OUTPUT
END
diff --git a/tests/instfail-java.test b/tests/instfail-java.test
index 2cb8afbc6..4ebc2c3eb 100755
--- a/tests/instfail-java.test
+++ b/tests/instfail-java.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
($HAS_JAVAC 77); $HAS_JAVAC 77
diff --git a/tests/instfail-libtool.test b/tests/instfail-libtool.test
index 1e756a676..b580c400e 100755
--- a/tests/instfail-libtool.test
+++ b/tests/instfail-libtool.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required='libtool libtoolize'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<END
AC_PROG_LIBTOOL
AC_OUTPUT
diff --git a/tests/instfail.test b/tests/instfail.test
index 38a1c9c99..d7fa73641 100755
--- a/tests/instfail.test
+++ b/tests/instfail.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<END
AC_PROG_CC
AC_PROG_RANLIB
diff --git a/tests/insthook.test b/tests/insthook.test
index a315447e6..ee89057cc 100755
--- a/tests/insthook.test
+++ b/tests/insthook.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2005, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2007, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_PROG_LN_S
AC_OUTPUT
diff --git a/tests/instman.test b/tests/instman.test
index 89c1a5e28..755770576 100755
--- a/tests/instman.test
+++ b/tests/instman.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2001, 2002, 2003, 2006 Free Software
+# Copyright (C) 1996, 1998, 2001, 2002, 2003, 2006, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'EOF'
diff --git a/tests/instman2.test b/tests/instman2.test
index 77844fa33..d082c0891 100755
--- a/tests/instman2.test
+++ b/tests/instman2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,7 +26,9 @@ EOF
: > frob.8
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^install-man' Makefile.in
+
+:
diff --git a/tests/instmany-mans.test b/tests/instmany-mans.test
index fe55be43e..b8f52a3ff 100755
--- a/tests/instmany-mans.test
+++ b/tests/instmany-mans.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
# In order to have a useful test on modern systems (which have a high
# limit, if any), use a fake install program that errors out for more
# than 2K characters in a command line. The POSIX limit is 4096, but
diff --git a/tests/instmany-python.test b/tests/instmany-python.test
index 7648e1bf0..ab4aa73a0 100755
--- a/tests/instmany-python.test
+++ b/tests/instmany-python.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required='python'
. ./defs || Exit 1
-set -e
-
limit=2500
subdir=long_subdir_name_with_many_characters
nfiles=81
diff --git a/tests/instmany.test b/tests/instmany.test
index 2de026d70..effee8289 100755
--- a/tests/instmany.test
+++ b/tests/instmany.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,8 +28,6 @@
. ./defs || Exit 1
-set -e
-
# In order to have a useful test on modern systems (which have a high
# limit, if any), use a fake install program that errors out for more
# than 2K characters in a command line. The POSIX limit is 4096, but
diff --git a/tests/instsh.test b/tests/instsh.test
index 61f5f9ecf..53397c345 100755
--- a/tests/instsh.test
+++ b/tests/instsh.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
: > Makefile.am
rm -f install-sh
diff --git a/tests/instsh2.test b/tests/instsh2.test
index 927edeb7e..2019b357f 100755
--- a/tests/instsh2.test
+++ b/tests/instsh2.test
@@ -18,8 +18,6 @@
# Various install-sh checks
. ./defs || Exit 1
-set -e
-
# Basic errors
./install-sh && Exit 1
./install-sh -m 644 dest && Exit 1
diff --git a/tests/instsh3.test b/tests/instsh3.test
index b7b8761ba..a2bb9d344 100755
--- a/tests/instsh3.test
+++ b/tests/instsh3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
required=non-root
. ./defs || Exit 1
-set -e
-
# Solaris /usr/ucb/touch does not accept -t.
touch -t $old_timestamp foo || Exit 77
diff --git a/tests/instspc-data.test b/tests/instspc-data.test
new file mode 100755
index 000000000..1c165d836
--- /dev/null
+++ b/tests/instspc-data.test
@@ -0,0 +1,26 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Helper testcase which generate input data for the other test
+# `instspc-*.test'. It basically delegates the work to the helper
+# script `instspc-test.sh'.
+
+# Ensure proper definition of $testsrcdir.
+. ./defs-static || exit 99
+test -n "$testsrcdir" || exit 99 # sanity check
+
+instspc_action=generate-data
+. $testsrcdir/instspc-tests.sh
diff --git a/tests/instspc-tests.sh b/tests/instspc-tests.sh
new file mode 100755
index 000000000..2c4089f50
--- /dev/null
+++ b/tests/instspc-tests.sh
@@ -0,0 +1,342 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#
+# Driver script to generate and run tests checking that building from,
+# or installing to, directories with shell metacharacters succeed.
+#
+# Original report from James Amundson about file names with spaces.
+# Other characters added by Paul Eggert.
+#
+# This script fulfills a threefold role:
+# 1. It generates a Makefile.am snippet, containing the definition
+# of proper lists of tests.
+# 2. It sets up a directory containing some common data files and
+# autotools-generated files used by said generated tests (this
+# is done for speed reasons only).
+# 3. It is sourced by said generated tests with proper parameters
+# pre-set, to run the "meat" of the checks.
+# This setup might seem a tricky and over-engineered abuse, but past
+# (painful) experiences showed that it is indeed required, because
+# the test generation code and test execution code tend to be
+# inextricably coupled and intertwined.
+#
+
+# Be more Bourne compatible (snippet copied from `tests/defs').
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+
+set -e
+
+# Sanity and usage checks.
+if test x"$instspc_action" = x; then
+ if test "$#,$1" = "1,--generate-makefile"; then
+ instspc_action=generate-makefile
+ else
+ echo "$0: empty action and no proper command line" >&2
+ exit 99
+ fi
+elif test $# -gt 0; then
+ echo "$0: action specified and command line arguments used" >&2
+ exit 99
+fi
+
+case $instspc_action in
+ generate-makefile|generate-data)
+ ;;
+ test-build|test-install)
+ if test x"$instspc_test_name" = x; then
+ echo "$0: test name undefined for action '$instspc_action'" >&2
+ exit 99
+ fi
+ ;;
+ *)
+ echo "$0: invalid action: '$instspc_action'"
+ exit 99
+ ;;
+esac
+
+# Helper subroutine for test data definition.
+# Usage: define_problematic_string NAME STRING
+define_problematic_string ()
+{
+ tst=$1
+ shift
+ eval "instspc__$tst=\$1" || exit 99
+ shift
+ instspc_names_list="$instspc_names_list $tst"
+ # Some of the "problematic" characters cannot be used in the name of
+ # a build or install directory on a POSIX host. These lists should
+ # be empty, but are not due to limitations in Autoconf, Automake, Make,
+ # M4, or the shell.
+ case " $* " in *' fail-build '*|*' build-fail '*)
+ instspc_xfail_builds_list="$instspc_xfail_builds_list $tst";;
+ esac
+ case " $* " in *' fail-install '*|*' install-fail '*)
+ instspc_xfail_installs_list="$instspc_xfail_installs_list $tst";;
+ esac
+}
+
+# Helper subroutines for creation of input data files.
+
+create_input_data ()
+{
+ mkdir sub
+
+ unindent > configure.in << 'EOF'
+ AC_INIT([instspc], [1.0])
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_FILES([Makefile])
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_OUTPUT
+EOF
+
+ : > sub/base.h
+ : > sub/nobase.h
+ : > sub/base.dat
+ : > sub/nobase.dat
+ : > sub/base.sh
+ : > sub/nobase.sh
+
+ unindent > source.c << 'EOF'
+ int
+ main (int argc, char **argv)
+ {
+ return 0;
+ }
+EOF
+
+ unindent > Makefile.am << 'EOF'
+ foodir = $(prefix)/foo
+ fooexecdir = $(prefix)/foo
+
+ foo_HEADERS = sub/base.h
+ nobase_foo_HEADERS = sub/nobase.h
+
+ dist_foo_DATA = sub/base.dat
+ nobase_dist_foo_DATA = sub/nobase.dat
+
+ dist_fooexec_SCRIPTS = sub/base.sh
+ nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
+
+ fooexec_PROGRAMS = sub/base
+ nobase_fooexec_PROGRAMS = sub/nobase
+ sub_base_SOURCES = source.c
+ sub_nobase_SOURCES = source.c
+
+ fooexec_LIBRARIES = sub/libbase.a
+ nobase_fooexec_LIBRARIES = sub/libnobase.a
+ sub_libbase_a_SOURCES = source.c
+ sub_libnobase_a_SOURCES = source.c
+
+ .PHONY: test-install-sep
+ test-install-sep: install
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.h'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.h'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/base.h'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.dat'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.dat'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/base.dat'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.sh'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.sh'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/base.sh'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase$(EXEEXT)'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase$(EXEEXT)'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/base$(EXEEXT)'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/libnobase.a'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/libnobase.a'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/libbase.a'
+EOF
+
+ $ACLOCAL
+ $AUTOCONF
+ $AUTOMAKE -a
+
+ : > success
+}
+
+# Be sure to avoid interferences from the environment.
+instspc_names_list=''
+instspc_xfail_builds_list=''
+instspc_xfail_installs_list=''
+
+
+# ================= #
+# Test data begin #
+# ----------------- #
+
+# Some control characters that are white space.
+bs='' # back space
+cr=' ' # carriage return
+ff=' ' # form feed
+ht=' ' # horizontal tab
+lf='
+' # line feed (aka newline)
+
+# Hack to save typing and make code visually clearer.
+def=define_problematic_string
+
+$def squote \' fail-build fail-install
+$def dquote '"' fail-build fail-install
+$def bquote '`' fail-build fail-install
+$def sharp '#' fail-build fail-install
+$def dollar '$' fail-build fail-install
+$def bang '!'
+$def bslash '\' fail-build
+$def ampersand '&' fail-build
+$def percent '%'
+$def leftpar '('
+$def rightpar ')'
+$def pipe '|'
+$def caret '^'
+$def tilde '~'
+$def qmark '?'
+$def star '*'
+$def plus '+'
+$def minus '-'
+$def comma ','
+$def colon ':'
+$def semicol ';'
+$def equal '='
+$def less '<'
+$def more '>'
+$def at '@'
+$def lqbrack '['
+$def rqbrack ']'
+$def lcbrack '{'
+$def rcbrack '}'
+$def space ' '
+$def tab "$ht"
+$def linefeed "$lf" fail-build fail-install
+$def backspace "$bs"
+$def formfeed "$ff"
+$def carriageret "$cr"
+$def quadrigraph0 '@&t@' fail-build
+$def quadrigraph1 '@<:@'
+$def quadrigraph2 '@:>@'
+$def quadrigraph3 '@S|@'
+$def quadrigraph4 '@%:@'
+$def a_b 'a b'
+$def a__b 'a b'
+$def a_lf_b "a${lf}b" fail-build fail-install
+$def dotdotdot '...'
+$def dosdrive 'a:'
+$def miscglob1 '?[a-z]*'
+$def miscglob2 '.*?[0-9]'
+
+unset def
+
+# --------------- #
+# Test data end #
+# =============== #
+
+
+if test x"$instspc_action" = x"generate-makefile"; then
+ # We must generate a makefile fragment on stdout. It must refer
+ # to all tests at once, hence the loop below.
+ echo '## Generated by instspc-tests.sh. DO NOT EDIT!'
+ echo 'instspc_tests ='
+ echo 'instspc_xfail_tests ='
+ for test_name in $instspc_names_list; do
+ echo "instspc_tests += instspc-$test_name-build.test"
+ echo "instspc_tests += instspc-$test_name-install.test"
+ done
+ for test_name in $instspc_xfail_builds_list; do
+ echo "instspc_xfail_tests += instspc-$test_name-build.test"
+ done
+ for test_name in $instspc_xfail_installs_list; do
+ echo "instspc_xfail_tests += instspc-$test_name-install.test"
+ done
+ exit 0
+fi
+
+# We'll need the full setup provided by `tests/defs'. Temporarily disable
+# the errexit flag, since the setup code might not be prepared to deal
+# with it.
+set +e
+. ./defs || Exit 99
+set -e
+
+# The directory set up by the `generate-data' action should contain all
+# the files we need. So remove the other files created by ./defs. And
+# check we really are in a temporary `*.dir' directory in the build tree,
+# since the last thing we want is to remove some random user files!
+test -f ../defs-static && test -f ../defs || Exit 99
+case `pwd` in *.dir);; *) Exit 99;; esac
+rm -f *
+
+if test x"$instspc_action" = x"generate-data"; then
+ # We must *not* remove the test directory, since its contents must be
+ # used by following dependent tests.
+ keep_testdirs=yes
+ create_input_data
+ Exit 0
+fi
+
+### If we are still here, we have to run a test ...
+
+eval "instspc_test_string=\${instspc__$instspc_test_name}" || Exit 99
+if test x"$instspc_test_string" = x; then
+ echo "$me: invalid test name: '$instspc_test_name'" >&2
+ Exit 99
+fi
+
+test -f ../instspc-data.dir/success || {
+ echo "$me: setup by instspc-data.test failed" >&2
+ Exit 99
+}
+
+# Skip if this system doesn't support these characters in file names.
+mkdir "./$instspc_test_string" || Exit 77
+
+case $instspc_action in
+ test-build)
+ dest=`pwd`/_dest
+ relbuilddir=../..
+ cd "./$instspc_test_string"
+ ;;
+ test-install)
+ dest=`pwd`/$instspc_test_string
+ relbuilddir=..
+ ;;
+ *)
+ echo "$me: internal error: invalid action '$instspc_action'"
+ Exit 99
+ ;;
+esac
+
+$relbuilddir/instspc-data.dir/configure \
+ --prefix "/$instspc_test_string-prefix"
+$MAKE
+# Some make implementations eliminate leading and trailing whitespace
+# from macros passed on the command line, and some eliminate leading
+# whitespace from macros set from environment variables, so prepend
+# './' and use the latter here.
+# Tru64 sh -e needs '|| Exit' in order to work correctly.
+DESTDIR="$dest" file="./$instspc_test_string" $MAKE -e test-install-sep \
+ || Exit 1
+
+:
diff --git a/tests/instspc.test b/tests/instspc.test
deleted file mode 100755
index 7d007884f..000000000
--- a/tests/instspc.test
+++ /dev/null
@@ -1,191 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2004, 2005, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that installation to directory with shell metacharacters succeed.
-# Original report from James Amundson about file names with spaces.
-# Other characters added by Paul Eggert.
-
-# This is mostly the same input as nobase.test, but we do not use
-# libtool libraries, because Libtool does not preserve space in
-# file names (Issue observed with ltmain.sh (GNU libtool) 1.5a (1.1323
-# 2003/11/10 21:06:47))
-
-
-required='gcc'
-. ./defs || Exit 1
-
-set -e
-
-# Set up files that won't change each time through the loop.
-
-cat >> configure.in <<'EOF'
-AC_PROG_CC
-AC_PROG_RANLIB
-AC_OUTPUT
-EOF
-
-mkdir sub
-
-: > sub/base.h
-: > sub/nobase.h
-: > sub/base.dat
-: > sub/nobase.dat
-: > sub/base.sh
-: > sub/nobase.sh
-
-cat >source.c <<'EOF'
-int
-main (int argc, char **argv)
-{
- return 0;
-}
-EOF
-cp source.c source2.c
-
-cat > Makefile.am << 'EOF'
-foodir = $(prefix)/foo
-fooexecdir = $(prefix)/foo
-
-foo_HEADERS = sub/base.h
-nobase_foo_HEADERS = sub/nobase.h
-
-dist_foo_DATA = sub/base.dat
-nobase_dist_foo_DATA = sub/nobase.dat
-
-dist_fooexec_SCRIPTS = sub/base.sh
-nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
-
-fooexec_PROGRAMS = sub/base
-nobase_fooexec_PROGRAMS = sub/nobase
-sub_base_SOURCES = source.c
-sub_nobase_SOURCES = source.c
-
-fooexec_LIBRARIES = sub/libbase.a
-nobase_fooexec_LIBRARIES = sub/libnobase.a
-sub_libbase_a_SOURCES = source.c
-sub_libnobase_a_SOURCES = source.c
-
-test-install-sep: install
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.h'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.h'
- test -f '$(DESTDIR)/$(file)-prefix/foo/base.h'
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.dat'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.dat'
- test -f '$(DESTDIR)/$(file)-prefix/foo/base.dat'
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.sh'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.sh'
- test -f '$(DESTDIR)/$(file)-prefix/foo/base.sh'
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase$(EXEEXT)'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase$(EXEEXT)'
- test -f '$(DESTDIR)/$(file)-prefix/foo/base$(EXEEXT)'
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/libnobase.a'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/libnobase.a'
- test -f '$(DESTDIR)/$(file)-prefix/foo/libbase.a'
-EOF
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-# Some control characters that are white space:
-# back space, carriage return, form feed, horizontal tab, line feed, space
-bs=''
-cr=' '
-ff=' '
-ht=' '
-lf='
-'
-sp=' '
-
-build_failures=
-install_failures=
-
-for file in \
- '!' '"' '#' '$' '%' '&' \' '(' ')' '*' '+' ',' '-' ':' ';' \
- '<' '=' '>' '?' '@' '[' '\' ']' '^' '`' '{' '|' '}' '~' \
- "$bs" "$cr" "$ff" "$ht" "$lf" "$sp" \
- '@<:@' '@:>@' '@S|@' '@%:@' '@&t@' \
- "a${sp}b" "a${sp}${sp}b" "a${lf}b" ... a:
-do
- for test in build install; do
- case $test in
- build)
- build=$file
- dest=`pwd`/sub1;;
- install)
- build=sub1
- dest=`pwd`/$file;;
- esac
-
- # Make sure this system supports this character in file names.
- mkdir sub1 "./$file" || Exit 77
-
- cd "$build"
-
- # Some make implementations eliminate leading and trailing whitespace
- # from macros passed on the command line, and some eliminate leading
- # whitespace from macros set from environment variables, so prepend
- # './' and use the latter here.
- ../configure --prefix "/$file-prefix" &&
- $MAKE &&
- DESTDIR=$dest file=./$file $MAKE -e test-install-sep ||
- eval "${test}_failures=\"\$${test}_failures$lf\$file\""
-
- cd ..
-
- rm -fr sub1 "./$file"
- done
-done
-
-# The list of the above file names that cannot be used as a build directory
-# on a POSIX host. This list should be empty, but is not due to limitations
-# in Autoconf, Automake, Make, M4, or the shell.
-expected_build_failures='
-"
-#
-$
-&
-'\''
-\
-`
-'"$lf"'
-@&t@
-a'"${lf}"'b'
-
-# Similarly, the list of file names that cannot be used as an install directory
-# on a POSIX host. This list should also be empty.
-expected_install_failures='
-"
-#
-$
-'\''
-`
-'"$lf"'
-a'"${lf}"'b'
-
-fail=0
-for test in build install; do
- eval failures=\$${test}_failures
- case $failures in
- ?*)
- cat >&2 <<EOF
-$0: $test test failed for the following file names:$failures
-EOF
- eval test \"\$failures\" = \"\$expected_${test}_failures\" || fail=1
- esac
-done
-
-Exit $fail
diff --git a/tests/interp.test b/tests/interp.test
index af82e33cb..e4352d7d2 100755
--- a/tests/interp.test
+++ b/tests/interp.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +29,9 @@ s1 = z.c
qqq_SOURCES = $(s1)
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP 'z.$(OBJEXT)' Makefile.in
+
+:
diff --git a/tests/interp2.test b/tests/interp2.test
index cff8d1d2f..804305e9b 100755
--- a/tests/interp2.test
+++ b/tests/interp2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,5 +32,7 @@ x_SOURCES = x.c
x_LDADD = $(X_EXTRA_LIBS)
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/java.test b/tests/java.test
index d5210cd14..f4259d4ed 100755
--- a/tests/java.test
+++ b/tests/java.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2004, 2007, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
($HAS_JAVAC 77); $HAS_JAVAC 77
diff --git a/tests/java2.test b/tests/java2.test
index d3b942ca8..b4f1dafa6 100755
--- a/tests/java2.test
+++ b/tests/java2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL(WITH_JDK, false)
AC_OUTPUT
diff --git a/tests/java3.test b/tests/java3.test
index 78957697d..5aa179693 100755
--- a/tests/java3.test
+++ b/tests/java3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([WHO_CARES], false)
AC_OUTPUT
diff --git a/tests/javaprim.test b/tests/javaprim.test
index aa1506bb6..f0b8a1a02 100755
--- a/tests/javaprim.test
+++ b/tests/javaprim.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,12 +19,16 @@
. ./defs || Exit 1
-echo 'AC_SUBST(JAVA)' >> configure.in
+cat >> configure.in << 'END'
+AC_SUBST([JAVA])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/javasubst.test b/tests/javasubst.test
index d0186452c..6b867d986 100755
--- a/tests/javasubst.test
+++ b/tests/javasubst.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,14 +19,18 @@
. ./defs || Exit 1
-echo 'AC_SUBST(JAVAC)' >> configure.in
+cat >> configure.in << 'END'
+AC_SUBST([JAVAC])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'JAVAC.*@JAVAC@' Makefile.in
+
+:
diff --git a/tests/ldadd.test b/tests/ldadd.test
index 7f4fce89a..12785fa55 100755
--- a/tests/ldadd.test
+++ b/tests/ldadd.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2010 Free Software
+# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,6 @@
required=libtool
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/ldflags.test b/tests/ldflags.test
index 39ca27464..96fb21302 100755
--- a/tests/ldflags.test
+++ b/tests/ldflags.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,6 +17,7 @@
# Check for LDFLAGS in conditional.
# PR 77.
+
required=libtool
. ./defs || Exit 1
@@ -23,7 +25,7 @@ cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
AC_SUBST([LTLIBOBJS], [q.o])
-AM_CONDITIONAL(USE_SWIG, :)
+AM_CONDITIONAL([USE_SWIG], [:])
AC_OUTPUT
END
@@ -41,5 +43,7 @@ END
: > config.sub
: > q.c
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/lex.test b/tests/lex.test
index c59c4e3bb..3327eb484 100755
--- a/tests/lex.test
+++ b/tests/lex.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2001, 2002, 2006, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,8 +17,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_LEX
@@ -29,19 +28,14 @@ zot_SOURCES = joe.l
LDADD = @LEXLIB@
END
-: > joe.l
-
$ACLOCAL
$AUTOMAKE -a
-
# Test to make sure that lex source generates correct target.
-
$FGREP '$(LEX)' Makefile.in
# Test to make sure that lex source generates correct clean rule.
# From Ralf Corsepius.
-
$FGREP joel Makefile.in && Exit 1
:
diff --git a/tests/lex2.test b/tests/lex2.test
index d588edf16..72be79d7d 100755
--- a/tests/lex2.test
+++ b/tests/lex2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
@@ -29,8 +28,9 @@ bin_PROGRAMS = zot
zot_SOURCES = joe.l
END
-: > joe.l
-
$ACLOCAL
-AUTOMAKE_fails
-grep AM_PROG_LEX stderr
+AUTOMAKE_fails -a
+grep 'LEX.* undefined' stderr
+grep 'add .*AM_PROG_LEX' stderr
+
+:
diff --git a/tests/lex3.test b/tests/lex3.test
index c4120cfc6..bc8839990 100755
--- a/tests/lex3.test
+++ b/tests/lex3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010 Free Software
+# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -15,6 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Basic semantic checks on Lex support.
# Test associated with PR 19.
# From Matthew D. Langston.
@@ -25,17 +26,12 @@ required='gcc flex GNUmake'
CFLAGS=
export CFLAGS
-cat > configure.in << 'END'
-AC_INIT
-dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(am_lex_bug, 0.1.1)
+distdir=$me-1.0
-dnl Checks for programs.
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_LEX
-AC_PROG_YACC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -46,38 +42,46 @@ END
cat > foo.l << 'END'
%%
-"END" return EOF;
+"GOOD" return EOF;
.
%%
int
main ()
{
- while (yylex () != EOF)
- ;
-
- return 0;
+ /* We don't use a 'while' loop here (like a real lexer would do)
+ to avoid possible hangs. */
+ if (yylex () == EOF)
+ return 0;
+ else
+ return 1;
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
+
./configure
+
+# Program should build and run.
$MAKE
-echo 'This is the END' | ./foo
-$MAKE distcheck
+echo GOOD | ./foo
+echo BAD | ./foo && Exit 1
-# foo.c must be shipped.
-gunzip am_lex_bug-0.1.1.tar.gz
-tar tf am_lex_bug-0.1.1.tar | $FGREP foo.c
+# The generated file `foo.c' must be shipped.
+$MAKE distdir
+test -f $distdir/foo.c
+
+# Sanity check on distribution.
+$MAKE distcheck
# While we are at it, make sure that foo.c is erased by
# maintainer-clean, and not by distclean.
test -f foo.c
$MAKE distclean
test -f foo.c
-./configure
+./configure # we must re-create `Makefile'
$MAKE maintainer-clean
test ! -f foo.c
+
+:
diff --git a/tests/lex4.test b/tests/lex4.test
index fee140d6b..f2bf574fd 100755
--- a/tests/lex4.test
+++ b/tests/lex4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
@@ -32,9 +31,9 @@ bin_PROGRAMS = zoo
zoo_SOURCES = joe.ll
END
-: > joe.ll
-
$ACLOCAL
$AUTOMAKE -a
$FGREP joe.Po Makefile.in
+
+:
diff --git a/tests/lex5.test b/tests/lex5.test
index 88924b214..220bf50f6 100755
--- a/tests/lex5.test
+++ b/tests/lex5.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,13 +20,7 @@
required='gcc GNUmake flex'
. ./defs || Exit 1
-set -e
-
-cat > configure.in << 'END'
-AC_INIT([lex5], [1.0])
-AC_CONFIG_AUX_DIR([.])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_LEX
@@ -57,8 +52,6 @@ main ()
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -96,4 +89,4 @@ $MAKE foo/foo2.o
test -f foo/foo2.c
test -f foo/foo2.o
-Exit 0
+:
diff --git a/tests/lexcpp.test b/tests/lexcpp.test
new file mode 100755
index 000000000..7fd409a35
--- /dev/null
+++ b/tests/lexcpp.test
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure Lex + C++ is supported.
+# Please keep this is sync with sister test yaccpp.test.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CXX
+AC_PROG_LEX
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo bar baz qux
+foo_SOURCES = foo.l++
+bar_SOURCES = bar.lpp
+baz_SOURCES = baz.ll
+qux_SOURCES = qux.lxx
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+sed -e 's/^/ /' -e 's/$/ /' Makefile.in >mk
+$FGREP ' foo.c++ ' mk
+$FGREP ' bar.cpp ' mk
+$FGREP ' baz.cc ' mk
+$FGREP ' qux.cxx ' mk
+
+:
diff --git a/tests/lexvpath.test b/tests/lexvpath.test
new file mode 100755
index 000000000..876541a83
--- /dev/null
+++ b/tests/lexvpath.test
@@ -0,0 +1,113 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This test checks that dependent files are updated before including
+# in the distribution. `lexer.c' depends on `lexer.l'. The latter is
+# updated so that `lexer.c' should be rebuild. Then we are running
+# `make' and `make distdir' and check whether the version of `lexer.c'
+# to be distributed is up to date.
+
+# Please keep this in sync with sister test `yaccvapth.test'.
+
+required='gcc flex'
+. ./defs || Exit 1
+
+distdir=$me-1.0
+
+cat > lexoutroot.in << 'END'
+LEX_OUTPUT_ROOT='@LEX_OUTPUT_ROOT@'
+END
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([lexoutroot])
+AC_PROG_CC
+AC_PROG_LEX
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = lexer.l foo.c
+LDADD = $(LEXLIB)
+END
+
+# Original lexer, with a "foobar" comment
+cat > lexer.l << 'END'
+%%
+"END" return EOF;
+.
+%%
+/*foobar*/
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir sub
+
+# We must run configure early, to find out whay $LEX_OUTPUT_ROOT is.
+cd sub
+../configure
+. ./lexoutroot
+test -n "$LEX_OUTPUT_ROOT" # sanity check
+cd ..
+
+flex lexer.l
+mv "$LEX_OUTPUT_ROOT".c lexer.c
+
+cd sub
+
+# Ensure that lexer.l will be newer than lexer.c.
+$sleep
+
+# New lexer, with `fubar' comment.
+cat > ../lexer.l << 'END'
+%%
+"END" return EOF;
+.
+%%
+/*fubar*/
+END
+
+$MAKE
+$MAKE distdir
+$FGREP '/*fubar*/' $distdir/lexer.c
+
+#
+# Now check to make sure that `make dist' will rebuilt the parser.
+#
+
+# Ensure that lexer.l will be newer than lexer.c.
+$sleep
+
+# New lexer, with `maude' comment.
+cat > ../lexer.l << 'END'
+%%
+"END" return EOF;
+.
+%%
+/*maude*/
+END
+
+$MAKE distdir
+$FGREP '/*maude*/' $distdir/lexer.c
+
+:
diff --git a/tests/lflags.test b/tests/lflags.test
index 4c3e04876..da207fb2e 100755
--- a/tests/lflags.test
+++ b/tests/lflags.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >fake-lex <<'END'
#!/bin/sh
echo '/*' "$*" '*/' >lex.yy.c
diff --git a/tests/lflags2.test b/tests/lflags2.test
index f13c65627..9e339f37c 100755
--- a/tests/lflags2.test
+++ b/tests/lflags2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required=g++ # FIXME: any working C++ compiler should be OK
. ./defs || Exit 1
-set -e
-
cat >fake-lex <<'END'
#!/bin/sh
echo '/*' "$*" '*/' >lex.yy.c
diff --git a/tests/libexec.test b/tests/libexec.test
index a6561b782..a305f78ec 100755
--- a/tests/libexec.test
+++ b/tests/libexec.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
libexec_PROGRAMS = foo
pkglibexec_PROGRAMS = bar
diff --git a/tests/libobj-basic.test b/tests/libobj-basic.test
new file mode 100755
index 000000000..0fe0278c7
--- /dev/null
+++ b/tests/libobj-basic.test
@@ -0,0 +1,108 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure AC_LIBSOURCE and AC_LIBSOURCES work.
+
+. ./defs || Exit 1
+
+mv configure.in configure.proto
+cat >> configure.proto << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES = foo.c
+libtu_a_LIBADD = $(LIBOBJS)
+
+include extra-checks.am
+.PHONY: $(extra_checks) pre-test
+
+pre-test: distdir
+ ls -l $(srcdir) $(builddir) $(distdir)
+ $(AR) tv libtu.a
+$(extra_checks): pre-test
+check-local: $(extra_checks)
+
+maude-src:
+ grep dummy_maude $(srcdir)/maude.c
+maude-dist:
+ grep dummy_maude $(distdir)/maude.c
+liver-src:
+ grep dummy_liver $(srcdir)/liver.c
+liver-dist:
+ grep dummy_liver $(distdir)/liver.c
+liver-not-dist:
+ test -d $(distdir)
+ test ! -r $(distdir)/liver.c
+maude-not-dist:
+ test -d $(distdir)
+ test ! -r $(distdir)/maude.c
+END
+
+cat > foo.c << 'END'
+extern int dummy_foo;
+END
+
+cat > maude.c << 'END'
+extern int dummy_maude;
+END
+
+cat > liver.c << 'END'
+extern int dummy_liver;
+END
+
+# AC_LIBSOURCE should work also if called after AC_OUTPUT.
+cat configure.proto - > configure.in <<END
+AC_LIBSOURCE([maude.c])
+END
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-not-dist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+$MAKE distclean
+# Avoid timestamp-related differences.
+rm -rf autom4te*.cache
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-src liver-dist
+END
+
+# AC_LIBSOURCES should work also if called after AC_OUTPUT.
+cat configure.proto - > configure.in <<END
+AC_LIBSOURCES([maude.c, liver.c])
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/tests/libobj10.test b/tests/libobj10.test
index 0d2474162..f891e85f4 100755
--- a/tests/libobj10.test
+++ b/tests/libobj10.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
@@ -30,13 +29,22 @@ END
cat > Makefile.am << 'END'
noinst_LIBRARIES = libfoo.a
-libfoo_a_LIBADD = @LIBOBJS@
+libfoo_a_SOURCES =
+libfoo_a_LIBADD = $(LIBOBJS)
+BUILT_SOURCES = foo.c
+CLEANFILES = foo.c
+foo.c:
+ echo 'extern int dummy;' > $@
END
$ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:2:.*foo\.c' stderr
+$AUTOCONF
+$AUTOMAKE
-echo 'BUILT_SOURCES = foo.c' >> Makefile.am
+./configure
-$AUTOMAKE
+$MAKE
+ar t libfoo.a # for debugging
+$MAKE distcheck
+
+:
diff --git a/tests/libobj12.test b/tests/libobj12.test
index 5f1d02908..89b70cfa1 100755
--- a/tests/libobj12.test
+++ b/tests/libobj12.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,12 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
# Test if a file can be mentioned in LIBOBJS and explicitly.
# (See libobj13.test for the LTLIBRARIES check.)
. ./defs || Exit 1
-set -e
cat >> configure.in << 'END'
AC_PROG_CC
@@ -48,22 +46,30 @@ END
: > bar.c
$ACLOCAL
-$AUTOMAKE
# This however should be diagnosed, since foo.c and bar.c are in @LIBOBJS@.
-echo 'libfoo_a_SOURCES += foo.c' >> Makefile.am
-echo 'p1_SOURCES += bar.c' >> Makefile.am
+cat >> Makefile.am << 'END'
+libfoo_a_SOURCES += foo.c
+p1_SOURCES += bar.c
+END
+
AUTOMAKE_fails
-$FGREP foo.c stderr
-$FGREP bar.c stderr
+grep 'foo\.c.*explicitly mentioned' stderr
+grep 'bar\.c.*explicitly mentioned' stderr
# Global `LDADD' can also come into play.
cat > Makefile.am << 'END'
noinst_PROGRAMS = a b
LDADD = @LIBOBJS@
END
+
$AUTOMAKE
grep 'a_DEPENDENCIES.*LIBOBJS' Makefile.in
-echo 'a_SOURCES = foo.c' >> Makefile.am
+
+cat >> Makefile.am << 'END'
+a_SOURCES = foo.c
+END
AUTOMAKE_fails
-$FGREP foo.c stderr
+grep 'foo\.c.*explicitly mentioned' stderr
+
+:
diff --git a/tests/libobj13.test b/tests/libobj13.test
index 6ca68c9e6..c572dd45b 100755
--- a/tests/libobj13.test
+++ b/tests/libobj13.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,13 +14,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
# Test if a file can be mentioned in LTLIBOBJS and explicitly.
# (Like libobj12.test, but for Libtool libraries.)
required='libtoolize'
. ./defs || Exit 1
-set -e
cat >> configure.in << 'END'
AC_PROG_CC
@@ -47,4 +45,6 @@ $AUTOMAKE --add-missing
# This however should be diagnosed, since foo.c is in @LIBOBJS@.
echo 'libfoo_la_SOURCES += foo.c' >> Makefile.am
AUTOMAKE_fails
-$FGREP foo.c stderr
+grep 'foo\.c.*explicitly mentioned' stderr
+
+:
diff --git a/tests/libobj14.test b/tests/libobj14.test
index 0ee750c83..4f05871ec 100755
--- a/tests/libobj14.test
+++ b/tests/libobj14.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,12 +22,10 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_PROG_CC
AC_LIBSOURCE([bar.c])
-AM_CONDITIONAL([CASE], :)
+AM_CONDITIONAL([CASE], [:])
AC_OUTPUT
EOF
@@ -43,3 +41,5 @@ EOF
$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/libobj11.test b/tests/libobj15a.test
index 204ff8bb4..044e3db85 100755
--- a/tests/libobj11.test
+++ b/tests/libobj15a.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,26 +14,24 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# AC_LIBOBJ must allow [] around its argument.
+# Nonexistent sources for AC_LIBOBJ should cause an Automake failure.
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
-AC_LIBOBJ([mountlist])
-AC_OUTPUT(Makefile)
+AC_LIBOBJ([foobar])
END
cat > Makefile.am << 'END'
noinst_LIBRARIES = libtu.a
libtu_a_SOURCES =
-libtu_a_LIBADD = @LIBOBJS@
+libtu_a_LIBADD = $(LIBOBJS)
END
-: > mountlist.c
+$ACLOCAL
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*foobar\.c.*' stderr
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+:
diff --git a/tests/aclibobj.test b/tests/libobj15b.test
index 6ef6f6bcf..4548a2a2a 100755
--- a/tests/aclibobj.test
+++ b/tests/libobj15b.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,36 +14,27 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure AC_LIBOBJ and friends work.
+# Nonexistent source for AC_LIBSOURCE should cause Automake to fail.
. ./defs || Exit 1
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
+AC_LIBSOURCE([foobar.c])
+# NOTE: this call to AC_OUTPUT is really needed; see Automake bug #7635
+# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7635>
AC_OUTPUT
END
cat > Makefile.am << 'END'
noinst_LIBRARIES = libtu.a
libtu_a_SOURCES =
-libtu_a_LIBADD = @LIBOBJS@
+libtu_a_LIBADD = $(LIBOBJS)
END
-: > maude.c
-: > liver.c
-
$ACLOCAL
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*foobar\.c.*' stderr
-set -e
-
-cp configure.in X
-echo 'AC_LIBSOURCE(maude.c)' >> configure.in
-$AUTOMAKE
-
-# Avoid timestamp-related differences.
-rm -rf autom4te.cache
-
-cp X configure.in
-echo 'AC_LIBSOURCES([maude.c, liver.c])' >> configure.in
-$AUTOMAKE
+:
diff --git a/tests/libobj15c.test b/tests/libobj15c.test
new file mode 100755
index 000000000..c39ac996b
--- /dev/null
+++ b/tests/libobj15c.test
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Nonexistent sources for AC_LIBSOURCES should cause Automake to fail.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBSOURCES([foobar.c, bazquux.c])
+# NOTE: this call to AC_OUTPUT is really needed; see Automake bug #7635
+# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7635>
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*foobar\.c.*' stderr
+grep 'configure\.in:.*required file.*bazquux\.c.*' stderr
+
+: > foobar.c
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*bazquux\.c.*' stderr
+grep 'foobar\.c' stderr && Exit 1
+
+:
diff --git a/tests/libobj16a.test b/tests/libobj16a.test
new file mode 100755
index 000000000..9946bc5b0
--- /dev/null
+++ b/tests/libobj16a.test
@@ -0,0 +1,137 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure AC_LIBOBJ and friends work.
+# Please keep this in sync with sister test `libobj16b.test'.
+
+. ./defs || Exit 1
+
+mv configure.in configure.proto
+cat >> configure.proto << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+%LIBOBJ-STUFF% # will be activated later
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+
+include extra-checks.am
+.PHONY: $(extra_checks) pre-test
+
+pre-test: distdir
+ ls -l $(srcdir) $(builddir) $(distdir)
+ $(AR) tv libtu.a
+$(extra_checks): pre-test
+check-local: $(extra_checks)
+
+maude-src:
+ grep dummy_maude $(srcdir)/maude.c
+maude-dist:
+ grep dummy_maude $(distdir)/maude.c
+liver-src:
+ grep dummy_liver $(srcdir)/liver.c
+liver-dist:
+ grep dummy_liver $(distdir)/liver.c
+liver-not-dist: distdir
+ test ! -r $(distdir)/liver.c
+maude-not-dist: distdir
+ test ! -r $(distdir)/maude.c
+maude-lib:
+ $(AR) t libtu.a | grep maude
+maude-not-lib:
+ $(AR) t libtu.a | grep maude && exit 1; exit 0
+liver-lib:
+ $(AR) t libtu.a | grep liver
+liver-not-lib:
+ $(AR) t libtu.a | grep liver && exit 1; exit 0
+END
+
+cat > maude.c << 'END'
+extern int dummy_maude;
+END
+
+cat > liver.c << 'END'
+extern int dummy_liver;
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AC_LIBOBJ([maude])
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist maude-lib liver-not-dist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+# Avoid timestamp-related differences.
+rm -rf autom4te*.cache
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-src liver-dist
+if MAUDE_COND
+extra_checks += maude-lib liver-not-lib
+else
+extra_checks += maude-not-lib liver-lib
+endif
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AM_CONDITIONAL([MAUDE_COND], [test x"$MAUDE" = x"yes"])\
+if test x"$MAUDE" = x"yes"; then\
+ AC_LIBOBJ([maude])\
+else\
+ AC_LIBOBJ([liver])\
+fi\
+AC_LIBSOURCES([maude.c, liver.c])
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure MAUDE=yes
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+./configure MAUDE=no
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+:
diff --git a/tests/libobj16b.test b/tests/libobj16b.test
new file mode 100755
index 000000000..1039558e0
--- /dev/null
+++ b/tests/libobj16b.test
@@ -0,0 +1,138 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure AC_LIBOBJ and friends work.
+# Please keep this in sync with sister test `libobj16b.test'.
+
+. ./defs || Exit 1
+
+mv configure.in configure.proto
+cat >> configure.proto << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+%LIBOBJ-STUFF% # will be activated later
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = @LIBOBJS@
+
+include extra-checks.am
+.PHONY: $(extra_checks) pre-test
+
+pre-test: distdir
+ ls -l $(srcdir) $(builddir) $(distdir)
+ $(AR) tv libtu.a
+$(extra_checks): pre-test
+check-local: $(extra_checks)
+
+maude-src:
+ grep dummy_maude $(srcdir)/maude.c
+maude-dist:
+ grep dummy_maude $(distdir)/maude.c
+liver-src:
+ grep dummy_liver $(srcdir)/liver.c
+liver-dist:
+ grep dummy_liver $(distdir)/liver.c
+liver-not-dist: distdir
+ test ! -r $(distdir)/liver.c
+maude-not-dist: distdir
+ test ! -r $(distdir)/maude.c
+maude-lib:
+ $(AR) t libtu.a | grep maude
+maude-not-lib:
+ $(AR) t libtu.a | grep maude && exit 1; exit 0
+liver-lib:
+ $(AR) t libtu.a | grep liver
+liver-not-lib:
+ $(AR) t libtu.a | grep liver && exit 1; exit 0
+END
+
+cat > maude.c << 'END'
+extern int dummy_maude;
+END
+
+cat > liver.c << 'END'
+extern int dummy_liver;
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AC_LIBOBJ(maude) dnl: do not quote this!
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist maude-lib liver-not-dist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+# Avoid timestamp-related differences.
+rm -rf autom4te*.cache
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-src liver-dist
+if MAUDE_COND
+extra_checks += maude-lib liver-not-lib
+else
+extra_checks += maude-not-lib liver-lib
+endif
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AM_CONDITIONAL([MAUDE_COND], [test x"$MAUDE" = x"yes"])\
+if test x"$MAUDE" = x"yes"; then\
+ AC_LIBOBJ(maude) dnl: do not quote this!\
+else\
+ AC_LIBOBJ(liver) dnl: do not quote this!\
+fi\
+AC_LIBSOURCE(maude.c) dnl: do not quote this!\
+AC_LIBSOURCE(liver.c) dnl: do not quote this!
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure MAUDE=yes
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+./configure MAUDE=no
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+:
diff --git a/tests/libobj17.test b/tests/libobj17.test
new file mode 100755
index 000000000..4f9db57f9
--- /dev/null
+++ b/tests/libobj17.test
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure AC_LIBOBJ accept non-literal arguments.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+foo=${FOO-oops}
+AC_LIBSOURCES([quux.c, zardoz.c])
+AC_LIBOBJ([$foo])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+cat > quux.c <<'END'
+extern int dummy;
+END
+
+cat > zardoz.c <<'END'
+extern int dummy;
+END
+
+# These might print warnings, but should not error out.
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure FOO=quux
+$MAKE
+ls -l # for debugging
+test -f libtu.a
+ar t libtu.a | $FGREP quux
+ar t libtu.a | $FGREP zardoz && Exit 1
+
+$MAKE distclean
+
+./configure FOO=zardoz
+$MAKE
+ls -l # for debugging
+test -f libtu.a
+ar t libtu.a | $FGREP zardoz
+ar t libtu.a | $FGREP quux && Exit 1
+
+:
diff --git a/tests/libobj18.test b/tests/libobj18.test
new file mode 100755
index 000000000..5fba7804f
--- /dev/null
+++ b/tests/libobj18.test
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure AC_LIBSOURCE and AC_LIBSOURCES use arguments literally.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+foo=dummy bar=dummy baz=dummy
+AC_LIBSOURCE([$foo.c])
+AC_LIBSOURCES([$bar.c, $baz.c])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+: > dummy.c
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*\$foo\.c.*not found' stderr
+grep 'configure\.in:.*required file.*\$bar\.c.*not found' stderr
+grep 'configure\.in:.*required file.*\$baz\.c.*not found' stderr
+
+:
diff --git a/tests/libobj19.test b/tests/libobj19.test
new file mode 100755
index 000000000..bc495b5b5
--- /dev/null
+++ b/tests/libobj19.test
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test support for AC_CONFIG_LIBOBJ_DIR.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBOBJ([foobar])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+check-local: distdir
+ ls -l $(srcdir)/* $(builddir)/* $(distdir)/*
+ test -f libtu.a
+ test ! -r $(srcdir)/foobar.c
+ test -f $(srcdir)/libobj-dir/foobar.c
+ test ! -r $(distdir)/foobar.c
+ test -f $(distdir)/libobj-dir/foobar.c
+ $(AR) t libtu.a
+ $(AR) t libtu.a | grep foobar
+END
+
+mkdir libobj-dir
+cat > libobj-dir/foobar.c << 'END'
+extern int dummy;
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/tests/libobj2.test b/tests/libobj2.test
index 81b0e7222..66ca0d04e 100755
--- a/tests/libobj2.test
+++ b/tests/libobj2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2010, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,13 +20,24 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
AC_PROG_CC
AC_PROG_RANLIB
+AC_CHECK_TOOLS([AR], [ar])
AC_LIBOBJ([fsusage])
-AC_OUTPUT(subdir/Makefile)
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = subdir
+check-local: distdir
+ ls -l $(srcdir) $(srcdir)/subdir
+ ls -l $(distdir) $(distdir)/subdir
+ ls -l $(builddir) $(builddir)/subdir
+ test -f $(srcdir)/subdir/fsusage.c
+ test -f $(distdir)/subdir/fsusage.c
+ $(AR) tv $(builddir)/subdir/libtu.a
END
mkdir subdir
@@ -37,9 +48,20 @@ libtu_a_SOURCES =
libtu_a_LIBADD = @LIBOBJS@
END
-: > subdir/fsusage.c
+cat > subdir/fsusage.c << 'END'
+extern int dummy;
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+# Older grepping check, kept "just to be sure".
+$FGREP 'fsusage.c' subdir/Makefile.in
+
+./configure
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$MAKE check
+$MAKE distcheck
-grep 'fsusage\.c' subdir/Makefile.in
+:
diff --git a/tests/libobj20a.test b/tests/libobj20a.test
new file mode 100755
index 000000000..2f90c843c
--- /dev/null
+++ b/tests/libobj20a.test
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests `libobj20b.test' and `libobj20c.test' .
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBOBJ([foo])
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+mkdir libobj-dir
+: > libobj-dir/foo.c
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'LIBOBJS.*used outside.*libobj-dir' stderr
+grep 'subdir-objects.*not set' stderr
+
+:
diff --git a/tests/libobj20b.test b/tests/libobj20b.test
new file mode 100755
index 000000000..d130a8abe
--- /dev/null
+++ b/tests/libobj20b.test
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests `libobj20a.test' and `libobj20c.test' .
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBSOURCE([foobar.c])
+# NOTE: this call to AC_OUTPUT is really needed; see Automake bug #7635
+# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7635>
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails
+grep 'configure\.in:.*required directory.*libobj-dir' stderr
+
+mkdir libobj-dir
+: > foobar.c # oops, it should be in libobj-dir...
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*libobj-dir/foobar.c.*' stderr
+
+rm -f foobar.c
+
+: > libobj-dir/foobar.c
+$AUTOMAKE # now we should succeed
+
+:
diff --git a/tests/libobj20c.test b/tests/libobj20c.test
new file mode 100755
index 000000000..1fb1f9d97
--- /dev/null
+++ b/tests/libobj20c.test
@@ -0,0 +1,51 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests `libobj20a.test' and `libobj20b.test' .
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBOBJ([foobar])
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails
+grep 'configure\.in:.*required directory.*\./libobj-dir' stderr
+
+mkdir libobj-dir
+: > foobar.c # oops, it should be in libobj-dir!
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*libobj-dir/foobar.c.*' stderr
+
+rm -f foobar.c
+
+: > libobj-dir/foobar.c
+$AUTOMAKE # now we should succeed
+
+:
diff --git a/tests/libobj3.test b/tests/libobj3.test
index 0aeced91b..04d4405b1 100755
--- a/tests/libobj3.test
+++ b/tests/libobj3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,12 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure we complain if @LIBOBJS@ is used without being set in configure.in
+# Make sure we complain if @LIBOBJS@ is used without being set in
+# configure.in.
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_RANLIB
END
@@ -32,4 +32,6 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep 'Makefile.am:3:.*LIBOBJS' stderr
+grep 'Makefile\.am:3:.*LIBOBJS' stderr
+
+:
diff --git a/tests/libobj4.test b/tests/libobj4.test
index d6639be58..8852262dd 100755
--- a/tests/libobj4.test
+++ b/tests/libobj4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,8 +26,10 @@ END
cat >> configure.in << 'END'
AC_PROG_CC
-AC_REPLACE_FUNCS(foo)
+AC_REPLACE_FUNCS([foo])
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/libobj5.test b/tests/libobj5.test
index 6add9e37a..d92aca159 100755
--- a/tests/libobj5.test
+++ b/tests/libobj5.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,11 +28,13 @@ END
cat >> configure.in << 'END'
AC_PROG_CC
AC_REPLACE_FUNCS(\
- foo)
+ foo_bar_quux)
END
-: > foo.c
+: > foo_bar_quux.c
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$FGREP foo.c Makefile.in
+$ACLOCAL
+$AUTOMAKE
+$FGREP foo_bar_quux.c Makefile.in
+
+:
diff --git a/tests/libobj7.test b/tests/libobj7.test
index 73a8ab0e2..b7556b70b 100755
--- a/tests/libobj7.test
+++ b/tests/libobj7.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,33 +19,53 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
-AC_REPLACE_FUNCS(basename dirname strsignal)
-AC_OUTPUT(Makefile)
+# `am__dummy_function' is there to ensure that at least one function is
+# replaced, to avoid creating an empty archive which can cause problems
+# with e.g. Solaris ar.
+AC_REPLACE_FUNCS([basename dirname am__dummy_function])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
noinst_LIBRARIES = libtu.a
libtu_a_SOURCES =
libtu_a_LIBADD = @LIBOBJS@
+check-local: test1 test2 test3
+.PHONY: test1 test2 test3
+test1: all
+ $(AR) tv libtu.a
+test2:
+ @echo DIST_COMMON = $(DIST_COMMON)
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]basename\.c '
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]dirname\.c '
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]am__dummy_function\.c '
+test3: distdir
+ test -f $(distdir)/basename.c
+ test -f $(distdir)/dirname.c
+ test -f $(distdir)/am__dummy_function.c
END
-: > basename.c
-: > dirname.c
-: > strsignal.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-sed -n -e ': again
- /^DIST_COMMON.*[^\]$/ p
- /^DIST_COMMON/ {
- s/^DIST_COMMON//p
- n
- s/^/DIST_COMMON/
- b again
- }' < Makefile.in | $FGREP dirname.c
+cat > basename.c <<'END'
+extern int dummy1;
+END
+cat > dirname.c <<'END'
+extern int dummy2;
+END
+cat > am__dummy_function.c <<'END'
+extern int dummy3;
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/tests/libobj8.test b/tests/libobj8.test
index c06746bef..97c8403fa 100755
--- a/tests/libobj8.test
+++ b/tests/libobj8.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,15 +20,13 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_RANLIB
AC_REPLACE_FUNCS(basename dirname strsignal)
AM_C_PROTOTYPES
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -44,7 +43,9 @@ END
: > ansi2knr.1
: > ansi2knr.c
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-grep 'strsignal_.c:' Makefile.in
+$FGREP 'strsignal_.c:' Makefile.in
+
+:
diff --git a/tests/library.test b/tests/library.test
index 1e2b58b9e..e3a981397 100755
--- a/tests/library.test
+++ b/tests/library.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2008, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,5 +31,7 @@ lib_LIBRARIES = libfoo.a
libfoo_a_DEPENDENCIES = libzot.a
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/library2.test b/tests/library2.test
index 0dbff2899..69f387a76 100755
--- a/tests/library2.test
+++ b/tests/library2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
EXTRA_LIBRARIES = libfoo.a
END
diff --git a/tests/library3.test b/tests/library3.test
index 9d30d87ea..8e3a0c93c 100755
--- a/tests/library3.test
+++ b/tests/library3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
AM_CONDITIONAL([A], [:])
diff --git a/tests/libtoo10.test b/tests/libtoo10.test
index 51a68d487..72310bb72 100755
--- a/tests/libtoo10.test
+++ b/tests/libtoo10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=libtoolize
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_LIBTOOL
AC_OUTPUT
diff --git a/tests/libtoo11.test b/tests/libtoo11.test
index 850ca8203..4cfcda5bd 100755
--- a/tests/libtoo11.test
+++ b/tests/libtoo11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=libtoolize
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_LIBTOOL
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
diff --git a/tests/libtool.test b/tests/libtool.test
index dd2a939c1..e88c2084b 100755
--- a/tests/libtool.test
+++ b/tests/libtool.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,6 +16,7 @@
# Make sure libtool is removed.
# Report from Kevin Dalley
+
required=libtool
. ./defs || Exit 1
@@ -23,7 +24,7 @@ cat >> configure.in << 'END'
AC_LIBTOOL_DLOPEN
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
+AC_SUBST([LIBTOOL_DEPS])
END
: > Makefile.am
@@ -32,7 +33,9 @@ END
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'rm -f libtool' Makefile.in
+
+:
diff --git a/tests/libtool2.test b/tests/libtool2.test
index a50f6a444..6e268dd60 100755
--- a/tests/libtool2.test
+++ b/tests/libtool2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,20 +16,14 @@
# Make sure libtool clean targets exist.
# Report from Eric Magnien.
+
required=libtoolize
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(mypackage,0.1)
-
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
-
-AC_CONFIG_FILES([
- sub/Makefile
- Makefile
-])
+AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
@@ -45,8 +39,10 @@ lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = foo.c
END
-$ACLOCAL || Exit 1
+$ACLOCAL
: > ltmain.sh
-$AUTOMAKE -a || Exit 1
+$AUTOMAKE -a
grep 'rm -f .*\.lo' sub/Makefile.in
+
+:
diff --git a/tests/libtool3.test b/tests/libtool3.test
index 3427f2892..3a6a40eab 100755
--- a/tests/libtool3.test
+++ b/tests/libtool3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='libtoolize gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_LIBTOOL
diff --git a/tests/libtool4.test b/tests/libtool4.test
index 9f6a7301e..22d0cb5f7 100755
--- a/tests/libtool4.test
+++ b/tests/libtool4.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'END'
AC_PROG_CC
END
diff --git a/tests/libtool5.test b/tests/libtool5.test
index c7f0476db..4bec20d09 100755
--- a/tests/libtool5.test
+++ b/tests/libtool5.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required='libtoolize'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_CONDITIONAL([COND1], [true])
AM_CONDITIONAL([COND2], [false])
diff --git a/tests/libtool6.test b/tests/libtool6.test
index ad01b149a..a17e4ee8f 100755
--- a/tests/libtool6.test
+++ b/tests/libtool6.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='libtoolize'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_CONDITIONAL([COND1], [true])
AM_CONDITIONAL([COND2], [false])
diff --git a/tests/libtool7.test b/tests/libtool7.test
index a2f912f43..afa9b1c57 100755
--- a/tests/libtool7.test
+++ b/tests/libtool7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='libtoolize gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_LIBTOOL_DLOPEN
diff --git a/tests/libtool8.test b/tests/libtool8.test
index a1bb88a5c..d539dc4f0 100755
--- a/tests/libtool8.test
+++ b/tests/libtool8.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='libtoolize'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_CONDITIONAL([COND1], [true])
AM_CONDITIONAL([COND2], [false])
diff --git a/tests/libtool9.test b/tests/libtool9.test
index c0d9688a8..ab03f580a 100755
--- a/tests/libtool9.test
+++ b/tests/libtool9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required='libtoolize gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/license.test b/tests/license.test
index 4a6979108..d0f936fb0 100755
--- a/tests/license.test
+++ b/tests/license.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=makeinfo
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >>configure.in
cat >Makefile.am <<\EOF
test1: distdir
diff --git a/tests/license2.test b/tests/license2.test
index 75f7811fd..34bfdf80b 100755
--- a/tests/license2.test
+++ b/tests/license2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = gnu
END
diff --git a/tests/link_c_cxx.test b/tests/link_c_cxx.test
index d1a093cce..fd3cdc3b9 100755
--- a/tests/link_c_cxx.test
+++ b/tests/link_c_cxx.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
diff --git a/tests/link_dist.test b/tests/link_dist.test
index 661d6831e..77c378563 100755
--- a/tests/link_dist.test
+++ b/tests/link_dist.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
diff --git a/tests/link_f90_only.test b/tests/link_f90_only.test
index 979eb673d..7afe52ce3 100755
--- a/tests/link_f90_only.test
+++ b/tests/link_f90_only.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_FC
END
diff --git a/tests/link_f_only.test b/tests/link_f_only.test
index c4df8cefb..5484f58c3 100755
--- a/tests/link_f_only.test
+++ b/tests/link_f_only.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_F77
END
diff --git a/tests/link_fc.test b/tests/link_fc.test
index 8c80f8c36..78a24577e 100755
--- a/tests/link_fc.test
+++ b/tests/link_fc.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_F77
diff --git a/tests/link_fccxx.test b/tests/link_fccxx.test
index 30263d01e..c60995547 100755
--- a/tests/link_fccxx.test
+++ b/tests/link_fccxx.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
diff --git a/tests/link_fcxx.test b/tests/link_fcxx.test
index c75ffc74c..75aee341e 100755
--- a/tests/link_fcxx.test
+++ b/tests/link_fcxx.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXX
AC_PROG_F77
diff --git a/tests/link_override.test b/tests/link_override.test
new file mode 100755
index 000000000..bcce05ab0
--- /dev/null
+++ b/tests/link_override.test
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure _LINK variables are detected and used as documented.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo bar baz boo
+foo_LINK = $(LINK)
+bar_LINK = $(LINK)
+bar_LDFLAGS = $(AM_LDFLAGS)
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+# We should use foo_LINK not LINK.
+grep '.\$(foo_LINK)' Makefile.in
+grep '.\$(LINK).*foo' Makefile.in && Exit 1
+
+# We should not override the user definition of bar_LINK.
+# IOW, bar_LDFLAGS is useless unless bar_LINK refers to it.
+grep '^ *bar_LINK *=.*bar_LDFLAGS' Makefile.in && Exit 1
+grep '.\$(bar_LINK).*bar' Makefile.in
+
+Exit 0
diff --git a/tests/lisp2.test b/tests/lisp2.test
index 2fccdb2ec..3b795dbfa 100755
--- a/tests/lisp2.test
+++ b/tests/lisp2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
echo 1
cat > Makefile.am << 'END'
diff --git a/tests/lisp3.test b/tests/lisp3.test
index 809d49103..a8a0fc36b 100755
--- a/tests/lisp3.test
+++ b/tests/lisp3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=emacs
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
lisp_LISP = am-one.el am-two.el am-three.el
EXTRA_DIST = am-one.el am-two.el
diff --git a/tests/lisp4.test b/tests/lisp4.test
index 080ab3bc5..3834746a1 100755
--- a/tests/lisp4.test
+++ b/tests/lisp4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=emacs
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
lisp_LISP = am-one.el am-two.el am-three.el
EXTRA_DIST = am-one.el am-two.el
diff --git a/tests/lisp5.test b/tests/lisp5.test
index e7b29e729..93ac9e132 100755
--- a/tests/lisp5.test
+++ b/tests/lisp5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=emacs
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
lisp_DATA = am-one.el am-two.el am-three.el
EXTRA_DIST = am-one.el am-two.el
diff --git a/tests/lisp6.test b/tests/lisp6.test
index f38653495..d42451189 100755
--- a/tests/lisp6.test
+++ b/tests/lisp6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=emacs
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el
if WANT_TWO
diff --git a/tests/lisp7.test b/tests/lisp7.test
index cf52527d8..ad231dd8b 100755
--- a/tests/lisp7.test
+++ b/tests/lisp7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el am-two.el am-three.el
EOF
diff --git a/tests/lisp8.test b/tests/lisp8.test
index 8a3edf2f4..afba76c45 100755
--- a/tests/lisp8.test
+++ b/tests/lisp8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='GNUmake emacs'
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el am-two.el am-three.el
EOF
diff --git a/tests/lispdry.test b/tests/lispdry.test
index 3bca21a31..e786ec33f 100755
--- a/tests/lispdry.test
+++ b/tests/lispdry.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='emacs non-root'
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el am-two.el am-three.el
EOF
diff --git a/tests/listval.test b/tests/listval.test
index 5ff75db4d..677fe3f0a 100755
--- a/tests/listval.test
+++ b/tests/listval.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,11 +17,12 @@
# Test to make sure variable is expanded properly.
# From Adam J. Richter.
+
required=libtool
. ./defs || Exit 1
cat >> configure.in << 'END'
-AC_SUBST(LTLIBOBJS)
+AC_SUBST([LTLIBOBJS])
AC_PROG_LIBTOOL
END
@@ -37,5 +39,7 @@ END
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/location.test b/tests/location.test
index 13a21836a..9013e31d9 100755
--- a/tests/location.test
+++ b/tests/location.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([COND1], [true])
AM_CONDITIONAL([COND2], [true])
@@ -45,29 +43,35 @@ VAR = 1 \
END
$ACLOCAL
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-error
# Smash the useless difference of lib file locations.
sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
cat >expected <<\EOF
-Makefile.am:12: VAR multiply defined in condition TRUE ...
+Makefile.am:12: warning: VAR multiply defined in condition TRUE ...
Makefile.am:8: ... `VAR' previously defined here
-automake: libfoo_a_OBJECTS should not be defined
+automake: error: libfoo_a_OBJECTS should not be defined
Makefile.am:3: while processing library `libfoo.a'
-automake: use `libfoo_a_LDADD', not `libfoo_a_LIBADD'
+automake: error: use `libfoo_a_LDADD', not `libfoo_a_LIBADD'
Makefile.am:3: while processing library `libfoo.a'
-library.am: deprecated feature: target `libfoo.a' overrides `libfoo.a$(EXEEXT)'
+library.am: warning: deprecated feature: target `libfoo.a' overrides `libfoo.a$(EXEEXT)'
library.am: change your target to read `libfoo.a$(EXEEXT)'
Makefile.am:3: while processing library `libfoo.a'
program.am: target `libfoo.a$(EXEEXT)' was defined here
Makefile.am:1: while processing program `libfoo.a'
-program.am: redefinition of `libfoo.a$(EXEEXT)'...
+program.am: warning: redefinition of `libfoo.a$(EXEEXT)' ...
Makefile.am:1: while processing program `libfoo.a'
library.am: ... `libfoo.a' previously defined here
Makefile.am:3: while processing library `libfoo.a'
-tags.am: redefinition of `ctags'...
+tags.am: warning: redefinition of `ctags' ...
program.am: ... `ctags$(EXEEXT)' previously defined here
Makefile.am:6: while processing program `ctags'
EOF
diff expected observed || Exit 1
+
+AUTOMAKE_fails -Werror
+sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
+( echo 'automake: warnings are treated as errors'; cat expected ) \
+ | diff - observed || Exit 1
+:
diff --git a/tests/longlin2.test b/tests/longlin2.test
index 2d81afa92..1d30b285a 100755
--- a/tests/longlin2.test
+++ b/tests/longlin2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
n=1
files=
match=
diff --git a/tests/longline.test b/tests/longline.test
index aefd9a88c..77f6e1e4d 100755
--- a/tests/longline.test
+++ b/tests/longline.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
(echo DUMMY = some_long_filename_1;
for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20;
do
diff --git a/tests/ltcond.test b/tests/ltcond.test
index 0350a3d8a..8ede51b22 100755
--- a/tests/ltcond.test
+++ b/tests/ltcond.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='libtoolize gcc'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_CONDITIONAL([WANT_LIBFOO], [true])
AM_CONDITIONAL([WANT_LIBBAR], [false])
diff --git a/tests/ltcond2.test b/tests/ltcond2.test
index 1687513cd..d4bf0647b 100755
--- a/tests/ltcond2.test
+++ b/tests/ltcond2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='libtoolize gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/ltconv.test b/tests/ltconv.test
index 0ec2132d2..2ea2705eb 100755
--- a/tests/ltconv.test
+++ b/tests/ltconv.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='libtoolize gcc'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/ltdeps.test b/tests/ltdeps.test
index 43d0ae3cf..3c41ec317 100755
--- a/tests/ltdeps.test
+++ b/tests/ltdeps.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=libtool
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_LIBTOOL
AC_PROG_CXX
diff --git a/tests/ltinstloc.test b/tests/ltinstloc.test
index bb3203af1..dd1c5d6fd 100755
--- a/tests/ltinstloc.test
+++ b/tests/ltinstloc.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='libtoolize'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_PROG_CC
AC_PROG_LIBTOOL
@@ -49,13 +47,13 @@ AUTOMAKE_fails --add-missing
# whether automake installs config.guess and config.sub.
cat >expected <<'END'
-Makefile.am:5: sub/liba2.la multiply defined in condition COND
+Makefile.am:5: error: sub/liba2.la multiply defined in condition COND
Makefile.am:5: `sub/liba2.la' should be installed below `lib' in condition COND ...
Makefile.am:2: ... and should also be installed in `lib' in condition COND.
-Makefile.am:4: liba1.la multiply defined in condition COND
+Makefile.am:4: error: liba1.la multiply defined in condition COND
Makefile.am:4: `liba1.la' should be installed in `pkglib' in condition COND ...
Makefile.am:2: ... and should also be installed in `lib' in condition COND.
-Makefile.am:2: Libtool libraries can be built for only one destination.
+Makefile.am:2: Libtool libraries can be built for only one destination
END
grep '^Makefile.am' stderr | diff - expected
diff --git a/tests/ltlibobjs.test b/tests/ltlibobjs.test
index fd6647324..9a3d830b5 100755
--- a/tests/ltlibobjs.test
+++ b/tests/ltlibobjs.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +21,7 @@ required=libtool
. ./defs || Exit 1
cat >> configure.in << 'END'
-AC_SUBST(LTLIBOBJS)
+AC_SUBST([LTLIBOBJS])
AC_PROG_LIBTOOL
END
@@ -35,5 +36,7 @@ END
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/ltlibsrc.test b/tests/ltlibsrc.test
index 2c9911d0f..78ac8e2f7 100755
--- a/tests/ltlibsrc.test
+++ b/tests/ltlibsrc.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='libtool gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/ltorder.test b/tests/ltorder.test
index 0f6921136..c41134137 100755
--- a/tests/ltorder.test
+++ b/tests/ltorder.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='libtoolize'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/lzip.test b/tests/lzip.test
new file mode 100755
index 000000000..481474343
--- /dev/null
+++ b/tests/lzip.test
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check support for no-dist-gzip with lzip
+
+required=lzip
+. ./defs || Exit 1
+
+cat > configure.in << 'END'
+AC_INIT([lzip], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-lzip])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+test: distcheck
+ test $(DIST_ARCHIVES) = lzip-1.0.tar.lz
+ test -f $(DIST_ARCHIVES)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test
diff --git a/tests/lzma.test b/tests/lzma.test
index 11bb93df3..97908d2fd 100755
--- a/tests/lzma.test
+++ b/tests/lzma.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=lzma
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([lzma], [1.0])
AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma])
diff --git a/tests/m4-inclusion.test b/tests/m4-inclusion.test
index 025d44fec..927f5212a 100755
--- a/tests/m4-inclusion.test
+++ b/tests/m4-inclusion.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2005, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,27 +26,28 @@ sinclude([doesntexist.m4])
EOF
mkdir sub
+
cat > sub/p.m4 << 'END'
-AC_SUBST(MAGICALPIG)
+AC_SUBST([MAGICALPIG])
END
cat > sub/h.m4 << 'END'
-AC_SUBST(MAGICALHOG)
+AC_SUBST([MAGICALHOG])
END
cat > sub/g.m4 << 'END'
-AC_SUBST(GREPME)
+AC_SUBST([GREPME])
END
: > Makefile.am
-echo 'sinclude(sub/g.m4)' >> acinclude.m4
-echo 'm4_sinclude(sub/doesntexist.m4)' >> acinclude.m4
+echo 'sinclude([sub/g.m4])' >> acinclude.m4
+echo 'm4_sinclude([sub/doesntexist.m4])' >> acinclude.m4
$ACLOCAL
-echo 'm4_sinclude(sub/p.m4)' >> aclocal.m4
-echo 'm4_include(sub/h.m4)' >> aclocal.m4
+echo 'm4_sinclude([sub/p.m4])' >> aclocal.m4
+echo 'm4_include([sub/h.m4])' >> aclocal.m4
$AUTOMAKE
@@ -53,3 +55,5 @@ grep doesntexist Makefile.in && Exit 1
grep MAGICALPIG Makefile.in
grep MAGICALHOG Makefile.in
grep GREPME Makefile.in
+
+:
diff --git a/tests/maintclean.test b/tests/maintclean.test
index 9e2246393..aeda04c30 100755
--- a/tests/maintclean.test
+++ b/tests/maintclean.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([bar sub/Makefile])
AC_OUTPUT
diff --git a/tests/make.test b/tests/make.test
index 1e3184ddd..eb4656a71 100755
--- a/tests/make.test
+++ b/tests/make.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,17 +20,13 @@
required=GNUmake
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(foo,0,no)
+cat >> configure.in << 'END'
AM_MAKE_INCLUDE
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
: > Makefile.am
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE
@@ -45,14 +41,11 @@ export AUTOMAKE
save="$MAKE"
for flag in '' -w; do
MAKE="$save $flag" ./configure
-
$FGREP 'am__include = include' Makefile
-
+ $sleep
touch configure.in
$MAKE $flag
-
$FGREP 'am__include = include' Makefile
-
rm -f config.cache
done
diff --git a/tests/makej.test b/tests/makej.test
index e5d55a107..e54c14426 100755
--- a/tests/makej.test
+++ b/tests/makej.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,11 +24,9 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
-cat >configure.in <<'END'
+cat >configure.in <<END
m4_include([version.m4])
-AC_INIT([version7], [THE_VERSION])
+AC_INIT([$me], [THE_VERSION])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile])
@@ -51,3 +49,5 @@ $sleep
echo 'm4_define([THE_VERSION], [3.141])' > version.m4
$MAKE -j
./configure --version | grep '3\.141'
+
+:
diff --git a/tests/makej2.test b/tests/makej2.test
index e7029990b..2adc75aba 100755
--- a/tests/makej2.test
+++ b/tests/makej2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_OUTPUT
END
diff --git a/tests/maken.test b/tests/maken.test
index 8c78b97b3..aa6d598ee 100755
--- a/tests/maken.test
+++ b/tests/maken.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >> configure.in << 'END'
diff --git a/tests/maken2.test b/tests/maken2.test
index 97bf7982f..eb330a23f 100755
--- a/tests/maken2.test
+++ b/tests/maken2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >> configure.in << 'END'
diff --git a/tests/maken3.test b/tests/maken3.test
index b839d0da9..5a77f1a50 100755
--- a/tests/maken3.test
+++ b/tests/maken3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,8 +24,6 @@
. ./defs || Exit 1
-set -e
-
mkdir sub sub2
cat >> configure.in << 'END'
@@ -122,7 +120,6 @@ $AUTOCONF
check_targets ()
{
- set -e
for target in \
all install install-strip uninstall clean distclean check \
info html dvi pdf ps \
diff --git a/tests/maken4.test b/tests/maken4.test
index ae5ce27e2..5c2194371 100755
--- a/tests/maken4.test
+++ b/tests/maken4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
mkdir sub sub2
cat >> configure.in << 'END'
@@ -124,7 +122,6 @@ $AUTOCONF
check_targets ()
{
- set -e
for target in \
all install install-strip uninstall clean distclean check \
info html dvi pdf ps \
diff --git a/tests/makevars.test b/tests/makevars.test
index f4a80aaf9..e4943733a 100755
--- a/tests/makevars.test
+++ b/tests/makevars.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,14 +20,14 @@
. ./defs || Exit 1
# Find the macros wanted by Automake.
-$ACLOCAL || Exit 1
+$ACLOCAL
# Create some dummy Makefile.in.
: > Makefile.am
-$AUTOMAKE || Exit 1
+$AUTOMAKE
# We are definitely not needing a compiler or preprocessor.
-$EGREP '^(CC|CPP|CXX|CXXCPP) =' Makefile.in && Exit 1
+$EGREP '^ *(CC|CPP|CXX|CXXCPP) *=' Makefile.in && Exit 1
-Exit 0
+:
diff --git a/tests/man.test b/tests/man.test
index 93b3bb2c3..3e326ead2 100755
--- a/tests/man.test
+++ b/tests/man.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,6 +27,8 @@ END
: > foo.1
: > bar.man
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-grep '^MANS ' Makefile.in
+$ACLOCAL
+$AUTOMAKE
+grep '^MANS *=' Makefile.in
+
+:
diff --git a/tests/man2.test b/tests/man2.test
index 0027645de..a4d181569 100755
--- a/tests/man2.test
+++ b/tests/man2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,9 +20,9 @@
. ./defs || Exit 1
-set -e
-
-echo AC_OUTPUT >> configure.in
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
man_MANS = foo.2
@@ -49,3 +50,5 @@ DESTDIR="`pwd`/_inst" $MAKE -e uninstall
test ! -f ./_inst/man/man2/foo.2
test ! -f ./_inst/man/man4/foo.4
test ! -f ./_inst/man/man4/bar.4
+
+:
diff --git a/tests/man3.test b/tests/man3.test
index b5afe0ea3..ff49d87fb 100755
--- a/tests/man3.test
+++ b/tests/man3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
dist_man_MANS = foo.1
installcheck-local:
@@ -42,3 +40,5 @@ $AUTOMAKE
$AUTOCONF
./configure
DISTCHECK_CONFIGURE_FLAGS=foo=bar $MAKE -e distcheck
+
+:
diff --git a/tests/man4.test b/tests/man4.test
index de75f8374..74acb3366 100755
--- a/tests/man4.test
+++ b/tests/man4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -33,8 +33,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
dist_man_MANS = $(srcdir)/foo.1 bar.1
dist_bin_SCRIPTS = foo bar
@@ -42,9 +40,6 @@ $(srcdir)/foo.1:
$(HELP2MAN) --output=$@ $(srcdir)/foo
bar.1:
$(HELP2MAN) --output=$(srcdir)/bar.1 $(srcdir)/bar
-
-## It is a bug that we need to list $(srcdir)/bar.1 explicitly here.
-MAINTAINERCLEANFILES = $(dist_man_MANS) $(srcdir)/bar.1
END
cat >>configure.in <<'END'
@@ -62,26 +57,38 @@ while test $# -gt 0; do
shift
done
END
-
cp foo bar
+chmod +x foo bar
-cat > help2man <<'END'
+mkdir bin
+cat > bin/help2man <<'END'
#! /bin/sh
# fake help2man script that lets `missing' think it is not installed
exit 127
END
+chmod +x bin/help2man
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH
-chmod +x foo bar help2man
-save_PATH=$PATH
-PATH=`pwd`$PATH_SEPARATOR$PATH
+grep_error_messages()
+{
+ grep ' man pages contain.*missing help2man.* replacement text' stderr \
+ && grep 'install help2man' stderr \
+ && grep 'regenerate the man pages' stderr \
+ || Exit 1
+}
$ACLOCAL
$AUTOMAKE
$AUTOCONF
+
./configure
$MAKE
-$MAKE dist && Exit 1
-$MAKE distcheck && Exit 1
+$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep_error_messages
+$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep_error_messages
$MAKE distclean
mkdir build
@@ -90,20 +97,9 @@ cd build
$MAKE
$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'install help2man' stderr
+grep_error_messages
$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep 'install help2man' stderr
-
-rm -f ../help2man
-PATH=$save_PATH
-export PATH
+grep_error_messages
-# If help2man is installed, then ensure that the recommendation works.
-if (help2man --version) >/dev/null 2>&1; then
- $MAKE maintainer-clean
- ../configure
- $MAKE
- $MAKE distcheck
-fi
:
diff --git a/tests/man5.test b/tests/man5.test
index 437dc3337..28bcff064 100755
--- a/tests/man5.test
+++ b/tests/man5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,9 @@
. ./defs || Exit 1
-set -e
-
-echo AC_OUTPUT >> configure.in
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
man_MANS = foo-1.4.5/foo.2 foo-1.4.5/bar.3 baz-1.4.2
diff --git a/tests/man6.test b/tests/man6.test
new file mode 100755
index 000000000..42a0f9af1
--- /dev/null
+++ b/tests/man6.test
@@ -0,0 +1,97 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure `make distcheck' passes when help2man generates man pages,
+# even if the `missing' script is involved.
+
+required=help2man
+. ./defs || Exit 1
+
+cat > Makefile.am << 'END'
+dist_man_MANS = $(srcdir)/foobar.1 bazquux.1 zardoz.1
+dist_bin_SCRIPTS = foobar bazquux zardoz
+$(srcdir)/foobar.1:
+ $(HELP2MAN) --output=$@ $(srcdir)/foobar
+bazquux.1:
+ $(HELP2MAN) --output=$@ $(srcdir)/bazquux
+zardoz.1:
+ $(HELP2MAN) --output=$(srcdir)/zardoz.1 $(srcdir)/zardoz
+END
+
+cat >> configure.in <<'END'
+AM_MISSING_PROG([HELP2MAN], [help2man])
+AC_OUTPUT
+END
+
+cat > foobar <<'END'
+#! /bin/sh
+while test $# -gt 0; do
+ case $1 in
+ -h | --help) echo "usage: $0 [OPTIONS]..."; exit 0;;
+ -v | --version) echo "$0 1.0"; exit 0;;
+ esac
+ shift
+done
+END
+
+cp foobar bazquux
+cp foobar zardoz
+
+chmod +x foobar bazquux zardoz
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+mkdir build
+cd build
+
+../configure
+# sanity check
+grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+
+$MAKE
+$FGREP foobar ../foobar.1
+$FGREP bazquux ./bazquux.1
+$FGREP zardoz ../zardoz.1
+
+$MAKE distdir
+$FGREP foobar $me-1.0/foobar.1
+$FGREP bazquux $me-1.0/bazquux.1
+$FGREP zardoz $me-1.0/zardoz.1
+
+$MAKE distcheck
+
+cd ..
+rm -f *.1 # remove leftover generated manpages
+
+./configure
+# sanity check
+grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+
+$MAKE
+$FGREP foobar foobar.1
+$FGREP bazquux bazquux.1
+$FGREP zardoz zardoz.1
+
+$MAKE distdir
+$FGREP foobar $me-1.0/foobar.1
+$FGREP bazquux $me-1.0/bazquux.1
+$FGREP zardoz $me-1.0/zardoz.1
+
+$MAKE distcheck
+
+:
diff --git a/tests/man7.test b/tests/man7.test
new file mode 100755
index 000000000..9f4f9ad1a
--- /dev/null
+++ b/tests/man7.test
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check for a bug in maintainer-clean w.r.t. generated manpages.
+
+. ./defs || Exit 1
+
+cat > Makefile.am << 'END'
+dist_man_MANS = $(srcdir)/foo.1 bar.1
+$(srcdir)/foo.1 bar.1:
+ : > $@
+MAINTAINERCLEANFILES = $(dist_man_MANS)
+END
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+
+$MAKE
+test -f bar.1
+test -f ../foo.1
+
+$MAKE maintainer-clean
+test ! -f bar.1
+test ! -f ../foo.1
+
+cd ..
+./configure
+
+$MAKE
+test -f bar.1
+test -f foo.1
+
+$MAKE maintainer-clean
+test ! -f bar.1
+test ! -f foo.1
+
+:
diff --git a/tests/man8.test b/tests/man8.test
new file mode 100755
index 000000000..91d6cacc8
--- /dev/null
+++ b/tests/man8.test
@@ -0,0 +1,57 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check for a bug in distcheck w.r.t. generated manpages.
+
+. ./defs || Exit 1
+
+cat > Makefile.am << 'END'
+dist_man_MANS = foo.1
+foo.1:
+## this 'rm' command will fail if $(srcdir) is unwritable
+ rm -f $(srcdir)/$@
+ : > $(srcdir)/$@
+END
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+
+$MAKE
+test -f ../foo.1
+$MAKE distdir
+test -f $me-1.0/foo.1
+$MAKE distcheck
+
+cd ..
+rm -f foo.1
+./configure
+
+$MAKE
+test -f foo.1
+$MAKE distdir
+test -f $me-1.0/foo.1
+$MAKE distcheck
+
+:
diff --git a/tests/mclean.test b/tests/mclean.test
index dcbe8184d..07ae0fef3 100755
--- a/tests/mclean.test
+++ b/tests/mclean.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,7 +26,9 @@ END
: > FOO
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'rm -f .*MAINTAINERCLEANFILES' Makefile.in
+
+:
diff --git a/tests/mdate.test b/tests/mdate.test
index 0dfba07e3..5d7810e52 100755
--- a/tests/mdate.test
+++ b/tests/mdate.test
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
END
diff --git a/tests/mdate2.test b/tests/mdate2.test
index 11b6d5dff..c577031cb 100755
--- a/tests/mdate2.test
+++ b/tests/mdate2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,7 +33,9 @@ END
echo '@setfilename textutils' > textutils.texi
# Use "././" to confuse Automake into thinking this is a subdir build.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
grep 'mdate-sh' Makefile.in | grep -v SHELL
+
+:
diff --git a/tests/mdate3.test b/tests/mdate3.test
index 75105f92f..970bd5460 100755
--- a/tests/mdate3.test
+++ b/tests/mdate3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2004, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,8 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT([mdate3], [1.0])
+cat > configure.in << END
+AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([foo])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
@@ -41,11 +42,9 @@ mkdir foo
: > foo/mdate-sh
mv install-sh foo
mv missing foo
-mv mkinstalldirs foo
-mv depcomp foo
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '[^/]mdate-sh' Makefile.in && Exit 1
Exit 0
diff --git a/tests/mdate4.test b/tests/mdate4.test
index ca24f5641..c1052a3d2 100755
--- a/tests/mdate4.test
+++ b/tests/mdate4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,10 +19,8 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
END
cat > Makefile.am << 'END'
@@ -40,6 +38,9 @@ cat > sub/textutils.texi << 'END'
@setfilename textutils.info
END
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOMAKE -a
+ls -l sub
test -f sub/mdate-sh
+
+:
diff --git a/tests/mdate5.test b/tests/mdate5.test
index c9140b660..dc6ede125 100755
--- a/tests/mdate5.test
+++ b/tests/mdate5.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2004, 2007 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2004, 2007, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
# Test to make sure mdate-sh works correctly.
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/mdate6.test b/tests/mdate6.test
index e7f7d69ca..17672ee7c 100755
--- a/tests/mdate6.test
+++ b/tests/mdate6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,13 +18,11 @@
. ./defs || Exit 1
-set -e
-
a=
file='file name $a'
( : > "$file" ) || Exit 77
-cp "$testsrcdir"/../lib/mdate-sh .
+cp "$top_testsrcdir/lib/mdate-sh" .
$SHELL ./mdate-sh "$file" >stdout 2>stderr ||
{ cat stdout; cat stderr >&2; Exit 1; }
cat stdout
diff --git a/tests/missing.test b/tests/missing.test
index eaf6f54c3..2e6d8d382 100755
--- a/tests/missing.test
+++ b/tests/missing.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2006, 2007, 2008 Free Software Foundation,
-# Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AC_OUTPUT
EOF
diff --git a/tests/missing2.test b/tests/missing2.test
index 2629198dd..88e6b27a6 100755
--- a/tests/missing2.test
+++ b/tests/missing2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
m4_include([v.m4])
AC_OUTPUT
diff --git a/tests/missing3.test b/tests/missing3.test
index 54044f561..21b5e4fa7 100755
--- a/tests/missing3.test
+++ b/tests/missing3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
# b7cb8259 assumed not to exist.
./missing b7cb8259 --version 2>stderr && { cat stderr >&2; Exit 1; }
diff --git a/tests/missing4.test b/tests/missing4.test
index 13a4c224e..767794a9d 100755
--- a/tests/missing4.test
+++ b/tests/missing4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2008, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >>configure.in
touch Makefile.am
diff --git a/tests/missing5.test b/tests/missing5.test
index a96e14eea..010b344d2 100755
--- a/tests/missing5.test
+++ b/tests/missing5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
# these programs may be invoked by `missing'
needed_tools='chmod find sed test touch'
needed_tools_csep=`echo $needed_tools | sed 's/ /, /g'`
diff --git a/tests/missing6.test b/tests/missing6.test
index e543697c9..2e257f157 100755
--- a/tests/missing6.test
+++ b/tests/missing6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
{
echo 'm4_define([AC_AUTOCONF_VERSION], [9999a])'
echo 'dnl!! m4_define([a], [oops])'
diff --git a/tests/mkinst2.test b/tests/mkinst2.test
index 359f56275..3058803ee 100755
--- a/tests/mkinst2.test
+++ b/tests/mkinst2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2007, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/mkinst3.test b/tests/mkinst3.test
index 20b9b0464..8d9efe708 100755
--- a/tests/mkinst3.test
+++ b/tests/mkinst3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,14 +18,12 @@
. ./defs || Exit 1
-set -e
-
# Make sure the directory we will create can be created...
mkdir '~a b' || Exit 77
mkdir '~a b/-x y' || Exit 77
rm -rf '~a b'
-cp "$testsrcdir/../lib/mkinstalldirs" .
+cp "$top_testsrcdir/lib/mkinstalldirs" .
# Test mkinstalldirs with the installed mkdir.
diff --git a/tests/mkinstall.test b/tests/mkinstall.test
index 4a65307af..1f1bac863 100755
--- a/tests/mkinstall.test
+++ b/tests/mkinstall.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,8 +25,8 @@ END
# The "././" prefix confuses Automake into thinking it is doing a
# subdir build. Yes, this is hacky.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
grep ' /mkinstalldirs' Makefile.in && Exit 1
Exit 0
diff --git a/tests/mmode.test b/tests/mmode.test
index c5a16c980..1dd64e783 100755
--- a/tests/mmode.test
+++ b/tests/mmode.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_MAINTAINER_MODE
AC_OUTPUT
diff --git a/tests/mmodely.test b/tests/mmodely.test
index fc94d3783..03c5d0f9a 100755
--- a/tests/mmodely.test
+++ b/tests/mmodely.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2004, 2006, 2007, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2004, 2006, 2007, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_MAINTAINER_MODE
AC_PROG_CC
diff --git a/tests/multlib.test b/tests/multlib.test
index 3f88be30a..e2ab6f337 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
required='gcc GNUmake'
. ./defs || Exit 1
-set -e
-
cat >configure.in <<'END'
AC_INIT([multlib], [1.0])
AC_CONFIG_SRCDIR(libfoo/foo.c)
@@ -107,8 +106,8 @@ mkdir libbar/sub
: > libbar/bar.c
-cp "$testsrcdir/../lib/config-ml.in" .
-cp "$testsrcdir/../lib/symlink-tree" .
+cp "$top_testsrcdir/lib/config-ml.in" .
+cp "$top_testsrcdir/lib/symlink-tree" .
$ACLOCAL
$AUTOCONF
diff --git a/tests/no-outdir-option.test b/tests/no-outdir-option.test
new file mode 100755
index 000000000..85921fc93
--- /dev/null
+++ b/tests/no-outdir-option.test
@@ -0,0 +1,29 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the `-o' aka `--output-dir' option is not recognized anymore.
+
+. ./defs || Exit 1
+
+: > Makefile.am
+
+AUTOMAKE_fails -Wno-error --output-dir=foo
+grep 'unrecognized option.*--output-dir' stderr
+
+AUTOMAKE_fails -Wno-error -o foo
+grep 'unrecognized option.*-o' stderr
+
+:
diff --git a/tests/nobase-libtool.test b/tests/nobase-libtool.test
index 12b055ec9..15d1b4994 100755
--- a/tests/nobase-libtool.test
+++ b/tests/nobase-libtool.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required='libtoolize gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/nobase-python.test b/tests/nobase-python.test
index db5b83076..c869b85ad 100755
--- a/tests/nobase-python.test
+++ b/tests/nobase-python.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=python
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AM_PATH_PYTHON
AC_OUTPUT
@@ -32,6 +30,7 @@ my_PYTHON = one.py sub/base.py
nobase_my_PYTHON = two.py sub/nobase.py
test-install-data: install-data
+ find inst -print; : for debugging
test -f inst/my/one.py
test -f inst/my/one.pyc
test -f inst/my/two.py
@@ -55,16 +54,13 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-mkdir inst
-inst=`pwd`/inst
-
./configure --prefix "`pwd`/inst" --program-prefix=p
$MAKE
$MAKE test-install-data
$MAKE uninstall
-test `find inst/my -type f -print | wc -l` = 0
+find inst/my -type f -print | grep . && Exit 1
$MAKE install-strip
@@ -78,4 +74,6 @@ cd build
$MAKE
$MAKE test-install-data
$MAKE uninstall
-test `find inst/my -type f -print | wc -l` = 0
+find inst/my -type f -print | grep . && Exit 1
+
+:
diff --git a/tests/nobase.test b/tests/nobase.test
index 8b0dc6e90..2fa9a6059 100755
--- a/tests/nobase.test
+++ b/tests/nobase.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2011
+# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
AC_PROG_CC
AC_PROG_RANLIB
diff --git a/tests/nodef.test b/tests/nodef.test
index 1a58bb7b4..cfcea3971 100755
--- a/tests/nodef.test
+++ b/tests/nodef.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
# -------------------------------------------------------------------
# Do not upgrade this file to use the modern AC_INIT/AM_INIT_AUTOMAKE
# forms. The day these obsolete AC_INIT and AM_INIT_AUTOMAKE forms
diff --git a/tests/nodef2.test b/tests/nodef2.test
index 5a6c0ee88..337c65f3e 100755
--- a/tests/nodef2.test
+++ b/tests/nodef2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
# First, check that PACKAGE and VERSION are output by default.
cat > configure.in << 'END'
diff --git a/tests/nodep.test b/tests/nodep.test
index 650bbd006..0d140eb44 100755
--- a/tests/nodep.test
+++ b/tests/nodep.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-dependencies
bin_PROGRAMS = zardoz
diff --git a/tests/nodep2.test b/tests/nodep2.test
index 53bcaad6e..840858e3c 100755
--- a/tests/nodep2.test
+++ b/tests/nodep2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
foo_SOURCES = a.c b.cpp c.m d.S e.java f.upc
diff --git a/tests/nodepcomp.test b/tests/nodepcomp.test
index 735c36349..7042ae939 100755
--- a/tests/nodepcomp.test
+++ b/tests/nodepcomp.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
rm -f depcomp
: > Makefile.am
diff --git a/tests/nodist.test b/tests/nodist.test
index 723933817..e300b9103 100755
--- a/tests/nodist.test
+++ b/tests/nodist.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +19,9 @@
. ./defs || Exit 1
-echo AC_PROG_CC >> configure.in
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
cat > Makefile.am << 'END'
bin_PROGRAMS = eyeball
@@ -28,15 +31,11 @@ nodist_eyeball_SOURCES = b.c
dist_eyeball_SOURCES = c.c
END
-: > a.c
-: > b.c
-: > c.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-grep '^am_eyeball_OBJECTS' Makefile.in || Exit 1
-grep '^DIST_SOURCES =' Makefile.in || Exit 1
+grep '^am_eyeball_OBJECTS' Makefile.in
+grep '^DIST_SOURCES =' Makefile.in
grep '^DIST_SOURCES =.*nodist' Makefile.in && Exit 1
-Exit 0
+:
diff --git a/tests/nodist2.test b/tests/nodist2.test
index 3d9e6ce88..c7a85630f 100755
--- a/tests/nodist2.test
+++ b/tests/nodist2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,10 +29,10 @@ EOF
: > baz.h
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
./configure --prefix "`pwd`/install"
$MAKE install-data
+
+:
diff --git a/tests/nodist3.test b/tests/nodist3.test
index 21cfec368..31f749023 100755
--- a/tests/nodist3.test
+++ b/tests/nodist3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +18,9 @@
. ./defs || Exit 1
-echo AC_PROG_CC >> configure.in
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-dist
@@ -26,12 +28,10 @@ bin_PROGRAMS = eyeball
eyeball_SOURCES = a.c
END
-: > a.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^dist:' Makefile.in && Exit 1
grep '^DIST_SOURCES =' Makefile.in && Exit 1
-Exit 0
+:
diff --git a/tests/nogzip.test b/tests/nogzip.test
index 77adcdcde..bf49a5374 100755
--- a/tests/nogzip.test
+++ b/tests/nogzip.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=bzip2
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([nogzip], [1.0])
AM_INIT_AUTOMAKE([no-dist-gzip dist-bzip2])
diff --git a/tests/nogzip2.test b/tests/nogzip2.test
index f6e01ab2c..1f8ed8f00 100755
--- a/tests/nogzip2.test
+++ b/tests/nogzip2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([nogzip], [1.0])
AM_INIT_AUTOMAKE([no-dist-gzip])
diff --git a/tests/noinst.test b/tests/noinst.test
index dd97481eb..ac4ff66e7 100755
--- a/tests/noinst.test
+++ b/tests/noinst.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +25,9 @@ all-local:
exit 1
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^install[-a-z]*:.* all' Makefile.in
+
+:
diff --git a/tests/noinstdir.test b/tests/noinstdir.test
index 3f33c3210..92f59ffd7 100755
--- a/tests/noinstdir.test
+++ b/tests/noinstdir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -37,9 +37,10 @@ AC_PROG_CC
AC_PROG_RANLIB
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'noinstdir' Makefile.in && Exit 1
grep 'checkdir' Makefile.in && Exit 1
-Exit 0
+
+:
diff --git a/tests/nolink.test b/tests/nolink.test
index 5e42076dc..ca67339c9 100755
--- a/tests/nolink.test
+++ b/tests/nolink.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-exeext
diff --git a/tests/nostdinc.test b/tests/nostdinc.test
index 43535ef77..a693003cc 100755
--- a/tests/nostdinc.test
+++ b/tests/nostdinc.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/notrans.test b/tests/notrans.test
index d3ee2b2b1..f791384d6 100755
--- a/tests/notrans.test
+++ b/tests/notrans.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_OUTPUT
END
diff --git a/tests/number.test b/tests/number.test
index a43ff2fe7..7a0d1ee98 100755
--- a/tests/number.test
+++ b/tests/number.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,8 +28,11 @@ cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+grep '^zardoz_OBJECTS' Makefile.in
count=`grep -c '^zardoz_OBJECTS' Makefile.in`
test $count -eq 1
+
+:
diff --git a/tests/objc.test b/tests/objc.test
index facc4d445..0ea5b407c 100755
--- a/tests/objc.test
+++ b/tests/objc.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2006, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +29,9 @@ bin_PROGRAMS = hello
hello_SOURCES = hello.m
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^\.SUFFIXES:.*\.m' Makefile.in
+
+:
diff --git a/tests/objc2.test b/tests/objc2.test
index 9931ef73f..3080d5c6d 100755
--- a/tests/objc2.test
+++ b/tests/objc2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >>configure.in
cat >Makefile.am <<'END'
diff --git a/tests/obsolete.test b/tests/obsolete.test
index 337e4db25..943df6f87 100755
--- a/tests/obsolete.test
+++ b/tests/obsolete.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2007, 2008, 2010 Free Software
+# Copyright (C) 1996, 2001, 2002, 2007, 2008, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -28,24 +28,31 @@ AC_INIT
END
$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
- "$testsrcdir/../m4/obsolete.m4" >> obs
+ "$top_testsrcdir/m4/obsolete.m4" >> obs
cat obs >> configure.in
-$PERL -ne 'chomp; print "grep $_ stderr || Exit 1\n"; ' obs > obs.1
+$PERL -ne 'chomp; print "grep $_ output || Exit 1\n"; ' obs > obs.1
$PERL -ne 'chomp; print "grep $_ configure.in && Exit 1\n"; ' obs > obs.2
+echo : >> obs.1 # since it will be sourced, it must and with a success
+echo : >> obs.2 # ditto
+
+cat configure.in # for debugging
+cat obs.1 # ditto
+cat obs.2 # ditto
# Sanity check. Make sure we have added something to configure.in.
-test `cat configure.in | wc -l` -gt 1 || Exit 1
+test `wc -l <configure.in` -gt 1
-$ACLOCAL || Exit 1
+$ACLOCAL
# Expect Autoconf to complain about each of the macros in obs.
-$AUTOCONF -Wobsolete >stderr 2>&1
+$AUTOCONF -Wobsolete >output 2>&1 || { cat output; Exit 1; }
+cat output
. ./obs.1
# Make sure Autoupdate remove each of these macros.
-$AUTOUPDATE || Exit 1
+$AUTOUPDATE
. ./obs.2
# Autoconf should be able to grok the updated configure.in.
-$AUTOCONF || Exit 1
+$AUTOCONF
-Exit 0
+:
diff --git a/tests/oldvars.test b/tests/oldvars.test
new file mode 100755
index 000000000..242056e4d
--- /dev/null
+++ b/tests/oldvars.test
@@ -0,0 +1,35 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Use of these variables is deprecated:
+# LISP, HEADERS, DATA, SCRIPTS, LTLIBRARIES, LIBRARIES, PROGRAMS, MANS.
+
+. ./defs || Exit 1
+
+cat >Makefile.am <<\EOF
+DATA =
+HEADERS =
+LIBRARIES =
+LISP =
+LTLIBRARIES =
+MANS =
+PROGRAMS =
+SCRIPTS =
+EOF
+
+$ACLOCAL
+AUTOMAKE_fails
+test `grep -c anachronism stderr` -eq 8
diff --git a/tests/order.test b/tests/order.test
index 0f39b796d..b1030fa7a 100755
--- a/tests/order.test
+++ b/tests/order.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
jm_TEST
FOO
diff --git a/tests/output-order.test b/tests/output-order.test
index cb9ffff93..259b34de2 100755
--- a/tests/output-order.test
+++ b/tests/output-order.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_OUTPUT
END
diff --git a/tests/output.test b/tests/output.test
index 4f6a7cdd8..260dfcb9a 100755
--- a/tests/output.test
+++ b/tests/output.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,10 +19,10 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile frob/zardoz)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([Makefile frob/zardoz])
END
: > Makefile.am
@@ -29,5 +30,7 @@ END
mkdir frob
: > frob/zardoz.in
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/output10.test b/tests/output10.test
index a973559ae..b20cae2bc 100755
--- a/tests/output10.test
+++ b/tests/output10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << END
AC_SUBST([FOO], [top])
AC_SUBST([BAR], [bot])
diff --git a/tests/output11.test b/tests/output11.test
index 9d5328b36..e8e2c8012 100755
--- a/tests/output11.test
+++ b/tests/output11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << \END
AC_SUBST([FOO], [foo])
file1=this.in
diff --git a/tests/output12.test b/tests/output12.test
index 2f8027c25..4297373c0 100755
--- a/tests/output12.test
+++ b/tests/output12.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << \END
AC_SUBST([FOO], [foo])
AC_SUBST([file1], [this.in])
diff --git a/tests/output13.test b/tests/output13.test
index c862f07a7..810c280ac 100755
--- a/tests/output13.test
+++ b/tests/output13.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << \END
AC_SUBST([FOO], [foo])
if $create; then
diff --git a/tests/output2.test b/tests/output2.test
index c9bdbc391..28850a4bf 100755
--- a/tests/output2.test
+++ b/tests/output2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,10 +19,10 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile intl/intlh.inst po/Makefile.in misc/gettextize)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([Makefile intl/intlh.inst po/Makefile.in misc/gettextize])
END
: > Makefile.am
@@ -31,8 +32,8 @@ mkdir intl po misc
: > po/Makefile.in.am
: > misc/gettextize.in
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^gettextize' Makefile.in && Exit 1
Exit 0
diff --git a/tests/output3.test b/tests/output3.test
index 02d7e6fcb..2626113bd 100755
--- a/tests/output3.test
+++ b/tests/output3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +19,9 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT([Makefile
tests/Makefile tests/defs],
[blah])
@@ -32,5 +33,7 @@ mkdir tests
: > tests/Makefile.am
: > tests/defs.in
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/output4.test b/tests/output4.test
index fc5a02249..41fabf9dd 100755
--- a/tests/output4.test
+++ b/tests/output4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,18 +19,18 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(tests/Makefile tests/defs)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([tests/Makefile tests/defs])
END
mkdir tests
: > tests/defs.in
: > tests/Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep tests/defs.in tests/Makefile.in && Exit 1
Exit 0
diff --git a/tests/output5.test b/tests/output5.test
index 4323f6233..c46ccf241 100755
--- a/tests/output5.test
+++ b/tests/output5.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004 Free Software
-# Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([foo], [bar], [baz])
AM_INIT_AUTOMAKE
diff --git a/tests/output6.test b/tests/output6.test
index 88daa7412..483de80e6 100755
--- a/tests/output6.test
+++ b/tests/output6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/output7.test b/tests/output7.test
index 878c0915e..a49632f73 100755
--- a/tests/output7.test
+++ b/tests/output7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/output8.test b/tests/output8.test
index 1c11a16a1..4e610a930 100755
--- a/tests/output8.test
+++ b/tests/output8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
mkdir testdir
cd testdir
diff --git a/tests/output9.test b/tests/output9.test
index d4cf15a0c..98572bede 100755
--- a/tests/output9.test
+++ b/tests/output9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << END
AC_CONFIG_FILES([a/mid.in:a/input.in.in])
AC_CONFIG_FILES([b/out:a/mid.in])
diff --git a/tests/override-conditional-1.test b/tests/override-conditional-1.test
new file mode 100755
index 000000000..b7f1556cb
--- /dev/null
+++ b/tests/override-conditional-1.test
@@ -0,0 +1,54 @@
+
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test for conditionally-defined overrides.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foobar:
+ : > $@
+if COND
+ps: foobar
+ :
+endif
+END
+
+$ACLOCAL
+$AUTOMAKE -Wno-override
+
+# "ps:" should be output in two conditions
+test `grep '[^-]ps:' Makefile.in | wc -l` = 2
+grep '@COND_TRUE@ps: *foobar' Makefile.in
+grep '@COND_FALSE@ps: *ps-am' Makefile.in
+
+$AUTOCONF
+
+./configure cond=no
+$MAKE ps
+test ! -r foobar
+
+./configure cond=yes
+$MAKE ps
+test -f foobar
+
+:
diff --git a/tests/override-conditional-2.test b/tests/override-conditional-2.test
new file mode 100755
index 000000000..0fc88c282
--- /dev/null
+++ b/tests/override-conditional-2.test
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that conditional overrides are diagnosed.
+# This test is still xfailing; see the FIXME in Automake::Rule::define.
+# Once that is fixed, the test should succeed.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([COND], [:])
+END
+
+cat > Makefile.am << 'END'
+if COND
+all:
+ :
+endif
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails
+grep ':.*overrides.*all' stderr
+
+:
diff --git a/tests/override-html.test b/tests/override-html.test
new file mode 100755
index 000000000..c2c5ec672
--- /dev/null
+++ b/tests/override-html.test
@@ -0,0 +1,33 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that overriding `html' target causes only one "html:" rule to
+# be output.
+
+. ./defs || Exit 1
+
+cat > Makefile.am << 'END'
+html:
+ :
+END
+
+$ACLOCAL
+$AUTOMAKE -Wno-override
+
+# Overriding `html' should cause only one "html:" rule to be output.
+test `grep '^html:' Makefile.in | wc -l` = 1
+
+:
diff --git a/tests/overrid.test b/tests/override-suggest-local.test
index df453ca9d..6639ee5ba 100755
--- a/tests/overrid.test
+++ b/tests/override-suggest-local.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,12 +19,6 @@
. ./defs || Exit 1
-set -e
-
-cat >> configure.in << 'END'
-AM_CONDITIONAL([COND], [:])
-END
-
cat > Makefile.am << 'END'
install:
:
@@ -34,11 +28,6 @@ html:
:
clean-am:
:
-
-if COND
-ps: mine
- :
-endif
END
$ACLOCAL
@@ -51,17 +40,4 @@ grep ':.*html-local' stderr
grep ':.*clean-am-local' stderr && Exit 1
grep ':.*clean-local' stderr
-# Conditional overrides ought to be diagnosed, but it can't be done yet.
-# See the FIXME in Automake::Rule::define. Once this is fixed, the grep below
-# will fail. If you see the failure, it means you fixed Automake. Well done!
-# Just strip out the next '&& Exit 1' and this comment.
-grep ':.*overrides.*ps' stderr && Exit 1
-
-# Test for another issue. Overriding html: should cause only one
-# html: rule to be output.
-test `grep '^html:' Makefile.in | wc -l` = 1
-
-# ps: should be output in two conditions
-test `grep '[^-]ps:' Makefile.in | wc -l` = 2
-grep '@COND_TRUE@ps: mine' Makefile.in
-grep '@COND_FALSE@ps: ps-am' Makefile.in
+:
diff --git a/tests/parallel-am.test b/tests/parallel-am.test
index 4aef62896..0182b44e1 100755
--- a/tests/parallel-am.test
+++ b/tests/parallel-am.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,10 +35,9 @@
#
# This test checks (0), (1), and (2). See sister tests for further coverage.
+required=perl-threads
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([parallel-am], [1.0])
AC_CONFIG_AUX_DIR([build-aux])
diff --git a/tests/parallel-am2.test b/tests/parallel-am2.test
index 20225a076..52dfde8fc 100755
--- a/tests/parallel-am2.test
+++ b/tests/parallel-am2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,10 +20,9 @@
# 4) warning and normal error output should be identical, in that duplicate
# warnings should be omitted in the same way as without threads,
+required=perl-threads
. ./defs || Exit 1
-set -e
-
mkdir sub
cat > Makefile.am << 'END'
diff --git a/tests/parallel-am3.test b/tests/parallel-am3.test
index 5db9c6725..932dea40f 100755
--- a/tests/parallel-am3.test
+++ b/tests/parallel-am3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,10 +21,9 @@
# with --add-missing, even with concurrent file requirements, and the
# installation of aux files should be race-free,
+required=perl-threads
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([parallel-am], [1.0])
AC_CONFIG_AUX_DIR([build-aux])
diff --git a/tests/parallel-tests.test b/tests/parallel-tests.test
index 399b23bbf..da961e12a 100755
--- a/tests/parallel-tests.test
+++ b/tests/parallel-tests.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,8 +27,6 @@
parallel_tests=yes
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/parallel-tests10.test b/tests/parallel-tests10.test
index 5cd33108e..cdf148d35 100755
--- a/tests/parallel-tests10.test
+++ b/tests/parallel-tests10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
parallel_tests=yes
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
index 9cfe14fc1..8fe5d3027 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@ parallel_tests=yes
required=rst2html
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/parallel-tests3.test b/tests/parallel-tests3.test
index a138f908a..9f0ce4289 100755
--- a/tests/parallel-tests3.test
+++ b/tests/parallel-tests3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@ case $MAKE in
*\ -j*) Exit 77 ;;
esac
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/parallel-tests4.test b/tests/parallel-tests4.test
index efe7e8d10..a24bd5135 100755
--- a/tests/parallel-tests4.test
+++ b/tests/parallel-tests4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
parallel_tests=yes
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/parallel-tests5.test b/tests/parallel-tests5.test
index c4ff5b905..7d7184166 100755
--- a/tests/parallel-tests5.test
+++ b/tests/parallel-tests5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,8 +24,6 @@ parallel_tests=yes
required=GNUmake
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/parallel-tests6.test b/tests/parallel-tests6.test
index 44caf0c8d..599225026 100755
--- a/tests/parallel-tests6.test
+++ b/tests/parallel-tests6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
parallel_tests=yes
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/parallel-tests7.test b/tests/parallel-tests7.test
index d01ada103..c29d32c21 100755
--- a/tests/parallel-tests7.test
+++ b/tests/parallel-tests7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
parallel_tests=yes
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/parallel-tests8.test b/tests/parallel-tests8.test
index 524b82bbb..d1d5b748a 100755
--- a/tests/parallel-tests8.test
+++ b/tests/parallel-tests8.test
@@ -27,8 +27,6 @@
parallel_tests=yes
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/parallel-tests9.test b/tests/parallel-tests9.test
index 337328fd3..e6191d922 100755
--- a/tests/parallel-tests9.test
+++ b/tests/parallel-tests9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
parallel_tests=yes
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/parse.test b/tests/parse.test
index e7dcbe5df..8a97cd14e 100755
--- a/tests/parse.test
+++ b/tests/parse.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,12 +19,8 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
AC_PROG_CC
-AC_PROG_RANLIB
-AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
@@ -33,8 +30,8 @@ zar.c\
doz.c
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP zar.cdoz Makefile.in && Exit 1
Exit 0
diff --git a/tests/percent.test b/tests/percent.test
index dfb48ae98..492d0e000 100755
--- a/tests/percent.test
+++ b/tests/percent.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
EOF
diff --git a/tests/percent2.test b/tests/percent2.test
index 09e4f8406..33cbe9c6d 100755
--- a/tests/percent2.test
+++ b/tests/percent2.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >>Makefile.am << 'EOF'
${ARCH}/%.$(OBJEXT): %.S
test -d ${ARCH} || mkdir ${ARCH}
diff --git a/tests/phony.test b/tests/phony.test
index 9c9f3d372..2eba53519 100755
--- a/tests/phony.test
+++ b/tests/phony.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >Makefile.am << 'EOF'
.PHONY: foo
.PHONY: bar
diff --git a/tests/pluseq.test b/tests/pluseq.test
index 66eec8f31..bd6da5b1d 100755
--- a/tests/pluseq.test
+++ b/tests/pluseq.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/tests/pluseq10.test b/tests/pluseq10.test
index 92734155d..2b0079bd7 100755
--- a/tests/pluseq10.test
+++ b/tests/pluseq10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << 'END'
AM_CONDITIONAL([A], [true])
AM_CONDITIONAL([B], [false])
diff --git a/tests/pluseq11.test b/tests/pluseq11.test
index 12ec4d77f..d619d3d38 100755
--- a/tests/pluseq11.test
+++ b/tests/pluseq11.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_OUTPUT
END
diff --git a/tests/pluseq2.test b/tests/pluseq2.test
index f9db345a0..14d6e7ffc 100755
--- a/tests/pluseq2.test
+++ b/tests/pluseq2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([CHECK], [true])
END
diff --git a/tests/pluseq3.test b/tests/pluseq3.test
index 755002c4d..dea002399 100755
--- a/tests/pluseq3.test
+++ b/tests/pluseq3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2004, 2010 Free Software
+# Copyright (C) 1998, 1999, 2001, 2002, 2004, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([CHECK], [true])
END
diff --git a/tests/pluseq4.test b/tests/pluseq4.test
index 744b4899b..831a3a91c 100755
--- a/tests/pluseq4.test
+++ b/tests/pluseq4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/pluseq5.test b/tests/pluseq5.test
index 4e03d37a3..ea3c360fe 100755
--- a/tests/pluseq5.test
+++ b/tests/pluseq5.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONDITIONAL([CHECK], [true])
END
@@ -37,10 +35,10 @@ AUTOMAKE_fails
# We expect the following diagnostic:
#
-# Makefile.am:4: Cannot apply `+=' because `INCLUDES' is not defined in
+# Makefile.am:4: cannot apply `+=' because `INCLUDES' is not defined in
# Makefile.am:4: the following conditions:
# Makefile.am:4: !CHECK
-# Makefile.am:4: Either define `INCLUDES' in these conditions, or use
+# Makefile.am:4: either define `INCLUDES' in these conditions, or use
# Makefile.am:4: `+=' in the same conditions as the definitions.
# Is !CHECK mentioned?
diff --git a/tests/pluseq6.test b/tests/pluseq6.test
index af0523900..68710cf0b 100755
--- a/tests/pluseq6.test
+++ b/tests/pluseq6.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_SUBST([ZZZ])
END
diff --git a/tests/pluseq7.test b/tests/pluseq7.test
index 071646208..3322a549e 100755
--- a/tests/pluseq7.test
+++ b/tests/pluseq7.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
diff --git a/tests/pluseq8.test b/tests/pluseq8.test
index 901f8b641..52e9854d9 100755
--- a/tests/pluseq8.test
+++ b/tests/pluseq8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2004, 2006, 2010 Free Software
+# Copyright (C) 1999, 2001, 2002, 2004, 2006, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
VAR = \
one \
diff --git a/tests/pluseq9.test b/tests/pluseq9.test
index fb30a1d8b..7f7265429 100755
--- a/tests/pluseq9.test
+++ b/tests/pluseq9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << 'END'
AM_CONDITIONAL([COND1], [true])
AM_CONDITIONAL([COND2], [true])
@@ -55,10 +53,10 @@ AUTOMAKE_fails
# We expect the following diagnostic:
#
-# Makefile.am:19: Cannot apply `+=' because `B' is not defined in
+# Makefile.am:19: cannot apply `+=' because `B' is not defined in
# Makefile.am:19: the following conditions:
# Makefile.am:19: !COND1 and !COND3
-# Makefile.am:19: Either define `B' in these conditions, or use
+# Makefile.am:19: either define `B' in these conditions, or use
# Makefile.am:19: `+=' in the same conditions as the definitions.
#
# It would be nice if Automake could print only COND3_FALSE and
diff --git a/tests/posixsubst-data.test b/tests/posixsubst-data.test
new file mode 100755
index 000000000..49547e148
--- /dev/null
+++ b/tests/posixsubst-data.test
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works
+# in when used with the DATA primary.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foodir = $(prefix)
+
+t1 = foo1 foo2
+t2 = barx
+t3 = baz.y
+
+bar.data bazzardoz:
+ : > $@
+CLEANFILES = bar.data bazzardoz
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+dist_foo_DATA = $(t1:=.txt)
+foo_DATA = $(t2:x=.data)
+nodist_foo_DATA = $(t3:.y=zardoz)
+
+check-local: test
+.PHONY: test
+test: distdir
+ ls -l $(distdir)
+ test ! -r $(distdir)/foo.data
+ test ! -r $(distdir)/bazzardoz
+
+installcheck-local:
+ ls -l $(prefix)
+ test -f $(prefix)/foo1.txt
+ test -f $(prefix)/foo2.txt
+ test -f $(prefix)/bar.data
+ test -f $(prefix)/bazzardoz
+END
+
+: > foo1.txt
+: > foo2.txt
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE install
+test -f bar.data
+test -f bazzardoz
+$MAKE test
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-extradist.test b/tests/posixsubst-extradist.test
new file mode 100755
index 000000000..36f0a3186
--- /dev/null
+++ b/tests/posixsubst-extradist.test
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# in EXTRA_DIST.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = bar.x
+t3 = baz-y
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+EXTRA_DIST = $(t1:=.c) $(t2:.x=.f) $(t3:-y=ar)
+bazar bar.f:
+ : > $@
+.PHONY: test
+test: distdir
+ ls -l $(distdir)
+ test -f $(distdir)/foo1.c
+ test -f $(distdir)/foo2.c
+ test -f $(distdir)/bar.f
+ test -f $(distdir)/bazar
+END
+
+: > foo1.c
+: > foo2.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE test
+
+:
diff --git a/tests/posixsubst-ldadd.test b/tests/posixsubst-ldadd.test
new file mode 100755
index 000000000..a418fc26e
--- /dev/null
+++ b/tests/posixsubst-ldadd.test
@@ -0,0 +1,76 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works
+# in when used in LDADD.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+u = libquux1.lib libquux2.lib
+v = libquux1
+w = none
+
+zardozdir = $(prefix)/zardoz
+zardoz_PROGRAMS = foo bar
+
+noinst_LIBRARIES = libquux1.a libquux2.a libquux3.a
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+LDADD = $(u:.lib=.a)
+bar_LDADD = $(v:=.a) libquux2.a $(w:none=libquux3.a)
+
+libquux1.c:
+ echo 'int quux1(void) { return 0; }' > $@
+CLEANFILES = libquux1.c # for FreeBSD make
+END
+
+cat > foo.c <<'END'
+int main(void)
+{
+ int quux1(void), quux2(void);
+ return quux1() + quux2();
+}
+END
+
+cat > bar.c <<'END'
+int main(void)
+{
+ int quux1(void), quux2(void), quux3(void);
+ return quux1() + quux2() + quux3();
+}
+END
+
+echo 'int quux2(void) { return 0; }' > libquux2.c
+echo 'int quux3(void) { return 0; }' > libquux3.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+test -f libquux1.c
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-libraries.test b/tests/posixsubst-libraries.test
new file mode 100755
index 000000000..418d24175
--- /dev/null
+++ b/tests/posixsubst-libraries.test
@@ -0,0 +1,63 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the LIBRARIES primary in a "simple" way.
+# Keep this in sync with sister test `posixsubst-ltlibraries.test'.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foolibs = libfoo1 libfoo2
+barlibs = libbaz
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+lib_LIBRARIES = $(foolibs:=.a) $(barlibs:z=r.a)
+
+libbar.c:
+ echo 'int bar(void) { return 0; }' > $@
+CLEANFILES = libbar.c # for FreeBSD make
+
+installcheck-local:
+ ls -l $(prefix)/lib
+ test -f $(prefix)/lib/libfoo1.a
+ test -f $(prefix)/lib/libfoo2.a
+ test -f $(prefix)/lib/libbar.a
+END
+
+echo 'int bar1(void) { return 0; }' > libfoo1.c
+echo 'int bar2(void) { return 0; }' > libfoo2.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+test -f libfoo2.c
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-ltlibraries.test b/tests/posixsubst-ltlibraries.test
new file mode 100755
index 000000000..e95023c94
--- /dev/null
+++ b/tests/posixsubst-ltlibraries.test
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the LTLIBRARIES primary in a "simple" way.
+# Keep this in sync with sister test `posixsubst-libraries.test'.
+
+required='libtool libtoolize'
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foolibs = libfoo1 libfoo2
+barlibs = libbaz
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+lib_LTLIBRARIES = $(foolibs:=.la) $(barlibs:z=r.la)
+
+libbar.c:
+ echo 'int bar(void) { return 0; }' > $@
+CLEANFILES = libbar.c # for FreeBSD make
+
+installcheck-local:
+ ls -l $(prefix)/lib
+ test -f $(prefix)/lib/libfoo1.la
+ test -f $(prefix)/lib/libfoo2.la
+ test -f $(prefix)/lib/libbar.la
+END
+
+echo 'int bar1(void) { return 0; }' > libfoo1.c
+echo 'int bar2(void) { return 0; }' > libfoo2.c
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+test -f libfoo2.c
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-programs.test b/tests/posixsubst-programs.test
new file mode 100755
index 000000000..947cf79bb
--- /dev/null
+++ b/tests/posixsubst-programs.test
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the PROGRAMS primary.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = barx bar2
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+bin_PROGRAMS = $(t1:=-p) $(t2:2=y)
+
+installcheck-local:
+ ls -l $(prefix)/bin
+ test -f $(prefix)/bin/foo1-p$(EXEEXT)
+ test -x $(prefix)/bin/foo1-p$(EXEEXT)
+ test -f $(prefix)/bin/foo2-p$(EXEEXT)
+ test -x $(prefix)/bin/foo2-p$(EXEEXT)
+ test -f $(prefix)/bin/barx$(EXEEXT)
+ test -x $(prefix)/bin/barx$(EXEEXT)
+ test -f $(prefix)/bin/bary$(EXEEXT)
+ test -x $(prefix)/bin/bary$(EXEEXT)
+END
+
+for f in foo1-p.c foo2-p.c barx.c bary.c; do
+ echo 'int main(void) { return 0; }' > $f
+done
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-scripts.test b/tests/posixsubst-scripts.test
new file mode 100755
index 000000000..eef7856ae
--- /dev/null
+++ b/tests/posixsubst-scripts.test
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the SCRIPTS primary.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+# We have to be careful with 'test -x' commands on MinGW/MSYS, because
+# the file system does not actually have execute permission information.
+# Instead, that is emulated by looking at the file content, and returning
+# 0 if the file starts with, e.g., a COFF header or with '#!'.
+# So we need to create actual scripts in the make rules and in the file
+# creation below.
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = bar1x bar2
+t3 = quu-baz
+
+bar1 bar2:
+ (echo '#!/bin/sh' && echo 'exit 0') > $@
+quux.pl:
+ (echo '#!/bin/perl' && echo '1;') > $@
+CLEANFILES = bar1 bar2 quux.pl
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+dist_sbin_SCRIPTS = $(t1:=.sh)
+libexec_SCRIPTS = $(t2:x=)
+nodist_bin_SCRIPTS = $(t3:-baz=x.pl)
+
+check-local: test1 test2
+.PHONY: test1 test2
+test1:
+ ls -l
+ test -f bar1
+ test -f bar2
+ test -f quux.pl
+test2: distdir
+ ls -l $(distdir)
+ ## the scripts foo1.sh and foo2.sh should be distributed
+ test -f $(distdir)/foo1.sh
+ test -f $(distdir)/foo2.sh
+ ## the scripts bar1, bar2 and quux.pl shouldn't be distributed
+ test ! -r $(distdir)/bar1
+ test ! -r $(distdir)/bar2
+ test ! -r $(distdir)/quux.pl
+
+installcheck-local:
+ ls -l $(prefix)/libexec $(prefix)/bin $(prefix)/sbin
+ test -f $(prefix)/sbin/foo1.sh
+ test -x $(prefix)/sbin/foo1.sh
+ test -f $(prefix)/sbin/foo2.sh
+ test -x $(prefix)/sbin/foo2.sh
+ test -f $(prefix)/libexec/bar1
+ test -x $(prefix)/libexec/bar1
+ test -f $(prefix)/libexec/bar2
+ test -x $(prefix)/libexec/bar2
+ test -f $(prefix)/bin/quux.pl
+ test -x $(prefix)/bin/quux.pl
+END
+
+cat > foo1.sh <<'END'
+#!/bin/sh
+exit 0
+END
+cp foo1.sh foo2.sh
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+$MAKE test1 test2
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-sources.test b/tests/posixsubst-sources.test
new file mode 100755
index 000000000..aef4c2f0b
--- /dev/null
+++ b/tests/posixsubst-sources.test
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the SOURCES primary.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+
+FOO = foo.cxx
+BAR = bar__
+BAZ = baz.
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+foo_SOURCES = main.c $(FOO:.cxx=.c)
+dist_foo_SOURCES = $(BAR:__=.c)
+nodist_foo_SOURCES = $(BAZ:=c)
+
+bar.c baz.c:
+ echo 'int $@ (void) { return 0; }' | sed 's/\.c //' > $@
+CLEANFILES = baz.c
+CLEANFILES += bar.c # for FreeBSD make
+
+.PHONY: test test2
+check-local: test1 test2
+test1:
+ ls -l . $(srcdir)
+ test -f $(srcdir)/bar.c
+ test -f baz.c
+test2: distdir
+ ls -l $(distdir)
+ ## these sources should be distributed ...
+ test -f $(distdir)/bar.c
+ test -f $(distdir)/foo.c
+ test -f $(distdir)/main.c
+ ## ... and this shouldn't
+ test ! -r $(distdir)/baz.c
+END
+
+cat > main.c <<'END'
+int main(void)
+{
+ int foo(void), bar(void), baz(void);
+ return foo() + bar() + baz();
+}
+END
+
+echo 'int foo(void) { return 0; }' > foo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+$MAKE test1 test2
+$MAKE distcheck
+
+:
diff --git a/tests/posixsubst-tests.test b/tests/posixsubst-tests.test
new file mode 100755
index 000000000..26ae69fa5
--- /dev/null
+++ b/tests/posixsubst-tests.test
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the TESTS special variable.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = barx
+t3 = bar2
+
+foo2.test barz:
+ (echo '#!/bin/sh' && echo 'exit 0') > $@ && chmod a+x $@
+CLEANFILES = foo2.test barz # for FreeBSD make
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+TESTS = $(t1:=.test) $(t2:x=y) $(t3:2=z)
+
+EXTRA_DIST = $(TESTS)
+MOSTLYCLEANFILES = *.out
+END
+
+cat > foo1.test <<'END'
+#!/bin/sh
+touch foo1.out
+test x"${TESTSUITE_OK-no}" = x"yes"
+END
+sed 's/foo1/bary/g' foo1.test > bary
+chmod +x foo1.test bary
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE check >out 2>&1 && { cat out; Exit 1; }
+cat out
+ls -l
+grep '^FAIL: foo1\.test *$' out
+grep '^PASS: foo2\.test *$' out
+grep '^FAIL: bary *$' out
+grep '^PASS: barz *$' out
+test -f foo1.out
+test -f bary.out
+
+TESTSUITE_OK=yes $MAKE distcheck
+
+:
diff --git a/tests/postproc.test b/tests/postproc.test
index 44570fe9d..0a8b1f388 100755
--- a/tests/postproc.test
+++ b/tests/postproc.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >configure.in <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/ppf77.test b/tests/ppf77.test
index 6c61a2e8d..301ba4ccd 100755
--- a/tests/ppf77.test
+++ b/tests/ppf77.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,8 +29,7 @@ bin_PROGRAMS = ppf
ppf_SOURCES = foo.F q.r
END
-: > foo.F
-: > q.r
-
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/pr2.test b/tests/pr2.test
index ceb272906..cbddea023 100755
--- a/tests/pr2.test
+++ b/tests/pr2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006, 2010, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,8 +30,6 @@
. ./defs || Exit 1
-set -e
-
# Please keep this underquoted and old-style.
cat > configure.in << 'END'
AC_INIT
diff --git a/tests/pr204.test b/tests/pr204.test
index 22a1e54f5..27453e0fe 100755
--- a/tests/pr204.test
+++ b/tests/pr204.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,11 +17,9 @@
# For PR 204.
# Sources derived from nodist_ sources should not be distributed.
-required='bison gcc'
+required='yacc gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
AM_MAINTAINER_MODE
AC_PROG_CC
diff --git a/tests/pr211.test b/tests/pr211.test
index 6778f7a06..5d4f0c1f5 100755
--- a/tests/pr211.test
+++ b/tests/pr211.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,8 +31,6 @@
required=libtoolize
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/pr220.test b/tests/pr220.test
index 95212ab0e..972f5aa3b 100755
--- a/tests/pr220.test
+++ b/tests/pr220.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2008, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2004, 2008, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat > main.c <<'EOF'
int main() { return 0; }
EOF
diff --git a/tests/pr224.test b/tests/pr224.test
index 00a7aad6e..d8b7468e7 100755
--- a/tests/pr224.test
+++ b/tests/pr224.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
mkdir foo
cat >foo/main.c <<'EOF'
diff --git a/tests/pr229.test b/tests/pr229.test
index 0d3f15383..09130ccbe 100755
--- a/tests/pr229.test
+++ b/tests/pr229.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<EOF
AC_CYGWIN
EOF
diff --git a/tests/pr243.test b/tests/pr243.test
index 58fb2a824..30b0d70a8 100755
--- a/tests/pr243.test
+++ b/tests/pr243.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,8 +29,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/pr266.test b/tests/pr266.test
index 2bace6f92..c3fd5598e 100755
--- a/tests/pr266.test
+++ b/tests/pr266.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
diff --git a/tests/pr279-2.test b/tests/pr279-2.test
index f4e6fb2d8..6142930ac 100755
--- a/tests/pr279-2.test
+++ b/tests/pr279-2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([FOOTEST], [false])
diff --git a/tests/pr279.test b/tests/pr279.test
index d658668f7..5f3b0649f 100755
--- a/tests/pr279.test
+++ b/tests/pr279.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([FOOTEST], [false])
diff --git a/tests/pr287.test b/tests/pr287.test
index 3a6f902f9..33587022b 100755
--- a/tests/pr287.test
+++ b/tests/pr287.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/pr300-lib.test b/tests/pr300-lib.test
index ee46b4b44..530f6c45a 100755
--- a/tests/pr300-lib.test
+++ b/tests/pr300-lib.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_RANLIB
AC_PROG_CC
diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test
index c47f32eba..1b3613682 100755
--- a/tests/pr300-ltlib.test
+++ b/tests/pr300-ltlib.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required='libtoolize gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/pr300-prog.test b/tests/pr300-prog.test
index 917a8a201..63eef4117 100755
--- a/tests/pr300-prog.test
+++ b/tests/pr300-prog.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/pr307.test b/tests/pr307.test
index 7676c4bc6..3db9f854c 100755
--- a/tests/pr307.test
+++ b/tests/pr307.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,8 +35,6 @@
required='libtoolize gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/pr401.test b/tests/pr401.test
index b68b5ed1b..fc3a72f65 100755
--- a/tests/pr401.test
+++ b/tests/pr401.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
mkdir lib src
cat >lib/feep.c <<'EOF'
diff --git a/tests/pr401b.test b/tests/pr401b.test
index 8e296ef73..8c7a7e1cf 100755
--- a/tests/pr401b.test
+++ b/tests/pr401b.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
required='gcc libtoolize'
. ./defs || Exit 1
-set -e
-
mkdir lib src
cat >lib/feep.c <<'EOF'
diff --git a/tests/pr401c.test b/tests/pr401c.test
index 8682dc0e0..2b5bcf31b 100755
--- a/tests/pr401c.test
+++ b/tests/pr401c.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
mkdir lib src
ac_cv_func_alloca_works=no
diff --git a/tests/pr72.test b/tests/pr72.test
index ab911ad15..8c52d2d80 100755
--- a/tests/pr72.test
+++ b/tests/pr72.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
required=libtool
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/pr87.test b/tests/pr87.test
index 31e64829c..3c860bdcc 100755
--- a/tests/pr87.test
+++ b/tests/pr87.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
subdirs="foo bar"
for i in $subdirs; do
diff --git a/tests/pr9.test b/tests/pr9.test
index a2e71d729..4a9a47ee6 100755
--- a/tests/pr9.test
+++ b/tests/pr9.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,8 +26,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([support])
diff --git a/tests/prefix.test b/tests/prefix.test
index 8ba92ef6c..482e71712 100755
--- a/tests/prefix.test
+++ b/tests/prefix.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/primary.test b/tests/primary.test
index a866f8f7d..acf1c3adf 100755
--- a/tests/primary.test
+++ b/tests/primary.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
bin_PROGRAMS = @programs@
END
diff --git a/tests/primary2.test b/tests/primary2.test
index 2fb3a605c..63e946712 100755
--- a/tests/primary2.test
+++ b/tests/primary2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2010 Free Software
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/primary3.test b/tests/primary3.test
index afccd0cbc..4340b0842 100755
--- a/tests/primary3.test
+++ b/tests/primary3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/proginst.test b/tests/proginst.test
index 31745b7e3..045ddbabe 100755
--- a/tests/proginst.test
+++ b/tests/proginst.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 1998, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
bin_SCRIPTS = zardoz qbert brownie
END
diff --git a/tests/python-dist.test b/tests/python-dist.test
new file mode 100755
index 000000000..fbf3ca568
--- /dev/null
+++ b/tests/python-dist.test
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test distribution of *_PYTHON files.
+
+# This test does not require python.
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_PATH_PYTHON([], [:], [:])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+python_PYTHON = python.py
+dist_python_PYTHON = python-dist.py
+nodist_python_PYTHON = python-nodist.py
+
+pkgpython_PYTHON = pkgpython.py
+dist_pkgpython_PYTHON = pkgpython-dist.py
+nodist_pkgpython_PYTHON = pkgpython-nodist.py
+
+mydir = $(prefix)/my
+my_PYTHON = my.py
+dist_my_PYTHON = my-dist.py
+nodist_my_PYTHON = my-nodist.py
+
+my.py my-dist.py my-nodist.py:
+ : > $@
+
+.PHONY: disttest
+disttest: distdir
+ ls -l $(distdir)
+ test -f $(distdir)/python.py
+ test -f $(distdir)/python-dist.py
+ test ! -f $(distdir)/python-nodist.py
+ test -f $(distdir)/pkgpython.py
+ test -f $(distdir)/pkgpython-dist.py
+ test ! -f $(distdir)/pkgpython-nodist.py
+ test -f $(distdir)/my.py
+ test -f $(distdir)/my-dist.py
+ test ! -f $(distdir)/my-nodist.py
+END
+
+: > python.py
+: > python-dist.py
+: > python-nodist.py
+
+: > pkgpython.py
+: > pkgpython-dist.py
+: > pkgpython-nodist.py
+
+: > py-compile
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE disttest
+# It's not distributed, hence it shouldn't be needlessly generated.
+test ! -f my-nodist.py
+
+:
diff --git a/tests/python-vars.test b/tests/python-vars.test
new file mode 100755
index 000000000..7defee20c
--- /dev/null
+++ b/tests/python-vars.test
@@ -0,0 +1,109 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that AM_PATH_PYTHON correctly sets all the output variables
+# advertised in the manual.
+
+required=python
+. ./defs || Exit 1
+
+set -e
+
+# In case the user's config.site defines pythondir or pyexecdir.
+CONFIG_SITE=/dev/null; export CONFIG_SITE
+
+PYTHON=python
+
+# Update the definition below if the documentation changes.
+# Note that the value of the `pythondir' and `pyexecdir' variables can
+# vary among different python installations, so we need more relaxed
+# and ad-hoc checks for them. Also, more proper "functional" checks
+# on them should be done in the `python-virtualenv.test' test.
+PYTHON_VERSION=`$PYTHON -c 'import sys; print(sys.version[:3])'` || Exit 1
+PYTHON_PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'` || Exit 1
+PYTHON_EXEC_PREFIX='${exec_prefix}'
+PYTHON_PREFIX='${prefix}'
+pkgpythondir="\${pythondir}/$me"
+pkgpyexecdir="\${pyexecdir}/$me"
+
+pyvars='PYTHON_VERSION PYTHON_PLATFORM PYTHON_PREFIX PYTHON_EXEC_PREFIX
+ pkgpythondir pkgpyexecdir'
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([vars-got pythondir pyexecdir])
+AM_PATH_PYTHON
+AC_OUTPUT
+END
+
+cat > my.py << 'END'
+def my():
+ return 1
+END
+
+cat > Makefile.am << 'END'
+
+python_PYTHON = my.py
+
+EXTRA_DIST = vars-exp
+
+check-local: test-in test-am
+.PHONY: test-in test-am
+
+test-in:
+ cat pythondir
+ case `cat pythondir` in '$${prefix}'/*);; *) exit 1;; esac
+ cat pyexecdir
+ case `cat pyexecdir` in '$${exec_prefix}'/*);; *) exit 1;; esac
+ cat $(srcdir)/vars-exp
+ cat $(builddir)/vars-got
+ diff $(srcdir)/vars-exp $(builddir)/vars-got
+
+## Note: this target's rules will be extended in the "for" loop below.
+test-am:
+ case '$(pythondir)' in '$(prefix)'/*);; *) exit 1;; esac
+ case '$(pyexecdir)' in '$(exec_prefix)'/*);; *) exit 1;; esac
+END
+
+echo @pythondir@ > pythondir.in
+echo @pyexecdir@ > pyexecdir.in
+
+: > vars-exp
+: > vars-got.in
+
+for var in $pyvars; do
+ eval val=\$$var
+ echo "var=$val" >> vars-exp
+ echo "var=@$var@" >> vars-got.in
+ echo "${tab}test x'\$($var)' = x'$val'" >> Makefile.am
+done
+
+cat Makefile.am
+cat vars-got.in
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+
+for var in pythondir pyexecdir $pyvars; do
+ grep "^$var *=" Makefile.in
+done
+
+$AUTOCONF
+./configure PYTHON="$PYTHON"
+
+$MAKE test-in test-am
+$MAKE distcheck
+
+:
diff --git a/tests/python-virtualenv.test b/tests/python-virtualenv.test
new file mode 100755
index 000000000..4bbfbfc4c
--- /dev/null
+++ b/tests/python-virtualenv.test
@@ -0,0 +1,186 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that python support can work well with virtualenvs.
+# This test also works as a mild stress-test on the python support.
+
+required='python virtualenv'
+. ./defs || Exit 1
+
+set -e
+
+# In case the user's config.site defines pythondir or pyexecdir.
+CONFIG_SITE=/dev/null; export CONFIG_SITE
+
+# Skip the test if a proper virtualenv cannot be created.
+virtualenv --verbose virtenv || Exit 77
+test -f virtenv/bin/activate || Exit 77
+
+# Activate the virtualenv.
+. ./virtenv/bin/activate
+# Sanity check.
+test -n "$VIRTUAL_ENV" || Exit 99
+
+cwd=`pwd`
+py_version=`python -c 'import sys; print("%u.%u" % tuple(sys.version_info[:2]))'`
+py_site=$VIRTUAL_ENV/lib/python$py_version/site-packages
+
+# We need control over the package name.
+cat > configure.in << END
+AC_INIT([am_virtenv], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_SUBST([MY_VIRTENV], ['$cwd/virtenv'])
+AC_PROG_CC
+AC_PROG_RANLIB
+AM_PATH_PYTHON
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+python_PYTHON = am_foo.py
+pkgpython_PYTHON = __init__.py
+pyexec_LIBRARIES = libquux.a
+libquux_a_SOURCES = foo.c
+pkgpyexec_LIBRARIES = libzardoz.a
+libzardoz_a_SOURCES = foo.c
+
+py_site = $(MY_VIRTENV)/lib/python$(PYTHON_VERSION)/site-packages
+
+.PYTHON: debug test-run test-install test-uninstall
+debug:
+ @echo PYTHON: $(PYTHON)
+ @echo PYTHON_VERSION: $(PYTHON_VERSION)
+ @echo prefix: $(prefix)
+ @echo pythondir: $(pythondir)
+ @echo pkgpythondir: $(pkgpythondir)
+ @echo pyexecdir: $(pyexecdir)
+ @echo pkgpyexecdir: $(pkgpyexecdir)
+test-run:
+ ## In a virtualenv, the default python must be the custom
+ ## virtualenv python.
+ @: \
+ && py1=`python -c 'import sys; print(sys.executable)'` \
+ && py2=`$(PYTHON) -c 'import sys; print(sys.executable)'` \
+ && echo "py1: $$py1" \
+ && echo "py2: $$py2" \
+ && test -n "$$py1" \
+ && test -n "$$py2" \
+ && test x"$$py1" = x"$$py2"
+ ## Check that modules installed in the virtualenv are readily
+ ## available.
+ python -c 'from am_foo import foo_func; assert (foo_func () == 12345)'
+ python -c 'from am_virtenv import old_am; assert (old_am () == "AutoMake")'
+test-install:
+ test -f $(py_site)/am_foo.py
+ test -f $(py_site)/am_foo.pyc
+ test -f $(py_site)/am_foo.pyo
+ test -f $(py_site)/am_virtenv/__init__.py
+ test -f $(py_site)/am_virtenv/__init__.pyc
+ test -f $(py_site)/am_virtenv/__init__.pyo
+ test -f $(py_site)/libquux.a
+ test -f $(py_site)/am_virtenv/libzardoz.a
+test-uninstall:
+ test ! -f $(py_site)/am_foo.py
+ test ! -f $(py_site)/am_foo.pyc
+ test ! -f $(py_site)/am_foo.pyo
+ test ! -f $(py_site)/am_virtenv/__init__.py
+ test ! -f $(py_site)/am_virtenv/__init__.pyc
+ test ! -f $(py_site)/am_virtenv/__init__.pyo
+ test ! -f $(py_site)/libquux.a
+ test ! -f $(py_site)/am_virtenv/libzardoz.a
+all-local: debug
+END
+
+cat > am_foo.py << 'END'
+def foo_func ():
+ return 12345
+END
+
+cat > __init__.py << 'END'
+def old_am ():
+ return 'AutoMake'
+END
+
+cat > foo.c << 'END'
+int foo (void)
+{
+ return 0;
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+# Try a VPATH build.
+mkdir build
+cd build
+../configure --prefix="$VIRTUAL_ENV"
+$MAKE install
+$MAKE test-install
+$MAKE test-run
+$MAKE uninstall
+$MAKE test-uninstall
+cd ..
+
+# Try an in-tree build.
+./configure --prefix="$VIRTUAL_ENV"
+$MAKE install
+$MAKE test-install
+$MAKE test-run
+$MAKE uninstall
+$MAKE test-uninstall
+
+$MAKE distclean
+
+# Overriding pythondir and pyexecdir with cache variables should work.
+./configure am_cv_python_pythondir="$py_site" \
+ am_cv_python_pyexecdir="$py_site"
+$MAKE install
+$MAKE test-install
+$MAKE test-run
+$MAKE uninstall
+$MAKE test-uninstall
+
+$MAKE distclean
+
+# Overriding pythondir and pyexecdir at make time should be enough.
+./configure --prefix="$cwd/bad-prefix"
+pythondir=$py_site pyexecdir=$py_site
+export pythondir pyexecdir
+$MAKE -e install
+test ! -d bad-prefix
+$MAKE -e test-install
+$MAKE test-run
+$MAKE -e uninstall
+$MAKE -e test-uninstall
+unset pythondir pyexecdir
+
+# Also check that the distribution is self-contained, for completeness.
+$MAKE distcheck
+
+# Finally, check that if we disable the virtualenv, we shouldn't be
+# able to access to the installed modules anymore.
+cd build
+$MAKE install
+python -c 'import am_foo; print(am_foo.__file__)'
+python -c 'import am_virtenv; print(am_virtenv.__file__)'
+deactivate "nondestructive"
+python -c 'import am_foo' && Exit 1
+python -c 'import am_virtenv' && Exit 1
+
+:
diff --git a/tests/python.test b/tests/python.test
index 8102ca002..07072da22 100755
--- a/tests/python.test
+++ b/tests/python.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
echo 'AM_PATH_PYTHON' >> configure.in
cat > Makefile.am << 'END'
@@ -27,7 +25,12 @@ python_PYTHON = foo.py
END
$ACLOCAL
-$AUTOMAKE -a
-grep '^py_compile =' Makefile.in
+AUTOMAKE_fails
+grep '^Makefile\.am:1:.* required file.*py-compile' stderr
+
+$AUTOMAKE -a
+grep '^py_compile *=' Makefile.in
test -f py-compile
+
+:
diff --git a/tests/python10.test b/tests/python10.test
index ff0ee151a..a585cb789 100755
--- a/tests/python10.test
+++ b/tests/python10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=python
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_PATH_PYTHON
AM_CONDITIONAL([ONE], [test "x$one" = x1])
@@ -41,7 +39,9 @@ one.py:
two.py:
echo 'def two(): return 1' >$@
+.PHONY: disttest
disttest: distdir
+ ls -l $(distdir)
test -f $(distdir)/one.py
test -f $(distdir)/two.py
END
@@ -81,3 +81,5 @@ test ! -f "$inst/my/one.pyc"
test ! -f "$inst/my/one.pyo"
$MAKE disttest
+
+:
diff --git a/tests/python11.test b/tests/python11.test
index 0f15f375f..298176468 100755
--- a/tests/python11.test
+++ b/tests/python11.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2008, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
# Python is not required for this test.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
m4_define([_AM_PYTHON_INTERPRETER_LIST], [IShouldNotExist1 IShouldNotExist2])
AM_PATH_PYTHON
@@ -44,12 +43,14 @@ grep 'no suitable Python interpreter found' stderr
sed 's/AM_PATH_PYTHON/AM_PATH_PYTHON(,,:)/' configure.in >configure.int
mv -f configure.int configure.in
-$ACLOCAL
-$AUTOCONF
-# This one should define PYTHON as : and exit succesfully
+$ACLOCAL --force
+$AUTOCONF --force
+# This one should define PYTHON as : and exit successfully
./configure
# Any user setting should be used.
./configure PYTHON=foo >stdout && { cat stdout; Exit 1; }
cat stdout
grep 'PYTHON = foo' stdout
+
+:
diff --git a/tests/python12.test b/tests/python12.test
index 2f52dfcaa..84d3cd325 100755
--- a/tests/python12.test
+++ b/tests/python12.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=python
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_PATH_PYTHON
AC_OUTPUT
diff --git a/tests/python2.test b/tests/python2.test
index 3e14fa2b5..4403dda57 100755
--- a/tests/python2.test
+++ b/tests/python2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,7 @@
. ./defs || Exit 1
-set -e
-
+$ACLOCAL
echo 1. pythondir not defined
@@ -28,8 +27,8 @@ PYTHON = x
python_PYTHON = foo.py
END
-$ACLOCAL
AUTOMAKE_fails -a
+grep 'pythondir.*undefined' stderr
grep AM_PATH_PYTHON stderr
@@ -40,8 +39,8 @@ PYTHON = x
pkgpython_PYTHON = foo.py
END
-$ACLOCAL
AUTOMAKE_fails -a
+grep 'pkgpythondir.*undefined' stderr
grep AM_PATH_PYTHON stderr
@@ -52,8 +51,8 @@ PYTHON = x
pyexec_PYTHON = foo.py
END
-$ACLOCAL
AUTOMAKE_fails -a
+grep 'pyexecdir.*undefined' stderr
grep AM_PATH_PYTHON stderr
@@ -64,8 +63,8 @@ PYTHON = x
pkgpyexec_PYTHON = foo.py
END
-$ACLOCAL
AUTOMAKE_fails -a
+grep 'pkgpyexecdir.*undefined' stderr
grep AM_PATH_PYTHON stderr
@@ -76,8 +75,8 @@ pkgpyexecdir = /here/we/go
pkgpyexec_PYTHON = foo.py
END
-$ACLOCAL
AUTOMAKE_fails -a
+grep 'PYTHON.*undefined' stderr
grep AM_PATH_PYTHON stderr
@@ -89,7 +88,7 @@ pkgpyexecdir = /here/we/go
pkgpyexec_PYTHON = foo.py
END
-$ACLOCAL
+rm -f py-compile
$AUTOMAKE -a
test -f py-compile
@@ -102,5 +101,6 @@ fubardir = /here/we/go
fubar_PYTHON = foo.py
END
-$ACLOCAL
$AUTOMAKE -a
+
+:
diff --git a/tests/python3.test b/tests/python3.test
index f01ad3108..a5e12bd0b 100755
--- a/tests/python3.test
+++ b/tests/python3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=python
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AM_PATH_PYTHON
AC_OUTPUT
@@ -47,3 +45,5 @@ $MAKE install
test -f "$inst/my/one.py"
test -f "$inst/my/one.pyc"
test -f "$inst/my/one.pyo"
+
+:
diff --git a/tests/python4.test b/tests/python4.test
index 11bb3ed84..cd9e4d6d5 100755
--- a/tests/python4.test
+++ b/tests/python4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
# Python is not required for this test.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AM_PATH_PYTHON
AC_OUTPUT
@@ -32,7 +30,14 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-# Simulate no Python
+# Simulate no Python.
./configure PYTHON=: 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'no suitable Python interpreter found' stderr
+
+# Again, but from the environment this time.
+env PYTHON=: ./configure 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'no suitable Python interpreter found' stderr
+
+:
diff --git a/tests/python5.test b/tests/python5.test
index 86f586341..8acbdfeec 100755
--- a/tests/python5.test
+++ b/tests/python5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,11 +20,9 @@
# Python is not required for this test.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
# Hopefully the Python team will never release such a version.
-AM_PATH_PYTHON(9999.9)
+AM_PATH_PYTHON([9999.9])
AC_OUTPUT
EOF
@@ -34,6 +32,14 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-./configure 2>stderr && { cat stderr >&2; Exit 1; }
+./configure >stdout 2>stderr && {
+ cat stdout
+ cat stderr >&2
+ Exit 1
+}
+cat stdout
cat stderr >&2
+$EGREP 'checking for a Python interpreter with version >= 9999\.9\.\.\. no(ne)? *$' stdout
grep 'no suitable Python interpreter found' stderr
+
+:
diff --git a/tests/python5b.test b/tests/python5b.test
new file mode 100755
index 000000000..7f77cda5d
--- /dev/null
+++ b/tests/python5b.test
@@ -0,0 +1,55 @@
+#! /bin/sh
+# Copyright (C) 2003, 2008, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test detection of missing Python.
+# Same as python5.test, but with the user forcing the python to use.
+
+required=python
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in << 'END'
+# Hopefully the Python team will never release such a version.
+AM_PATH_PYTHON([9999.9])
+AC_OUTPUT
+END
+
+mkdir bin
+cat > bin/my-python << 'END'
+#! /bin/sh
+exec python ${1+"$@"}
+END
+chmod a+x bin/my-python
+PATH=`pwd`/bin:$PATH_SEPARATOR$PATH
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure PYTHON=my-python >stdout 2>stderr && {
+ cat stdout
+ cat stderr >&2
+ Exit 1
+}
+cat stdout
+cat stderr >&2
+grep 'whether my-python version is >= 9999\.9\.\.\. no *$' stdout
+grep '[Pp]ython interpreter is too old' stderr
+
+:
diff --git a/tests/python6.test b/tests/python6.test
index 86dcfbba7..8b3c6f367 100755
--- a/tests/python6.test
+++ b/tests/python6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,10 +20,8 @@
# Python is not required for this test.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<\EOF
-AM_PATH_PYTHON(,, [echo "GREP ME$PYTHON" >&2])
+AM_PATH_PYTHON(,, [echo "$PYTHON" > py])
AC_OUTPUT
EOF
@@ -33,9 +31,8 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-# Simulate no Python
-./configure PYTHON=: 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'GREP ME:' stderr
+# Simulate no Python.
+./configure PYTHON=:
+test x"`cat py`" = x:
:
diff --git a/tests/python7.test b/tests/python7.test
index 27b2e7966..1390a4e15 100755
--- a/tests/python7.test
+++ b/tests/python7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,11 +20,9 @@
# Python is not required for this test.
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<\EOF
# Hopefully the Python team will never release such a version.
-AM_PATH_PYTHON(9999.9,, [echo "GREP ME$PYTHON" >&2])
+AM_PATH_PYTHON([9999.9], [], [echo "$PYTHON" > py])
AC_OUTPUT
EOF
@@ -34,8 +32,7 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-./configure 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'GREP ME:' stderr
+./configure
+test x"`cat py`" = x:
:
diff --git a/tests/python8.test b/tests/python8.test
index 51d02ad9b..981e64d54 100755
--- a/tests/python8.test
+++ b/tests/python8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,10 +19,9 @@
required=python
. ./defs || Exit 1
-set -e
-
-cat >>configure.in <<EOF
-AM_PATH_PYTHON(, [echo 'GREP ME' >&2])
+cat >>configure.in <<'EOF'
+# $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
+AM_PATH_PYTHON(, [$PYTHON -V >py-version 2>&1])
AC_OUTPUT
EOF
@@ -32,8 +31,7 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-./configure 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'GREP ME' stderr
+./configure
+grep '^Python [0-9]\.[0-9][0-9]*\.[0-9]' py-version
:
diff --git a/tests/python9.test b/tests/python9.test
index 6a91e9fee..da95884af 100755
--- a/tests/python9.test
+++ b/tests/python9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,15 +15,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test ACTION-IF-TRUE in AM_PATH_PYTHON.
-# Same as python8.test, but requiring a version.
+# Similar to python8.test, but requiring a version.
required=python
. ./defs || Exit 1
-set -e
-
-cat >>configure.in <<EOF
-AM_PATH_PYTHON(0.0, [echo 'GREP ME' >&2])
+cat >>configure.in <<'EOF'
+# $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
+AM_PATH_PYTHON([0.0], [$PYTHON -c 'print("%u:%u" % (1-1, 2**0))' > py.out])
AC_OUTPUT
EOF
@@ -33,8 +32,7 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-./configure 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'GREP ME' stderr
+./configure
+test x"`cat py.out`" = x0:1
:
diff --git a/tests/recurs.test b/tests/recurs.test
index 4937f4fa6..d20482c21 100755
--- a/tests/recurs.test
+++ b/tests/recurs.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL(ONE, true)
diff --git a/tests/recurs2.test b/tests/recurs2.test
index c025984f4..ef85475ff 100755
--- a/tests/recurs2.test
+++ b/tests/recurs2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
man_MANS = chgrp.1
man_aux = $(man_MANS:.1=.x)
diff --git a/tests/regex-obsolete.test b/tests/regex-obsolete.test
new file mode 100755
index 000000000..572441316
--- /dev/null
+++ b/tests/regex-obsolete.test
@@ -0,0 +1,30 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check tha the AM_WITH_REGEX macro is reported as obsolete.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AM_WITH_REGEX
+END
+
+$ACLOCAL
+$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '^configure\.in:.*AM_WITH_REGEX.*obsolete' stderr
+
+:
diff --git a/tests/regex.test b/tests/regex.test
index babd92a29..ff786914e 100755
--- a/tests/regex.test
+++ b/tests/regex.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_WITH_REGEX
END
diff --git a/tests/remake.test b/tests/remake.test
index 9c86b1b7f..236649dcb 100755
--- a/tests/remake.test
+++ b/tests/remake.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,20 +15,25 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure remaking rules in subdir are correctly generated.
+# Weak "grepping" test trying to ensure that remaking rules in a subdir
+# are correctly generated.
+# See also sister functional test `remake1a.test'.
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(sub/Makefile)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
END
mkdir sub
: > sub/Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^Makefile' sub/Makefile.in
+
+:
diff --git a/tests/remake10a.test b/tests/remake10a.test
new file mode 100755
index 000000000..7da457cc4
--- /dev/null
+++ b/tests/remake10a.test
@@ -0,0 +1,106 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test remake rules for m4 files included (also recursively) by
+# configure.ac.
+# Keep in sync with sister tests `remake10b.test' and `remake10c.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+magic3=%%MagicStringThree%%
+
+cat >> configure.in <<END
+m4_include([foo.m4])
+AC_SUBST([FINGERPRINT], [my_fingerprint])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+.PHONY: nil
+nil:
+## Used by "make distcheck" later.
+check-local:
+ test -f $(top_srcdir)/foo.m4
+ test ! -r $(top_srcdir)/bar.m4
+ test x'$(FINGERPRINT)' = x'DummyValue'
+END
+
+echo 'm4_define([my_fingerprint], [BadBadBad])' > foo.m4
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ top_srcdir=..
+ else
+ top_srcdir=.
+ fi
+
+ $top_srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "m4_define([my_fingerprint], [$magic1])" > $top_srcdir/foo.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "m4_define([my_fingerprint], [$magic2])" > $top_srcdir/foo.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+
+ $sleep
+ echo "m4_include([bar.m4])" > $top_srcdir/foo.m4
+ echo "m4_define([my_fingerprint], [$magic3])" > $top_srcdir/bar.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile
+
+ $sleep
+ echo "m4_define([my_fingerprint], [$magic1])" > $top_srcdir/bar.m4
+ $MAKE nil
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile && Exit 1
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "m4_define([my_fingerprint], [DummyValue])" > $top_srcdir/foo.m4
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+ $FGREP $magic3 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $top_srcdir
+
+done
+
+:
diff --git a/tests/remake10b.test b/tests/remake10b.test
new file mode 100755
index 000000000..0672fc9a4
--- /dev/null
+++ b/tests/remake10b.test
@@ -0,0 +1,105 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test remake rules for am files included (also recursively) by
+# Makefile.am.
+# Keep in sync with sister tests `remake10a.test' and `remake10c.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+magic3=%%MagicStringThree%%
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+.PHONY: nil
+nil:
+include foo.am
+## Used by "make distcheck" later.
+check-local:
+ test -f $(top_srcdir)/foo.am
+ test ! -r $(top_srcdir)/bar.am
+ test x'$(FINGERPRINT)' = x'DummyValue'
+END
+
+echo 'FINGERPRINT = BadBadBad' > foo.am
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ top_srcdir=..
+ else
+ top_srcdir=.
+ fi
+
+ $top_srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "FINGERPRINT = $magic1" > $top_srcdir/foo.am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "FINGERPRINT = $magic2" > $top_srcdir/foo.am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+
+ $sleep
+ echo 'include $(top_srcdir)/bar.am' > $top_srcdir/foo.am
+ echo "FINGERPRINT = $magic3" > $top_srcdir/bar.am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile
+
+ $sleep
+ echo "FINGERPRINT = $magic1" > $top_srcdir/bar.am
+ $MAKE nil
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile && Exit 1
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "FINGERPRINT = DummyValue" > $top_srcdir/foo.am
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+ $FGREP $magic3 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $top_srcdir
+
+done
+
+:
diff --git a/tests/remake10c.test b/tests/remake10c.test
new file mode 100755
index 000000000..9b9aca97d
--- /dev/null
+++ b/tests/remake10c.test
@@ -0,0 +1,110 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test remake rules for m4 files included (also recursively) by
+# aclocal.m4.
+# Keep in sync with sister tests `remake10a.test' and `remake10b.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+magic3=%%MagicStringThree%%
+
+cat >> configure.in <<END
+FINGERPRINT='my_fingerprint'
+AC_SUBST([FINGERPRINT])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+ACLOCAL_AMFLAGS = -I m4
+.PHONY: nil
+nil:
+## Used by "make distcheck" later.
+check-local:
+ test -f $(top_srcdir)/m4/foo.m4
+ test ! -r $(top_srcdir)/m4/bar.m4
+ test x'$(FINGERPRINT)' = x'DummyValue'
+END
+
+mkdir m4
+echo 'AC_DEFUN([my_fingerprint], [BadBadBad])' > m4/foo.m4
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL -I m4
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ top_srcdir=..
+ else
+ top_srcdir=.
+ fi
+
+ $top_srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic1])" > $top_srcdir/m4/foo.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic2])" > $top_srcdir/m4/foo.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+
+ $sleep
+ echo "m4_include([m4/bar.m4])" > $top_srcdir/m4/foo.m4
+ echo "AC_DEFUN([my_fingerprint], [$magic3])" > $top_srcdir/m4/bar.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic1])" > $top_srcdir/m4/bar.m4
+ $MAKE nil
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile && Exit 1
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [DummyValue])" > $top_srcdir/m4/foo.m4
+ echo "AC_DEFUN([AM_UNUSED], [NoSuchMacro])" > $top_srcdir/m4/bar.m4
+ $MAKE nil # required to work around limitation of GNU make 3.82
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+ $FGREP $magic3 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $top_srcdir
+
+done
+
+:
diff --git a/tests/remake11.test b/tests/remake11.test
new file mode 100755
index 000000000..bfd682e99
--- /dev/null
+++ b/tests/remake11.test
@@ -0,0 +1,82 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test remake rules in deeply nested subdirectories, and with a lot
+# of files. This is basically a mild stress test, ensuring that rebuild
+# rules don't break in obvious ways in a slightly "heavier than usual"
+# setup.
+
+required=GNUmake
+. ./defs || Exit 1
+
+ocwd=`pwd` || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+echo "AC_SUBST([FOO], [$magic1])" >> configure.in
+
+echo "@FOO@" > bar.in
+echo "AC_CONFIG_FILES([bar])" >> configure.in
+for i in 0 1 2 3 4 5 6 7 8 9; do
+ d=${d+"$d/"}sub$i
+ echo "SUBDIRS = sub$i" > Makefile.am
+ echo "AC_CONFIG_FILES([$d/Makefile])" >> "$ocwd"/configure.in
+ echo "AC_CONFIG_FILES([$d/bar])" >> "$ocwd"/configure.in
+ mkdir sub$i
+ cd sub$i
+ echo "$d: @FOO@" > bar.in
+done
+echo AC_OUTPUT >> "$ocwd"/configure.in
+: > Makefile.am
+unset d i
+bottom=`pwd`
+
+cd "$ocwd"
+
+makefiles_am_list=`find . -name Makefile.am | LC_ALL=C sort`
+makefiles_list=`echo "$makefiles_am_list" | sed 's/\.am$//'`
+bar_in_list=`find . -name bar.in | LC_ALL=C sort`
+bar_list=`echo "$bar_in_list" | sed 's/\.in$//'`
+
+cat configure.in # useful for debugging
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+for f in configure config.status $makefiles_list $bar_list; do
+ $FGREP "$magic1" $f
+done
+
+$sleep
+sed "s/$magic1/$magic2/" configure.in >configure.tmp
+mv -f configure.tmp configure.in
+
+cd "$bottom"
+$MAKE
+cd "$ocwd"
+
+for f in configure config.status $makefiles_list $bar_list; do
+ $FGREP "$magic2" $f
+done
+$FGREP "$magic1" configure config.status $makefiles_list $bar_list && Exit 1
+
+$MAKE distcheck
+
+:
diff --git a/tests/remake12.test b/tests/remake12.test
new file mode 100755
index 000000000..fe14885b7
--- /dev/null
+++ b/tests/remake12.test
@@ -0,0 +1,120 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test basic remake rules for Makefiles with non-default names
+# and/or with multiple sources.
+
+required=GNUmake
+. ./defs || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+magic3=%%MagicStringThree%%
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([zardoz])
+AC_CONFIG_LINKS([Makefile:Makefile])
+AC_OUTPUT
+END
+
+cat > zardoz.am <<END
+EXTRA_DIST = Makefile
+#H: $magic1
+END
+
+cat > Makefile <<END
+include zardoz
+nil:
+.PHONY: nil
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE nil
+grep '^#H:' zardoz.in # for debugging
+$FGREP $magic1 zardoz
+$FGREP $magic1 zardoz.in
+$MAKE distcheck
+$MAKE distclean # this shouldn't remove Makefile
+ls -l
+test -f Makefile
+
+./configure
+
+$sleep
+sed "s/%MAGIC3%/$magic3/" >> Makefile <<'END'
+my-check:
+ ls -l . $(srcdir) ;: for debugging
+ test -f $(srcdir)/quux.am
+ test -f $(srcdir)/quux.in
+ test -f $(srcdir)/bot.in
+ test -f $(srcdir)/top.in
+ test ! -r $(srcdir)/zardoz.am
+ test ! -r $(srcdir)/zardoz.in
+ grep FOO zardoz ;: for debugging
+ test x'$(FOO)' = x'%MAGIC3%'
+test:
+ ls -l ;: for debugging
+ test x'$(FOO)' = x'dummy'
+.PHONY: test my-check
+END
+sed "s/^#H:.*/#H: $magic2/" zardoz.am > t
+cat >> t <<'END'
+# used by "make distcheck" below
+check-local: my-check
+END
+mv -f t zardoz.am
+cat zardoz.am # for debugging
+$MAKE nil
+$FGREP my-check zardoz # sanity check
+$FGREP $magic1 zardoz zardoz.in && Exit 1
+$FGREP $magic2 zardoz
+$FGREP $magic2 zardoz.in
+
+./configure
+
+$sleep
+sed 's/^\(AC_CONFIG_FILES\)(.*/\1([zardoz:top.in:quux.in:bot.in])/' \
+ <configure.in >t
+mv -f t configure.in
+cat configure.in # for debugging
+sed '/^#H:/d' zardoz.am > quux.am
+echo 'FOO = dummy' >> quux.am
+echo 'BAR = $(BAZ)' > top.in
+echo "BAZ = $magic3" > bot.in
+$MAKE test
+$FGREP my-check zardoz # sanity check
+$FGREP $magic3 quux.in && Exit 1
+$FGREP $magic3 zardoz
+$FGREP $magic1 zardoz && Exit 1
+$FGREP $magic2 zardoz && Exit 1
+# After the remake above, the files `zardoz.am' and `zardoz.in'
+# should be no more needed
+echo 'endif' > zardoz.am # put in syntax error
+$MAKE test
+rm -f zardoz.in zardoz.am # get rid of them
+$MAKE test
+
+echo 'FOO = $(BAR)' >> quux.am
+$MAKE distcheck
+
+:
diff --git a/tests/remake1a.test b/tests/remake1a.test
new file mode 100755
index 000000000..a794a058e
--- /dev/null
+++ b/tests/remake1a.test
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure remaking rules in subdir are correctly generated.
+# See also sister "grepping" test `remake.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+fingerprint='=/FiNgErPrInT/='
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+: > sub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+# Rebuild rules should work even if there is no top-level
+# makefiles, if we are careful enough to trigger them only
+# in proper subdirs
+$sleep
+echo "# $fingerprint" > sub/Makefile.am
+cd sub
+$MAKE Makefile
+cd ..
+# Check that no spurious Makefile has been created in the
+# top-level directory.
+test ! -r Makefile
+# Check that the Makefile in the subdirectory has been properly
+# updated.
+$FGREP "$fingerprint" sub/Makefile
+
+:
diff --git a/tests/remake2.test b/tests/remake2.test
index 3b63dea6c..486da34b1 100755
--- a/tests/remake2.test
+++ b/tests/remake2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,20 +15,25 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure remaking rules in subdir are correct.
+# Weak "grepping" test trying to ensure that remaking rules in subdir
+# are correct even when there is no upper-level Makefile.
+# TODO: we should really add also functional tests for this!
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(sub/Makefile)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
END
mkdir sub
: > sub/Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-grep 'AUTOMAKE.*sub/Makefile' sub/Makefile.in
+grep '\$(AUTOMAKE).*sub/Makefile' sub/Makefile.in
+
+:
diff --git a/tests/remake3.test b/tests/remake3.test
index 08ec16a9e..b32235b26 100755
--- a/tests/remake3.test
+++ b/tests/remake3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,14 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure remaking rules work when there is no subdir Makefile.
+# Weak "grepping" test trying to ensure that remake rules work for files
+# in a subdirectory even when there is no Makefile for that subdirectory.
+# See also sister functional test `remake3a.test'.
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/foo)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/foo])
+AC_OUTPUT
END
: > Makefile.am
@@ -29,7 +30,9 @@ END
mkdir sub
: > sub/foo.in
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^sub/foo' Makefile.in
+
+:
diff --git a/tests/remake3a.test b/tests/remake3a.test
new file mode 100755
index 000000000..38a3f401f
--- /dev/null
+++ b/tests/remake3a.test
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure that remake rules work for files in a subdirectory even when
+# there is no Makefile for that subdirectory.
+# See also sister "grepping" test `remake3.test'.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/foo])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+all-local: sub/foo
+END
+
+mkdir sub
+: > sub/foo.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+# First a VPATH build.
+mkdir build
+cd build
+../configure
+$sleep
+test -f sub/foo
+test ! -s sub/foo
+echo '#GrepMe#' > ../sub/foo.in
+$MAKE
+grep '#GrepMe#' sub/foo
+
+cd ..
+
+# Now try an in-tree build.
+: > sub/foo.in # restore its original (empty) content
+./configure
+$sleep
+test -f sub/foo
+test ! -s sub/foo
+echo '#GrepMe#' > sub/foo.in
+$MAKE
+grep '#GrepMe#' sub/foo
+
+# Finally try to check the distribution.
+$sleep
+echo '%GrepMe%' > sub/foo.in
+cat >>Makefile.am <<END
+check-local:
+ grep '%GrepMe%' sub/foo
+END
+$MAKE
+grep "grep '%GrepMe%' sub/foo" Makefile.in # sanity check
+$MAKE distcheck
+
+:
diff --git a/tests/remake4.test b/tests/remake4.test
index d6dbed7bd..c4c21adb6 100755
--- a/tests/remake4.test
+++ b/tests/remake4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,8 +27,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
# Rebuild rule are ok until make dist, but not afterwards.
if test ! -f rebuild_ok; then
@@ -50,7 +48,9 @@ $MAKE
$sleep
touch aclocal.m4
$MAKE distdir
-cd remake4-1.0
+cd $me-1.0
test ! -f rebuild_ok
./configure
$MAKE
+
+:
diff --git a/tests/remake5.test b/tests/remake5.test
index d353632c8..d3bfc1060 100755
--- a/tests/remake5.test
+++ b/tests/remake5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,11 +21,9 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_MAINTAINER_MODE
-m4_include(foo.m4)
+m4_include([foo.m4])
if test ! -f rebuild_ok; then
ACLOCAL=false
AUTOMAKE=false
@@ -70,3 +68,8 @@ $sleep
echo 'AC_SUBST([YIPPY_YIPPY_YEAH])' >foo.m4
$MAKE
grep YIPPY_YIPPY_YEAH Makefile
+
+# Try the distribution, for completeness.
+$MAKE distcheck
+
+:
diff --git a/tests/remake6.test b/tests/remake6.test
index a25e486a9..c7d01e10f 100755
--- a/tests/remake6.test
+++ b/tests/remake6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,12 +17,10 @@
# Make sure remaking rules work when subdir Makefile.in has been removed.
. ./defs || Exit 1
-set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
END
cat > Makefile.am <<'END'
@@ -42,23 +40,25 @@ $MAKE
# only.
rm -f Makefile.in
-$MAKE >stdout
+$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
test `grep -c " --run " stdout` -eq 1
rm -f sub/Makefile.in
-$MAKE >stdout
+$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
test `grep -c " --run " stdout` -eq 1
$sleep # Let touched files appear newer.
touch Makefile.am
-$MAKE >stdout
+$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
test `grep -c " --run " stdout` -eq 1
touch sub/Makefile.am
-$MAKE >stdout
+$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
test `grep -c " --run " stdout` -eq 1
+
+:
diff --git a/tests/remake7.test b/tests/remake7.test
index 670f60b00..39f7ca953 100755
--- a/tests/remake7.test
+++ b/tests/remake7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,12 +17,10 @@
# Make sure remaking rules fail when they should.
. ./defs || Exit 1
-set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
END
cat > Makefile.am <<'END'
@@ -67,4 +65,5 @@ $MAKE && Exit 1
rm -f Makefile.in
$MAKE && Exit 1
+
:
diff --git a/tests/remake8a.test b/tests/remake8a.test
new file mode 100755
index 000000000..c625e32cd
--- /dev/null
+++ b/tests/remake8a.test
@@ -0,0 +1,191 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test basic remake rules for Makefiles, for an *in-tree build*.
+# This testcase checks dependency of generated Makefile from Makefile.am,
+# configure.ac, acinclude.m4, aclocal.m4, and extra m4 files considered
+# by aclocal.
+# Keep this in sync with sister test `remake8b.test', which performs the
+# same checks for a VPATH build.
+
+required=GNUmake
+. ./defs || Exit 1
+
+mv -f configure.in configure.stub
+
+cat > Makefile.am <<'END'
+all-local: foo
+foo:
+ echo '!Foo!' >$@
+check-local:
+ cat foo
+ grep '!Foo!' foo
+CLEANFILES = foo
+END
+
+cat configure.stub - > configure.in <<'END'
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+srcdir='.' # to make syncing with remake8b.test easier.
+
+$srcdir/configure
+
+$MAKE
+cat foo
+grep '!Foo!' foo
+$MAKE distcheck
+
+rm -f foo
+
+# Modify just Makefile.am.
+
+$sleep
+
+cat > $srcdir/Makefile.am <<'END'
+all-local: bar
+bar:
+ echo '!Baz!' >$@
+check-local:
+ cat bar
+ grep '!Baz!' bar
+ test ! -r $(srcdir)/foo
+ test ! -r foo
+CLEANFILES = bar
+END
+
+$MAKE
+cat bar
+grep '!Baz!' bar
+test ! -r foo
+$MAKE distcheck
+
+rm -f bar
+
+# Modify Makefile.am and configure.in.
+
+$sleep
+
+cat > $srcdir/Makefile.am <<'END'
+all-local: quux
+check-local:
+ cat quux
+ grep '!Zardoz!' quux
+ test ! -r $(srcdir)/bar
+ test ! -r bar
+END
+
+cat $srcdir/configure.stub - > $srcdir/configure.in <<'END'
+AC_CONFIG_FILES([quux])
+AC_SUBST([QUUX], [Zardoz])
+AC_OUTPUT
+END
+
+cat > $srcdir/quux.in <<'END'
+!@QUUX@!
+END
+
+$MAKE
+cat quux
+grep '!Zardoz!' quux
+test ! -r bar
+$MAKE distcheck
+
+rm -f quux
+
+# Modify Makefile.am to add a directory of extra m4 files
+# considered by aclocal.
+
+$sleep
+
+mkdir $srcdir/m4
+
+cat > $srcdir/Makefile.am <<'END'
+ACLOCAL_AMFLAGS = -I m4
+all-local: quux
+check-local:
+ cat quux
+ grep '%Foo%' quux
+ test x'$(QUUX)' = x'%Foo%'
+END
+
+$MAKE # this should place aclocal flags in Makefile
+grep '.*-I m4' Makefile # sanity check
+
+# Modify configure.in and aclocal.m4.
+
+$sleep
+
+cat $srcdir/configure.stub - > $srcdir/configure.in <<'END'
+AC_CONFIG_FILES([quux])
+MY_CUSTOM_MACRO
+AC_OUTPUT
+END
+
+cat >> $srcdir/aclocal.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Foo%])])
+END
+
+$MAKE
+cat quux
+grep '%Foo%' quux
+$MAKE distcheck
+
+# Modify Makefile.am, remove aclocal.m4, and add a new m4 file to
+# the directory of extra m4 files considered by aclocal. This new
+# file should now provide a macro required by configure.in and that
+# was previously provided by aclocal.m4.
+
+$sleep
+
+sed 's/%Foo%/%Bar%/g' $srcdir/Makefile.am > t
+mv -f t $srcdir/Makefile.am
+cat $srcdir/Makefile.am
+rm -f $srcdir/aclocal.m4
+cat > $srcdir/m4/blah.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Bar%])])
+END
+
+$MAKE
+cat quux
+grep '%Bar%' quux
+$MAKE distcheck
+
+# Modify Makefile.am, remove all the extra m4 files to considered
+# by aclocal, and add an acinclude.m4 file. This last file should
+# now provide a macro required by configure.in, and that was
+# previously provided by the extra m4 files considered by aclocal.
+
+$sleep
+
+rm -f $srcdir/m4/*.m4
+sed 's/%Bar%/%Quux%/g' $srcdir/Makefile.am > t
+mv -f t $srcdir/Makefile.am
+cat $srcdir/Makefile.am
+cat > $srcdir/acinclude.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Quux%])])
+END
+
+$MAKE
+cat quux
+grep '%Quux%' quux
+$MAKE distcheck
+
+:
diff --git a/tests/remake8b.test b/tests/remake8b.test
new file mode 100755
index 000000000..86f0f8e86
--- /dev/null
+++ b/tests/remake8b.test
@@ -0,0 +1,193 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test basic remake rules for Makefiles, for a *VPATH build*.
+# This testcase checks dependency of generated Makefile from Makefile.am,
+# configure.ac, acinclude.m4, aclocal.m4, and extra m4 files considered
+# by aclocal.
+# Keep this in sync with sister test `remake8a.test', which performs the
+# same checks for a in-tree build.
+
+required=GNUmake
+. ./defs || Exit 1
+
+mv -f configure.in configure.stub
+
+cat > Makefile.am <<'END'
+all-local: foo
+foo:
+ echo '!Foo!' >$@
+check-local:
+ cat foo
+ grep '!Foo!' foo
+CLEANFILES = foo
+END
+
+cat configure.stub - > configure.in <<'END'
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+mkdir build
+cd build
+srcdir='..' # to make syncing with remake8a.test easier.
+
+$srcdir/configure
+
+$MAKE
+cat foo
+grep '!Foo!' foo
+$MAKE distcheck
+
+rm -f foo
+
+# Modify just Makefile.am.
+
+$sleep
+
+cat > $srcdir/Makefile.am <<'END'
+all-local: bar
+bar:
+ echo '!Baz!' >$@
+check-local:
+ cat bar
+ grep '!Baz!' bar
+ test ! -r $(srcdir)/foo
+ test ! -r foo
+CLEANFILES = bar
+END
+
+$MAKE
+cat bar
+grep '!Baz!' bar
+test ! -r foo
+$MAKE distcheck
+
+rm -f bar
+
+# Modify Makefile.am and configure.in.
+
+$sleep
+
+cat > $srcdir/Makefile.am <<'END'
+all-local: quux
+check-local:
+ cat quux
+ grep '!Zardoz!' quux
+ test ! -r $(srcdir)/bar
+ test ! -r bar
+END
+
+cat $srcdir/configure.stub - > $srcdir/configure.in <<'END'
+AC_CONFIG_FILES([quux])
+AC_SUBST([QUUX], [Zardoz])
+AC_OUTPUT
+END
+
+cat > $srcdir/quux.in <<'END'
+!@QUUX@!
+END
+
+$MAKE
+cat quux
+grep '!Zardoz!' quux
+test ! -r bar
+$MAKE distcheck
+
+rm -f quux
+
+# Modify Makefile.am to add a directory of extra m4 files
+# considered by aclocal.
+
+$sleep
+
+mkdir $srcdir/m4
+
+cat > $srcdir/Makefile.am <<'END'
+ACLOCAL_AMFLAGS = -I m4
+all-local: quux
+check-local:
+ cat quux
+ grep '%Foo%' quux
+ test x'$(QUUX)' = x'%Foo%'
+END
+
+$MAKE # this should place aclocal flags in Makefile
+grep '.*-I m4' Makefile # sanity check
+
+# Modify configure.in and aclocal.m4.
+
+$sleep
+
+cat $srcdir/configure.stub - > $srcdir/configure.in <<'END'
+AC_CONFIG_FILES([quux])
+MY_CUSTOM_MACRO
+AC_OUTPUT
+END
+
+cat >> $srcdir/aclocal.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Foo%])])
+END
+
+$MAKE
+cat quux
+grep '%Foo%' quux
+$MAKE distcheck
+
+# Modify Makefile.am, remove aclocal.m4, and add a new m4 file to
+# the directory of extra m4 files considered by aclocal. This new
+# file should now provide a macro required by configure.in and that
+# was previously provided by aclocal.m4.
+
+$sleep
+
+sed 's/%Foo%/%Bar%/g' $srcdir/Makefile.am > t
+mv -f t $srcdir/Makefile.am
+cat $srcdir/Makefile.am
+rm -f $srcdir/aclocal.m4
+cat > $srcdir/m4/blah.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Bar%])])
+END
+
+$MAKE
+cat quux
+grep '%Bar%' quux
+$MAKE distcheck
+
+# Modify Makefile.am, remove all the extra m4 files to considered
+# by aclocal, and add an acinclude.m4 file. This last file should
+# now provide a macro required by configure.in, and that was
+# previously provided by the extra m4 files considered by aclocal.
+
+$sleep
+
+rm -f $srcdir/m4/*.m4
+sed 's/%Bar%/%Quux%/g' $srcdir/Makefile.am > t
+mv -f t $srcdir/Makefile.am
+cat $srcdir/Makefile.am
+cat > $srcdir/acinclude.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Quux%])])
+END
+
+$MAKE
+cat quux
+grep '%Quux%' quux
+$MAKE distcheck
+
+:
diff --git a/tests/remake9a.test b/tests/remake9a.test
new file mode 100755
index 000000000..d46f31742
--- /dev/null
+++ b/tests/remake9a.test
@@ -0,0 +1,104 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test remake rules when configure.in or its prerequisites change.
+# Keep in sync with the other sister tests `remake9*.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+cat >> configure.in <<END
+FINGERPRINT=BadBadBad
+AC_SUBST([FINGERPRINT])
+AC_CONFIG_FILES([foo.sh:foo.in], [chmod a+x foo.sh])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+nil:
+.PHONY: nil
+
+$(srcdir)/configure.in: $(srcdir)/tweak-configure-in
+ $(SHELL) $(srcdir)/tweak-configure-in <$@ >$@-t
+ mv -f $@-t $@
+EXTRA_DIST = $(srcdir)/tweak-configure-in
+
+# Used by "make distcheck" later.
+check-local:
+ test x'$(FINGERPRINT)' = x'DummyValue'
+ test x"`./foo.sh`" = x"DummyValue"
+END
+
+cat > foo.in <<END
+#!/bin/sh
+echo '@FINGERPRINT@'
+END
+
+echo cat > tweak-configure-in # no-op by default
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ srcdir=..
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ sed "s/^\\(FINGERPRINT\\)=.*/\\1=$magic1/" $srcdir/configure.in >t
+ mv -f t $srcdir/configure.in
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+ test x"`./foo.sh`" = x"$magic1"
+
+ $sleep
+ echo 'sed "s/^\\(FINGERPRINT\\)=.*/\\1='$magic2'/"' \
+ > $srcdir/tweak-configure-in
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+ test x"`./foo.sh`" = x"$magic2"
+
+ $sleep
+ echo cat > $srcdir/tweak-configure-in # no-op again
+ sed "s/^\\(FINGERPRINT\\)=.*/\\1=DummyValue/" $srcdir/configure.in >t
+ mv -f t $srcdir/configure.in
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $srcdir
+
+done
+
+:
diff --git a/tests/remake9b.test b/tests/remake9b.test
new file mode 100755
index 000000000..680ce9abc
--- /dev/null
+++ b/tests/remake9b.test
@@ -0,0 +1,106 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test remake rules when Makefile.am or its prerequisites change.
+# Keep in sync with the other sister tests `remake9*.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+cat >> configure.in <<END
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+FINGERPRINT = BadBadBad
+
+all-local: nil
+nil: foo.sh
+.PHONY: nil
+
+$(srcdir)/Makefile.am: $(srcdir)/tweak-makefile-am
+ $(SHELL) $(srcdir)/tweak-makefile-am <$@ >$@-t
+ mv -f $@-t $@
+EXTRA_DIST = $(srcdir)/tweak-makefile-am
+
+foo.sh: Makefile
+ rm -f $@ $@-t
+ echo '#!/bin/sh' > $@-t
+ echo "echo '$(FINGERPRINT)'" >> $@-t
+ chmod a+x $@-t && mv -f $@-t $@
+CLEANFILES = foo.sh
+
+# Used by "make distcheck" later.
+check-local:
+ test x'$(FINGERPRINT)' = x'DummyValue'
+ test x"`./foo.sh`" = x"DummyValue"
+END
+
+echo cat > tweak-makefile-am # no-op by default
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ srcdir=..
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = $magic1/" $srcdir/Makefile.am >t
+ mv -f t $srcdir/Makefile.am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+ test x"`./foo.sh`" = x"$magic1"
+
+ $sleep
+ echo 'sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = '$magic2'/"' \
+ > $srcdir/tweak-makefile-am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+ test x"`./foo.sh`" = x"$magic2"
+
+ $sleep
+ echo cat > $srcdir/tweak-makefile-am # no-op again
+ sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = DummyValue/" $srcdir/Makefile.am >t
+ mv -f t $srcdir/Makefile.am
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $srcdir
+
+done
+
+:
diff --git a/tests/remake9c.test b/tests/remake9c.test
new file mode 100755
index 000000000..3328bebcf
--- /dev/null
+++ b/tests/remake9c.test
@@ -0,0 +1,107 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test remake rules when acinclude.m4 or its prerequisites change.
+# Keep in sync with the other sister tests `remake9*.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+cat >> configure.in <<END
+FINGERPRINT='my_fingerprint'
+AC_SUBST([FINGERPRINT])
+AC_CONFIG_FILES([foo.sh:foo.in], [chmod a+x foo.sh])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+nil:
+.PHONY: nil
+
+# The right way to extend an autogenerated aclocal.m4 is to provide
+# an acinclude.m4 file.
+$(srcdir)/acinclude.m4: $(srcdir)/tweak-acinclude-m4
+ $(SHELL) $(srcdir)/tweak-acinclude-m4 <$@ >$@-t
+ mv -f $@-t $@
+ touch $@
+EXTRA_DIST = $(srcdir)/tweak-acinclude-m4
+
+# Used by "make distcheck" later.
+check-local:
+ test x'$(FINGERPRINT)' = x'DummyValue'
+ test x"`./foo.sh`" = x"DummyValue"
+END
+
+cat > foo.in <<END
+#!/bin/sh
+echo '@FINGERPRINT@'
+END
+
+echo "AC_DEFUN([my_fingerprint], [BadBadBad])" > acinclude.m4
+
+echo : > tweak-acinclude-m4 # no-op by default
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ srcdir=..
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic1])" > $srcdir/acinclude.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+ test x"`./foo.sh`" = x"$magic1"
+
+ $sleep
+ echo "echo 'AC_DEFUN([my_fingerprint], [$magic2])'" \
+ > $srcdir/tweak-acinclude-m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+ test x"`./foo.sh`" = x"$magic2"
+
+ $sleep
+ echo : > $srcdir/tweak-acinclude-m4 # no-op again
+ echo "AC_DEFUN([my_fingerprint], [DummyValue])" > $srcdir/acinclude.m4
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $srcdir
+
+done
+
+:
diff --git a/tests/remake9d.test b/tests/remake9d.test
new file mode 100755
index 000000000..ecb93d96a
--- /dev/null
+++ b/tests/remake9d.test
@@ -0,0 +1,107 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test remake rules when aclocal.m4 or its prerequisites change.
+# Keep in sync with the other sister tests `remake9*.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+cat >> configure.in <<END
+FINGERPRINT='my_fingerprint'
+AC_SUBST([FINGERPRINT])
+AC_CONFIG_FILES([foo.sh:foo.in], [chmod a+x foo.sh])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+nil:
+.PHONY: nil
+
+# A non-autogenerated aclocal.m4 can be extended by hand.
+$(srcdir)/aclocal.m4: $(srcdir)/tweak-aclocal-m4
+ $(SHELL) $(srcdir)/tweak-aclocal-m4 <$@ >$@-t
+ mv -f $@-t $@
+ touch $@
+EXTRA_DIST = $(srcdir)/tweak-aclocal-m4
+
+# Used by "make distcheck" later.
+check-local:
+ test x'$(FINGERPRINT)' = x'DummyValue'
+ test x"`./foo.sh`" = x"DummyValue"
+END
+
+cat > foo.in <<END
+#!/bin/sh
+echo '@FINGERPRINT@'
+END
+
+echo cat > tweak-aclocal-m4 # no-op by default
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+# Cheatingly mark aclocal.m4 as non auto-generated.
+sed '/^ *#.*generated automatically/d' aclocal.m4 > t
+mv -f t aclocal.m4
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ srcdir=..
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic1])dnl %%%" >> $srcdir/aclocal.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+ test x"`./foo.sh`" = x"$magic1"
+
+ $sleep
+ echo "sed 's/.*dnl *%%%.*/AC_DEFUN([my_fingerprint], [$magic2])/'" \
+ > $srcdir/tweak-aclocal-m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+ test x"`./foo.sh`" = x"$magic2"
+
+ $sleep
+ echo cat > $srcdir/tweak-aclocal-m4 # no-op again
+ echo 'AC_DEFUN([my_fingerprint], [DummyValue])' >> $srcdir/aclocal.m4
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $srcdir
+
+done
+
+:
diff --git a/tests/repeated-options.test b/tests/repeated-options.test
new file mode 100755
index 000000000..4ad6be605
--- /dev/null
+++ b/tests/repeated-options.test
@@ -0,0 +1,78 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that automake does not complain on repeated options, nor
+# generate broken or incorrect makefiles.
+
+required=bzip2
+. ./defs || Exit 1
+
+cat >configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip no-dist-gzip dist-bzip2])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = parallel-tests subdir-objects subdir-objects
+AUTOMAKE_OPTIONS += dist-bzip2 parallel-tests
+TESTS = foo.test
+EXTRA_DIST = $(TESTS)
+bin_PROGRAMS = sub/foo
+END
+
+mkdir sub
+
+cat > foo.test <<'END'
+#!/bin/sh
+test -f sub/foo && test -x sub/foo
+END
+chmod a+x foo.test
+
+cat > sub/foo.c <<'END'
+int main (void)
+{
+ return 0;
+}
+END
+
+cp $testsrcdir/../lib/compile .
+
+$ACLOCAL
+$AUTOMAKE --foreign --foreign -Wall 2>stderr || { cat stderr >&2; Exit 1; }
+test -s stderr && { cat stderr >&2; Exit 1; }
+rm -f stderr
+$AUTOCONF
+
+./configure
+$MAKE
+ls -l . sub
+test -f sub/foo.o
+test -f sub/foo
+$MAKE check
+ls -l
+test -f foo.log
+test -f test-suite.log
+$MAKE clean
+$MAKE distcheck
+ls -l
+test -f $me-1.0.tar.bz2
+test ! -r $me-1.0.tar.gz
+
+:
diff --git a/tests/req.test b/tests/req.test
index 39bf3492d..ef250996a 100755
--- a/tests/req.test
+++ b/tests/req.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,6 +33,8 @@ module=[$1]
AC_SUBST(module)])
END
-$ACLOCAL || Exit 1
+$ACLOCAL
grep 'DEFUN.*INIT_AUTOMAKE' aclocal.m4
+
+:
diff --git a/tests/reqd.test b/tests/reqd.test
index 58a8839b6..aa723cc29 100755
--- a/tests/reqd.test
+++ b/tests/reqd.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<EOF
AC_CONFIG_FILES([one/Makefile two/Makefile])
AC_OUTPUT
diff --git a/tests/reqd2.test b/tests/reqd2.test
index b47ef156d..dfb237133 100755
--- a/tests/reqd2.test
+++ b/tests/reqd2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required='libtoolize'
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([req2], [1.0])
AC_CONFIG_AUX_DIR([autoconf])
diff --git a/tests/rulepat.test b/tests/rulepat.test
index c15e91001..3d939c904 100755
--- a/tests/rulepat.test
+++ b/tests/rulepat.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +23,9 @@ cat > Makefile.am << 'END'
$(srcdir)/Makefile.am:
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^$(srcdir)/Makefile\.am' Makefile.in
+
+:
diff --git a/tests/sanity.test b/tests/sanity.test
index ed7fe2809..7dd31eb1a 100755
--- a/tests/sanity.test
+++ b/tests/sanity.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
mkdir 'unsafe$'
cd 'unsafe$'
diff --git a/tests/scripts.test b/tests/scripts.test
index b9aed7f7d..7501fff68 100755
--- a/tests/scripts.test
+++ b/tests/scripts.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2010 Free Software
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
noinst_SCRIPTS = foo
END
diff --git a/tests/seenc.test b/tests/seenc.test
index 3bfac3754..ea51cf5a1 100755
--- a/tests/seenc.test
+++ b/tests/seenc.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
dnl AC_PROG_CC and AC_PROG_CXX missing on purpose
AC_LIBOBJ([fsusage])
diff --git a/tests/self-check-cleanup.test b/tests/self-check-cleanup.test
new file mode 100755
index 000000000..92a203e98
--- /dev/null
+++ b/tests/self-check-cleanup.test
@@ -0,0 +1,129 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Sanity check for the automake testsuite.
+# Check creation/removal of temporary test working directory by `./defs'.
+
+. ./defs || Exit 1
+
+if test x"$sh_errexit_works" != x"yes"; then
+ echo "$me: the shell can't have a working exit trap with 'set -e'" >&2
+ Exit 77
+fi
+
+# We still need a little hack to make ./defs work outside automake's
+# tree `tests' subdirectory. Not a big deal.
+sed "s|^testbuilddir=.*|testbuilddir='`pwd`'|" ../defs-static >defs-static
+cp ../defs .
+
+have_symlinks=false
+ln -s defs foo && have_symlinks=:
+export have_symlinks # Is used also by spawned shells.
+
+dir=dummy.dir
+
+# Check that pre-test cleanup works also with directories with
+# "null" permissions, and containing broken symlinks.
+mkdir $dir $dir/sub
+cd $dir
+touch file sub/file
+if $have_symlinks; then
+ ln -s file symlink
+ ln -s none brokenlink
+fi
+cd ..
+chmod 000 $dir/sub/* $dir/file $dir/symlink
+chmod 000 $dir/sub $dir
+$SHELL -c '. ./defs' dummy.test
+test ! -f $dir
+test ! -d $dir
+test ! -r $dir
+
+# Check that post-test cleanup works also with directories with
+# "null" permissions, and containing broken symlinks.
+$SHELL -c '
+ . ./defs || Exit 1
+ set -e
+ mkdir dir dir/sub
+ cd dir
+ touch file sub/file
+ if $have_symlinks; then
+ ln -s file symlink
+ ln -s none brokenlink
+ fi
+ cd ..
+ chmod 000 dir/sub/* dir/file dir/symlink
+ chmod 000 dir/sub dir
+' dummy.test
+test ! -f $dir
+test ! -d $dir
+test ! -r $dir
+
+# Check that pre-test cleanup does not unduly change the permissions of
+# files to which symlinks in the temporary test directory point to.
+if $have_symlinks; then
+
+ mkdir dir
+ chmod 000 dir
+ : > file
+ chmod 000 file
+
+ mkdir $dir
+ cd $dir
+ ln -s ../dir ../file .
+ cd ..
+ $SHELL -c '. ./defs' dummy.test
+ ls -l # For debugging.
+ ls -l file | grep "^---------- .*file"
+ ls -ld dir | grep "^d--------- .*dir"
+
+ $SHELL -c '
+ ocwd=`pwd` || exit 1
+ . ./defs || Exit 1
+ ln -s "$ocwd/dir" "$ocwd/file" .
+ ' dummy.test
+ ls -l # For debugging.
+ ls -l file | grep "^---------- .*file"
+ ls -ld dir | grep "^d--------- .*dir"
+
+ rmdir dir
+ rm -f file
+
+fi # $have_symlinks
+
+# Check that the cleanup trap does not remove the temporary
+# test directory in case of test failure, skip, hard-error,
+# or when receiving a signal.
+for bailout_command in \
+ 'Exit 1' \
+ 'Exit 2' \
+ 'Exit 10' \
+ 'Exit 77' \
+ 'Exit 99' \
+ 'Exit 126' \
+ 'Exit 127' \
+ 'Exit 255' \
+ 'kill -1 $$' \
+ 'kill -2 $$' \
+ 'kill -9 $$' \
+ 'kill -13 $$' \
+ 'kill -15 $$' \
+; do
+ $SHELL -c ". ./defs; : > foo; $bailout_command" dummy.test && Exit 1
+ test -f dummy.dir/foo
+done
+
+:
diff --git a/tests/self-check-dir.test b/tests/self-check-dir.test
new file mode 100755
index 000000000..a8e5d889a
--- /dev/null
+++ b/tests/self-check-dir.test
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Sanity check for the automake testsuite.
+# Check that tests using `./defs' create a proper temporary directory,
+# and run in it.
+
+set -ex
+
+this=S_dir
+outcome=:
+pwd
+
+rm -f $this.tmp
+
+$SHELL -c "
+ . ./defs || Exit 1
+ : > $this.tmp
+ case \`pwd\` in '`pwd`'/$this.dir);; *) Exit 1;; esac
+" $this.test || outcome=false
+
+test -f $this.tmp && { rm -f $this.tmp; outcome=false; }
+
+$outcome
diff --git a/tests/self-check-exit.test b/tests/self-check-exit.test
new file mode 100755
index 000000000..73f3ea5f9
--- /dev/null
+++ b/tests/self-check-exit.test
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Sanity check for the automake testsuite.
+# Check that. in case of failing commands, the correct exit status is
+# passed to the exit trap installed by the `./defs' script.
+# Also check that the `errexit' shell flag is active.
+
+. ./defs-static || exit 99
+
+for st in 1 2 3 4 5 77 99 126 127 128 129 130 255; do
+
+ echo "* Try: Exit $st"
+ $SHELL -c ". ./defs; Exit $st; :"
+ rc=$?
+ echo "* rc=$rc"
+ echo
+ test $rc -eq $st || exit 1
+
+ echo "* Try: sh -c 'exit $st'"
+ $SHELL -c ". ./defs; sh -c 'exit $st'; :"
+ rc=$?
+ echo "* rc=$rc"
+ echo
+ test $rc -eq $st || exit 1
+
+done
+
+echo "* Try: non-existent-program"
+$SHELL -c ". ./defs; non-existent-program; :"
+rc=$?
+echo "* rc=$rc"
+echo
+test $rc -eq 127 || exit 1
+
+for sig in 1 2 13 15; do
+
+ echo "* Try: kill -$sig \$\$"
+ if test $sig -eq 2; then
+ # Some Korn shells might otherwise get a spurious SIGINT
+ # signal when one is sent to the child $SHELL.
+ trap : 2
+ fi
+ $SHELL -c ". ./defs; kill -$sig \$\$; :"
+ rc=$?
+ if test $sig -eq 2; then
+ # Reset default SIGINT handler as portably as possible.
+ trap 2 || trap - 2
+ fi
+ echo "* rc=$rc"
+ echo
+ if test x"$sh_errexit_works" = x"yes"; then
+ # The exit trap should turn into an hard errors any failure
+ # caused by signals.
+ test $rc -eq 99 || exit 1
+ else
+ # The exit trap is not installed, so that the shell should exit
+ # with status 128+n when receiving signal number n. But don't
+ # be too strict in the check, as POSIX only says that "The exit
+ # status of a command that terminated because it received a
+ # signal shall be reported as greater than 128".
+ test $rc -gt 128 || exit 1
+ fi
+
+done
+
+:
diff --git a/tests/self-check-is_newest.test b/tests/self-check-is_newest.test
new file mode 100755
index 000000000..f17922952
--- /dev/null
+++ b/tests/self-check-is_newest.test
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Sanity check for the automake testsuite.
+# Check the `is_newest' subroutine.
+
+. ./defs || Exit 1
+
+: > a
+$sleep
+: > b
+: > c
+
+stat a b c || : # for debugging
+
+is_newest c a
+is_newest b a
+is_newest a b && Exit 1
+is_newest c b
+is_newest c c
+is_newest c a b c
+
+touch -r c d
+
+stat c d || : # for debugging
+
+is_newest c d
+
+:
diff --git a/tests/self-check-me.test b/tests/self-check-me.test
new file mode 100755
index 000000000..5773e2c2a
--- /dev/null
+++ b/tests/self-check-me.test
@@ -0,0 +1,29 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Sanity check for the automake testsuite.
+# Make sure that $me gets automatically defined by `./defs'.
+
+set -ex
+
+: ${SHELL=/bin/sh}
+
+$SHELL -c '. ./defs && echo me=$me' foo-bar-.test | grep '^me=foo-bar-$'
+$SHELL -c '. ./defs && echo me=$me' _foo__bar.test | grep '^me=_foo__bar$'
+$SHELL -c '. ./defs && echo me=$me' 012.test | grep '^me=012$'
+$SHELL -c '. ./defs && echo me=$me' foo.bar | grep '^me=foo\.bar$'
+
+:
diff --git a/tests/self-check-sanity.test b/tests/self-check-sanity.test
new file mode 100755
index 000000000..d35432f69
--- /dev/null
+++ b/tests/self-check-sanity.test
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Sanity check for the automake testsuite.
+# Test the sanity checks performed by the `defs' script. Also check
+# that we can use `defs' elsewhere, when we duplicate some of the
+# infrastructure from the automake/tests subdirectory.
+
+. ./defs || Exit 1
+
+# Avoid to confuse traces from child processed with our own traces.
+show_stderr ()
+{
+ sed 's/^/ | /' stderr >&2
+}
+
+if $SHELL -c '. ../defs' dummy.test 2>stderr; then
+ show_stderr
+ Exit 1
+else
+ show_stderr
+ grep 'defs-static: not found in current directory' stderr
+fi
+
+sed 's|^testsrcdir=.*|testsrcdir=foo|' ../defs-static > defs-static
+if $SHELL -c '. ../defs' dummy.test 2>stderr; then
+ show_stderr
+ Exit 1
+else
+ show_stderr
+ grep 'foo/defs-static\.in not found.*check \$testsrcdir' stderr
+fi
+
+sed 's|^testbuilddir=.*|testbuilddir=foo|' ../defs-static > defs-static
+if $SHELL -c '. ../defs' dummy.test 2>stderr; then
+ show_stderr
+ Exit 1
+else
+ show_stderr
+ grep 'foo/defs-static not found.*check \$testbuilddir' stderr
+fi
+
+# We still need a little hack to make ./defs work outside automake's
+# tree `tests' subdirectory. Not a big deal.
+sed "s|^testbuilddir=.*|testbuilddir='`pwd`'|" ../defs-static >defs-static
+# Redefining *srcdir and *builddir variables in the environment shouldn't
+# cause problems
+env \
+ builddir=bad-dir srcdir=bad-dir \
+ top_builddir=bad-dir top_srcdir=bad-dir \
+ abs_builddir=bad-dir abs_srcdir=bad-dir \
+ abs_top_builddir=bad-dir abs_top_srcdir=bad-dir \
+ $SHELL -c '. ../defs && echo "!OK!" > ../foo' dummy.test
+$FGREP '!OK!' foo
+
+:
diff --git a/tests/self-check-unindent.test b/tests/self-check-unindent.test
new file mode 100755
index 000000000..3f7edd962
--- /dev/null
+++ b/tests/self-check-unindent.test
@@ -0,0 +1,255 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Sanity check for the automake testsuite.
+# Check the `unindent' subroutine.
+
+. ./defs || Exit 1
+
+#------------------------------------------------------------------
+
+: Leading spaces
+
+cat > input <<END
+ 1
+ 2
+3
+ 4
+${tab}5
+${tab} 6
+ 6${sp}
+7${sp}
+ 8${sp}${sp}
+9${sp}${sp}
+ 10${tab}
+11${tab}
+ 12${sp}${tab}
+13${sp}${tab}
+ 14 this${tab}with${tab}multiple fields${sp}
+15 and ${tab}${tab}this too${tab}
+ 16 and also this
+${sp}${sp}
+${sp}
+${tab}
+
+last line
+END
+
+cat > exp <<END
+1
+ 2
+3
+ 4
+${tab}5
+${tab} 6
+6${sp}
+7${sp}
+8${sp}${sp}
+9${sp}${sp}
+10${tab}
+11${tab}
+12${sp}${tab}
+13${sp}${tab}
+14 this${tab}with${tab}multiple fields${sp}
+15 and ${tab}${tab}this too${tab}
+ 16 and also this
+
+${sp}
+${tab}
+
+last line
+END
+
+unindent input > got
+diff exp got
+
+unindent input | unindent > got
+diff exp got
+
+#------------------------------------------------------------------
+
+: Leading tab
+
+cat > input <<END
+${tab}1
+${tab} 2
+3
+ 4
+ 5
+ 6
+ 7
+ ${tab}8
+${tab}${tab}9
+${tab}10${tab}
+${tab}11${sp}
+12${tab}
+13${sp}
+${tab}14 this with${tab}multiple fields${sp}
+15 and ${tab}${tab}this too${tab}
+ 16 and also this
+${tab}
+${sp}
+${sp}${tab}
+
+last line
+END
+
+cat > exp <<END
+1
+ 2
+3
+ 4
+ 5
+ 6
+ 7
+ ${tab}8
+${tab}9
+10${tab}
+11${sp}
+12${tab}
+13${sp}
+14 this with${tab}multiple fields${sp}
+15 and ${tab}${tab}this too${tab}
+ 16 and also this
+
+${sp}
+${sp}${tab}
+
+last line
+END
+
+unindent input > got
+diff exp got
+
+unindent input | unindent > got
+diff exp got
+
+#------------------------------------------------------------------
+
+: No leading whitespace
+
+cat > input <<END
+1
+ 2
+ 3
+ 4
+${tab}5
+${tab} 6
+ ${tab}7
+${tab}${tab}8
+9${sp}
+ 10${tab}
+${tab}10${sp}${sp}
+14 this with${tab}multiple fields${sp}
+ 15 and this too${tab}
+${tab}16 and also this
+${tab}
+${sp}
+
+last line
+END
+
+cp input exp
+
+unindent input > got
+diff exp got
+
+unindent input | unindent > got
+diff exp got
+
+#------------------------------------------------------------------
+
+: Leading empty lines are ignored [1]
+
+cat > input <<END
+
+
+ foo
+ bar
+ quux
+END
+
+cat > exp <<END
+
+
+foo
+bar
+ quux
+END
+
+unindent input > got
+diff exp got
+
+unindent input | unindent > got
+diff exp got
+
+#------------------------------------------------------------------
+
+: Leading empty lines are ignored [2]
+
+cat > input <<END
+
+
+foo
+bar
+ quux
+END
+
+cat > exp <<END
+
+
+foo
+bar
+ quux
+END
+
+unindent input > got
+diff exp got
+
+unindent input | unindent > got
+diff exp got
+
+#------------------------------------------------------------------
+
+: More elaborated parallel use
+
+cat > input <<END
+ x
+ ${tab}y
+ z
+ ${tab}a
+ ${tab} b
+${tab}c
+ ${tab}d
+ ${tab}e
+ ${tab}${tab}f
+END
+
+cat > exp <<END
+y
+z
+a
+ b
+c
+ ${tab}d
+ ${tab}e
+${tab}f
+END
+
+unindent input | sed 1d | unindent > got
+diff exp got
+
+:
diff --git a/tests/silent-lex-gcc.test b/tests/silent-lex-gcc.test
index 426dc504c..a55f35802 100755
--- a/tests/silent-lex-gcc.test
+++ b/tests/silent-lex-gcc.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='flex gcc'
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silent-lex-generic.test b/tests/silent-lex-generic.test
index 66535e800..a61969827 100755
--- a/tests/silent-lex-generic.test
+++ b/tests/silent-lex-generic.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='flex'
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silent-many-gcc.test b/tests/silent-many-gcc.test
index d770a467c..62dafa196 100755
--- a/tests/silent-many-gcc.test
+++ b/tests/silent-many-gcc.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,11 +21,9 @@
# This test requires the GNU compilers; keep it in sync with sister test
# `silent-many-generic.test', which should work with generic compilers.
-required='gcc g++ gfortran flex bison'
+required='gcc g++ gfortran flex yacc'
. ./defs || Exit 1
-set -e
-
# Avoids too much code duplication.
do_and_check_silent_build ()
{
diff --git a/tests/silent-many-generic.test b/tests/silent-many-generic.test
index 223a97c64..b8864793e 100755
--- a/tests/silent-many-generic.test
+++ b/tests/silent-many-generic.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,11 +23,9 @@
# and forces the use of gcc depmode.
# FIXME: generic C++/Fortran compilers should suffice here
-required='g++ gfortran flex bison'
+required='g++ gfortran flex yacc'
. ./defs || Exit 1
-set -e
-
# Avoids too much code duplication.
do_and_check_silent_build ()
{
diff --git a/tests/silent-nowarn.test b/tests/silent-nowarn.test
new file mode 100755
index 000000000..f0f5e7078
--- /dev/null
+++ b/tests/silent-nowarn.test
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the 'silent-rules' mode suppresses the warnings for recursive
+# make variable expansions. This should happen regardless of whether and
+# where these warnings are requested.
+
+. ./defs || Exit 1
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+# Yes, we repeat the warnings two times, both before and after
+# 'silent-rules'. This is deliberate.
+AM_INIT_AUTOMAKE([gnu -Wall -Wportability-recursive
+ silent-rules
+ -Wall -Wportability-recursive])
+AC_CONFIG_FILES([Makefile])
+END
+
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = gnu -Wall -Wportability-recursive
+foo = $($(v)) $(x$(v)) $($(v)x) $(y$(v)z)
+END
+
+# Files required bu gnu strictness.
+touch AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS
+
+$ACLOCAL
+$AUTOMAKE --gnu -Wall -Wportability-recursive
+
+:
diff --git a/tests/silent-yacc-gcc.test b/tests/silent-yacc-gcc.test
index 33ae8aefc..624b2cd86 100755
--- a/tests/silent-yacc-gcc.test
+++ b/tests/silent-yacc-gcc.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,11 +17,9 @@
# Check silent-rules mode for Yacc, forcing gcc depmode.
# Keep this in sync with sister test `silent-yacc-generic.test'.
-required='gcc bison'
+required='gcc yacc'
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silent-yacc-generic.test b/tests/silent-yacc-generic.test
index b7489dac9..76a290f48 100755
--- a/tests/silent-yacc-generic.test
+++ b/tests/silent-yacc-generic.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,11 +17,9 @@
# Check silent-rules mode for Yacc.
# Keep this in sync with sister test `silent-yacc-gcc.test'.
-required='bison'
+required=yacc
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silent.test b/tests/silent.test
index 97d881e76..f590347ef 100755
--- a/tests/silent.test
+++ b/tests/silent.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silent2.test b/tests/silent2.test
index aed8546c1..fc976973c 100755
--- a/tests/silent2.test
+++ b/tests/silent2.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silent3.test b/tests/silent3.test
index 17f195980..c0a9192cd 100755
--- a/tests/silent3.test
+++ b/tests/silent3.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required=libtoolize
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silent4.test b/tests/silent4.test
index 9c343c0d7..06a02ef94 100755
--- a/tests/silent4.test
+++ b/tests/silent4.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required="libtoolize gcc"
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silent6.test b/tests/silent6.test
index acd9ceab0..5fa968ef1 100755
--- a/tests/silent6.test
+++ b/tests/silent6.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_SILENT_RULES
AC_OUTPUT
diff --git a/tests/silent7.test b/tests/silent7.test
index 5ae8ac022..39a267a19 100755
--- a/tests/silent7.test
+++ b/tests/silent7.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'EOF'
AM_SILENT_RULES
AC_OUTPUT
diff --git a/tests/silent8.test b/tests/silent8.test
new file mode 100755
index 000000000..7a34bdb64
--- /dev/null
+++ b/tests/silent8.test
@@ -0,0 +1,66 @@
+#!/bin/sh
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check texinfo rules in silent-rules mode.
+
+required='makeinfo-html tex texi2dvi-o dvips'
+. ./defs || Exit 1
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+info_TEXINFOS = foo.texi
+EOF
+
+cat > foo.texi <<'EOF'
+\input texinfo
+@c %**start of header
+@setfilename foo.info
+@settitle foo manual
+@c %**end of header
+@bye
+EOF
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure --disable-silent-rules
+
+# Make sure that all labels work in silent-mode
+$MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'DVIPS foo.ps' stdout || Exit 1
+grep 'MAKEINFO foo.html' stdout || Exit 1
+# NetBSD make will print `./foo.info' instead of `foo.info'.
+grep 'MAKEINFO.*foo.info' stdout || Exit 1
+grep 'TEXI2DVI foo.dvi' stdout || Exit 1
+grep 'TEXI2PDF foo.pdf' stdout || Exit 1
+
+# Now make sure the labels don't appear in verbose mode.
+$MAKE clean || Exit 1
+$MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'DVIPS foo.ps' stdout && Exit 1
+grep 'MAKEINFO foo.html' stdout && Exit 1
+grep 'MAKEINFO.*foo.info' stdout && Exit 1
+grep 'TEXI2DVI foo.dvi' stdout && Exit 1
+grep 'TEXI2PDF foo.pdf' stdout && Exit 1
+
+:
diff --git a/tests/silent9.test b/tests/silent9.test
index f0abb2902..cb62136e2 100755
--- a/tests/silent9.test
+++ b/tests/silent9.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required="libtoolize"
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silentcxx.test b/tests/silentcxx.test
index 40fc92e61..14d61ca58 100755
--- a/tests/silentcxx.test
+++ b/tests/silentcxx.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='g++' # FIXME: any decent C++ compiler should be OK
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silentf77.test b/tests/silentf77.test
index cfdb1866a..75d5777b2 100755
--- a/tests/silentf77.test
+++ b/tests/silentf77.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='gfortran' # FIXME: any working Fortran compiler should be OK!
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/silentf90.test b/tests/silentf90.test
index 4fe1c3f14..c85f78f7c 100755
--- a/tests/silentf90.test
+++ b/tests/silentf90.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='gfortran' # FIXME: any working Fortran compiler should be OK!
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'EOF'
diff --git a/tests/space.test b/tests/space.test
index a4ab5a800..c0ed86910 100755
--- a/tests/space.test
+++ b/tests/space.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,5 +26,5 @@ cat > Makefile.am << 'END'
foo_SOURCES = foo.c
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
diff --git a/tests/specflg.test b/tests/specflg.test
index b9b2e103f..04c9153af 100755
--- a/tests/specflg.test
+++ b/tests/specflg.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/specflg10.test b/tests/specflg10.test
index efe13f53f..45753b20f 100755
--- a/tests/specflg10.test
+++ b/tests/specflg10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=g++
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
diff --git a/tests/specflg2.test b/tests/specflg2.test
index 0dc7fccc4..1c4d69a4d 100755
--- a/tests/specflg2.test
+++ b/tests/specflg2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/specflg3.test b/tests/specflg3.test
index 60006a5c7..71cf8e52f 100755
--- a/tests/specflg3.test
+++ b/tests/specflg3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2004, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2004, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,12 +19,10 @@
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(test, 0.1)
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -35,14 +33,12 @@ END
: > compile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-$FGREP -e '-o foo-foo' Makefile.in || Exit 1
+$FGREP ' -o foo-foo' Makefile.in
+$FGREP 'foo.o.o' Makefile.in && Exit 1
+$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && Exit 1
+$FGREP '$(foo_CFLAGS)' Makefile.in
-$FGREP 'foo.o.o' Makefile.in && Exit 1
-$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && Exit 1
-
-$FGREP '$(foo_CFLAGS)' Makefile.in || Exit 1
-
-Exit 0
+:
diff --git a/tests/specflg6.test b/tests/specflg6.test
index d85876986..b02dbbaa3 100755
--- a/tests/specflg6.test
+++ b/tests/specflg6.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +24,7 @@
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
-AM_CONDITIONAL(BAR, true)
+AM_CONDITIONAL([BAR], [true])
END
cat > Makefile.am << 'END'
@@ -38,8 +39,8 @@ END
: > compile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
uncondval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
@@ -47,8 +48,10 @@ cat >> Makefile.am << 'END'
foo_SOURCES += $(BAR_SRCS)
END
-$AUTOMAKE || Exit 1
+$AUTOMAKE
condval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
test "x$uncondval" = "x$condval"
+
+:
diff --git a/tests/specflg7.test b/tests/specflg7.test
index 067a36d92..6d422bf9d 100755
--- a/tests/specflg7.test
+++ b/tests/specflg7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/specflg8.test b/tests/specflg8.test
index 1abcaa2b0..1defd0bef 100755
--- a/tests/specflg8.test
+++ b/tests/specflg8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/specflg9.test b/tests/specflg9.test
index 7f920462e..42f6fff35 100755
--- a/tests/specflg9.test
+++ b/tests/specflg9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/spell.test b/tests/spell.test
index d880a620f..0e06e7fbe 100755
--- a/tests/spell.test
+++ b/tests/spell.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz foo
zardoz_SOURCES = x.c
diff --git a/tests/spell2.test b/tests/spell2.test
index 54298f19d..900213613 100755
--- a/tests/spell2.test
+++ b/tests/spell2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/spell3.test b/tests/spell3.test
index 399328ff4..a415cf2b9 100755
--- a/tests/spell3.test
+++ b/tests/spell3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,5 +26,7 @@ TAGS_DEPENDENCIES = joe
ETAGS_ARGS = joe
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/tests/spelling.test b/tests/spelling.test
index ad1e232ce..7112f895e 100755
--- a/tests/spelling.test
+++ b/tests/spelling.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +23,9 @@ cat > Makefile.am << 'EOF'
bni_PROGRAMS = zot
EOF
-if $ACLOCAL || Exit 1
-$AUTOMAKE; then
- Exit 1
-fi
-Exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'bni_PROGRAMS' stderr
+grep 'bnidir.*undefined' stderr
+
+:
diff --git a/tests/spy.test b/tests/spy.test
index 5f1a87b24..1a97ae7ea 100755
--- a/tests/spy.test
+++ b/tests/spy.test
@@ -69,8 +69,6 @@
. ./defs || Exit 1
-set -e
-
cat >Makefile <<\EOF
a :: b
echo rule1 >> $@
diff --git a/tests/srcsub.test b/tests/srcsub.test
index 2f3831296..0265af155 100755
--- a/tests/srcsub.test
+++ b/tests/srcsub.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/srcsub2.test b/tests/srcsub2.test
index 494d0f6cc..6eb3e54ac 100755
--- a/tests/srcsub2.test
+++ b/tests/srcsub2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/stamph2.test b/tests/stamph2.test
index cb96d278c..3330f0fe5 100755
--- a/tests/stamph2.test
+++ b/tests/stamph2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,17 +18,15 @@
# Make sure stamp-h* files are created where we expect
. ./defs || Exit 1
-set -e
-
cat >> configure.in << END
-AM_CONFIG_HEADER(1.h
- 2.h:config.hin
- 3.h:sdir1/config1.hin)
+AM_CONFIG_HEADER([1.h
+ 2.h:config.hin
+ 3.h:sdir1/config1.hin])
# AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
-AC_CONFIG_HEADERS(sdir1/4.h
- sdir1/5.h:config.hin
- sdir1/6.h:sdir1/config1.hin
- sdir1/7.h:sdir2/config2.hin)
+AC_CONFIG_HEADERS([sdir1/4.h
+ sdir1/5.h:config.hin
+ sdir1/6.h:sdir1/config1.hin
+ sdir1/7.h:sdir2/config2.hin])
AC_OUTPUT
END
@@ -68,4 +67,4 @@ test ! -f sdir1/stamp-h5
test ! -f sdir1/stamp-h6
test -f sdir1/stamp-h7
-Exit 0
+:
diff --git a/tests/stdinc.test b/tests/stdinc.test
index ff914f3d3..2b619d854 100755
--- a/tests/stdinc.test
+++ b/tests/stdinc.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_CONFIG_HEADERS([sub/config.h])
diff --git a/tests/stdlib.test b/tests/stdlib.test
index 48f56fc25..edd68b020 100755
--- a/tests/stdlib.test
+++ b/tests/stdlib.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
diff --git a/tests/stdlib2.test b/tests/stdlib2.test
index c5d543c23..b23e540b0 100755
--- a/tests/stdlib2.test
+++ b/tests/stdlib2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=libtool
. ./defs || Exit 1
-set -e
-
: > README
: > NEWS
: > AUTHORS
diff --git a/tests/strictness-override.test b/tests/strictness-override.test
new file mode 100755
index 000000000..aacb5611c
--- /dev/null
+++ b/tests/strictness-override.test
@@ -0,0 +1,123 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The strictness specified in Makefile.am:AUTOMAKE_OPTIONS should
+# override that specified in configure.in:AM_INIT_AUTOMAKE, and both
+# should override the strictness specified on the command line.
+# NOTE: the current semantics might not be the best one (even if it has
+# been in place for quite a long time); see also Automake bug #7673.
+# Update this test if the semantics are changed.
+
+. ./defs || Exit 1
+
+# We want complete control over automake options.
+AUTOMAKE=$original_AUTOMAKE
+
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS =
+END
+
+set_strictness ()
+{
+ set +x
+ sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+ -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
+ mv -f $2-t $2
+ set -x
+ cat $2
+}
+
+ok ()
+{
+ $AUTOMAKE -Werror $*
+}
+
+ko ()
+{
+ AUTOMAKE_fails $*
+ grep 'required file.*README' stderr
+}
+
+$ACLOCAL
+
+# Leave out only one of the required files, to avoid too much
+# repetition in the error messages.
+touch INSTALL NEWS AUTHORS ChangeLog COPYING
+
+rm -rf autom4te*.cache
+set_strictness '' Makefile.am
+set_strictness '' configure.in
+ko --gnu
+ko
+ok --foreign
+
+rm -rf autom4te*.cache
+set_strictness 'gnu' Makefile.am
+set_strictness '' configure.in
+ko --gnu
+ko
+ko --foreign
+
+rm -rf autom4te*.cache
+set_strictness '' Makefile.am
+set_strictness 'gnu' configure.in
+ko --gnu
+ko
+ko --foreign
+
+rm -rf autom4te*.cache
+set_strictness 'foreign' Makefile.am
+set_strictness '' configure.in
+ok --gnu
+ok
+ok --foreign
+
+rm -rf autom4te*.cache
+set_strictness '' Makefile.am
+set_strictness 'foreign' configure.in
+ok --gnu
+ok
+ok --foreign
+
+rm -rf autom4te*.cache
+set_strictness 'gnu' Makefile.am
+set_strictness 'gnu' configure.in
+ko --gnu
+ko
+ko --foreign
+
+rm -rf autom4te*.cache
+set_strictness 'foreign' Makefile.am
+set_strictness 'foreign' configure.in
+ok --gnu
+ok
+ok --foreign
+
+rm -rf autom4te*.cache
+set_strictness 'foreign' Makefile.am
+set_strictness 'gnu' configure.in
+ok --gnu
+ok
+ok --foreign
+
+rm -rf autom4te*.cache
+set_strictness 'gnu' Makefile.am
+set_strictness 'foreign' configure.in
+ko --gnu
+ko
+ko --foreign
+
+:
diff --git a/tests/strictness-precedence.test b/tests/strictness-precedence.test
new file mode 100755
index 000000000..a9492156f
--- /dev/null
+++ b/tests/strictness-precedence.test
@@ -0,0 +1,77 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# On the command line, in AM_INIT_AUTOMAKE, and in AUTOMAKE_OPTIONS,
+# strictness specified later should take precedence over strictness
+# specified earlier.
+
+. ./defs || Exit 1
+
+# We want complete control over automake options.
+AUTOMAKE=$original_AUTOMAKE
+
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS =
+END
+
+set_strictness ()
+{
+ set +x
+ sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+ -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
+ mv -f $2-t $2
+ set -x
+ cat $2
+}
+
+ok ()
+{
+ $AUTOMAKE -Werror $*
+}
+
+ko ()
+{
+ AUTOMAKE_fails $*
+ grep 'required file.*README' stderr
+}
+
+# Leave out only one of the required files, to avoid too much
+# repetition in the error messages.
+touch INSTALL NEWS AUTHORS ChangeLog COPYING
+
+$ACLOCAL
+ko --foreign --gnu
+ok --gnu --foreign
+
+set_strictness '' Makefile.am
+set_strictness 'gnu foreign' configure.in
+rm -rf autom4te*.cache
+$ACLOCAL
+ok
+set_strictness 'foreign gnu' configure.in
+rm -rf autom4te*.cache
+$ACLOCAL
+ko
+
+set_strictness '' configure.in
+rm -rf autom4te*.cache
+$ACLOCAL
+set_strictness 'gnu foreign' Makefile.am
+ok
+set_strictness 'foreign gnu' Makefile.am
+ko
+
+:
diff --git a/tests/strip.test b/tests/strip.test
index 12fe6b489..c63af43ea 100755
--- a/tests/strip.test
+++ b/tests/strip.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/strip2.test b/tests/strip2.test
index 5786ded89..01f66f186 100755
--- a/tests/strip2.test
+++ b/tests/strip2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=strip
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
diff --git a/tests/strip3.test b/tests/strip3.test
index b15967334..5f6f163d3 100755
--- a/tests/strip3.test
+++ b/tests/strip3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='libtoolize strip'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/subcond.test b/tests/subcond.test
index 0269cacec..dea041d96 100755
--- a/tests/subcond.test
+++ b/tests/subcond.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2006, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
required=gettext
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_GNU_GETTEXT
AM_CONDITIONAL(MAUDE, true)
diff --git a/tests/subcond2.test b/tests/subcond2.test
index 5086cd3a2..5cece059f 100755
--- a/tests/subcond2.test
+++ b/tests/subcond2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
AC_CONFIG_FILES([src/Makefile opt/Makefile])
diff --git a/tests/subcond3.test b/tests/subcond3.test
index 3506d0574..e0c9e133a 100755
--- a/tests/subcond3.test
+++ b/tests/subcond3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
if test "$want_opt" = yes; then
MAYBE_OPT=opt
diff --git a/tests/subdir.test b/tests/subdir.test
index edad4ca8e..a78d74d3b 100755
--- a/tests/subdir.test
+++ b/tests/subdir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2010 Free Software
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
mkdir zot
cat >> configure.in << 'END'
diff --git a/tests/subdir10.test b/tests/subdir10.test
index eabd1a9cd..b6daff55c 100755
--- a/tests/subdir10.test
+++ b/tests/subdir10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >> configure.in <<'END'
diff --git a/tests/subdir2.test b/tests/subdir2.test
index 941205420..354775847 100755
--- a/tests/subdir2.test
+++ b/tests/subdir2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2010 Free Software
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
mkdir one
mkdir one/two
diff --git a/tests/subdir3.test b/tests/subdir3.test
index 3da2cc8dd..bcf6acbe1 100755
--- a/tests/subdir3.test
+++ b/tests/subdir3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz widdershins
zardoz_SOURCES = y.c x/z.c
diff --git a/tests/subdir4.test b/tests/subdir4.test
index 7ea10f894..5dd516138 100755
--- a/tests/subdir4.test
+++ b/tests/subdir4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
mkdir lib src
cat >> configure.in << 'END'
diff --git a/tests/subdir5.test b/tests/subdir5.test
index 3f4dfa387..60730cbe8 100755
--- a/tests/subdir5.test
+++ b/tests/subdir5.test
@@ -26,8 +26,6 @@
required='GNUmake gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/subdir6.test b/tests/subdir6.test
index f3a210793..80ae138da 100755
--- a/tests/subdir6.test
+++ b/tests/subdir6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_CONFIG_HEADER([sub/config.h:sub/config.hin])
AC_OUTPUT
diff --git a/tests/subdir7.test b/tests/subdir7.test
index b50b2506e..28fe024c2 100755
--- a/tests/subdir7.test
+++ b/tests/subdir7.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
mkdir obj
cat >>configure.in << 'END'
diff --git a/tests/subdir8.test b/tests/subdir8.test
index b39dfe4e1..98146ba50 100755
--- a/tests/subdir8.test
+++ b/tests/subdir8.test
@@ -26,8 +26,6 @@
required='GNUmake gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/subdir9.test b/tests/subdir9.test
index c73ca1823..55e960800 100755
--- a/tests/subdir9.test
+++ b/tests/subdir9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([src/subdir/Makefile src/subdir2/Makefile])
AC_OUTPUT
diff --git a/tests/subdirbuiltsources.test b/tests/subdirbuiltsources.test
index a84f28e9c..18cacd91d 100755
--- a/tests/subdirbuiltsources.test
+++ b/tests/subdirbuiltsources.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
mkdir lib
cat >> configure.in << 'END'
diff --git a/tests/subobj.test b/tests/subobj.test
index 39dc1b9ac..15104934b 100755
--- a/tests/subobj.test
+++ b/tests/subobj.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2004, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2004, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/subobj10.test b/tests/subobj10.test
index dbddf29c1..227e34d00 100755
--- a/tests/subobj10.test
+++ b/tests/subobj10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=gcc # avoid compiler errors.
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE([subdir-objects])
diff --git a/tests/subobj11a.test b/tests/subobj11a.test
index 3bf301287..fc674b83c 100755
--- a/tests/subobj11a.test
+++ b/tests/subobj11a.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,8 +28,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/subobj11b.test b/tests/subobj11b.test
index 1db5fab11..275b2caa4 100755
--- a/tests/subobj11b.test
+++ b/tests/subobj11b.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,8 +28,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/subobj11c.test b/tests/subobj11c.test
index 9262d155f..f78f7e96d 100755
--- a/tests/subobj11c.test
+++ b/tests/subobj11c.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/subobj2.test b/tests/subobj2.test
index 87a467140..6c41a20e2 100755
--- a/tests/subobj2.test
+++ b/tests/subobj2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXX
END
diff --git a/tests/subobj3.test b/tests/subobj3.test
index 4fe685c3c..5ba999c1e 100755
--- a/tests/subobj3.test
+++ b/tests/subobj3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2010 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2010, 2011
+# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
dnl Prevent automake from looking in .. and ../..
diff --git a/tests/subobj4.test b/tests/subobj4.test
index ead2305c3..0a29ad023 100755
--- a/tests/subobj4.test
+++ b/tests/subobj4.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/subobj5.test b/tests/subobj5.test
index c857e7393..1b05db39a 100755
--- a/tests/subobj5.test
+++ b/tests/subobj5.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([generic/Makefile])
AC_PROG_CC
diff --git a/tests/subobj6.test b/tests/subobj6.test
index 228a1e974..48a0f2d87 100755
--- a/tests/subobj6.test
+++ b/tests/subobj6.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_PROG_CC_C_O
AC_OUTPUT
diff --git a/tests/subobj7.test b/tests/subobj7.test
index dd1a8febd..ff36d6c7e 100755
--- a/tests/subobj7.test
+++ b/tests/subobj7.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/tests/subobj8.test b/tests/subobj8.test
index ae9b09bf9..b2fc0e5af 100755
--- a/tests/subobj8.test
+++ b/tests/subobj8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([tools])
diff --git a/tests/subobj9.test b/tests/subobj9.test
index 83f3a31ef..a910d22d5 100755
--- a/tests/subobj9.test
+++ b/tests/subobj9.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2004, 2005, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2005, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
required='libtoolize g++'
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE([subdir-objects])
diff --git a/tests/subobjname.test b/tests/subobjname.test
index a8128bb0e..3f6f8a0a2 100755
--- a/tests/subobjname.test
+++ b/tests/subobjname.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_CONDITIONAL([FOO1], [some test])
diff --git a/tests/subpkg.test b/tests/subpkg.test
index 366293726..481cbb478 100755
--- a/tests/subpkg.test
+++ b/tests/subpkg.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,11 +17,9 @@
# Check subpackage handling.
-required='gcc bison'
+required='gcc yacc'
. ./defs || Exit 1
-set -e
-
mkdir m4
cat >m4/foo.m4 <<'EOF'
diff --git a/tests/subpkg2.test b/tests/subpkg2.test
index ebbc69bf1..67cc74aee 100755
--- a/tests/subpkg2.test
+++ b/tests/subpkg2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
mkdir m4
cat >m4/foo.m4 <<'EOF'
diff --git a/tests/subpkg3.test b/tests/subpkg3.test
index d57ee373c..937e51d3c 100755
--- a/tests/subpkg3.test
+++ b/tests/subpkg3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >Makefile.am <<'END'
SUBDIRS = subpkg
EXTRA_DIST = subpkg/foobar
diff --git a/tests/subpkg4.test b/tests/subpkg4.test
index 1a6835a91..096b621d3 100755
--- a/tests/subpkg4.test
+++ b/tests/subpkg4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >Makefile.am <<'END'
SUBDIRS = subpkg
test-distdir-is-readable:
diff --git a/tests/subst.test b/tests/subst.test
index ebc73cadd..d1e832b8f 100755
--- a/tests/subst.test
+++ b/tests/subst.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2007, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2001, 2002, 2007, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
dnl This test used to have the following lines, which cannot have
dnl worked sensibly with Autoconf for years, however:
diff --git a/tests/subst2.test b/tests/subst2.test
index 2bbabdd3b..1dbb5110a 100755
--- a/tests/subst2.test
+++ b/tests/subst2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
# line (when there are @substitutions@ inside).
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_SUBST([ABCDEFGHIJKLMNOPQRSTUVWX])
diff --git a/tests/subst3.test b/tests/subst3.test
index 1bcb17060..c1b2dfc35 100755
--- a/tests/subst3.test
+++ b/tests/subst3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='gcc'
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
AC_PROG_CC
AC_PROG_RANLIB
diff --git a/tests/subst4.test b/tests/subst4.test
index 5f3fdd6b2..ffa2b3ad9 100755
--- a/tests/subst4.test
+++ b/tests/subst4.test
@@ -1,6 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software
-# Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'EOF'
myrule="\
foo: bar
diff --git a/tests/subst5.test b/tests/subst5.test
new file mode 100755
index 000000000..097dfe3a7
--- /dev/null
+++ b/tests/subst5.test
@@ -0,0 +1,40 @@
+#! /bin/sh
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Complain about configure substitutions in EXTRA_PRIMARY variables.
+# Rationale: we need to know the literal values of, say, PROGRAMS.
+# Thus, we allow substitutions in bin_PROGRAMS, but then EXTRA_PROGRAMS
+# needs to list possible values of that substitution, literally.
+
+. ./defs || Exit 1
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AC_SUBST([substed1])
+AC_SUBST([substed2])
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = @substed1@
+EXTRA_PROGRAMS = @substed2@
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'bin_PROGRAMS.*contains configure substitution' stderr && Exit 1
+grep 'EXTRA_PROGRAMS.*contains configure substitution' stderr
+
+Exit 0
diff --git a/tests/substre2.test b/tests/substre2.test
index ffe9e8b2f..c8ffd38c6 100755
--- a/tests/substre2.test
+++ b/tests/substre2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/substref.test b/tests/substref.test
index 23dc1687e..12f72e351 100755
--- a/tests/substref.test
+++ b/tests/substref.test
@@ -21,8 +21,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/substtarg.test b/tests/substtarg.test
index d82895470..ad94e3e84 100755
--- a/tests/substtarg.test
+++ b/tests/substtarg.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_SOURCE([fakelib.c])
AC_PROG_CC
diff --git a/tests/suffix.test b/tests/suffix.test
index c790c66a4..bb8b82ec6 100755
--- a/tests/suffix.test
+++ b/tests/suffix.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,26 +15,32 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure a suffix rule for C compilation is produced.
+# Make sure proper suffix rules for C compilation are produced, and
+# only once.
+# See also related test `suffix2.test'.
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
+AC_PROG_RANLIB
END
cat > Makefile.am << 'END'
noinst_PROGRAMS = foo
+noinst_LIBRARIES = libbar.a
END
$ACLOCAL
$AUTOMAKE -i
-grep '^\.c\.o' Makefile.in
+grep '^ *\.c' Makefile.in # for debugging
+test `grep -c '^\.c\.o:' Makefile.in` -eq 1
+test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
$AUTOMAKE
-grep '^\.c\.o' Makefile.in
+grep '^ *\.c' Makefile.in # for debugging
+test `grep -c '^\.c\.o:' Makefile.in` -eq 1
+test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
:
diff --git a/tests/suffix10.test b/tests/suffix10.test
index 131359c8f..026da2430 100755
--- a/tests/suffix10.test
+++ b/tests/suffix10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,11 +17,9 @@
# Make sure that derivations work with .lo too.
# (related to PR/37)
-required='libtoolize bison'
+required='libtoolize yacc'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
AC_PROG_YACC
@@ -29,16 +27,31 @@ AC_PROG_LIBTOOL
AC_OUTPUT
EOF
-
cat >Makefile.am << 'END'
lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = foo.x_
-
.x_.y:
- cp $< $@
+ rm -f $@ $@-t
+## the leading `:;' works around a bug in bash <= 3.2
+ :; { echo '/* autogenerated */' \
+ && echo '%{' \
+ && echo 'int yylex () {return 0;}' \
+ && echo 'void yyerror (char *s) {}' \
+ && echo '%}' \
+ && echo '%%' \
+ && echo 'WORD: "foo";' \
+ && echo '%%' \
+## account for VPATH issues on weaker make implementations
+ && cat `test -f '$<' || echo $(srcdir)/`$<; \
+ } > $@-t
+ mv -f $@-t $@
+.PHONY: test
+test:
+ echo $(libfoo_la_OBJECTS) | grep '^foo\.lo$$'
+END
-print:
- echo BEGIN: $(libfoo_la_OBJECTS) :END
+cat > foo.x_ << 'END'
+int foo (void) { return yyparse(); }
END
libtoolize --force
@@ -47,9 +60,7 @@ $AUTOCONF
$AUTOMAKE --add-missing
./configure
-
-$MAKE print >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'BEGIN: foo.lo :END' stdout
+$MAKE test
+$MAKE all
:
diff --git a/tests/suffix11.test b/tests/suffix11.test
index 91d2cf4d3..daeba1c2c 100755
--- a/tests/suffix11.test
+++ b/tests/suffix11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
AC_OUTPUT
@@ -32,18 +30,30 @@ bin_PROGRAMS = foo bar baz
foo_SOURCES = foo.x_
bar_SOURCES = bar.y-z
baz_SOURCES = baz1.x_ baz2.y-z
+
.y-z.c .x_.c:
- cp $< $@
- .z_.c .w_.x_ :
- cp $< $@
+## account for VPATH issues on weaker make implementations (e.g. IRIX 6.5)
+ sed 's/INTEGER/int/g' `test -f '$<' || echo $(srcdir)/`$< >$@
-.PHONY: print
-print:
- @echo BEGIN: $(foo_OBJECTS) :END
- @echo BEGIN: $(bar_OBJECTS) :END
- @echo BEGIN: $(baz_OBJECTS) :END
+CLEANFILES = foo.c bar.c baz1.c baz2.c
+
+.PHONY: test-real test-fake
+test-fake:
+ echo $(foo_OBJECTS) | grep '^foo\.foo$$'
+ echo $(bar_OBJECTS) | grep '^bar\.foo$$'
+ echo $(baz_OBJECTS) | grep '^baz1\.foo baz2\.foo$$'
+test-real:
+ echo $(foo_OBJECTS) | grep '^foo\.$(OBJEXT)$$'
+ echo $(bar_OBJECTS) | grep '^bar\.$(OBJEXT)$$'
+ echo $(baz_OBJECTS) | grep '^baz1\.$(OBJEXT) baz2\.$(OBJEXT)$$'
+check-local: test-real
END
+echo 'INTEGER main(void) { return 0; }' > foo.x_
+echo 'INTEGER main(void) { return 0; }' > bar.y-z
+echo 'INTEGER main(void) { INTEGER baz(void); return baz(); }' > baz1.x_
+echo 'INTEGER baz(void) { return 0; }' > baz2.y-z
+
$ACLOCAL
$AUTOCONF
@@ -56,10 +66,9 @@ $AUTOMAKE -a -Wno-portability
./configure
-OBJEXT=foo $MAKE -e print >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEGIN: foo.foo :END' stdout
-$FGREP 'BEGIN: bar.foo :END' stdout
-$FGREP 'BEGIN: baz1.foo baz2.foo :END' stdout
+OBJEXT=foo $MAKE -e test-fake
+$MAKE test-real
+$MAKE
+$MAKE distcheck
:
diff --git a/tests/suffix12.test b/tests/suffix12.test
index 21089a549..a515f41bd 100755
--- a/tests/suffix12.test
+++ b/tests/suffix12.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
AC_OUTPUT
@@ -31,14 +30,17 @@ AUTOMAKE_OPTIONS = subdir-objects
SUFFIXES = .baz .o
# we fake here:
.baz.o:
- cp $< $@
+ ## account for VPATH issues on weaker make implementations
+ cp `test -f '$<' || echo $(srcdir)/`$< $@
bin_PROGRAMS = foo
foo_SOURCES = foo.c sub/bar.baz
-.PHONY: print
-print:
- @echo BEGIN: $(foo_OBJECTS) :END
+.PHONY: test-fake test-real
+test-fake:
+ echo $(foo_OBJECTS) | grep '^foo\.quux sub/bar\.quux$$'
+test-real:
+ echo $(foo_OBJECTS) | grep '^foo\.$(OBJEXT) sub/bar\.$(OBJEXT)$$'
END
mkdir sub
@@ -48,9 +50,10 @@ mkdir sub
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
+
./configure
-OBJEXT=OBJ $MAKE -e print >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEGIN: foo.OBJ sub/bar.OBJ :END' stdout
+
+OBJEXT=quux $MAKE -e test-fake
+$MAKE test-real
:
diff --git a/tests/suffix13.test b/tests/suffix13.test
index 8120024f6..228d04ad1 100755
--- a/tests/suffix13.test
+++ b/tests/suffix13.test
@@ -25,8 +25,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
AM_PROG_CC_C_O
@@ -70,7 +68,7 @@ $MAKE distclean
sed '/subdir-objects/d' < Makefile.am > t
mv -f t Makefile.am
-$AUTOMAKE --force
+$AUTOMAKE
./configure
$MAKE
$MAKE distcheck
diff --git a/tests/suffix2.test b/tests/suffix2.test
index 405ce90c5..b1212a8ac 100755
--- a/tests/suffix2.test
+++ b/tests/suffix2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,20 +15,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure .c.o rule is only included once.
+# Make sure proper suffix rules for C compilation are produced,
+# and only once, even for libtool libraries.
+# See also related test `suffix.test'.
required=libtoolize
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
END
cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = no-dependencies
lib_LTLIBRARIES = libltdl.la
libltdl_la_SOURCES = ltdl.c ltdl.h
END
@@ -41,8 +40,14 @@ END
: > config.sub
$ACLOCAL
-$AUTOMAKE -a
+$AUTOMAKE -i
+grep '^ *\.c' Makefile.in # for debugging
+test `grep -c '^\.c\.o:' Makefile.in` -eq 1
+test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+
+$AUTOMAKE
+grep '^ *\.c' Makefile.in # for debugging
test `grep -c '^\.c\.o:' Makefile.in` -eq 1
test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
diff --git a/tests/suffix3.test b/tests/suffix3.test
index fc445bf51..e0c01f618 100755
--- a/tests/suffix3.test
+++ b/tests/suffix3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,28 +19,57 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXX
+AC_OUTPUT
END
cat > Makefile.am << 'END'
SUFFIXES = .zoo
.zoo.cc:
- convert-zoo whatever
+ sed 's/INTEGER/int/g' `test -f '$<' || echo $(srcdir)/`$< >$@
bin_PROGRAMS = foo
foo_SOURCES = foo.zoo
+# This is required by "make distcheck". The useless indirection is
+# reequired to avoid false positives by the grepping checks below.
+FOO = foo
+CLEANFILES = $(FOO).cc
END
$ACLOCAL
$AUTOMAKE
# The foo.cc intermediate step is implicit, it's a mistake if
-# Automake requires this file somewhere.
-$FGREP foo.cc Makefile.in && Exit 1
+# Automake requires this file somewhere. Also, Automake should
+# not require the file `foo.c' anywhere.
+$FGREP foo.c Makefile.in && Exit 1
# However Automake must figure that foo.zoo is eventually
# transformed into foo.o, and use this latter file (to link foo).
$FGREP 'foo.$(OBJEXT)' Makefile.in
+$AUTOCONF
+./configure
+
+# This is deliberately valid C++, but invalid C.
+cat > foo.zoo <<'END'
+#include <iostream>
+using namespace std;
+INTEGER main(void)
+{
+ return 0;
+}
+END
+
+$MAKE
+# FIXME: should we check that intermediate file `foo.cc' has
+# been removed? Or is this requiring too much from the make
+# implementation?
+
+# Intermediate files should not be distributed.
+$MAKE distdir
+test ! -r $me-1.0/foo.cc
+
+# Check the distribution.
+$MAKE distcheck
+
:
diff --git a/tests/suffix4.test b/tests/suffix4.test
index e95228315..4eae8e196 100755
--- a/tests/suffix4.test
+++ b/tests/suffix4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
.k.o:
echo $< > $@
@@ -34,6 +32,8 @@ END
$ACLOCAL
$AUTOMAKE
-grep '.SUFFIXES:.*\.k' Makefile.in
+grep '^\.SUFFIXES:' Makefile.in | sed -e 's/$/ /' > suffixes
+cat suffixes
+$FGREP ' .k ' suffixes
:
diff --git a/tests/suffix5.test b/tests/suffix5.test
index b3b36aaea..60417e46e 100755
--- a/tests/suffix5.test
+++ b/tests/suffix5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,26 +21,42 @@
required=libtool
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
+AC_SUBST([LINK], [:])
AC_PROG_LIBTOOL
+AC_OUTPUT
END
cat > Makefile.am << 'END'
.k.lo:
- echo $< > $@
+## account for VPATH issues on weaker make implementations
+ (echo $< && cat `test -f '$<' || echo $(srcdir)/`$<) > $@
noinst_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = foo.k
+
+.PHONY: test
+test: all
+ grep '^=GREP=ME=$$' foo.lo
+## weaker regex to account for VPATH issues
+ grep 'foo\.k$$' foo.lo
+check-local: test
END
: > ltmain.sh
-: > config.guess
-: > config.sub
+
+cp "$testsrcdir/../lib/config.guess" "$testsrcdir/../lib/config.sub" .
$ACLOCAL
$AUTOMAKE
grep '_OBJECTS.*foo\.lo' Makefile.in
+$AUTOCONF
+./configure
+
+echo '=GREP=ME=' > foo.k
+
+$MAKE test
+$MAKE distcheck
+
:
diff --git a/tests/suffix6.test b/tests/suffix6.test
index ab7cf6459..1d31a141c 100755
--- a/tests/suffix6.test
+++ b/tests/suffix6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,32 +15,49 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test to make sure Automake supports implicit rules with dot-less
-# extensions. Also make sure that `.o' is handled like `.$(OBJEXT)'.
+# extensions. Also make sure that `.o' and `.obj' are handled like
+# `.$(OBJEXT)'. See also related "semantic" tests suffix6b.test
+# and suffix6c.test.
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
-SUFFIXES = a b .$(OBJEXT) c .o
+SUFFIXES = a b .$(OBJEXT) c .o .obj
bin_PROGRAMS = foo
-foo_SOURCES = fooa fuc
+foo_SOURCES = fooa barc bazc
ab:
- cp $< $@
+ dummy action 1
b.$(OBJEXT):
- cp $< $@
+ dummy action 2
c.o:
- cp $< $@
+ dummy action C
+c.obj:
+ dummy action C
END
$ACLOCAL
$AUTOMAKE
+sed -n -e '/foo_OBJECTS *=.*\\$/ {
+ :loop
+ p
+ n
+ t clear
+ :clear
+ s/\\$/\\/
+ t loop
+ p
+ n
+}' -e 's/$/ /' -e 's/^.*foo_OBJECTS *= */ /p' Makefile.in > foo-objects
+cat foo-objects
+
# Automake must figure that fooa translates to foo.$(OBJEXT) and
# foo.$(OBJEXT) using the following rules:
# fooa --[ab]--> foob --[b.$(OBJEXT)]--> foo.$(OBJEXT)
-grep '_OBJECTS.* foo\.\$(OBJEXT)' Makefile.in
-# fuc --[c.o]--> fu.$(OBJEXT) ## This is really meant !
-grep '_OBJECTS.* fu\.\$(OBJEXT)' Makefile.in
+$FGREP ' foo.$(OBJEXT) ' foo-objects
+# barc --[c.o]--> bar.$(OBJEXT) ## This is really meant !
+$FGREP ' bar.$(OBJEXT) ' foo-objects
+# bazc --[c.obj]--> baz.$(OBJEXT) ## This is really meant !
+$FGREP ' baz.$(OBJEXT) ' foo-objects
:
diff --git a/tests/suffix6b.test b/tests/suffix6b.test
new file mode 100755
index 000000000..c417df234
--- /dev/null
+++ b/tests/suffix6b.test
@@ -0,0 +1,75 @@
+#! /bin/sh
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure Automake supports implicit rules with dot-less
+# extensions. Se also related "grepping" test suffix6.test.
+
+required=GNUmake # other makes might not grok dot-less suffix rules
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+# $(LINK) is not defined automatically by Automake, since the *_SOURCES
+# variables don't contain any known extension (.c, .cc, .f ...),
+# So we need this hack -- but since such an hack can also serve as a
+# mild stress test, that's ok.
+AC_SUBST([LINK], ['cat >$@'])
+AC_SUBST([OBJEXT], [oOo])
+AC_SUBST([EXEEXT], [.XxX])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUFFIXES = a b c .$(OBJEXT)
+bin_PROGRAMS = foo
+foo_SOURCES = fooa
+ab:
+ { echo '=ab=' && cat $<; } >$@
+bc:
+ { echo '=bc=' && cat $<; } >$@
+c.$(OBJEXT):
+ { echo '=b.obj=' && cat $<; } >$@
+test:
+ : for debugging
+ ls -l
+ : implicit intermediate files should be removed by GNU make
+ test ! -r foob
+ test ! -r fooc
+ : but object files should not
+ cat foo.$(OBJEXT)
+ : for debugging
+ cat foo.XxX
+ : now check that the chain of implicit rules has been executed
+ : completely and in the correct order
+ (echo =b.obj= && echo =bc= && echo =ab= && echo =src=) > exp
+ diff exp foo.XxX
+ rm -f exp
+.PHONY: test
+check-local: test
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+echo =src= > fooa
+
+$MAKE
+$MAKE test
+$MAKE distcheck
+
+:
diff --git a/tests/suffix6c.test b/tests/suffix6c.test
new file mode 100755
index 000000000..149717dd8
--- /dev/null
+++ b/tests/suffix6c.test
@@ -0,0 +1,90 @@
+#! /bin/sh
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure that `.o' and `.obj' are handled like `.$(OBJEXT)'.
+# See also related "grepping" test suffix6.test.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+# $(LINK) is not defined automatically by Automake, since the *_SOURCES
+# variables don't contain any known extension (.c, .cc, .f ...),
+# So we need this hack -- but since such an hack can also serve as a
+# mild stress test, that's ok.
+OBJEXT=${OBJEXT-oOo}
+AC_SUBST([LINK], ['cat >$@'])
+AC_SUBST([EXEEXT], [.XxX])
+AC_SUBST([OBJEXT])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUFFIXES = .zoo .o .obj .@OBJEXT@
+
+bin_PROGRAMS = foo
+foo_SOURCES = foo.zoo
+
+.zoo.o:
+ { echo '=.zoo.o=' && cat $<; } >$@
+.zoo.obj:
+ { echo '=.zoo.obj=' && cat $<; } >$@
+.zoo.@OBJEXT@:
+ { echo '=.zoo.@OBJEXT@=' && cat $<; } >$@
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat > foo.exp <<'END'
+=.zoo.oOo=
+%ONE%
+END
+echo %ONE% > foo.zoo
+$MAKE
+cat foo.oOo
+cat foo.XxX
+diff foo.XxX foo.exp
+
+rm -f foo.* exp
+
+cat > foo.exp <<'END'
+=.zoo.o=
+%TWO%
+END
+echo %TWO% > foo.zoo
+OBJEXT=o $MAKE -e
+cat foo.o
+cat foo.XxX
+diff foo.XxX foo.exp
+
+rm -f foo.* exp
+
+cat > foo.exp <<'END'
+=.zoo.obj=
+%THREE%
+END
+echo %THREE% > foo.zoo
+OBJEXT=obj $MAKE -e
+cat foo.obj
+cat foo.XxX
+diff foo.XxX foo.exp
+
+rm -f foo.* exp
+
+:
diff --git a/tests/suffix7.test b/tests/suffix7.test
index eb6719533..8d291bb0a 100755
--- a/tests/suffix7.test
+++ b/tests/suffix7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
SUFFIXES = .idl S.cpp C.h
SUFFIXES += C.cpp S.h
diff --git a/tests/suffix8.test b/tests/suffix8.test
index 70ff3a590..921c6419e 100755
--- a/tests/suffix8.test
+++ b/tests/suffix8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,55 +14,61 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure Automake supports multiple derivations for the same suffix.
-# PR/37
+# Test to make sure Automake supports multiple derivations for the
+# same suffix.
+# From PR/37.
-required='gcc libtoolize'
+required=libtoolize
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AM_PROG_LIBTOOL
AC_OUTPUT
END
cat >Makefile.am << 'END'
+# $(LINK) is not defined automatically by Automake, since the *_SOURCES
+# variables don't contain any known extension (.c, .cc, .f ...),
+# So we need this hack.
+LINK = :
+
bin_PROGRAMS = foo
lib_LTLIBRARIES = libfoo.la
foo_SOURCES = foo.x_
libfoo_la_SOURCES = bar.x_
+# The elaborate cp commands below account for VPATH issues on
+# weaker make implementations (e.g. IRIX 6.5).
.x_.y_:
- cp $< $@
-
+ cp `test -f '$<' || echo $(srcdir)/`$< $@
.y_.o:
- cp $< $@
-
+ cp `test -f '$<' || echo $(srcdir)/`$< $@
.y_.z_:
- cp $< $@
-
+ cp `test -f '$<' || echo $(srcdir)/`$< $@
.z_.lo:
- cp $< $@
-
-# Add explicit dependencies to help make implementations that
-# don't otherwise chain implicit rules (e.g., Sun make).
-foo.$(OBJEXT): foo.y_
-bar.lo: bar.z_
-bar.z_: bar.y_
-
-print:
- @echo BEGIN: $(foo_OBJECTS) :END
- @echo BEGIN: $(libfoo_la_OBJECTS) :END
-
-test: $(foo_OBJECTS) $(libfoo_la_OBJECTS)
+ cp `test -f '$<' || echo $(srcdir)/`$< $@
+
+# Some make implementations don't remove intermediate files
+# automatically, thus causing "make distcheck" to fail if
+# this is not added.
+MOSTLYCLEANFILES = *.y_ *.z_
+
+.PHONY: test0 test1 test2
+test0:
+ echo $(foo_OBJECTS) | grep '^foo\.foo$$'
+ echo $(libfoo_la_OBJECTS) | grep '^bar\.lo$$'
+test1:
+ echo $(foo_OBJECTS) | grep '^foo\.$(OBJEXT)$$'
+ echo $(libfoo_la_OBJECTS) | grep '^bar\.lo$$'
+test2: $(foo_OBJECTS) $(libfoo_la_OBJECTS)
test -f foo.$(OBJEXT)
test -f bar.lo
+check-local: test1 test2
END
-echo 'int main() { return 0; }' > foo.x_
-cp foo.x_ bar.x_
+echo 'int main(void) { return 0; }' > foo.x_
+echo 'int bar(void) { return 0; }' > bar.x_
libtoolize
$ACLOCAL
@@ -71,11 +77,10 @@ $AUTOMAKE -a
./configure
-OBJEXT=foo $MAKE -e print >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEGIN: foo.foo :END' stdout
-$FGREP 'BEGIN: bar.lo :END' stdout
-
-$MAKE test
+OBJEXT=foo $MAKE -e test0
+$MAKE test1
+$MAKE test2
+$MAKE all
+$MAKE distcheck
:
diff --git a/tests/suffix9.test b/tests/suffix9.test
index 815ec56ef..8cd973be1 100755
--- a/tests/suffix9.test
+++ b/tests/suffix9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in << 'END'
AC_PROG_CC
END
diff --git a/tests/symlink.test b/tests/symlink.test
index a9b12c531..a7e63fd9f 100755
--- a/tests/symlink.test
+++ b/tests/symlink.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999, 2001, 2002, 2003, 2004, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
rm -f install-sh
rm -f mkinstalldirs
diff --git a/tests/symlink2.test b/tests/symlink2.test
index 97a3d2667..f2a9b4552 100755
--- a/tests/symlink2.test
+++ b/tests/symlink2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
rm -f install-sh
ln -s Zardoz install-sh || {
echo "$me: cannot create broken symlinks" >&2
diff --git a/tests/syntax.test b/tests/syntax.test
index 505486f0d..ba9249ea3 100755
--- a/tests/syntax.test
+++ b/tests/syntax.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
foo = q \
@@ -28,4 +27,6 @@ END
$ACLOCAL
AUTOMAKE_fails
-grep 'Makefile.am:2:.*blank line' stderr
+grep 'Makefile\.am:2:.*blank line' stderr
+
+:
diff --git a/tests/tags.test b/tests/tags.test
index 1eaf56977..8d974db7f 100755
--- a/tests/tags.test
+++ b/tests/tags.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
noinst_HEADERS = iguana.h
END
diff --git a/tests/tags2.test b/tests/tags2.test
new file mode 100755
index 000000000..aba350bdc
--- /dev/null
+++ b/tests/tags2.test
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# TAGS_DEPENDENCIES only make sense if other tag-worthy things (such as
+# sources) exist.
+
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat >Makefile.am << 'END'
+TAGS_DEPENDENCIES = foo
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'define.*TAGS_DEPENDENCIES.*without' stderr
+
+cat >>Makefile.am << 'END'
+bin_PROGRAMS = bar
+END
+
+AUTOMAKE_run 0
+grep 'define.*TAGS_DEPENDENCIES.*without' stderr && Exit 1
+
+:
diff --git a/tests/tagsub.test b/tests/tagsub.test
index bcf752d95..ca29406aa 100755
--- a/tests/tagsub.test
+++ b/tests/tagsub.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required=etags
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
diff --git a/tests/tar.test b/tests/tar.test
index dc5353c31..3dcf7ba90 100755
--- a/tests/tar.test
+++ b/tests/tar.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([tar], [1.0])
AM_INIT_AUTOMAKE([tar-ustar])
diff --git a/tests/tar2.test b/tests/tar2.test
index e62f0cce3..987ff403e 100755
--- a/tests/tar2.test
+++ b/tests/tar2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([tar2], [1.0])
AM_INIT_AUTOMAKE([tar-pax])
diff --git a/tests/tar3.test b/tests/tar3.test
index de6675422..a08bb7097 100755
--- a/tests/tar3.test
+++ b/tests/tar3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([tar2], [1.0])
AM_INIT_AUTOMAKE([tar-pax tar-v7])
diff --git a/tests/target-cflags.test b/tests/target-cflags.test
index b324568d9..352808efa 100755
--- a/tests/target-cflags.test
+++ b/tests/target-cflags.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2004, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2000, 2001, 2002, 2004, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,12 +21,10 @@
required=gcc
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(foo.c)
-AM_INIT_AUTOMAKE(target-cflags,0.0)
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -54,8 +52,6 @@ int main(void)
#endif
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -72,3 +68,5 @@ cd ..
$MAKE
./foo
./bar
+
+:
diff --git a/tests/targetclash.test b/tests/targetclash.test
index 0433b4155..22a1ad331 100755
--- a/tests/targetclash.test
+++ b/tests/targetclash.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
END
@@ -30,6 +28,7 @@ bin_PROGRAMS = ctags
END
$ACLOCAL
-$AUTOCONF
AUTOMAKE_fails -a
grep 'redefinition.*ctags' stderr
+
+:
diff --git a/tests/transform.test b/tests/transform.test
index 02fdd61d0..04e8d53a5 100755
--- a/tests/transform.test
+++ b/tests/transform.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2003, 2004, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required=gcc
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/transform2.test b/tests/transform2.test
index 0f9d5ec08..d6411d2b5 100755
--- a/tests/transform2.test
+++ b/tests/transform2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<'END'
AC_PROG_CC
AC_OUTPUT
diff --git a/tests/txinfo-unrecognized-extension.test b/tests/txinfo-unrecognized-extension.test
new file mode 100755
index 000000000..719f5082e
--- /dev/null
+++ b/tests/txinfo-unrecognized-extension.test
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that automake complains properly when the files with unrecognized
+# extensions are passed to the TEXINFOS primary.
+
+. ./defs || Exit 1
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foobar.foo bazquux.tex zardoz.c
+END
+
+echo '@setfilename foobar.info' > foobar.foo
+echo '@setfilename bazquux.info' > bazquux.tex
+echo '@setfilename zardoz.info' > zardoz.c
+: > texinfo.tex
+
+$ACLOCAL
+AUTOMAKE_fails
+
+for x in 'foobar\.foo' 'bazquux\.tex' 'zardoz\.c'; do
+ grep "^Makefile\\.am:.* texinfo file .*$x.* unrecognized extension" stderr
+done
+
+:
diff --git a/tests/txinfo.test b/tests/txinfo.test
index b764e53d3..3b7be7642 100755
--- a/tests/txinfo.test
+++ b/tests/txinfo.test
@@ -21,8 +21,6 @@
required=makeinfo
. ./defs || Exit 1
-set -e
-
cat >> configure.in <<'END'
AC_OUTPUT
END
diff --git a/tests/txinfo10.test b/tests/txinfo10.test
index 7432c7f4e..28eee445f 100755
--- a/tests/txinfo10.test
+++ b/tests/txinfo10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
SUBDIRS = sub
END
diff --git a/tests/txinfo13.test b/tests/txinfo13.test
index 81b39e461..aace4e68b 100755
--- a/tests/txinfo13.test
+++ b/tests/txinfo13.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006, 2007, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +22,6 @@
required='makeinfo tex texi2dvi-o'
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/txinfo16.test b/tests/txinfo16.test
index 4c14abacf..8ed8b11a1 100755
--- a/tests/txinfo16.test
+++ b/tests/txinfo16.test
@@ -20,8 +20,6 @@
required='makeinfo tex texi2dvi'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/txinfo17.test b/tests/txinfo17.test
index 62408be10..92abcf5df 100755
--- a/tests/txinfo17.test
+++ b/tests/txinfo17.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
info_TEXINFOS = texinfo.texi
END
diff --git a/tests/txinfo18.test b/tests/txinfo18.test
index 8dc896163..dcc370504 100755
--- a/tests/txinfo18.test
+++ b/tests/txinfo18.test
@@ -21,8 +21,6 @@
required='makeinfo tex texi2dvi'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/txinfo19.test b/tests/txinfo19.test
index aabe4be88..80602fd76 100755
--- a/tests/txinfo19.test
+++ b/tests/txinfo19.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='makeinfo tex'
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/txinfo2.test b/tests/txinfo2.test
index f51d0b631..39c404c24 100755
--- a/tests/txinfo2.test
+++ b/tests/txinfo2.test
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/txinfo20.test b/tests/txinfo20.test
index 5f6de57e6..dcd362b12 100755
--- a/tests/txinfo20.test
+++ b/tests/txinfo20.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=makeinfo
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/txinfo21.test b/tests/txinfo21.test
index 4bbce4aeb..39b7a549a 100755
--- a/tests/txinfo21.test
+++ b/tests/txinfo21.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2008, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +21,6 @@
required='makeinfo-html tex texi2dvi'
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<\EOF
AC_CONFIG_FILES([rec/Makefile])
diff --git a/tests/txinfo22.test b/tests/txinfo22.test
index c2f23e176..06819fdcf 100755
--- a/tests/txinfo22.test
+++ b/tests/txinfo22.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2008, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2003, 2004, 2007, 2008, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required='makeinfo tex texi2dvi'
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([aux1])
@@ -52,7 +50,7 @@ END
mkdir aux1
mkdir tex
-cp "$testsrcdir/../lib/texinfo.tex" tex
+cp "$top_testsrcdir/lib/texinfo.tex" tex
$ACLOCAL
$AUTOMAKE --add-missing
diff --git a/tests/txinfo23.test b/tests/txinfo23.test
index 660487d8c..7ec3796b8 100755
--- a/tests/txinfo23.test
+++ b/tests/txinfo23.test
@@ -22,8 +22,6 @@
required='makeinfo tex texi2dvi-o'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/txinfo24.test b/tests/txinfo24.test
index fc9f9d1e0..a6f9e023c 100755
--- a/tests/txinfo24.test
+++ b/tests/txinfo24.test
@@ -21,8 +21,6 @@
required='makeinfo tex texi2dvi-o'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/txinfo25.test b/tests/txinfo25.test
index f80b035da..a350a02a2 100755
--- a/tests/txinfo25.test
+++ b/tests/txinfo25.test
@@ -23,8 +23,6 @@
required='makeinfo tex texi2dvi-o'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/txinfo26.test b/tests/txinfo26.test
index e5e8f84b7..ba935518d 100755
--- a/tests/txinfo26.test
+++ b/tests/txinfo26.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='makeinfo'
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/txinfo27.test b/tests/txinfo27.test
index 0769fa5e3..368707ffb 100755
--- a/tests/txinfo27.test
+++ b/tests/txinfo27.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required='makeinfo'
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT >> configure.in
cat > Makefile.am << 'END'
diff --git a/tests/txinfo28.test b/tests/txinfo28.test
index 1fd702be5..26e8bb31f 100755
--- a/tests/txinfo28.test
+++ b/tests/txinfo28.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
required='makeinfo tex texi2dvi-o'
. ./defs || Exit 1
-set -e
-
# This setting, when honored by GNU ls, used to cause an infinite loop
# in mdate-sh.
TIME_STYLE="+%Y-%m-%d %H:%M:%S"
diff --git a/tests/txinfo29.test b/tests/txinfo29.test
index 42dd3abdf..6f986541a 100755
--- a/tests/txinfo29.test
+++ b/tests/txinfo29.test
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
INFO_DEPS = foo.info
info_TEXINFOS = bar.texi
diff --git a/tests/txinfo3.test b/tests/txinfo3.test
index 6af712faa..57ebd7197 100755
--- a/tests/txinfo3.test
+++ b/tests/txinfo3.test
@@ -20,8 +20,6 @@
required='makeinfo tex texi2dvi'
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_OUTPUT
END
diff --git a/tests/txinfo30.test b/tests/txinfo30.test
index 296180d0a..ee6976fb5 100755
--- a/tests/txinfo30.test
+++ b/tests/txinfo30.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo info_TEXINFOS = bar.texi >Makefile.am
echo grepme >bar.info
$sleep
diff --git a/tests/txinfo31.test b/tests/txinfo31.test
index cb8df940c..d657f226e 100755
--- a/tests/txinfo31.test
+++ b/tests/txinfo31.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo info_TEXINFOS = bar.texi >Makefile.am
cat >bar.texi <<EOF
@setfilename bar-1.9.info
diff --git a/tests/txinfo32.test b/tests/txinfo32.test
index 6b63ad840..6c7c75187 100755
--- a/tests/txinfo32.test
+++ b/tests/txinfo32.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >>configure.in <<'END'
AC_CONFIG_FILES([sub/Makefile])
diff --git a/tests/txinfo33.test b/tests/txinfo33.test
index 4657a94bd..38bea681b 100755
--- a/tests/txinfo33.test
+++ b/tests/txinfo33.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
required='makeinfo tex texi2dvi-o dvips'
. ./defs || Exit 1
-set -e
-
mkdir sub
cat >> configure.in << 'END'
diff --git a/tests/txinfo4.test b/tests/txinfo4.test
index 0c55a1ca8..93acdba60 100755
--- a/tests/txinfo4.test
+++ b/tests/txinfo4.test
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
END
diff --git a/tests/txinfo5.test b/tests/txinfo5.test
index 0b3ea683b..e9c43fd37 100755
--- a/tests/txinfo5.test
+++ b/tests/txinfo5.test
@@ -23,8 +23,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_MAINTAINER_MODE
END
diff --git a/tests/txinfo5b.test b/tests/txinfo5b.test
index f14eadb00..be52e0bd5 100755
--- a/tests/txinfo5b.test
+++ b/tests/txinfo5b.test
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_MAINTAINER_MODE
END
diff --git a/tests/txinfo6.test b/tests/txinfo6.test
index f5b8c0b64..e6af70c44 100755
--- a/tests/txinfo6.test
+++ b/tests/txinfo6.test
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
info_TEXINFOS = foo.txi
END
diff --git a/tests/txinfo7.test b/tests/txinfo7.test
index 9a1dd5ceb..2a3f17119 100755
--- a/tests/txinfo7.test
+++ b/tests/txinfo7.test
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
END
diff --git a/tests/txinfo8.test b/tests/txinfo8.test
index 13c8e312e..74acc339f 100755
--- a/tests/txinfo8.test
+++ b/tests/txinfo8.test
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([auxdir])
diff --git a/tests/txinfo9.test b/tests/txinfo9.test
index 71b5efb6d..ce1e72c53 100755
--- a/tests/txinfo9.test
+++ b/tests/txinfo9.test
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
info_TEXINFOS = maude.texi liver.txi heart.texinfo
END
diff --git a/tests/unused.test b/tests/unused.test
index f406b43f1..d22643f76 100755
--- a/tests/unused.test
+++ b/tests/unused.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2002, 2003, 2008, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998, 2002, 2003, 2008, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
MACRO_1
MACRO_1_2
diff --git a/tests/upc.test b/tests/upc.test
index 3c55ccbdf..ad072bf66 100755
--- a/tests/upc.test
+++ b/tests/upc.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,8 +17,6 @@
# A simple Hello World for UPC.
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AM_PROG_UPC
AC_OUTPUT
diff --git a/tests/upc2.test b/tests/upc2.test
index 6b717fdc6..616b2f4ca 100755
--- a/tests/upc2.test
+++ b/tests/upc2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
echo AC_PROG_CC >>configure.in
cat >Makefile.am <<'END'
diff --git a/tests/upc3.test b/tests/upc3.test
index f575b9ac6..4692398b1 100755
--- a/tests/upc3.test
+++ b/tests/upc3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,8 +17,6 @@
# Test that C and Unified Parallel C link safely.
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_UPC
diff --git a/tests/vala.test b/tests/vala.test
index 3e9ae3648..3e1ef65aa 100755
--- a/tests/vala.test
+++ b/tests/vala.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011 Free Software
+# Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -24,8 +24,6 @@
required="libtool"
. ./defs || Exit 1
-set -e
-
cat >> 'configure.in' << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/vala1.test b/tests/vala1.test
index d0cc24101..5030f7232 100755
--- a/tests/vala1.test
+++ b/tests/vala1.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011 Free Software
+# Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -25,8 +25,6 @@
required="libtool"
. ./defs || Exit 1
-set -e
-
cat >> 'configure.in' << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/vala2.test b/tests/vala2.test
index e559540d6..d5308e35b 100755
--- a/tests/vala2.test
+++ b/tests/vala2.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011 Free Software
+# Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -24,8 +24,6 @@
required="libtool libtoolize pkg-config valac gcc GNUmake"
. ./defs || Exit 1
-set -e
-
mkdir src
cat >> 'configure.in' << 'END'
diff --git a/tests/vala3.test b/tests/vala3.test
index 138e85335..2d9c85c33 100755
--- a/tests/vala3.test
+++ b/tests/vala3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011 Free Software
+# Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -24,8 +24,6 @@
required="libtool libtoolize pkg-config valac gcc GNUmake"
. ./defs || Exit 1
-set -e
-
mkdir src
cat >> 'configure.in' << 'END'
diff --git a/tests/vala4.test b/tests/vala4.test
index 7a15ebe20..acd4f7ee9 100755
--- a/tests/vala4.test
+++ b/tests/vala4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -23,8 +23,6 @@
required=libtoolize
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/tests/vala5.test b/tests/vala5.test
index 8fc703c4f..d6ff62954 100755
--- a/tests/vala5.test
+++ b/tests/vala5.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011 Free Software
+# Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -24,8 +24,6 @@
required="libtool libtoolize pkg-config valac gcc GNUmake"
. ./defs || Exit 1
-set -e
-
mkdir src
cat >> 'configure.in' << 'END'
diff --git a/tests/vars.test b/tests/vars.test
index 6163a8d0b..1a33b3bd7 100755
--- a/tests/vars.test
+++ b/tests/vars.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
MY_FLAGS_1=-DABC=345
MY_FLAGS_2= -DABC=345
@@ -30,3 +28,9 @@ END
$ACLOCAL
$AUTOMAKE
+
+for i in 1 2 3 4; do
+ grep "^MY_FLAGS_$i *= *-DABC=345 *$" Makefile.in
+done
+
+:
diff --git a/tests/vars3.test b/tests/vars3.test
index 6b738ab98..9608d6cf3 100755
--- a/tests/vars3.test
+++ b/tests/vars3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >Makefile.am <<'EOF'
L01 = $(shell echo *)
L02 = $$(not an error)
@@ -30,7 +28,7 @@ L05 = "$(bad boy)"
L06 = $(this:is= ok)
L07 = ${three errors}${on this} $(long line)
L08$(o u c h): $(wildcard *.c)
- ${another error}
+ ${another Error}
echo $${ok-this is}
L11: $(thisis) $(ok)
${here}
@@ -70,7 +68,7 @@ grep 'on this' stderr
grep 'long line' stderr
grep 'o u c h' stderr
grep 'wildcard' stderr
-grep 'another error' stderr
+grep 'another Error' stderr
grep 'thisis' stderr && Exit 1
grep 'here' stderr && Exit 1
@@ -82,3 +80,5 @@ $AUTOMAKE -Wno-portability
# processed far later).
echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
$AUTOMAKE
+
+:
diff --git a/tests/vartar.test b/tests/vartar.test
index 3a18d773a..8fd77166b 100755
--- a/tests/vartar.test
+++ b/tests/vartar.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
install = install
install:
@@ -37,3 +36,5 @@ install:
EOF
sed -n '/^install:/,/^ /p' Makefile.in > target.value
diff target.expected target.value
+
+:
diff --git a/tests/vartypo2.test b/tests/vartypo2.test
new file mode 100755
index 000000000..f811bbcb4
--- /dev/null
+++ b/tests/vartypo2.test
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure we warn about possible variable typos when we should,
+# Libtool variant.
+
+required=libtoolize
+. ./defs || Exit 1
+
+cat >>configure.in <<'END'
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+libfoo_la_SOURCES = unused
+nodist_libfoo_la_SOURCES = unused
+EXTRA_libfoo_la_SOURCES = unused
+libfoo_la_LIBADD = unused
+libfoo_la_DEPENDENCIES = unused
+EXTRA_libfoo_la_DEPENDENCIES = unused
+END
+
+libtoolize
+$ACLOCAL
+AUTOMAKE_fails --add-missing
+# The expected diagnostic is:
+# automake: warnings are treated as errors
+# Makefile.am:3: warning: variable `EXTRA_libfoo_la_SOURCES' is defined but no program or
+# Makefile.am:3: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:1: warning: variable `libfoo_la_SOURCES' is defined but no program or
+# Makefile.am:1: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:2: warning: variable `nodist_libfoo_la_SOURCES' is defined but no program or
+# Makefile.am:2: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:4: warning: variable `libfoo_la_LIBADD' is defined but no program or
+# Makefile.am:4: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:6: warning: variable `EXTRA_libfoo_la_DEPENDENCIES' is defined but no program or
+# Makefile.am:6: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:5: warning: variable `libfoo_la_DEPENDENCIES' is defined but no program or
+# Makefile.am:5: library has `libfoo_la' as canonical name (possible typo)
+
+
+grep 'as canonical' stderr | grep -v ' .libfoo_la. ' && Exit 1
+test `grep 'variable.*is defined but' stderr | wc -l` = 6
+
+# If we add a global -Wnone, all warnings should disappear.
+$AUTOMAKE -Wnone
+
+# Likewise, if matching programs or libraries are defined.
+cat >>Makefile.am <<'END'
+lib_LTLIBRARIES = libfoo.la
+END
+
+$AUTOMAKE
+
+:
diff --git a/tests/vartypos.test b/tests/vartypos.test
new file mode 100755
index 000000000..03747ed87
--- /dev/null
+++ b/tests/vartypos.test
@@ -0,0 +1,89 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure we warn about possible variable typos when we should.
+
+. ./defs || Exit 1
+
+cat >>configure.in <<'END'
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+foo_SOURCES = unused
+nodist_foo_SOURCES = unused
+EXTRA_foo_SOURCES = unused
+foo_LDADD = unused
+foo_LDFLAGS = unused
+foo_DEPENDENCIES = unused
+EXTRA_foo_DEPENDENCIES = unused
+
+libfoo_a_SOURCES = unused
+nodist_libfoo_a_SOURCES = unused
+EXTRA_libfoo_a_SOURCES = unused
+libfoo_a_LIBADD = unused
+libfoo_a_DEPENDENCIES = unused
+EXTRA_libfoo_a_DEPENDENCIES = unused
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+# The expected diagnostic is:
+# automake: warnings are treated as errors
+# Makefile.am:2: warning: variable `nodist_foo_SOURCES' is defined but no program or
+# Makefile.am:2: library has `foo' as canonical name (possible typo)
+# Makefile.am:1: warning: variable `foo_SOURCES' is defined but no program or
+# Makefile.am:1: library has `foo' as canonical name (possible typo)
+# Makefile.am:9: warning: variable `libfoo_a_SOURCES' is defined but no program or
+# Makefile.am:9: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:10: warning: variable `nodist_libfoo_a_SOURCES' is defined but no program or
+# Makefile.am:10: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:11: warning: variable `EXTRA_libfoo_a_SOURCES' is defined but no program or
+# Makefile.am:11: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:3: warning: variable `EXTRA_foo_SOURCES' is defined but no program or
+# Makefile.am:3: library has `foo' as canonical name (possible typo)
+# Makefile.am:12: warning: variable `libfoo_a_LIBADD' is defined but no program or
+# Makefile.am:12: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:4: warning: variable `foo_LDADD' is defined but no program or
+# Makefile.am:4: library has `foo' as canonical name (possible typo)
+# Makefile.am:5: warning: variable `foo_LDFLAGS' is defined but no program or
+# Makefile.am:5: library has `foo' as canonical name (possible typo)
+# Makefile.am:14: warning: variable `EXTRA_libfoo_a_DEPENDENCIES' is defined but no program or
+# Makefile.am:14: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:7: warning: variable `EXTRA_foo_DEPENDENCIES' is defined but no program or
+# Makefile.am:7: library has `foo' as canonical name (possible typo)
+# Makefile.am:6: warning: variable `foo_DEPENDENCIES' is defined but no program or
+# Makefile.am:6: library has `foo' as canonical name (possible typo)
+# Makefile.am:13: warning: variable `libfoo_a_DEPENDENCIES' is defined but no program or
+# Makefile.am:13: library has `libfoo_a' as canonical name (possible typo)
+
+grep 'as canonical' stderr | grep -v ' .foo. ' | grep -v ' .libfoo_a. ' \
+ && Exit 1
+test `grep 'variable.*is defined but' stderr | wc -l` = 13
+
+# If we add a global -Wnone, all warnings should disappear.
+$AUTOMAKE -Wnone
+
+# Likewise, if matching programs or libraries are defined.
+cat >>Makefile.am <<'END'
+bin_PROGRAMS = foo
+lib_LIBRARIES = libfoo.a
+END
+
+$AUTOMAKE
+
+:
diff --git a/tests/version.test b/tests/version.test
index a894a7556..48c0ff670 100755
--- a/tests/version.test
+++ b/tests/version.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE([sh-utils], [1.12o])
diff --git a/tests/version2.test b/tests/version2.test
index a25b82b1c..86bc8d968 100755
--- a/tests/version2.test
+++ b/tests/version2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE([sh-utils], [1.12o], [no])
diff --git a/tests/version3.test b/tests/version3.test
index b7d356d23..5423e7c38 100755
--- a/tests/version3.test
+++ b/tests/version3.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = 9.9x
END
diff --git a/tests/version4.test b/tests/version4.test
index f8ceafed9..1e5510d1e 100755
--- a/tests/version4.test
+++ b/tests/version4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = 1.4-p3
END
diff --git a/tests/version6.test b/tests/version6.test
index 6993c0608..ca87e3624 100755
--- a/tests/version6.test
+++ b/tests/version6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
. ./defs || Exit 1
-set -e
-
amver=`$AUTOMAKE --version | sed -e 's/.* //;1q'`
cat > Makefile.am << END
diff --git a/tests/version7.test b/tests/version7.test
index 4df84edfc..2385b07a9 100755
--- a/tests/version7.test
+++ b/tests/version7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2008, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,11 +22,9 @@
required='makeinfo tex texi2dvi GNUmake'
. ./defs || Exit 1
-set -e
-
-cat >configure.in <<'END'
+cat >configure.in <<END
m4_include([version.m4])
-AC_INIT([version7], [THE_VERSION])
+AC_INIT([$me], [THE_VERSION])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
@@ -59,9 +57,10 @@ $AUTOMAKE --add-missing
$MAKE
grep '2\.718' version.texi
-
$sleep
echo 'm4_define([THE_VERSION], [3.141])' > version.m4
$MAKE distcheck
./configure --version | grep '3\.141'
grep '3\.141' version.texi
+
+:
diff --git a/tests/version8.test b/tests/version8.test
index 91b11a0a7..9552afff2 100755
--- a/tests/version8.test
+++ b/tests/version8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +18,6 @@
. ./defs || Exit 1
-set -e
echo 'AM_AUTOMAKE_VERSION([1.9])' >>configure.in
$ACLOCAL 2>stderr && { cat stderr >&2; Exit 0; }
cat stderr >&2
diff --git a/tests/vpath.test b/tests/vpath.test
index a95f5b2bc..4cbd5a182 100755
--- a/tests/vpath.test
+++ b/tests/vpath.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
VPATH = zardoz
END
diff --git a/tests/vtexi.test b/tests/vtexi.test
index e9a45111f..c0e49f9b6 100755
--- a/tests/vtexi.test
+++ b/tests/vtexi.test
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
END
diff --git a/tests/vtexi2.test b/tests/vtexi2.test
index 00e4c1e79..958de07bd 100755
--- a/tests/vtexi2.test
+++ b/tests/vtexi2.test
@@ -22,8 +22,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
info_TEXINFOS = zardoz.texi
END
diff --git a/tests/vtexi3.test b/tests/vtexi3.test
index 34f46c55c..83e64821f 100755
--- a/tests/vtexi3.test
+++ b/tests/vtexi3.test
@@ -22,8 +22,6 @@
. ./defs || Exit 1
-set -e
-
distdir=$me-7.45.3a
# This should work without tex, texinfo or makeinfo
diff --git a/tests/vtexi4.test b/tests/vtexi4.test
index 3c8ab4103..b6d970ad1 100755
--- a/tests/vtexi4.test
+++ b/tests/vtexi4.test
@@ -24,8 +24,6 @@
required='makeinfo tex texi2dvi-o'
. ./defs || Exit 1
-set -e
-
case `LC_ALL=C date '+%u'` in
[1-7]) date_is_posix=:;;
*) date_is_posx=false;;
diff --git a/tests/warning-groups-win-over-strictness.test b/tests/warning-groups-win-over-strictness.test
new file mode 100755
index 000000000..a29144211
--- /dev/null
+++ b/tests/warning-groups-win-over-strictness.test
@@ -0,0 +1,64 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that explicitly-defined warning levels take precedence over
+# implicit strictness-implied warnings, even when these explicit warning
+# levels are "catch-all warnings" (such as `-Wall' and `-Wnone').
+# Since we are at it, also throw in *.am and *.m4 file inclusions.
+
+. ./defs || Exit 1
+
+# We want complete control over automake options.
+AUTOMAKE=$original_AUTOMAKE
+
+# Files required in gnu and/or gnits strictness.
+touch README INSTALL NEWS AUTHORS ChangeLog COPYING THANKS
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+m4_include([am-init-automake.m4])
+AC_PROG_CC
+AC_CONFIG_FILES([Makefile])
+# Other similar tests do not use AC_OUTPUT, so we use it here,
+# for completeness and for better coverage.
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+include automake-options.am
+FOO := bar
+END
+
+rm -rf autom4te*.cache
+: > automake-options.am
+echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
+$ACLOCAL
+AUTOMAKE_fails -Werror -Wall --foreign
+grep '^Makefile\.am:.*:=.*not portable' stderr
+
+rm -rf autom4te*.cache
+: > automake-options.am
+echo 'AM_INIT_AUTOMAKE([-Werror -Wnone gnu])' > am-init-automake.m4
+$ACLOCAL
+$AUTOMAKE
+
+rm -rf autom4te*.cache
+echo 'AUTOMAKE_OPTIONS = -Werror -Wnone gnits' > automake-options.am
+echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
+$ACLOCAL
+$AUTOMAKE
+
+:
diff --git a/tests/warnings-override.test b/tests/warnings-override.test
new file mode 100755
index 000000000..728a7c034
--- /dev/null
+++ b/tests/warnings-override.test
@@ -0,0 +1,111 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The warnings specified in Makefile.am:AUTOMAKE_OPTIONS should override
+# those specified in configure.in:AM_INIT_AUTOMAKE, and both should
+# override the warnings specified on the command line.
+# NOTE: the current semantics might not be the best one (even if it has
+# been in place for quite a long time); see also Automake bug #7673.
+# Update this test if the semantics are changed.
+
+. ./defs || Exit 1
+
+# We want (almost) complete control over automake options.
+AUTOMAKE="$original_AUTOMAKE -Werror"
+
+cat > Makefile.am <<'END'
+FOO := bar
+AUTOMAKE_OPTIONS =
+END
+
+set_warnings ()
+{
+ set +x
+ sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+ -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
+ mv -f $2-t $2
+ set -x
+ cat $2
+}
+
+ok ()
+{
+ $AUTOMAKE $*
+}
+
+ko ()
+{
+ AUTOMAKE_fails $*
+ grep '^Makefile\.am:1:.*:=.*not portable' stderr
+}
+
+$ACLOCAL
+
+# Files required in gnu strictness.
+touch README INSTALL NEWS AUTHORS ChangeLog COPYING
+
+rm -rf autom4te*.cache
+set_warnings '-Wno-portability' Makefile.am
+set_warnings '' configure.in
+
+ok -Wportability
+ok
+
+rm -rf autom4te*.cache
+set_warnings '' Makefile.am
+set_warnings '-Wno-portability' configure.in
+
+ok -Wportability
+ok
+
+rm -rf autom4te*.cache
+set_warnings '-Wno-portability' Makefile.am
+set_warnings '-Wno-portability' configure.in
+
+ok -Wportability
+
+rm -rf autom4te*.cache
+set_warnings '-Wportability' Makefile.am
+set_warnings '' configure.in
+
+ko
+ko -Wno-portability
+
+rm -rf autom4te*.cache
+set_warnings '' Makefile.am
+set_warnings '-Wportability' configure.in
+
+ko
+ko -Wno-portability
+
+rm -rf autom4te*.cache
+set_warnings '-Wportability' Makefile.am
+set_warnings '-Wportability' configure.in
+ko -Wno-portability
+
+rm -rf autom4te*.cache
+set_warnings '-Wno-portability' Makefile.am
+set_warnings '-Wportability' configure.in
+ok
+ok -Wportability
+
+rm -rf autom4te*.cache
+set_warnings '-Wportability' Makefile.am
+set_warnings '-Wno-portability' configure.in
+ko
+ko -Wno-portability
+
+:
diff --git a/tests/warnings-precedence.test b/tests/warnings-precedence.test
new file mode 100755
index 000000000..0f116695a
--- /dev/null
+++ b/tests/warnings-precedence.test
@@ -0,0 +1,77 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# On the command line, in AM_INIT_AUTOMAKE, and in AUTOMAKE_OPTIONS,
+# warnings specified later should take precedence over those specified
+# earlier.
+
+. ./defs || Exit 1
+
+# We want (almost) complete control over automake options.
+AUTOMAKE="$original_AUTOMAKE -Werror"
+
+cat > Makefile.am <<'END'
+FOO := bar
+AUTOMAKE_OPTIONS =
+END
+
+set_warnings ()
+{
+ set +x
+ sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+ -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
+ mv -f $2-t $2
+ set -x
+ cat $2
+}
+
+ok ()
+{
+ $AUTOMAKE $*
+}
+
+ko ()
+{
+ AUTOMAKE_fails $*
+ grep '^Makefile\.am:1:.*:=.*not portable' stderr
+}
+
+# Files required in gnu strictness.
+touch README INSTALL NEWS AUTHORS ChangeLog COPYING
+
+$ACLOCAL
+ok -Wportability -Wno-portability
+ko -Wno-portability -Wportability
+
+set_warnings '' Makefile.am
+set_warnings '-Wportability -Wno-portability' configure.in
+rm -rf autom4te*.cache
+$ACLOCAL
+ok
+set_warnings '-Wno-portability -Wportability' configure.in
+rm -rf autom4te*.cache
+$ACLOCAL
+ko
+
+set_warnings '' configure.in
+rm -rf autom4te*.cache
+$ACLOCAL
+set_warnings '-Wportability -Wno-portability' Makefile.am
+ok
+set_warnings '-Wno-portability -Wportability' Makefile.am
+ko
+
+:
diff --git a/tests/warnings-strictness-interactions.test b/tests/warnings-strictness-interactions.test
new file mode 100755
index 000000000..e2c767532
--- /dev/null
+++ b/tests/warnings-strictness-interactions.test
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the default warnings triggered by a strictness specified
+# in AUTOMAKE_OPTIONS take precedence over explicit warnings given in
+# AM_INIT_AUTOMAKE.
+
+. ./defs || Exit 1
+
+# We want (almost) complete control over automake options.
+AUTOMAKE="$original_AUTOMAKE -Werror"
+
+cat > Makefile.am <<END
+AUTOMAKE_OPTIONS =
+FOO := bar
+END
+
+set_am_opts ()
+{
+ set +x
+ sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+ -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
+ mv -f $2-t $2
+ set -x
+ cat $2
+}
+
+set_am_opts '-Wportability' configure.in
+set_am_opts 'foreign' Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+
+rm -rf autom4te*.cache
+
+# Files required in gnu strictness.
+touch README INSTALL NEWS AUTHORS ChangeLog COPYING
+
+set_am_opts '-Wno-portability' configure.in
+set_am_opts 'gnu' Makefile.am
+
+AUTOMAKE_fails
+$ACLOCAL
+grep '^Makefile\.am:2:.*:=.*not portable' stderr
+
+:
diff --git a/tests/warnings-unknown.test b/tests/warnings-unknown.test
new file mode 100755
index 000000000..77ed589d7
--- /dev/null
+++ b/tests/warnings-unknown.test
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that automake complains about unknown warnings.
+
+. ./defs || Exit 1
+
+# We want (almost) complete control over automake options.
+AUTOMAKE="$original_AUTOMAKE --foreign -Werror"
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([-Wno-zardoz])
+AC_CONFIG_FILES([Makefile])
+END
+
+cat > Makefile.am <<END
+AUTOMAKE_OPTIONS = -Wfoobar
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails -Wbazquux
+grep '^configure\.in:2:.* unknown warning category.*zardoz' stderr
+grep '^Makefile\.am:1:.* unknown warning category.*foobar' stderr
+grep '^automake:.* unknown warning category.*bazquux' stderr
+
+# Check that we can override warnings about unknown warning categories.
+$AUTOMAKE -Wno-unsupported -Wbazquux
+
+:
diff --git a/tests/warnings-win-over-strictness.test b/tests/warnings-win-over-strictness.test
new file mode 100755
index 000000000..0db3176a4
--- /dev/null
+++ b/tests/warnings-win-over-strictness.test
@@ -0,0 +1,90 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that, on the command line, explicitly-defined warnings take
+# precedence over implicit strictness-implied warnings.
+
+. ./defs || Exit 1
+
+# We want complete control over automake options.
+AUTOMAKE=$original_AUTOMAKE
+
+ok ()
+{
+ AUTOMAKE_run 0 $*
+ test ! -s stderr
+}
+
+ko ()
+{
+ AUTOMAKE_run 0 $*
+ grep '^Makefile\.am:.*:=.*not portable' stderr
+ test `wc -l <stderr` -eq 1
+}
+
+set_am_opts()
+{
+ set +x
+ sed <$2 >$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \
+ -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|"
+ mv -f $2-t $2
+ set -x
+ cat $2
+}
+
+# Files required in gnu strictness.
+touch README INSTALL NEWS AUTHORS ChangeLog COPYING
+
+cat > Makefile.am <<END
+AUTOMAKE_OPTIONS =
+FOO := bar
+END
+
+$ACLOCAL
+
+ko --foreign -Wportability
+ko -Wportability --foreign
+ok --gnu -Wno-portability
+ok -Wno-portability --gnu
+
+set_am_opts '' Makefile.am
+
+rm -rf autom4te*.cache
+set_am_opts 'foreign -Wportability' configure.in
+ko
+rm -rf autom4te*.cache
+set_am_opts '-Wportability foreign' configure.in
+ko
+rm -rf autom4te*.cache
+set_am_opts 'gnu -Wno-portability' configure.in
+ok
+rm -rf autom4te*.cache
+set_am_opts '-Wno-portability gnu' configure.in
+ok
+
+rm -rf autom4te*.cache
+set_am_opts '' configure.in
+
+set_am_opts 'foreign -Wportability' Makefile.am
+ko
+set_am_opts '-Wportability foreign' Makefile.am
+ko
+set_am_opts 'gnu -Wno-portability' Makefile.am
+ok
+set_am_opts '-Wno-portability gnu' Makefile.am
+ok
+
+:
diff --git a/tests/warnopts.test b/tests/warnopts.test
index 6d964000b..edcf70ac4 100755
--- a/tests/warnopts.test
+++ b/tests/warnopts.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<END
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
@@ -46,14 +45,15 @@ END
$ACLOCAL
AUTOMAKE_fails
# The expected diagnostic is
-# Makefile.am:3: unused variable: `foo_SOURCES'
-# sub/Makefile.am:2: `INCLUDES' is the old name for `AM_CPPFLAGS'
+# Makefile.am:3: warning: variable `foo_SOURCES' is defined but no program or
+# library has `foo' as canonical name (possible typo)
+# sub/Makefile.am:2: warning: `INCLUDES' is the old name for `AM_CPPFLAGS'
grep '^Makefile.am:.*foo_SOURCES' stderr
grep '^sub/Makefile.am:.*INCLUDES' stderr
grep '^sub/Makefile.am:.*foo_SOURCES' stderr && Exit 1
grep '^Makefile.am:.*INCLUDES' stderr && Exit 1
# Only three lines of warnings.
-test `wc -l < stderr` = 3
+test `grep -v 'warnings are treated as errors' stderr | wc -l` = 3
# On fast machines the autom4te.cache created during the above run of
# $AUTOMAKE is likely to have the same time stamp as the configure.in
diff --git a/tests/werror.test b/tests/werror.test
index 355f9d288..8ea6c6792 100755
--- a/tests/werror.test
+++ b/tests/werror.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,15 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure --Werror and --add-missing work together.
+# Test to make sure -Werror and --add-missing work together.
. ./defs || Exit 1
-set -e
-
: > Makefile.am
rm -f install-sh depcomp missing mkinstalldirs
$ACLOCAL
-$AUTOMAKE --Werror --add-missing
+$AUTOMAKE -Werror --add-missing
diff --git a/tests/werror2.test b/tests/werror2.test
index 6b6d011a7..c3c46a560 100755
--- a/tests/werror2.test
+++ b/tests/werror2.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2009, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,6 @@
required=GNUmake
. ./defs || Exit 1
-set -e
-
echo AC_OUTPUT>>configure.in
: > Makefile.am
diff --git a/tests/werror3.test b/tests/werror3.test
index 96b4ff347..98cc8f0da 100755
--- a/tests/werror3.test
+++ b/tests/werror3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<\END
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
diff --git a/tests/werror4.test b/tests/werror4.test
new file mode 100755
index 000000000..2ffaa4eeb
--- /dev/null
+++ b/tests/werror4.test
@@ -0,0 +1,66 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# -Werror and local -Werror settings should be flagged for the user.
+
+. ./defs || Exit 1
+
+cat >>configure.in <<\END
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+cat >sub/Makefile.am <<\END
+AUTOMAKE_OPTIONS = -Werror
+SUB = foo
+SUB = bar
+END
+cat >Makefile.am <<\END
+AUTOMAKE_OPTIONS = -Werror
+VAR = foo
+VAR = bar
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails -Wno-error
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+test `grep -c 'warnings are treated as errors' stderr` -eq 1
+
+sed '/AUTOMAKE_OPTIONS/d' sub/Makefile.am > t
+mv -f t sub/Makefile.am
+
+AUTOMAKE_fails -Wno-error
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+test `grep -c 'warnings are treated as errors' stderr` -eq 1
+
+sed '/AUTOMAKE_OPTIONS/d' Makefile.am > t
+mv -f t Makefile.am
+
+AUTOMAKE_fails -Werror
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+test `grep -c 'warnings are treated as errors' stderr` -eq 1
+
+AUTOMAKE_run 0 -Wno-error
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+grep 'warnings are treated as errors' stderr && Exit 1
+
+:
diff --git a/tests/whoami.test b/tests/whoami.test
index 37bd81a04..fa1b08dcf 100755
--- a/tests/whoami.test
+++ b/tests/whoami.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
WHO_AM_I=17
END
diff --git a/tests/xsource.test b/tests/xsource.test
index df140a59d..573941323 100755
--- a/tests/xsource.test
+++ b/tests/xsource.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz
zardoz_SOURCES = z.c x/z.c
diff --git a/tests/xz.test b/tests/xz.test
index f442711b4..50bfb4a9c 100755
--- a/tests/xz.test
+++ b/tests/xz.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
required=xz
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([xz], [1.0])
AM_INIT_AUTOMAKE([no-dist-gzip dist-xz])
diff --git a/tests/yacc-basic.test b/tests/yacc-basic.test
new file mode 100755
index 000000000..26dc4a902
--- /dev/null
+++ b/tests/yacc-basic.test
@@ -0,0 +1,86 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Basic semantic checks on Yacc support.
+
+required=yacc
+. ./defs || Exit 1
+
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = parse.y foo.c
+
+.PHONY: echo-distcom
+echo-distcom:
+ @echo ' ' $(DIST_COMMON) ' '
+END
+
+cat > parse.y << 'END'
+%{
+#include <stdio.h>
+#include <stdlib.h>
+int yylex () { return (getchar ()); }
+void yyerror (char *s) {}
+%}
+%%
+a : 'a' { exit(0); };
+END
+
+cat > foo.c << 'END'
+int main () { yyparse (); return 1; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+# The `parse.c' file must be created and not removed (i.e., not treated
+# like an "intermediate file" in the GNU make sense).
+test -f parse.c
+
+echo a | ./foo
+echo b | ./foo && Exit 1
+
+# The generated file `parse.c' must be shipped.
+$MAKE echo-distcom
+$MAKE -s echo-distcom | grep '[ /]parse.c '
+$MAKE distdir
+ls -l $distdir
+test -f $distdir/parse.c
+
+# Sanity check on distribution.
+$MAKE distcheck
+
+# While we are at it, make sure that parse.c is erased by
+# maintainer-clean, and not by distclean.
+test -f parse.c
+$MAKE distclean
+test -f parse.c
+./configure # we must re-create `Makefile'
+$MAKE maintainer-clean
+test ! -f parse.c
+
+:
diff --git a/tests/yacc-clean.test b/tests/yacc-clean.test
new file mode 100755
index 000000000..a05e5f23d
--- /dev/null
+++ b/tests/yacc-clean.test
@@ -0,0 +1,153 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that .c and .h files derived from non-distributed .y sources
+# are cleaned by "make clean", while .c and .h files derived from
+# distributed .y sources are cleaned by "make maintainer-clean".
+
+required=yacc
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+# Use two subdirectories, one to test with `-d' in YFLAGS, the
+# other one to test with empty YFLAGS.
+SUBDIRS = sub1 sub2
+END
+
+mkdir sub1 sub2
+
+cat > sub1/Makefile.am << 'END'
+bin_PROGRAMS = foo bar baz qux
+
+foo_SOURCES = main.c parse.y
+
+bar_SOURCES = main.c parse.y
+bar_YFLAGS = $(AM_YFLAGS)
+
+baz_SOURCES = main.c
+nodist_baz_SOURCES = baz.y
+
+qux_SOURCES = main.c
+nodist_qux_SOURCES = baz.y
+qux_YFLAGS = $(AM_YFLAGS)
+
+baz.y:
+ cp $(srcdir)/parse.y $@
+
+CLEANFILES = baz.y
+END
+
+cat > sub2/Makefile.am << 'END'
+include $(top_srcdir)/sub1/Makefile.am
+AM_YFLAGS = -d
+END
+
+cat > sub1/parse.y << 'END'
+%{
+int yylex () { return (getchar ()); }
+void yyerror (char *s) {}
+%}
+%%
+x : 'x' { };
+END
+cp sub1/parse.y sub2/parse.y
+
+cat > sub1/main.c << 'END'
+int main ()
+{
+ return yyparse ();
+}
+END
+cp sub1/main.c sub2/main.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+cp config.status config.sav
+
+$MAKE
+ls -l . sub1 sub2
+# Sanity checks.
+test -f sub1/parse.y
+test -f sub1/parse.c
+test -f sub1/bar-parse.c
+test -f sub1/baz.y
+test -f sub1/baz.c
+test -f sub1/qux-baz.c
+test -f sub2/parse.y
+test -f sub2/parse.c
+test -f sub2/parse.h
+test -f sub2/bar-parse.c
+test -f sub2/bar-parse.h
+test -f sub2/baz.y
+test -f sub2/baz.c
+test -f sub2/baz.h
+test -f sub2/qux-baz.c
+test -f sub2/qux-baz.h
+
+for target in clean distclean; do
+ $MAKE $target
+ ls -l . sub1 sub2
+ test -f sub1/parse.y
+ test -f sub1/parse.c
+ test -f sub1/bar-parse.c
+ test ! -r sub1/baz.y
+ test ! -r sub1/baz.c
+ test ! -r sub1/qux-baz.c
+ test -f sub2/parse.y
+ test -f sub2/parse.c
+ test -f sub2/parse.h
+ test -f sub2/bar-parse.c
+ test -f sub2/bar-parse.h
+ test ! -r sub2/baz.y
+ test ! -r sub2/baz.c
+ test ! -r sub2/baz.h
+ test ! -r sub2/qux-baz.c
+ test ! -r sub2/qux-baz.h
+done
+
+cp config.sav config.status
+./config.status # re-create Makefile
+
+$MAKE maintainer-clean
+ls -l . sub1 sub2
+test -f sub1/parse.y
+test ! -r sub1/parse.c
+test ! -r sub1/bar-parse.c
+test -f sub2/parse.y
+test ! -r sub2/parse.c
+test ! -r sub2/parse.h
+test ! -r sub2/bar-parse.c
+test ! -r sub2/bar-parse.h
+
+cp config.sav config.status
+./config.status # re-create Makefile
+
+# The distribution must work correctly, assuming the user has
+# the proper tools to process yacc files.
+$MAKE distcheck
+
+:
diff --git a/tests/yacc-d-basic.test b/tests/yacc-d-basic.test
new file mode 100755
index 000000000..ae60084f1
--- /dev/null
+++ b/tests/yacc-d-basic.test
@@ -0,0 +1,156 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tests on basic Yacc support for when we have -d in YFLAGS, AM_YFLAGS
+# or maude_YFLAGS.
+
+required=yacc
+. ./defs || Exit 1
+
+tab=' '
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_CONFIG_FILES([foo/Makefile bar/Makefile baz/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = foo bar baz
+END
+
+mkdir foo bar baz
+
+cat > foo/Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = parse.y main.c
+.PHONY: echo-distcom
+echo-distcom:
+ @echo ' ' $(DIST_COMMON) ' '
+END
+cp foo/Makefile.am bar/Makefile.am
+cp foo/Makefile.am baz/Makefile.am
+
+cat > foo/parse.y << 'END'
+%{
+#include "parse.h"
+int yylex () { return 0; }
+void yyerror (char *s) {}
+%}
+%%
+x : 'x' {};
+%%
+END
+cp foo/parse.y bar/parse.y
+
+cat > foo/main.c << 'END'
+#include "parse.h"
+int main ()
+{
+ return yyparse ();
+}
+END
+cp foo/main.c bar/main.c
+
+# Even the generated header file is renamed when target-specific YFLAGS
+# are used. This might not be the best behavior, but it has been in
+# place for quite a long time, so just go along with it for now.
+sed 's/"parse\.h"/"zardoz-parse.h"/' foo/parse.y > baz/parse.y
+sed 's/"parse\.h"/"zardoz-parse.h"/' foo/main.c > baz/main.c
+
+$ACLOCAL
+$AUTOCONF
+
+$AUTOMAKE -a
+$FGREP parse.h foo/Makefile.in bar/Makefile.in baz/Makefile.in && Exit 1
+
+cat >> foo/Makefile.am <<END
+BUILT_SOURCES = parse.h
+YFLAGS=\
+-d
+END
+$AUTOMAKE -Wno-gnu foo/Makefile
+
+sed 's/EOL$//' >> bar/Makefile.am <<END
+AM_YFLAGS${tab}= -d EOL
+BUILT_SOURCES = parse.h
+END
+$AUTOMAKE bar/Makefile
+
+cat >> baz/Makefile.am <<END
+BUILT_SOURCES = zardoz-parse.h
+zardoz_YFLAGS =-d${tab}
+END
+$AUTOMAKE baz/Makefile
+
+./configure
+
+$MAKE
+
+test -f foo/parse.c
+test -f foo/parse.h
+test -f bar/parse.c
+test -f bar/parse.h
+test -f baz/zardoz-parse.c
+test -f baz/zardoz-parse.h
+
+# The generated C and header files must be shipped.
+for dir in foo bar; do
+ cd $dir
+ $MAKE echo-distcom
+ $MAKE -s echo-distcom | grep '[ /]parse.c '
+ $MAKE -s echo-distcom | grep '[ /]parse.h '
+ cd ..
+done
+cd baz
+$MAKE echo-distcom
+$MAKE -s echo-distcom | grep '[ /]zardoz-parse.c '
+$MAKE -s echo-distcom | grep '[ /]zardoz-parse.h '
+cd ..
+
+$MAKE distdir
+ls -l $distdir
+test -f $distdir/foo/parse.c
+test -f $distdir/foo/parse.h
+test -f $distdir/bar/parse.c
+test -f $distdir/bar/parse.h
+test -f $distdir/baz/zardoz-parse.c
+test -f $distdir/baz/zardoz-parse.h
+
+# Sanity check the distribution.
+$MAKE distcheck
+
+# While we are at it, make sure that `parse.c' and `parse.h' are erased
+# by maintainer-clean, and not by distclean.
+$MAKE distclean
+test -f foo/parse.c
+test -f foo/parse.h
+test -f bar/parse.c
+test -f bar/parse.h
+test -f baz/zardoz-parse.c
+test -f baz/zardoz-parse.h
+./configure # We must re-create `Makefile'.
+$MAKE maintainer-clean
+test ! -f foo/parse.c
+test ! -f foo/parse.h
+test ! -f bar/parse.c
+test ! -f bar/parse.h
+test ! -f baz/zardoz-parse.c
+test ! -f baz/zardoz-parse.h
+
+:
diff --git a/tests/yacc-d-vpath.test b/tests/yacc-d-vpath.test
new file mode 100755
index 000000000..b331bf581
--- /dev/null
+++ b/tests/yacc-d-vpath.test
@@ -0,0 +1,110 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This test checks that dependent files are updated before including
+# in the distribution. `parse.c' depends on `parse.y'. The latter is
+# updated so that `parse.c' should be rebuilt. Then we are running
+# `make' and `make distdir' and check whether the version of `parse.c'
+# to be distributed is up to date.
+
+# Please keep this in sync with sister test `yaccvpath.test'.
+
+required=yacc
+. ./defs || Exit 1
+
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = parse.y foo.c
+AM_YFLAGS = -d
+END
+
+# Original parser, with `foobar'
+cat > parse.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%token FOOBAR
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+cat > foo.c << 'END'
+#include "parse.h"
+int main () { return 0; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+$YACC -d parse.y
+mv y.tab.c parse.c
+mv y.tab.h parse.h
+# Sanity checks.
+grep foobar parse.c
+grep FOOBAR parse.h
+
+mkdir sub
+cd sub
+../configure
+
+$sleep
+
+# New parser, with `fubar'
+cat > ../parse.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%token FUBAR
+%%
+fubar : 'f' 'u' 'b' 'a' 'r' {};
+END
+
+$MAKE
+$MAKE distdir
+$FGREP fubar $distdir/parse.c
+$FGREP FUBAR $distdir/parse.h
+
+# Now check to make sure that `make dist' will rebuild the parser.
+
+$sleep
+
+# New parser, with `maude'
+cat > ../parse.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%token MAUDE
+%%
+maude : 'm' 'a' 'u' 'd' 'e' {};
+END
+
+$MAKE distdir
+$FGREP maude $distdir/parse.c
+$FGREP MAUDE $distdir/parse.h
+
+:
diff --git a/tests/yacc-dist-nobuild.test b/tests/yacc-dist-nobuild.test
new file mode 100755
index 000000000..85a960dc8
--- /dev/null
+++ b/tests/yacc-dist-nobuild.test
@@ -0,0 +1,87 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that distributed Yacc-generated parsers are not uselessly
+# remade from an unpacked distributed tarball.
+
+required=yacc
+. ./defs || Exit 1
+
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foobar zardoz
+foobar_SOURCES = parse.y main.c
+zardoz_SOURCES = $(foobar_SOURCES)
+zardoz_YFLAGS = -d
+END
+
+cat > parse.y << 'END'
+%{
+int yylex () { return 0; }
+void yyerror (char *s) {}
+%}
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+cat > main.c << 'END'
+int main () { return 0; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+
+$MAKE distdir
+chmod -R a-w $distdir
+
+mkdir bin
+cat > bin/yacc <<'END'
+#!/bin/sh
+echo "$0 invoked, shouldn't happen!" >&2
+exit 1
+END
+cp bin/yacc bin/bison
+chmod a+x bin/yacc bin/bison
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH
+
+YACC=yacc BISON=bison
+export YACC BISON
+
+mkdir build
+cd build
+../$distdir/configure
+$MAKE
+
+# Sanity check.
+chmod u+w ../$distdir
+rm -f ../$distdir/parse.c
+chmod a-w ../$distdir
+$MAKE >out 2>&1 && { cat out; Exit 1; }
+cat out
+$FGREP parse.c out
+
+:
diff --git a/tests/yacc-nodist.test b/tests/yacc-nodist.test
new file mode 100755
index 000000000..c55f40035
--- /dev/null
+++ b/tests/yacc-nodist.test
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Checks for .c and .h files derived from non-distributed .y sources.
+
+required=yacc
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub1 sub2
+.PHONY: test
+test-build: all
+ ls -l . sub1 sub2
+ test -f sub1/parse.y
+ test -f sub1/parse.c
+ test -f sub2/parse.y
+ test -f sub2/parse.c
+ test -f sub2/parse.h
+test-dist: distdir
+ ls -l $(distdir) $(distdir)/sub1 $(distdir)/sub2
+ test ! -r $(distdir)/sub1/parse.y
+ test ! -r $(distdir)/sub1/parse.c
+ test ! -r $(distdir)/sub1/parse.h
+ test ! -r $(distdir)/sub2/parse.y
+ test ! -r $(distdir)/sub2/parse.c
+ test ! -r $(distdir)/sub2/parse.h
+check-local: test-build test-dist
+END
+
+mkdir sub1 sub2
+
+cat > sub1/Makefile.am << 'END'
+parse.y:
+ rm -f $@ $@-t
+ :; { : \
+ && echo "%{" \
+ && echo "int yylex () { return 0; }" \
+ && echo "void yyerror (char *s) {}" \
+ && echo "%}" \
+ && echo "%%" \
+ && echo "maude : 'm' 'a' 'u' 'd' 'e' {}"; \
+ } > $@-t
+ chmod a-w $@-t
+ mv -f $@-t $@
+bin_PROGRAMS = prog
+prog_SOURCES = main.c
+nodist_prog_SOURCES = parse.y
+CLEANFILES = $(nodist_prog_SOURCES)
+END
+
+cat sub1/Makefile.am - > sub2/Makefile.am << 'END'
+AM_YFLAGS = -d
+BUILT_SOURCES = parse.h
+END
+
+cat > sub1/main.c << 'END'
+int main ()
+{
+ return yyparse ();
+}
+END
+cat - sub1/main.c > sub2/main.c << 'END'
+#include "parse.h"
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+$MAKE test-build
+$MAKE test-dist
+
+# But the distribution must work correctly, assuming the user has
+# the proper tools to process yacc files.
+$MAKE distcheck
+
+:
diff --git a/tests/yacc.test b/tests/yacc.test
index bf6782fe1..9a5db93e2 100755
--- a/tests/yacc.test
+++ b/tests/yacc.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_YACC
@@ -34,4 +33,6 @@ END
$ACLOCAL
$AUTOMAKE -a
-grep 'zardoz.c' Makefile.in
+$FGREP 'zardoz.c' Makefile.in
+
+:
diff --git a/tests/yacc2.test b/tests/yacc2.test
index a095edc2e..bf5084b47 100755
--- a/tests/yacc2.test
+++ b/tests/yacc2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,16 +17,19 @@
# Test to make sure intermediate .h file is not generated nor removed
# if (AM_)?YFLAGS do not contain -d. Requested by Jim Meyering.
+# See also the related semantic test `yacc-d-basic.test'.
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_YACC
END
+# Run it here once and for all, since we are not going to modify
+# configure.in anymore.
+$ACLOCAL
+
cat > Makefile.am <<'END'
bin_PROGRAMS = zardoz
zardoz_SOURCES = zardoz.y
@@ -34,53 +38,36 @@ END
# Don't redefine several times the same variable.
cp Makefile.am Makefile.src
-$ACLOCAL
$AUTOMAKE -a
-
# If zardoz.h IS mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null && Exit 1
-
-
+$FGREP 'zardoz.h' Makefile.in && Exit 1
cp Makefile.src Makefile.am
echo 'AM_YFLAGS = -d' >> Makefile.am
-
$AUTOMAKE
-
# If zardoz.h is NOT mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null
-
-
+$FGREP 'zardoz.h' Makefile.in
cp Makefile.src Makefile.am
echo 'AM_YFLAGS = ' >> Makefile.am
-
$AUTOMAKE
-
# If zardoz.h IS mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null && Exit 1
-
-
+$FGREP 'zardoz.h' Makefile.in && Exit 1
cp Makefile.src Makefile.am
echo 'YFLAGS = -d' >> Makefile.am
-
-# YFLAGS is a use variable.
+# YFLAGS is a user variable.
AUTOMAKE_fails
-grep 'YFLAGS' stderr
+grep 'YFLAGS.* user variable' stderr
+grep 'AM_YFLAGS.* instead' stderr
$AUTOMAKE -Wno-gnu
-
# If zardoz.h is NOT mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null
-
-
+$FGREP 'zardoz.h' Makefile.in
cp Makefile.src Makefile.am
echo 'YFLAGS = ' >> Makefile.am
-
$AUTOMAKE -Wno-gnu
-
# If zardoz.h IS mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null && Exit 1
+$FGREP 'zardoz.h' Makefile.in && Exit 1
:
diff --git a/tests/yacc4.test b/tests/yacc4.test
index 0435ec081..06376ec4c 100755
--- a/tests/yacc4.test
+++ b/tests/yacc4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,18 +16,13 @@
# Some simple tests of ylwrap functionality.
-required='bison gcc'
+required='yacc gcc'
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AC_CONFIG_AUX_DIR([.])
-AM_INIT_AUTOMAKE(foo, 0.1)
-PACKAGE=foo
-VERSION=0.1
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_YACC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -60,8 +55,6 @@ cat > foo.c << 'END'
int main () { return 0; }
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -86,6 +79,5 @@ test -f parse.c
$MAKE maintainer-clean
test ! -f bar.c
test ! -f parse.c
-:
-Exit 0
+:
diff --git a/tests/yacc5.test b/tests/yacc5.test
index f428396be..bac61aa34 100755
--- a/tests/yacc5.test
+++ b/tests/yacc5.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,15 +20,10 @@
. ./defs || Exit 1
-set -e
-
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_YACC
-AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
@@ -70,8 +66,8 @@ maude_SOURCES = sub/maude.y
maude_YFLAGS = -d
END
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOMAKE -a
# Rule should use maude_YFLAGS.
grep 'AM_YFLAGS.*maude' Makefile.in && Exit 1
diff --git a/tests/yacc6.test b/tests/yacc6.test
index f10effdcb..c127d15d7 100755
--- a/tests/yacc6.test
+++ b/tests/yacc6.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 2010, 2011 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,20 +20,18 @@
# Also make sure depcomp does not needlessly update headers.
# Report from Paolo Bonzini.
-required='gcc bison GNUmake'
+required='gcc yacc GNUmake'
. ./defs || Exit 1
-set -e
-
cat > configure.in << 'END'
AC_INIT([yacc6], [1.0])
+# `aux' is not an acceptable file/directory name on Windows systems
AC_CONFIG_AUX_DIR([aux1])
AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_YACC
-AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
@@ -89,11 +87,11 @@ $AUTOMAKE -a
test -f aux1/ylwrap
test ! -f ylwrap
test ! -f sub/ylwrap
-$FGREP '(top_srcdir)/aux1/ylwrap' sub/Makefile.in
+$FGREP '$(top_srcdir)/aux1/ylwrap' sub/Makefile.in
./configure
$MAKE
-grep '#.*line.*foo.y' sub/foo.c
-grep '#.*line.*bar.y' sub/bar.c
+grep '#.*line.*foo\.y' sub/foo.c
+grep '#.*line.*bar\.y' sub/bar.c
$sleep
: > z
@@ -106,3 +104,5 @@ sed s/TOKEN/TEKON/g sub/bar.y >sub/bar.yt
mv -f sub/bar.yt sub/bar.y
$MAKE
$MAKE test-time-changed
+
+:
diff --git a/tests/yacc7.test b/tests/yacc7.test
index 2edd15cb3..5cea7afc5 100755
--- a/tests/yacc7.test
+++ b/tests/yacc7.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +21,7 @@
# Also check that the sources of the generated parser are distributed.
# PR/47.
-required=bison
+required=yacc
. ./defs || Exit 1
cat >> configure.in << 'END'
@@ -52,8 +53,6 @@ WORD: "up";
%%
END
-set -e
-
$ACLOCAL
$AUTOMAKE -a
$AUTOCONF
@@ -83,8 +82,9 @@ $MAKE distclean
test -f foo.h
test -f foo.c
# ... but maintainer-clean should.
-./configure
+./configure # we must re-create `Makefile'
$MAKE maintainer-clean
test ! -f foo.h
test ! -f foo.c
+
:
diff --git a/tests/yacc8.test b/tests/yacc8.test
index 979415c81..fecd54b07 100755
--- a/tests/yacc8.test
+++ b/tests/yacc8.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,17 +17,11 @@
# Test for subdir parsers.
-required="gcc bison"
+required="gcc yacc"
. ./defs || Exit 1
-set -e
-
-cat > configure.in << 'END'
-AC_INIT([yacc8], [1.0])
-AC_CONFIG_AUX_DIR([.])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_YACC
@@ -39,15 +34,16 @@ bin_PROGRAMS = foo/foo
foo_foo_SOURCES = foo/parse.y
AM_YFLAGS = -d
+.PHONY: obj
obj: foo/parse.$(OBJEXT)
-test1: obj
- test -f foo/parse.c
- test -f foo/parse.$(OBJEXT)
-
-test2: obj
+.PHONY: test1 test2
+test1: foo/parse.$(OBJEXT)
test -f foo/parse.c
test -f foo/parse.$(OBJEXT)
+test2: foo/parse2.$(OBJEXT)
+ test -f foo/parse2.c
+ test -f foo/parse2.$(OBJEXT)
END
mkdir foo
@@ -104,9 +100,11 @@ EXTRA_foo_foo_SOURCES = foo/parse2.y
END
$AUTOMAKE -a
-test -f ./ylwrap || Exit 1
+test -f ./ylwrap
cd sub
# Regenerate Makefile (automatic in GNU Make, but not in other Makes)
./config.status
$MAKE test2
+
+:
diff --git a/tests/yaccdry.test b/tests/yaccdry.test
index d2e763231..f30e7f3f2 100755
--- a/tests/yaccdry.test
+++ b/tests/yaccdry.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,11 +16,9 @@
# Removal recovery rules for headers should not remove files with `make -n'.
-required=bison
+required=yacc
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_YACC
diff --git a/tests/yaccpp.test b/tests/yaccpp.test
index 9013f4092..0d0591d7d 100755
--- a/tests/yaccpp.test
+++ b/tests/yaccpp.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2006, 2010, 2011 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,23 +15,31 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure yacc + c++ works.
+# Test to make sure Yacc + C++ is supported.
+# Please keep this is sync with sister test lexcpp.test.
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CXX
AC_PROG_YACC
END
cat > Makefile.am << 'END'
-bin_PROGRAMS = zardoz
-zardoz_SOURCES = zardoz.yy
+bin_PROGRAMS = foo bar baz qux
+foo_SOURCES = foo.y++
+bar_SOURCES = bar.ypp
+baz_SOURCES = baz.yy
+qux_SOURCES = qux.yxx
END
$ACLOCAL
$AUTOMAKE -a
-grep zardoz.cc Makefile.in
+sed -e 's/^/ /' -e 's/$/ /' Makefile.in >mk
+$FGREP ' foo.c++ ' mk
+$FGREP ' bar.cpp ' mk
+$FGREP ' baz.cc ' mk
+$FGREP ' qux.cxx ' mk
+
+:
diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test
index 6db5fd7c1..c998373c6 100755
--- a/tests/yaccvpath.test
+++ b/tests/yaccvpath.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,23 +16,22 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This test checks that dependent files are updated before including
-# in the distribution. `parse.c' depends on `parce.y'. The later is
+# in the distribution. `parse.c' depends on `parse.y'. The later is
# updated so that `parse.c' should be rebuild. Then we are running
# `make' and `make distdir' and check whether the version of `parse.c'
# to be distributed is up to date.
-required='gcc bison'
+# Please keep this in sync with sister test `yacc-d-vpath.test'.
+
+required=yacc
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AC_CONFIG_AUX_DIR([.])
-AM_INIT_AUTOMAKE(foo, 0.1)
-PACKAGE=foo
-VERSION=0.1
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_YACC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
@@ -53,8 +53,6 @@ cat > foo.c << 'END'
int main () { return 0; }
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -66,8 +64,6 @@ mkdir sub
cd sub
../configure
-# A delay is needed to make sure that the new parse.y is indeed newer
-# than parse.c, i.e. the they don't have the same timestamp.
$sleep
# New parser, with `fubar'
@@ -82,14 +78,10 @@ END
$MAKE
$MAKE distdir
-grep fubar foo-0.1/parse.c
+$FGREP fubar $distdir/parse.c
-#
# Now check to make sure that `make dist' will rebuild the parser.
-#
-# A delay is needed to make sure that the new parse.y is indeed newer
-# than parse.c, i.e. the they don't have the same timestamp.
$sleep
# New parser, with `maude'
@@ -103,4 +95,6 @@ maude : 'm' 'a' 'u' 'd' 'e' {};
END
$MAKE distdir
-grep maude foo-0.1/parse.c
+$FGREP maude $distdir/parse.c
+
+:
diff --git a/tests/yflags-cmdline-override.test b/tests/yflags-cmdline-override.test
new file mode 100755
index 000000000..aecff9fa7
--- /dev/null
+++ b/tests/yflags-cmdline-override.test
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that automake can cope with user-redefinition of $(YFLAGS)
+# at configure time and/or at make time.
+
+required=yacc
+. ./defs || Exit 1
+
+unset YFLAGS || :
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+# A minor automake wart: automake doesn't generate code to clean
+# `*.output' files generated by yacc (it's not even clear if that
+# would be useful in general, so it's probably better to be
+# conservative).
+CLEANFILES = foo.output
+# Another automake wart: `-d' flag won't be given at automake time,
+# so automake won't be able to generate code to clean `foo.h' :-(
+MAINTAINERCLEANFILES = foo.h
+END
+
+cat > foo.y << 'END'
+%{
+int yylex () { return 0; }
+void yyerror (char *s) { return; }
+int main () { return 0; }
+%}
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+./configure YFLAGS='-d -v'
+$MAKE
+ls -l
+test -f foo.c
+test -f foo.h
+test -f foo.output
+
+$MAKE maintainer-clean
+ls -l
+
+./configure YFLAGS='-v'
+$MAKE
+ls -l
+test -f foo.c
+test ! -r foo.h
+test -f foo.output
+
+$MAKE maintainer-clean
+ls -l
+
+./configure YFLAGS='-v'
+YFLAGS=-d $MAKE -e
+ls -l
+test -f foo.c
+test -f foo.h
+test ! -r foo.output
+
+$MAKE maintainer-clean
+ls -l
+
+:
diff --git a/tests/yflags-conditional.test b/tests/yflags-conditional.test
new file mode 100755
index 000000000..68e25eb77
--- /dev/null
+++ b/tests/yflags-conditional.test
@@ -0,0 +1,143 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that automake complains about *_YFLAGS variables which have
+# conditional content.
+
+. ./defs || Exit 1
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+
+# `YFLAGS' is AC_SUBST'd by AC_PROG_YACC by default, but we
+# don't want this, since it might confuse our error messages.
+# Also, AM_SUBST_NOTMAKE seems not to help about this.
+# So we simply define $(YACC) by hand.
+AC_SUBST([YACC], [yacc])
+
+AM_CONDITIONAL([COND], [:])
+END
+
+$ACLOCAL
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo zardoz
+foo_SOURCES = foo.y
+zardoz_SOURCES = zardoz.y
+if COND
+AM_YFLAGS = -v
+zardoz_YFLAGS = -v
+endif COND
+END
+
+cat > Makefile1.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+## dummy comment to keep line count right
+if COND
+YFLAGS = foo
+endif COND
+END
+
+cat > Makefile2.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+AM_YFLAGS = am_yflags
+if COND
+YFLAGS = yflags
+endif COND
+END
+
+cat > Makefile3.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+foo_YFLAGS = foo_yflags
+if COND
+YFLAGS = yflags
+endif COND
+END
+
+cat > Makefile4.am <<'END'
+bin_PROGRAMS = foo zardoz
+
+foo_SOURCES = foo.y
+zardoz_SOURCES = $(foo_SOURCES)
+
+YFLAGS =
+AM_YFLAGS = $(COND_VAR1)
+zardoz_YFLAGS = $(COND_VAR2:z=r)
+
+COND_VAR2 = foo
+if COND
+YFLAGS += -v
+COND_VAR2 += bar
+else !COND
+COND_VAR1 = -d
+endif !COND
+END
+
+cat > Makefile5.am <<'END'
+bin_PROGRAMS = foo zardoz
+foo_SOURCES = foo.y
+zardoz_SOURCES = zardoz.y
+YFLAGS = -v
+AM_YFLAGS = -v
+if COND
+zardoz_YFLAGS = -v
+endif
+END
+
+cat > Makefile6.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+foo_YFLAGS = -v
+if COND
+quux_YFLAGS = -v
+AM_YFLAGS = -v
+endif
+END
+
+: > ylwrap
+
+LC_ALL=C; export LC_ALL # For grep regexes below.
+
+AUTOMAKE_fails -Wnone -Wunsupported Makefile
+grep '^Makefile\.am:5:.*AM_YFLAGS.* conditional contents' stderr
+grep '^Makefile\.am:6:.*zardoz_YFLAGS.* conditional contents' stderr
+
+for i in 1 2 3; do
+ AUTOMAKE_fails -Wnone -Wunsupported Makefile$i
+ grep "^Makefile$i\\.am:5:.*[^a-zA-Z0-9_]YFLAGS.* conditional contents" \
+ stderr
+done
+
+AUTOMAKE_fails -Wnone -Wunsupported Makefile4
+grep '^Makefile4\.am:6:.*[^a-zA-Z0-9_]YFLAGS.* conditional contents' stderr
+grep '^Makefile4\.am:7:.*AM_YFLAGS.* conditional contents' stderr
+grep '^Makefile4\.am:8:.*zardoz_YFLAGS.* conditional contents' stderr
+
+# Now let's check we avoid false positives.
+
+# Disable `gnu' warnings because we override the user variable `YFLAGS'.
+AUTOMAKE_fails -Wno-gnu Makefile5
+grep -v '^Makefile5\.am:.*zardoz_YFLAGS' stderr \
+ | grep -v ': warnings are treated as errors' \
+ | grep . && Exit 1
+
+# Disable `gnu' warnings because we override the user variable `YFLAGS'.
+$AUTOMAKE -Wno-gnu Makefile6
+
+:
diff --git a/tests/yacc3.test b/tests/yflags-d-false-positives.test
index 86d897c0d..6decf9d83 100755
--- a/tests/yacc3.test
+++ b/tests/yflags-d-false-positives.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,40 +14,28 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Ensure that generated .h file is distributed iff we have -d in
-# (AM_)?YFLAGS.
+# Check for false positives in automake recognition of `-d' in YFLAGS.
. ./defs || Exit 1
-set -e
-
-cat >> configure.in << 'END'
+cat >> configure.in <<'END'
AC_PROG_CC
AC_PROG_YACC
END
+$ACLOCAL
+
cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = no-dependencies
-bin_PROGRAMS = zardoz
+bin_PROGRAMS = zardoz foobar
zardoz_SOURCES = zardoz.y
-magic:
- @echo $(DIST_COMMON)
+foobar_SOURCES = foobar.y
+# All the "almost -d" substrings ("- d", "-dd", etc.) are meant.
+AM_YFLAGS = -xd --d - d --output=d
+foobar_YFLAGS = - d $(foovar)-d -dd
END
-$ACLOCAL
$AUTOMAKE -a
+$EGREP '(foobar|zardoz)\.h.*:' Makefile.in && Exit 1
+$EGREP '(foobar|zardoz)\.h' Makefile.in | $FGREP -v '$(YLWRAP) ' && Exit 1
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-# It should not be disted here
-grep 'zardoz.h' Makefile.in && Exit 1
-
-cp Makefile.am Save
-# Test all available flags to make sure header is distributed with
-# `-d'.
-for flag in YFLAGS AM_YFLAGS zardoz_YFLAGS; do
- cp Save Makefile.am
- echo "$flag = -d" >> Makefile.am
-
- $AUTOMAKE -Wno-gnu
- grep 'zardoz.h' Makefile.in
-done
+:
diff --git a/tests/yflags-force-conditional.test b/tests/yflags-force-conditional.test
new file mode 100755
index 000000000..dd3b2dea3
--- /dev/null
+++ b/tests/yflags-force-conditional.test
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the user can force automake to use *_YFLAGS variables
+# which have conditional content.
+
+. ./defs || Exit 1
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_YACC
+AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
+AC_OUTPUT
+END
+
+mkdir bin
+cat > bin/fake-yacc <<'END'
+#!/bin/sh
+echo "/* $* */" > y.tab.c
+echo 'extern int dummy;' >> y.tab.c
+END
+chmod a+x bin/fake-yacc
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+YACC=fake-yacc; export YACC
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = foo.y main.c
+bar_SOURCES = $(foo_SOURCES)
+bar_YFLAGS = $(bar_yflags2)
+if COND
+AM_YFLAGS = __am_cond_yes__
+bar_YFLAGS += __bar_cond_yes__
+else !COND
+AM_YFLAGS = __am_cond_no__
+bar_yflags2 = __bar_cond_no__
+endif !COND
+END
+
+cat > main.c <<'END'
+int main (void)
+{
+ return 0;
+}
+END
+
+: > foo.y
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a -Wno-unsupported
+
+$EGREP '(YFLAGS|yflags|am__append)' Makefile.in # For debugging.
+
+./configure cond=yes
+$MAKE
+
+ls -l
+cat foo.c
+cat bar-foo.c
+
+$FGREP ' __am_cond_yes__ ' foo.c
+$FGREP ' __bar_cond_yes__ ' bar-foo.c
+$FGREP 'cond_no' foo.c bar-foo.c && Exit 1
+
+$MAKE maintainer-clean
+ls -l
+
+./configure cond=no
+$MAKE
+
+ls -l
+cat foo.c
+cat bar-foo.c
+
+$FGREP ' __am_cond_no__ ' foo.c
+$FGREP ' __bar_cond_no__ ' bar-foo.c
+$FGREP 'cond_yes' foo.c bar-foo.c && Exit 1
+
+:
diff --git a/tests/yflags-force-override.test b/tests/yflags-force-override.test
new file mode 100755
index 000000000..b76b529ea
--- /dev/null
+++ b/tests/yflags-force-override.test
@@ -0,0 +1,64 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that automake can cope with a definition of the $(YFLAGS) variable
+# in Makefile.am (even if that is extremely bad practice, because that
+# variable is user-reserved).
+
+required=yacc
+. ./defs || Exit 1
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+# Don't do this in a real-life Makefile.am!
+YFLAGS = -d -v
+END
+
+cat > foo.y << 'END'
+%{
+int yylex () { return 0; }
+void yyerror (char *s) { return; }
+int main () { return 0; }
+%}
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+$ACLOCAL
+$AUTOMAKE -a -Wno-gnu
+
+$EGREP '(foo|YFLAGS)' Makefile.in # for debugging
+grep '^foo.h *:' Makefile.in
+
+$AUTOCONF
+./configure
+
+$MAKE
+
+test -f foo.c
+test -f foo.h
+test -f foo.output
+
+$MAKE distcheck
+
+:
diff --git a/tests/yflags-var-expand.test b/tests/yflags-var-expand.test
new file mode 100755
index 000000000..de38a7420
--- /dev/null
+++ b/tests/yflags-var-expand.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that automake expand variables when looking for `-d' in YFLAGS;
+# for example, the following is supposed to work:
+# foo_flags = -d
+# AM_YFLAGS = $(foo_flags)
+
+. ./defs || Exit 1
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_YACC
+END
+
+$ACLOCAL
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = foo.y
+bar_SOURCES = bar.y
+my_YFLAGS = -x
+AM_YFLAGS = $(my_YFLAGS:x=d)
+bar_YFLAGS = $(AM_YFLAGS)
+END
+
+$AUTOMAKE -a
+
+$EGREP '(foo|bar|YFLAGS)' Makefile.in # for debugging
+grep '^foo.h *:' Makefile.in
+grep '^bar-bar.h *:' Makefile.in
+
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = -Wno-gnu
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = parser.y
+my_YFLAGS = $(my_YFLAGS_1)
+my_YFLAGS += $(my_YFLAGS_2)
+my_YFLAGS_2 = -d
+YFLAGS = $(my_YFLAGS)
+END
+
+$AUTOMAKE
+
+$EGREP 'parser|YFLAGS' Makefile.in # for debugging
+grep '^parser.h *:' Makefile.in
+
+:
diff --git a/tests/yflags.test b/tests/yflags.test
index dbc3a7390..aac198661 100755
--- a/tests/yflags.test
+++ b/tests/yflags.test
@@ -21,8 +21,6 @@
. ./defs || Exit 1
-set -e
-
cat >fake-yacc <<'END'
#!/bin/sh
echo '/*' "$*" '*/' >y.tab.c
diff --git a/tests/yflags2.test b/tests/yflags2.test
index 02aed8dc6..fe0d4b31f 100755
--- a/tests/yflags2.test
+++ b/tests/yflags2.test
@@ -22,8 +22,6 @@
required=g++ # FIXME: any working C++ compiler should be OK
. ./defs || Exit 1
-set -e
-
cat >fake-yacc <<'END'
#!/bin/sh
echo '/*' "$*" '*/' >y.tab.c