diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-04-11 16:35:09 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-04-11 17:34:02 +0200 |
commit | 1490961b7bfcb4a5bba24925ff45e2ff32fa93f0 (patch) | |
tree | dde3c73b3665af9a666b920fe6c59a6fdf8b9333 /t/suffix6c.sh | |
parent | 5edc5fc4b997d2748967a054638ca0190f10be51 (diff) | |
parent | e306fb5d1043c60b46128fb09ee54434340a0d42 (diff) | |
download | automake-1490961b7bfcb4a5bba24925ff45e2ff32fa93f0.tar.gz |
Merge branch 'master' into ng/master
* master:
vala tests: force the use of automatic dependency tracking
tests: avoid spurious failures in tests on C++ and lex
tests: avoid spurious failures with non-flex 'lex' programs and C++
tests: avoid a spurious failures for shells with busted 'set -e'
maint: simplify generation of files with @substed@ stuff
tests: remove redundant requirement
tests: make two test scripts executable
t/README: update w.r.t. recent overhaul (non-recursive build system)
docs: fix names of relevant test cases in comments
NEWS: automake build systems avoids make recursion
maint: no more make recursion in Automake's build system
tests: rename 'tests/' => 't/', '*.test' => '*.sh'
tests: remove recipes that run tests with 'prove'
tests: move most helper scripts and files into the 'ax' subdirectory
maint: remove most recursion in automake's own build system
tests: fix a spurious failures with non-GNU make
+ Extra non-trivial edits:
* Makefile.am: Remove new uses of 'AM_MAKEFLAGS' throughout.
(dist_automake_ac_DATA): Do not list 'm4/depout.m4' nor
'm4/make.m4'.
* syntax-checks.m4: Use '$(xdefs)' instead of hard-coding the
older paths of 'defs' and 'defs-static.in'. Use 't/README'
instead of 'tests/README'.
* t/instdir-no-empty.sh: Remove uses of 'AM_MAKEFLAGS'.
* tests/depcomp-recover.test: Renamed ...
* t/depcomp-recover.sh: ... to this.
* tests/gmake-vars.test: Renamed ...
* t/gmake-vars.sh: ... to this.
* tests/interp3.test: Renamed ...
* t/interp3.sh: ... to this.
* tests/objdir.test: Renamed ...
* t/objdir.sh: ... to this.
* tests/spy-vpath-rewrite.test: Renamed ...
* t/spy-vpath-rewrite.sh: ... to this.
* tests/vpath-rewrite.test: Renamed ...
* t/vpath-rewrite.sh: ... to this.
* tests/yacc-subobj-nodep.test: Renamed ...
* t/yacc-subobj-nodep.sh: ... to this.
* tests/depcomp-shuffle.sh: Renamed ...
* t/ax/depcomp-shuffle.sh: ... to this, and removed executable bit.
* t/depcomp-shuffle-sub-vpath.sh: Adjust.
* t/depcomp-shuffle-sub.sh: Likewise.
* t/depcomp-shuffle-vpath.sh: Likewise.
* t/depcomp-shuffle.sh: Likewise.
* gen-testsuite-part: Likewise.
* t/list-of-tests.mk: Do not list tests that had been already
removed from the Automake-NG testsuite. Take into account the
renames above.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/suffix6c.sh')
-rwxr-xr-x | t/suffix6c.sh | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/t/suffix6c.sh b/t/suffix6c.sh new file mode 100755 index 000000000..549f8076d --- /dev/null +++ b/t/suffix6c.sh @@ -0,0 +1,92 @@ +#! /bin/sh +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This 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.ac << '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 + +unset OBJEXT || : + +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 +$MAKE OBJEXT=o +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 +$MAKE OBJEXT=obj +cat foo.obj +cat foo.XxX +diff foo.XxX foo.exp + +rm -f foo.* exp + +: |