From: Ralf Wildenhues Date: Sat, 14 Nov 2009 20:58:34 +0000 (+0100) Subject: Coverage for corner cases in derive_suffix. X-Git-Tag: ng-0.5a~458^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ce2fb20bbc9297bd7233ba924aa350b7b388be8;p=thirdparty%2Fautomake.git 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. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 15bd1cbf1..c7b248356 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-11-14 Ralf Wildenhues + 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. diff --git a/tests/Makefile.am b/tests/Makefile.am index 8107dec9e..519b40615 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -282,6 +282,7 @@ exeext4.test \ exsource.test \ ext.test \ ext2.test \ +ext3.test \ extra.test \ extra3.test \ extra4.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 13989201d..4cc6a59bb 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -516,6 +516,7 @@ exeext4.test \ exsource.test \ ext.test \ ext2.test \ +ext3.test \ extra.test \ extra3.test \ extra4.test \ diff --git a/tests/ext3.test b/tests/ext3.test new file mode 100755 index 000000000..0a691c511 --- /dev/null +++ b/tests/ext3.test @@ -0,0 +1,41 @@ +#! /bin/sh +# Copyright (C) 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 +# 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 . + +# 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 + +set -e + +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