From e5f088718ff4c8f363c32dea8449f9bc012e4b3a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 27 Apr 1999 13:46:40 +0000 Subject: [PATCH] * specflags3.test: New file. * Makefile.am (TESTS): Added specflags3.test. (TESTS): Now lists one file per line, for simpler maintenance. * specflags2.test: New file. * specflags.test: New file. * Makefile.am (TESTS): Added specflags.test, specflags2.test. --- tests/ChangeLog | 10 ++ tests/Makefile.am | 263 +++++++++++++++++++++++++++++++++++------- tests/Makefile.in | 263 +++++++++++++++++++++++++++++++++++------- tests/specflags.test | 31 +++++ tests/specflags2.test | 39 +++++++ tests/specflags3.test | 21 ++++ 6 files changed, 543 insertions(+), 84 deletions(-) create mode 100755 tests/specflags.test create mode 100755 tests/specflags2.test create mode 100755 tests/specflags3.test diff --git a/tests/ChangeLog b/tests/ChangeLog index 805e28f5..6c4c825d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,13 @@ +1999-04-27 Tom Tromey + + * specflags3.test: New file. + * Makefile.am (TESTS): Added specflags3.test. + (TESTS): Now lists one file per line, for simpler maintenance. + + * specflags2.test: New file. + * specflags.test: New file. + * Makefile.am (TESTS): Added specflags.test, specflags2.test. + 1999-04-27 Alexandre Oliva * canon5.test (bin_PROGRAMS): New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 19e0852f..4303be60 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,49 +3,228 @@ AUTOMAKE_OPTIONS = gnits XFAIL_TESTS = -TESTS = acinclude.test aclocal.test aclocali.test aclocalii.test \ -acoutnoq.test acoutput.test acoutqnl.test acouttbs.test acsilent.test \ -all.test alpha.test ammissing.test ansi.test ansi2.test ansi3.test \ -auxdir.test backsl.test backsl2.test badline.test badprog.test \ -block.test canon.test canon2.test canon3.test canon4.test canon5.test \ -checkall.test clean.test colneq.test colneq2.test colon.test \ -colon2.test colon3.test colon4.test colon5.test colon6.test \ -colon7.test comment.test comment2.test compile_f_c_cxx.test cond.test \ -cond2.test cond3.test cond4.test cond5.test cond6.test cond7.test \ -cond8.test condman.test condman2.test conf2.test confdist.test \ -confh.test confh2.test confh3.test config.test confincl.test \ -confsub.test confvar.test confvar2.test copy.test cxxcpp.test \ -cxxlibobj.test cxxlink.test cxxnoc.test cxxo.test cygwin32.test \ -defun.test defun2.test dejagnu.test depacl.test depacl2.test \ -depend.test depend2.test depend3.test discover.test distdir.test \ -dup.test dup2.test else.test empty.test error.test exdir.test \ -exdir2.test exsource.test ext.test extra.test extra3.test extra4.test \ -flibs.test fnoc.test fo.test fonly.test fpinst2.test fpinstall.test \ -gcj.test gcj2.test gnits.test implicit.test include.test info.test \ -insh.test insh2.test install.test installsh.test instdata.test \ -instexec.test insthook.test instman.test interp.test interp2.test \ -java.test javaprim.test javasubst.test ldadd.test lex.test lex2.test \ -lex3.test libobj.test libobj2.test libobj3.test libobj4.test \ -libobj5.test libobj6.test libobj7.test libobj8.test libobj9.test \ +TESTS = \ +acinclude.test \ +aclocal.test \ +aclocali.test \ +aclocalii.test \ +acoutnoq.test \ +acoutput.test \ +acoutqnl.test \ +acouttbs.test \ +acsilent.test \ +all.test \ +alpha.test \ +ammissing.test \ +ansi.test \ +ansi2.test \ +ansi3.test \ +auxdir.test \ +backsl.test \ +backsl2.test \ +badline.test \ +badprog.test \ +block.test \ +canon.test \ +canon2.test \ +canon3.test \ +canon4.test \ +canon5.test \ +checkall.test \ +clean.test \ +colneq.test \ +colneq2.test \ +colon.test \ +colon2.test \ +colon3.test \ +colon4.test \ +colon5.test \ +colon6.test \ +colon7.test \ +comment.test \ +comment2.test \ +compile_f_c_cxx.test \ +cond.test \ +cond2.test \ +cond3.test \ +cond4.test \ +cond5.test \ +cond6.test \ +cond7.test \ +cond8.test \ +condman.test \ +condman2.test \ +conf2.test \ +confdist.test \ +confh.test \ +confh2.test \ +confh3.test \ +config.test \ +confincl.test \ +confsub.test \ +confvar.test \ +confvar2.test \ +copy.test \ +cxxcpp.test \ +cxxlibobj.test \ +cxxlink.test \ +cxxnoc.test \ +cxxo.test \ +cygwin32.test \ +defun.test \ +defun2.test \ +dejagnu.test \ +depacl.test \ +depacl2.test \ +depend.test \ +depend2.test \ +depend3.test \ +discover.test \ +distdir.test \ +dup.test \ +dup2.test \ +else.test \ +empty.test \ +error.test \ +exdir.test \ +exdir2.test \ +exsource.test \ +ext.test \ +extra.test \ +extra3.test \ +extra4.test \ +flibs.test \ +fnoc.test \ +fo.test \ +fonly.test \ +fpinst2.test \ +fpinstall.test \ +gcj.test \ +gcj2.test \ +gnits.test \ +implicit.test \ +include.test \ +info.test \ +insh.test \ +insh2.test \ +install.test \ +installsh.test \ +instdata.test \ +instexec.test \ +insthook.test \ +instman.test \ +interp.test \ +interp2.test \ +java.test \ +javaprim.test \ +javasubst.test \ +ldadd.test \ +lex.test \ +lex2.test \ +lex3.test \ +libobj.test \ +libobj2.test \ +libobj3.test \ +libobj4.test \ +libobj5.test \ +libobj6.test \ +libobj7.test \ +libobj8.test \ +libobj9.test \ libobj10.test \ -library.test link_c_cxx.test link_f_c.test link_f_c_cxx.test \ -link_f_cxx.test link_f_only.test lisp.test mclean.test mdate.test \ -mdate2.test mdate3.test mkinst2.test mkinstall.test nodep.test \ -nodist.test noinst.test number.test objc.test obsolete.test \ -obsolete2.test order.test outdir.test output.test output2.test \ -output3.test output4.test output5.test package.test parse.test \ -pluseq.test pluseq2.test pluseq3.test pluseq4.test pluseq5.test \ -pluseq6.test pluseq7.test ppf77.test prefix.test primary.test \ -primary2.test proginst.test ranlib.test recurs.test recurs2.test \ -remake.test remake2.test req.test rulepat.test scripts.test seenc.test \ -sinclude.test spell.test spell2.test spell3.test spelling.test \ -stamph.test stdlib.test subdir.test subdir2.test subdir3.test \ -subobj.test subobj2.test subst.test suffix.test symlink.test \ -syntax.test tags.test tagsub.test target.test texinfo.test \ -texinfo2.test texinfo3.test texinfo4.test texinfo5.test texinfo6.test \ -texinfo7.test texinfo8.test unused.test version.test version2.test \ -version3.test vpath.test vtexi.test vtexi2.test whoami.test \ -xsource.test yacc.test yacc2.test yacc3.test yaccpp.test +library.test \ +link_c_cxx.test \ +link_f_c.test \ +link_f_c_cxx.test \ +link_f_cxx.test \ +link_f_only.test \ +lisp.test \ +mclean.test \ +mdate.test \ +mdate2.test \ +mdate3.test \ +mkinst2.test \ +mkinstall.test \ +nodep.test \ +nodist.test \ +noinst.test \ +number.test \ +objc.test \ +obsolete.test \ +obsolete2.test \ +order.test \ +outdir.test \ +output.test \ +output2.test \ +output3.test \ +output4.test \ +output5.test \ +package.test \ +parse.test \ +pluseq.test \ +pluseq2.test \ +pluseq3.test \ +pluseq4.test \ +pluseq5.test \ +pluseq6.test \ +pluseq7.test \ +ppf77.test \ +prefix.test \ +primary.test \ +primary2.test \ +proginst.test \ +ranlib.test \ +recurs.test \ +recurs2.test \ +remake.test \ +remake2.test \ +req.test \ +rulepat.test \ +scripts.test \ +seenc.test \ +sinclude.test \ +specflags.test \ +specflags2.test \ +specflags3.test \ +spell.test \ +spell2.test \ +spell3.test \ +spelling.test \ +stamph.test \ +stdlib.test \ +subdir.test \ +subdir2.test \ +subdir3.test \ +subobj.test \ +subobj2.test \ +subst.test \ +suffix.test \ +symlink.test \ +syntax.test \ +tags.test \ +tagsub.test \ +target.test \ +texinfo.test \ +texinfo2.test \ +texinfo3.test \ +texinfo4.test \ +texinfo5.test \ +texinfo6.test \ +texinfo7.test \ +texinfo8.test \ +unused.test \ +version.test \ +version2.test \ +version3.test \ +vpath.test \ +vtexi.test \ +vtexi2.test \ +whoami.test \ +xsource.test \ +yacc.test \ +yacc2.test \ +yacc3.test \ +yaccpp.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 17042861..6fb41431 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -68,49 +68,228 @@ VERSION = @VERSION@ AUTOMAKE_OPTIONS = gnits XFAIL_TESTS = -TESTS = acinclude.test aclocal.test aclocali.test aclocalii.test \ -acoutnoq.test acoutput.test acoutqnl.test acouttbs.test acsilent.test \ -all.test alpha.test ammissing.test ansi.test ansi2.test ansi3.test \ -auxdir.test backsl.test backsl2.test badline.test badprog.test \ -block.test canon.test canon2.test canon3.test canon4.test canon5.test \ -checkall.test clean.test colneq.test colneq2.test colon.test \ -colon2.test colon3.test colon4.test colon5.test colon6.test \ -colon7.test comment.test comment2.test compile_f_c_cxx.test cond.test \ -cond2.test cond3.test cond4.test cond5.test cond6.test cond7.test \ -cond8.test condman.test condman2.test conf2.test confdist.test \ -confh.test confh2.test confh3.test config.test confincl.test \ -confsub.test confvar.test confvar2.test copy.test cxxcpp.test \ -cxxlibobj.test cxxlink.test cxxnoc.test cxxo.test cygwin32.test \ -defun.test defun2.test dejagnu.test depacl.test depacl2.test \ -depend.test depend2.test depend3.test discover.test distdir.test \ -dup.test dup2.test else.test empty.test error.test exdir.test \ -exdir2.test exsource.test ext.test extra.test extra3.test extra4.test \ -flibs.test fnoc.test fo.test fonly.test fpinst2.test fpinstall.test \ -gcj.test gcj2.test gnits.test implicit.test include.test info.test \ -insh.test insh2.test install.test installsh.test instdata.test \ -instexec.test insthook.test instman.test interp.test interp2.test \ -java.test javaprim.test javasubst.test ldadd.test lex.test lex2.test \ -lex3.test libobj.test libobj2.test libobj3.test libobj4.test \ -libobj5.test libobj6.test libobj7.test libobj8.test libobj9.test \ +TESTS = \ +acinclude.test \ +aclocal.test \ +aclocali.test \ +aclocalii.test \ +acoutnoq.test \ +acoutput.test \ +acoutqnl.test \ +acouttbs.test \ +acsilent.test \ +all.test \ +alpha.test \ +ammissing.test \ +ansi.test \ +ansi2.test \ +ansi3.test \ +auxdir.test \ +backsl.test \ +backsl2.test \ +badline.test \ +badprog.test \ +block.test \ +canon.test \ +canon2.test \ +canon3.test \ +canon4.test \ +canon5.test \ +checkall.test \ +clean.test \ +colneq.test \ +colneq2.test \ +colon.test \ +colon2.test \ +colon3.test \ +colon4.test \ +colon5.test \ +colon6.test \ +colon7.test \ +comment.test \ +comment2.test \ +compile_f_c_cxx.test \ +cond.test \ +cond2.test \ +cond3.test \ +cond4.test \ +cond5.test \ +cond6.test \ +cond7.test \ +cond8.test \ +condman.test \ +condman2.test \ +conf2.test \ +confdist.test \ +confh.test \ +confh2.test \ +confh3.test \ +config.test \ +confincl.test \ +confsub.test \ +confvar.test \ +confvar2.test \ +copy.test \ +cxxcpp.test \ +cxxlibobj.test \ +cxxlink.test \ +cxxnoc.test \ +cxxo.test \ +cygwin32.test \ +defun.test \ +defun2.test \ +dejagnu.test \ +depacl.test \ +depacl2.test \ +depend.test \ +depend2.test \ +depend3.test \ +discover.test \ +distdir.test \ +dup.test \ +dup2.test \ +else.test \ +empty.test \ +error.test \ +exdir.test \ +exdir2.test \ +exsource.test \ +ext.test \ +extra.test \ +extra3.test \ +extra4.test \ +flibs.test \ +fnoc.test \ +fo.test \ +fonly.test \ +fpinst2.test \ +fpinstall.test \ +gcj.test \ +gcj2.test \ +gnits.test \ +implicit.test \ +include.test \ +info.test \ +insh.test \ +insh2.test \ +install.test \ +installsh.test \ +instdata.test \ +instexec.test \ +insthook.test \ +instman.test \ +interp.test \ +interp2.test \ +java.test \ +javaprim.test \ +javasubst.test \ +ldadd.test \ +lex.test \ +lex2.test \ +lex3.test \ +libobj.test \ +libobj2.test \ +libobj3.test \ +libobj4.test \ +libobj5.test \ +libobj6.test \ +libobj7.test \ +libobj8.test \ +libobj9.test \ libobj10.test \ -library.test link_c_cxx.test link_f_c.test link_f_c_cxx.test \ -link_f_cxx.test link_f_only.test lisp.test mclean.test mdate.test \ -mdate2.test mdate3.test mkinst2.test mkinstall.test nodep.test \ -nodist.test noinst.test number.test objc.test obsolete.test \ -obsolete2.test order.test outdir.test output.test output2.test \ -output3.test output4.test output5.test package.test parse.test \ -pluseq.test pluseq2.test pluseq3.test pluseq4.test pluseq5.test \ -pluseq6.test pluseq7.test ppf77.test prefix.test primary.test \ -primary2.test proginst.test ranlib.test recurs.test recurs2.test \ -remake.test remake2.test req.test rulepat.test scripts.test seenc.test \ -sinclude.test spell.test spell2.test spell3.test spelling.test \ -stamph.test stdlib.test subdir.test subdir2.test subdir3.test \ -subobj.test subobj2.test subst.test suffix.test symlink.test \ -syntax.test tags.test tagsub.test target.test texinfo.test \ -texinfo2.test texinfo3.test texinfo4.test texinfo5.test texinfo6.test \ -texinfo7.test texinfo8.test unused.test version.test version2.test \ -version3.test vpath.test vtexi.test vtexi2.test whoami.test \ -xsource.test yacc.test yacc2.test yacc3.test yaccpp.test +library.test \ +link_c_cxx.test \ +link_f_c.test \ +link_f_c_cxx.test \ +link_f_cxx.test \ +link_f_only.test \ +lisp.test \ +mclean.test \ +mdate.test \ +mdate2.test \ +mdate3.test \ +mkinst2.test \ +mkinstall.test \ +nodep.test \ +nodist.test \ +noinst.test \ +number.test \ +objc.test \ +obsolete.test \ +obsolete2.test \ +order.test \ +outdir.test \ +output.test \ +output2.test \ +output3.test \ +output4.test \ +output5.test \ +package.test \ +parse.test \ +pluseq.test \ +pluseq2.test \ +pluseq3.test \ +pluseq4.test \ +pluseq5.test \ +pluseq6.test \ +pluseq7.test \ +ppf77.test \ +prefix.test \ +primary.test \ +primary2.test \ +proginst.test \ +ranlib.test \ +recurs.test \ +recurs2.test \ +remake.test \ +remake2.test \ +req.test \ +rulepat.test \ +scripts.test \ +seenc.test \ +sinclude.test \ +specflags.test \ +specflags2.test \ +specflags3.test \ +spell.test \ +spell2.test \ +spell3.test \ +spelling.test \ +stamph.test \ +stdlib.test \ +subdir.test \ +subdir2.test \ +subdir3.test \ +subobj.test \ +subobj2.test \ +subst.test \ +suffix.test \ +symlink.test \ +syntax.test \ +tags.test \ +tagsub.test \ +target.test \ +texinfo.test \ +texinfo2.test \ +texinfo3.test \ +texinfo4.test \ +texinfo5.test \ +texinfo6.test \ +texinfo7.test \ +texinfo8.test \ +unused.test \ +version.test \ +version2.test \ +version3.test \ +vpath.test \ +vtexi.test \ +vtexi2.test \ +whoami.test \ +xsource.test \ +yacc.test \ +yacc2.test \ +yacc3.test \ +yaccpp.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/specflags.test b/tests/specflags.test new file mode 100755 index 00000000..9a704bb6 --- /dev/null +++ b/tests/specflags.test @@ -0,0 +1,31 @@ +#! /bin/sh + +# Test of flags specific to executable. + +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +AC_PROG_CC +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS = no-dependencies +bin_PROGRAMS = foo +foo_SOURCES = foo.c +foo_CFLAGS = -DBAR +END + +# Make sure `compile' is required. +$AUTOMAKE && exit 1 + +: > compile + +$AUTOMAKE || exit 1 + +# Look for $(COMPILE) -c in .c.o rule. +grep 'COMPILE. [^-]' Makefile.in && exit 1 + +# Look for foo-foo.o. +grep '[^-]foo\.o' Makefile.in && exit 1 + +exit 0 diff --git a/tests/specflags2.test b/tests/specflags2.test new file mode 100755 index 00000000..1da10e2a --- /dev/null +++ b/tests/specflags2.test @@ -0,0 +1,39 @@ +#! /bin/sh + +# Test library-specific flags. + +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +AC_PROG_CC +AC_PROG_CXX +AC_PROG_RANLIB +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS = no-dependencies +lib_LIBRARIES = libfoo.a +libfoo_a_SOURCES = foo.c bar.cc +libfoo_a_CFLAGS = -DBAR +libfoo_a_CXXFLAGS = -DZOT +END + +# Make sure `compile' is required. +$AUTOMAKE && exit 1 + +: > compile + +$AUTOMAKE || exit 1 + +# Look for $(COMPILE) -c in .c.o rule. +grep 'COMPILE. [^-]' Makefile.in && exit 1 + +# Look for libfoo_a-foo.o. +grep foo Makefile.in || exit 1 +grep '[^-]foo\.o' Makefile.in && exit 1 + +# Look for libfoo_a-bar.o. +grep bar Makefile.in || exit 1 +grep '[^-]bar\.o' Makefile.in && exit 1 + +exit 0 diff --git a/tests/specflags3.test b/tests/specflags3.test new file mode 100755 index 00000000..460c3ac7 --- /dev/null +++ b/tests/specflags3.test @@ -0,0 +1,21 @@ +#! /bin/sh + +# Test exe-specific flags with dependency tracking. + +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +AC_PROG_CC +END + +cat > Makefile.am << 'END' +bin_PROGRAMS = foo +foo_SOURCES = foo.c +foo_CFLAGS = -DBAR +END + +: > compile + +$AUTOMAKE || exit 1 + +grep 'CC.*-Wp' Makefile.in -- 2.43.5