From: Stefano Lattarini Date: Tue, 14 May 2013 11:17:50 +0000 (+0200) Subject: check-cc-no-c-o: avoid a spurious failure X-Git-Tag: v1.13b~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6653939c0d4c551502bb4b74cf4ae9c7441a9436;p=platform%2Fupstream%2Fautomake.git check-cc-no-c-o: avoid a spurious failure * t/am-prog-cc-c-o.sh: In this test, by relying on the knowledge that we are running under the aegis of the 'check-cc-no-c-o' maintainer-specific target, knowledge given us by ... * t/Makefile.in (check-cc-no-c-o) : ... the new environment variable 'AM_TESTSUITE_SIMULATING_NO_CC_C_O', set to a value of "yes" by this rule. * t/ax/test-defs.in: Initialize the new variable to "no" by default, and add an explanatory comment. Signed-off-by: Stefano Lattarini --- diff --git a/t/Makefile.inc b/t/Makefile.inc index 18a57c2..800b66c 100644 --- a/t/Makefile.inc +++ b/t/Makefile.inc @@ -235,6 +235,7 @@ check-no-trailing-backslash-in-recipes: # long discussion about automake bug#13378. check-cc-no-c-o: $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \ + AM_TESTSUITE_SIMULATING_NO_CC_C_O=yes \ CC='$(abs_top_builddir)/%D%/ax/cc-no-c-o' \ GNU_CC='$(abs_top_builddir)/%D%/ax/cc-no-c-o' .PHONY: check-cc-no-c-o diff --git a/t/am-prog-cc-c-o.sh b/t/am-prog-cc-c-o.sh index 549cdcc..920a0dc 100755 --- a/t/am-prog-cc-c-o.sh +++ b/t/am-prog-cc-c-o.sh @@ -56,7 +56,11 @@ $AUTOMAKE --add-missing ./configure >stdout || { cat stdout; exit 1; } cat stdout -$EGREP 'understands? -c and -o together.* yes$' stdout +if test "$AM_TESTSUITE_SIMULATING_NO_CC_C_O" != no; then + $EGREP 'understands? -c and -o together.* no$' stdout +else + $EGREP 'understands? -c and -o together.* yes$' stdout +fi # No repeated checks please. test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1 $MAKE diff --git a/t/ax/test-defs.in b/t/ax/test-defs.in index 1083743..7bf4342 100644 --- a/t/ax/test-defs.in +++ b/t/ax/test-defs.in @@ -76,6 +76,11 @@ PATH_SEPARATOR='@PATH_SEPARATOR@' host_alias=${host_alias-'@host_alias@'}; export host_alias build_alias=${build_alias-'@build_alias@'}; export build_alias +# Whether the testsuite is being run by faking the presence of a C +# compiler that doesn't grasp the '-c' and '-o' flags together. By +# default, of course, it isn't. +: "${AM_TESTSUITE_SIMULATING_NO_CC_C_O:=no}" + # A concurrency-safe "mkdir -p" implementation. MKDIR_P=${AM_TESTSUITE_MKDIR_P-'@MKDIR_P@'}