Hi Diab, Thanks for the bug report!
* Diab Jerius <[EMAIL PROTECTED]> wrote on Tue, Apr 18, 2006 at 12:35:52AM CEST: > >Synopsis: make check XFAIL shell code may fail on Solaris due to > >extraneous tabs > Solaris 5.8, /usr/ccs/bin/make > >Description: > If the list of tests expected to fail (XFAIL) contains elements with > tabs immediately preceding or trailing them, Solaris make sometimes > does not remove the tabs when it passes the list to the shell, causing > the logic for the check-TESTS target to fail. I've attached a tarball > containing the input Makefile.am and generated Makefile.in and > Makefile files, as well as the output of "make -n check" exhibiting > the retained tabs. The check-TESTS code assumes that the test name > will be preceded and followed by spaces (*" $$tst "*); the presence of > the tab causes the test to fail. This happens with GNU make as well, by design: `make' should not interpret or change any white space in a macro, except that any leading white space immedidately after the `=' is removed. Suggested patch below. OK to apply? The variable assignment is to work around this bug (info Autoconf "Limitations of Builtins"): | Some shells also have problems with backslash escaping in case you | do not want to match the backslash: both a backslash and the | escaped character match this pattern. To work around this, | specify the character class in a variable, so that quote removal | does not apply afterwards, and the special characters don't have | to be backslash-escaped: | | $ case '\' in [\<]) echo OK;; esac | OK | $ scanset='[<]'; case '\' in $scanset) echo OK;; esac | $ | | Even with this, Solaris `ksh' matches a backslash if the set | contains any of the characters `|', `&', `(', or `)'. and the three tests are just so that no $EDITOR gets the idea of merging adjacent tabs with spaces. Cheers, Ralf * lib/am/check.am (check-TESTS): Match XFAIL_TESTS delimited by TABs as well as spaces. Fixes PR automake/490. * tests/check6.test: New test. * tests/Makefile.am, THANKS: Update. Report from Diab Jerius <[EMAIL PROTECTED]>. Index: lib/am/check.am =================================================================== RCS file: /cvs/automake/automake/lib/am/check.am,v retrieving revision 1.6 diff -u -r1.6 check.am --- lib/am/check.am 14 May 2005 20:28:51 -0000 1.6 +++ lib/am/check.am 18 Apr 2006 05:28:44 -0000 @@ -19,7 +19,7 @@ .PHONY: check-TESTS check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ @@ -33,7 +33,7 @@ ## Success all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ + *$$ws$$tst$$ws*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ @@ -46,7 +46,7 @@ ## Failure all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ + *$$ws$$tst$$ws*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ Index: THANKS =================================================================== RCS file: /cvs/automake/automake/THANKS,v retrieving revision 1.279 diff -u -r1.279 THANKS --- THANKS 9 Apr 2006 07:18:33 -0000 1.279 +++ THANKS 18 Apr 2006 05:41:58 -0000 @@ -53,6 +53,7 @@ David Zaroski [EMAIL PROTECTED] Dean Povey [EMAIL PROTECTED] Derek R. Price [EMAIL PROTECTED] +Diab Jerius [EMAIL PROTECTED] Didier Cassirame [EMAIL PROTECTED] Dieter Baron [EMAIL PROTECTED] Dmitry Mikhin [EMAIL PROTECTED] Index: tests/Makefile.am =================================================================== RCS file: /cvs/automake/automake/tests/Makefile.am,v retrieving revision 1.601 diff -u -r1.601 Makefile.am --- tests/Makefile.am 9 Apr 2006 07:46:55 -0000 1.601 +++ tests/Makefile.am 18 Apr 2006 05:41:58 -0000 @@ -83,6 +83,7 @@ check3.test \ check4.test \ check5.test \ +check6.test \ checkall.test \ clean.test \ clean2.test \ --- /dev/null 2006-01-01 00:00:01.000000000 +0000 +++ tests/check6.test 2006-04-18 07:41:03.000000000 +0200 @@ -0,0 +1,52 @@ +#! /bin/sh +# Copyright (C) 2006 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 2, 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. + +# Test for PR 400: XFAIL_TESTS delimited by TABs. + +. ./defs || exit 1 + +set -e + +cat >> configure.in << 'END' +AC_PROG_CC +AC_OUTPUT +END + +cat > Makefile.am << 'END' +TESTS = $(XFAIL_TESTS) +XFAIL_TESTS = a b c +END + +cat >>a <<'END' +#! /bin/sh +exit 1 +END + +cp a b +cp a c + +chmod a+x a b c + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +./configure +$MAKE check