Debian Codegraph @

examples/c++/glr/local.mk

raw
1 ## Copyright (C) 2020-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.
12 ##
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/>.
15
16 glrxxdir = $(docdir)/%D%
17
18 ## ----------- ##
19 ## c++-types. ##
20 ## ----------- ##
21
22 %D%/c++-types.stamp: $(dependencies)
23 $(nodist_%C%_c___types_SOURCES): %D%/c++-types.stamp
24 @test -f $@ || rm -f %D%/c++-types.stamp
25 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) %D%/c++-types.stamp
26 CLEANFILES += \
27 $(nodist_%C%_c___types_SOURCES) \
28 %D%/c++-types.stamp \
29 %D%/c++-types.output \
30 %D%/location.hh
31 CLEANDIRS += %D%/*.dSYM
32
33 ## -------------------- ##
34 ## Building & testing. ##
35 ## -------------------- ##
36
37 # Avoid using BUILT_SOURCES which is too global.
38 $(%C%_c___types_OBJECTS): $(cxx_types_sources_generated)
39
40 if ENABLE_CXX14
41 check_PROGRAMS += %D%/c++-types
42 dist_%C%_c___types_SOURCES = \
43 %D%/ast.hh
44 nodist_%C%_c___types_SOURCES = \
45 %D%/c++-types.cc \
46 %D%/c++-types.hh
47 # Don't use gnulib's system headers.
48 %C%_c___types_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D%
49 %C%_c___types_CXXFLAGS = $(CXX14_CXXFLAGS) $(WARN_CXXFLAGS_TEST)
50 TESTS += %D%/c++-types.test
51 endif ENABLE_CXX14
52 EXTRA_DIST += %D%/c++-types.yy %D%/c++-types.test