tests: generalize the compilation macros.

* tests/local.at (AT_COMPILE, AT_COMPILE_CXX): If OUTPUT ends with ".o",
then append the "natural" extension for the input file (.c or .cc).
If there is no source, pass -c.
* tests/headers.at, tests/input.at, tests/regression.at: Adjust.
This commit is contained in:
Akim Demaille
2012-06-25 16:37:18 +02:00
parent 837b769659
commit 91ce0b3a66
4 changed files with 39 additions and 18 deletions

View File

@@ -533,8 +533,8 @@ main (void)
AT_BISON_OPTION_POPDEFS
AT_BISON_CHECK([-d -v -o input.c input.y])
AT_COMPILE([input.o], [-c input.c])
AT_COMPILE([main.o], [-c main.c])
AT_COMPILE([input.o])
AT_COMPILE([main.o])
AT_COMPILE([input], [input.o main.o])
AT_PARSER_CHECK([./input], 0,
[[[@<:@],
@@ -654,7 +654,7 @@ input.y:18.8-16: warning: POSIX Yacc forbids dashes in symbol names: with-dash
AT_BISON_CHECK([-o input.c input.y])
# Make sure we don't export silly token identifiers with periods or dashes.
AT_COMPILE([input.o], [-c input.c])
AT_COMPILE([input.o])
# Periods are genuine letters, they can start identifiers.