]> git.saurik.com Git - bison.git/blob - examples/calc++/Makefile
Extract calc++ from the documentation.
[bison.git] / examples / calc++ / Makefile
1 all: calc++
2
3 calc++:
4 flex -ocalc++-scanner.cc calc++-scanner.ll
5 bison -o calc++-parser.cc calc++-parser.yy
6 $(CC) -o calc++ calc++.cc calc++-driver.cc calc++-parser.cc calc++-scanner.cc
7
8 check: all
9 ./test
10
11 clean:
12 rm -f *~ *.o *.tab.* input position.hh location.hh stack.hh \
13 calc++-parser.cc calc++-parser.hh \
14 calc++-scanner.cc \
15 calc++
16
17 ## ------------ ##
18 ## Extracting. ##
19 ## ------------ ##
20
21 EXTRACTED = \
22 calc++-driver.hh calc++-driver.cc \
23 calc++-parser.yy \
24 calc++-scanner.ll \
25 calc++.cc
26
27 doc = ../../doc/bison.texinfo
28 extexi = gawk -f ../extexi
29
30 RECURSIVE_TARGETS += extract
31
32 $(EXTRACTED): $(doc) ../extexi
33 $(extexi) $(doc) -- $(EXTRACTED)
34
35 extract extract-am: $(EXTRACTED)