summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2020-07-27 13:27:47 -0400
committerZack Weinberg <zackw@panix.com>2020-07-27 13:27:47 -0400
commitdf7e1cdbdf012fb2c767836e16639850e7b23818 (patch)
tree311c474938c9903c185a17c9cb34622ad30e8c64
parentae26b9b44c183c41b84fc36ff70082713295d621 (diff)
downloadautoconf-df7e1cdbdf012fb2c767836e16639850e7b23818.tar.gz
Simplify Makefiles embedded in autotest.at
This is a follow-up for the various patches to address problems with tests 221 and 222 with various non-GNU make implementations. We’re not trying to exercise Make at all in these tests; it’s just a convenient way to invoke the compiler found by AC_PROG_CC on a test program. The tests will be more reliable if we minimize the number of Make features we are using. So: no implicit rules at all, and no intermediates. Generate ‘testprog’ directly from ‘testprog.c’. Also copy from fortran.at a more thorough set of substitution variables for the compilation command, mainly for consistency, and don’t use Makefile variables, again for consistency with fortran.at. (This is also, theoretically, faster since we’re only invoking the compiler driver once, but it’s probably not enough of a difference to measure.)
-rw-r--r--tests/autotest.at26
1 files changed, 4 insertions, 22 deletions
diff --git a/tests/autotest.at b/tests/autotest.at
index d30e3df4..dbd86460 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -1909,17 +1909,8 @@ AT_DATA([testprog.c],
# Testsuite
AT_DATA([Makefile.in],
-[[CC=@CC@
-CFLAGS=@CFLAGS@
-
-testprog@EXEEXT@: testprog.o
- $(CC) -o testprog@EXEEXT@ testprog.o
-
-testprog.o: testprog.c
-.SUFFIXES: .c .o
-
-.c.o:
- $(CC) -c $<
+[[testprog@EXEEXT@: testprog.c
+ @CC@ @CPPFLAGS@ @CFLAGS@ @LDFLAGS@ -o testprog@EXEEXT@ testprog.c
]])
AT_CHECK_AT_PREP([suite],
@@ -1970,17 +1961,8 @@ AT_DATA([testprog.c],
# Testsuite
AT_DATA([Makefile.in],
-[[CC=@CC@
-CFLAGS=@CFLAGS@
-
-testprog@EXEEXT@: testprog.o
- $(CC) -o testprog@EXEEXT@ testprog.o
-
-testprog.o: testprog.c
-.SUFFIXES: .c .o
-
-.c.o:
- $(CC) -c $<
+[[testprog@EXEEXT@: testprog.c
+ @CC@ @CPPFLAGS@ @CFLAGS@ @LDFLAGS@ -o testprog@EXEEXT@ testprog.c
]])
AT_CHECK_AT_PREP([suite],