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. 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 16lexcalcdir = $(docdir)/%D% 17 18## --------- ## 19## LexCalc. ## 20## --------- ## 21 22if FLEX_WORKS 23 check_PROGRAMS += %D%/lexcalc 24 TESTS += %D%/lexcalc.test 25 nodist_%C%_lexcalc_SOURCES = %D%/parse.y %D%/parse.h %D%/scan.l 26 # Don't use gnulib's system headers. 27 %C%_lexcalc_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D% 28 # Fighting warnings triggered by Flex is just too painful. 29 # %C%_lexcalc_CFLAGS = $(TEST_CFLAGS) 30endif FLEX_WORKS 31 32%D%/parse.c: $(dependencies) 33 34# Tell Make scan.o depends on parse.h, except that Make sees only 35# parse.c, not parse.h. We can't use BUILT_SOURCES to this end, since 36# we use the built bison. 37%D%/lexcalc$(DASH)scan.o: %D%/parse.c 38# Likewise, but for Automake before 1.16. 39%D%/examples_c_lexcalc_lexcalc$(DASH)scan.o: %D%/parse.c 40 41EXTRA_DIST += %D%/lexcalc.test 42dist_lexcalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md 43CLEANFILES += %D%/parse.[ch] %D%/scan.c %D%/parse.output 44CLEANDIRS += %D%/*.dSYM 45