]> git.saurik.com Git - bison.git/blob - examples/calc++/local.mk
54e558402d06fef21893e6e13b9abb6166e413d6
[bison.git] / examples / calc++ / local.mk
1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
2
3 ## Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
4
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 ## ------------ ##
19 ## Extracting. ##
20 ## ------------ ##
21
22 doc = $(top_srcdir)/doc/bison.texinfo
23 extexi = $(top_srcdir)/examples/extexi
24 # Extract in src.
25 $(top_srcdir)/examples/calc++/calc.stamp: $(doc) $(extexi)
26 $(AM_V_GEN)rm -f $@ $@.tmp
27 $(AM_V_at)touch $@.tmp
28 $(AM_V_at)cd $(top_srcdir)/examples/calc++ && \
29 $(AWK) -f ../extexi -v VERSION="$(VERSION)" \
30 ../../doc/bison.texinfo -- calc++-parser.yy \
31 calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
32 $(AM_V_at)mv $@.tmp $@
33
34 $(calc_extracted): $(top_srcdir)/examples/calc++/calc.stamp
35 $(AM_V_GEN)if test -f $@; then :; else \
36 rm -f $< && \
37 $(MAKE) $(AM_MAKEFLAGS) $<; \
38 fi
39
40 ## --------------------------- ##
41 ## Building & testing calc++. ##
42 ## --------------------------- ##
43
44 BUILT_SOURCES += $(calc_sources) examples/calc++/calc++-parser.h
45 CLEANFILES += *.tmp
46 MAINTAINERCLEANFILES += $(top_srcdir)/examples/calc++/calc.stamp $(calc_sources)
47 EXTRA_DIST += examples/calc++/calc.stamp
48
49 calc_extracted = \
50 examples/calc++/calc++-scanner.ll \
51 examples/calc++/calc++.cc \
52 examples/calc++/calc++-driver.hh \
53 examples/calc++/calc++-driver.cc \
54 examples/calc++/calc++-parser.yy
55 calc_generated = \
56 examples/calc++/stack.hh \
57 examples/calc++/position.hh \
58 examples/calc++/location.hh
59 calc_sources = \
60 $(calc_extracted) $(calc_generated)
61 if BISON_CXX_WORKS
62 check_PROGRAMS = examples/calc++/calc++
63 examples_calc___calc___SOURCES = \
64 $(calc_sources) \
65 examples/calc++/y.tab.h \
66 examples/calc++/calc++-parser.hh
67
68 examples_calc___calc___CPPFLAGS = -I$(top_srcdir)/examples/calc++
69 TESTS = examples/calc++/test
70 endif
71 EXTRA_DIST += examples/calc++/test