AT_FULL_COMPILE.

* tests/local.at (AT_FULL_COMPILE): New.
	* tests/actions.at, tests/calc.at, tests/regression.at: Use it.
This commit is contained in:
Akim Demaille
2008-08-25 13:43:00 +02:00
parent 1a7a65f9d5
commit 7ca2266adc
5 changed files with 24 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
# Process this -*- Autotest -*- file with autom4te.
# Macros for the GNU Bison Test suite.
# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -268,6 +268,18 @@ AT_CHECK([$CXX $CXXFLAGS $CPPFLAGS m4_bmatch([$1], [[.]], [], [$LDFLAGS ])-o $1
0, [ignore], [ignore])])
# AT_FULL_COMPILE(OUTPUT)
# -----------------------
# Compile OUTPUT.y to OUTPUT.c or OUTPUT.cc, and compile it to OUTPUT.
# Relies on AT_SKEL_CC_IF.
m4_define([AT_FULL_COMPILE],
[AT_SKEL_CC_IF(
[AT_BISON_CHECK([-o $1.cc $1.y])
AT_COMPILE_CXX([$1])],
[AT_BISON_CHECK([-o $1.c $1.y])
AT_COMPILE([$1])])
])
## ---------------------------- ##
## Running a generated parser. ##