mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: don't fail if the C++ compiler does not work
Also, make sure that `make dist` generates a correct tarball even if the C++ compiler does not work. Reported by Nelson H. F. Beebe. * m4/cxx.m4 (BISON_CXX_WORKS): Define to true/false instead of true/exit 77. The latter is too dangerous to use (it directly quits). (ENABLE_CXX): New name for the Automake conditional, for consistency with ENABLE_CXX11 etc. * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Adjust to the new semantics of BISON_CXX_WORKS. * examples/c++/local.mk: Skip the variant test if C++ does not work. * examples/calc++/local.mk: Likewise.
This commit is contained in:
@@ -65,17 +65,16 @@ calcxx_sources = \
|
||||
$(calcxx_sources_generated)
|
||||
|
||||
if FLEX_CXX_WORKS
|
||||
check_PROGRAMS += %D%/calc++
|
||||
nodist_%C%_calc___SOURCES = \
|
||||
$(calcxx_sources)
|
||||
|
||||
# Don't use gnulib's system headers.
|
||||
%C%_calc___CPPFLAGS = -I$(top_builddir)/%D%
|
||||
%C%_calc___CXXFLAGS = $(AM_CXXFLAGS) $(FLEX_SCANNER_CXXFLAGS)
|
||||
dist_TESTS += %D%/calc++.test
|
||||
else
|
||||
if ENABLE_CXX
|
||||
check_PROGRAMS += %D%/calc++
|
||||
nodist_%C%_calc___SOURCES = $(calcxx_sources)
|
||||
# Don't use gnulib's system headers.
|
||||
%C%_calc___CPPFLAGS = -I$(top_builddir)/%D%
|
||||
%C%_calc___CXXFLAGS = $(AM_CXXFLAGS) $(FLEX_SCANNER_CXXFLAGS)
|
||||
TESTS += %D%/calc++.test
|
||||
endif ENABLE_CXX
|
||||
endif FLEX_CXX_WORKS
|
||||
EXTRA_DIST += %D%/calc++.test
|
||||
endif
|
||||
|
||||
|
||||
## ------------ ##
|
||||
|
||||
Reference in New Issue
Block a user