Files
bison/examples/c/reentrant-calc/local.mk
Akim Demaille 6289d673a0 examples: add an example with a reentrant parser in Flex+Bison
Suggested by Eric S. Raymond.
https://lists.gnu.org/archive/html/bison-patches/2019-02/msg00066.html

* examples/c/reentrant-calc/Makefile, examples/c/reentrant-calc/README.md,
* examples/c/reentrant-calc/parse.y, examples/c/reentrant-calc/scan.l
* examples/c/reentrant-calc/lexcalc.test,
* examples/c/reentrant-calc/local.mk:
New.
2019-02-17 11:31:51 +01:00

38 lines
1.3 KiB
Makefile

## Copyright (C) 2018-2019 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
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
lexcalcdir = $(docdir)/%D%
## ------ ##
## Calc. ##
## ------ ##
check_PROGRAMS += %D%/lexcalc
TESTS += %D%/lexcalc.test
EXTRA_DIST += %D%/lexcalc.test %D%/scan.l
%C%_lexcalc_SOURCES = %D%/parse.y %D%/parse.h
nodist_%C%_lexcalc_SOURCES = %D%/scan.c %D%/scan.h
%D%/lexcalc.c: $(dependencies)
%D%/scan.c: %D%/scan.l
$(AM_V_LEX) $(LEX) -o %D%/scan.c --header-file=%D%/scan.h $<
# Don't use gnulib's system headers.
%C%_lexcalc_CPPFLAGS = -I$(top_srcdir)/%D% -I$(top_builddir)/%D%
dist_lexcalc_DATA = %D%/parse.y %D%/scan.l %D%/Makefile %D%/README.md
CLEANFILES += %D%/lexcalc %D%/*.o %D%/parse.c %D%/scan.c
CLEANDIRS += %D%/*.dSYM