Files
bison/examples/calc++/Makefile
Akim Demaille 1c59e0a121 Extract calc++ from the documentation.
* doc/bison.texinfo (Calc++): Add the extraction marks.
* examples/extexi: New, from the aborted GNU Programming 2E.
Separate the different paragraph of a file with empty lines.
* examples/Makefile: Use it to extract the whole calc++ example.
2005-07-05 07:21:30 +00:00

36 lines
709 B
Makefile

all: calc++
calc++:
flex -ocalc++-scanner.cc calc++-scanner.ll
bison -o calc++-parser.cc calc++-parser.yy
$(CC) -o calc++ calc++.cc calc++-driver.cc calc++-parser.cc calc++-scanner.cc
check: all
./test
clean:
rm -f *~ *.o *.tab.* input position.hh location.hh stack.hh \
calc++-parser.cc calc++-parser.hh \
calc++-scanner.cc \
calc++
## ------------ ##
## Extracting. ##
## ------------ ##
EXTRACTED = \
calc++-driver.hh calc++-driver.cc \
calc++-parser.yy \
calc++-scanner.ll \
calc++.cc
doc = ../../doc/bison.texinfo
extexi = gawk -f ../extexi
RECURSIVE_TARGETS += extract
$(EXTRACTED): $(doc) ../extexi
$(extexi) $(doc) -- $(EXTRACTED)
extract extract-am: $(EXTRACTED)