check-cc-no-c-o: unify initializations in a single place
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 14 May 2013 11:40:48 +0000 (13:40 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 14 May 2013 11:40:48 +0000 (13:40 +0200)
* t/ax/test-defs.in: That is, by setting CC and GNU_CC here, in accord
with the value of the variable 'AM_TESTSUITE_SIMULATING_NO_CC_C_O'.
* t/Makefile.in (check-cc-no-c-o) : No need to reset CC and GNU_CC any
longer in the recursive "make check" invocation.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/Makefile.inc
t/ax/test-defs.in

index 800b66c..85c4c8e 100644 (file)
@@ -235,9 +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'
+         AM_TESTSUITE_SIMULATING_NO_CC_C_O=yes
 .PHONY: check-cc-no-c-o
 
 ## Checking the list of tests.
index 7bf4342..9662c79 100644 (file)
@@ -141,7 +141,11 @@ FGREP=${AM_TESTSUITE_FGREP-'@FGREP@'}
 
 # Compilers and their flags.  These can point to non-GNU compilers (and
 # on non-Linux and non-BSD systems, they probably will).
-CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
+if test $AM_TESTSUITE_SIMULATING_NO_CC_C_O = no; then
+  CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
+else
+  CC=$am_testaux_builddir/cc-no-c-o
+fi
 CXX=${AM_TESTSUITE_CXX-${CXX-'@CXX@'}}
 F77=${AM_TESTSUITE_F77-${F77-'@F77@'}}
 FC=${AM_TESTSUITE_FC-${FC-'@FC@'}}
@@ -152,6 +156,11 @@ FFLAGS=${AM_TESTSUITE_FFLAGS-${FFLAGS-'@FFLAGS@'}}
 CPPFLAGS=${AM_TESTSUITE_CPPFLAGS-${CPPFLAGS-'@CPPFLAGS@'}}
 
 # GNU compilers and their flags.
+if test $AM_TESTSUITE_SIMULATING_NO_CC_C_O = no; then
+  GNU_CC=${AM_TESTSUITE_GNU_CC-${GNU_CC-'@GNU_CC@'}}
+else
+  GNU_CC=$am_testaux_builddir/cc-no-c-o
+fi
 GNU_CC=${AM_TESTSUITE_GNU_CC-${GNU_CC-'@GNU_CC@'}}
 GNU_CXX=${AM_TESTSUITE_GNU_CXX-${GNU_CXX-'@GNU_CXX@'}}
 GNU_F77=${AM_TESTSUITE_GNU_F77-${GNU_F77-'@GNU_F77@'}}