diff options
Diffstat (limited to 't/suffix5.sh')
-rwxr-xr-x | t/suffix5.sh | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/t/suffix5.sh b/t/suffix5.sh new file mode 100755 index 000000000..8608a86b5 --- /dev/null +++ b/t/suffix5.sh @@ -0,0 +1,66 @@ +#! /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 Automake include libtool objects resulting +# from user-defined implicit rules. +# Based on a report from Arkadiusz Miskiewicz <misiek@pld.ORG.PL>. + +required='cc libtool' +. ./defs || Exit 1 + +cat >> configure.ac << 'END' +AC_SUBST([LINK], [:]) +AM_PROG_AR +AC_PROG_LIBTOOL +AC_OUTPUT +END + +cat > Makefile.am << 'END' +.k.lo: +## 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 + +for auxscript in ar-lib config.guess config.sub; do + cp "$am_scriptdir/$auxscript" . \ + || fatal_ "fetching auxiliary script '$auxscript'" +done + +$ACLOCAL +$AUTOMAKE +grep '_OBJECTS.*foo\.lo' Makefile.in + +$AUTOCONF +./configure + +echo '=GREP=ME=' > foo.k + +$MAKE test +$MAKE distcheck + +: |