1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
3 ## Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
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.
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.
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/>.
22 doc = $(top_srcdir)/doc/bison.texinfo
23 extexi = $(top_srcdir)/examples/extexi
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 $@
34 $(calc_extracted): $(top_srcdir)/examples/calc++/calc.stamp
35 $(AM_V_GEN)if test -f $@; then :; else \
37 $(MAKE) $(AM_MAKEFLAGS) $<; \
40 ## --------------------------- ##
41 ## Building & testing calc++. ##
42 ## --------------------------- ##
44 BUILT_SOURCES += $(calc_sources) examples/calc++/calc++-parser.h
46 MAINTAINERCLEANFILES += $(top_srcdir)/examples/calc++/calc.stamp $(calc_sources)
47 EXTRA_DIST += examples/calc++/calc.stamp
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
56 examples/calc++/stack.hh \
57 examples/calc++/position.hh \
58 examples/calc++/location.hh
60 $(calc_extracted) $(calc_generated)
62 check_PROGRAMS = examples/calc++/calc++
63 examples_calc___calc___SOURCES = \
65 examples/calc++/y.tab.h \
66 examples/calc++/calc++-parser.hh
68 examples_calc___calc___CPPFLAGS = -I$(top_srcdir)/examples/calc++
69 TESTS = examples/calc++/test
71 EXTRA_DIST += examples/calc++/test