glr2.cc: put glr_state_set and glr_stack_item in unnamed namespace
[bison.git] / examples / c++ / local.mk
blobdb1459d5107b11d92c967254589c8e64c0244481
1 ## Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 ##
3 ## This program is free software: you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation, either version 3 of the License, or
6 ## (at your option) any later version.
7 ##
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <https://www.gnu.org/licenses/>.
16 cxxdir = $(docdir)/%D%
17 include %D%/calc++/local.mk
18 include %D%/glr/local.mk
20 ## -------- ##
21 ## Simple. ##
22 ## -------- ##
24 BUILT_SOURCES += $(simple_sources)
25 CLEANFILES += %D%/simple.[ch] %D%/simple.output
26 CLEANDIRS += %D%/*.dSYM
27 cxx_DATA = $(simple_extracted)
29 simple_extracted = %D%/simple.yy
30 simple_sources = $(simple_extracted)
31 extracted += $(simple_extracted)
33 if ENABLE_CXX11
34 check_PROGRAMS += %D%/simple
35 nodist_%C%_simple_SOURCES = $(simple_sources)
37 %C%_simple_CXXFLAGS = $(CXX11_CXXFLAGS) $(WARN_CXXFLAGS_TEST)
38 # Don't use gnulib's system headers.
39 %C%_simple_CPPFLAGS = -I$(top_builddir)
40 TESTS += %D%/simple.test
41 %D%/simple.cc: $(dependencies)
42 endif
43 EXTRA_DIST += %D%/simple.test
46 ## ---------- ##
47 ## Variants. ##
48 ## ---------- ##
50 if ENABLE_CXX
51 check_PROGRAMS += %D%/variant
52 nodist_%C%_variant_SOURCES = %D%/variant.yy
53 # Don't use gnulib's system headers.
54 %C%_variant_CPPFLAGS = -I$(top_builddir)
55 TESTS += %D%/variant.test
56 %D%/variant.cc: $(dependencies)
57 endif
58 EXTRA_DIST += %D%/variant.test
60 if ENABLE_CXX11
61 check_PROGRAMS += %D%/variant-11
62 nodist_%C%_variant_11_SOURCES = %D%/variant-11.yy
63 %C%_variant_11_CXXFLAGS = $(CXX11_CXXFLAGS) $(WARN_CXXFLAGS_TEST)
64 # Don't use gnulib's system headers.
65 %C%_variant_11_CPPFLAGS = -I$(top_builddir)
66 TESTS += %D%/variant-11.test
67 %D%/variant-11.cc: $(dependencies)
68 endif
69 EXTRA_DIST += %D%/variant-11.test
71 dist_cxx_DATA = %D%/README.md %D%/Makefile %D%/variant.yy %D%/variant-11.yy
72 CLEANFILES += \
73 %D%/simple.output %D%/variant.output %D%/variant-11.output \
74 %D%/simple.hh %D%/variant.hh %D%/variant-11.hh