mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
examples: modernize the example Makefiles
* examples/c++/Makefile, examples/c++/calc++/Makefile, * examples/c++/glr/Makefile, examples/c/bistromathic/Makefile, * examples/c/calc/Makefile, examples/c/glr/Makefile, * examples/c/lexcalc/Makefile, examples/c/mfcalc/Makefile, * examples/c/pushcalc/Makefile, examples/c/reccalc/Makefile, * examples/c/rpcalc/Makefile, examples/d/calc/Makefile, * examples/d/simple/Makefile, examples/java/calc/Makefile, * examples/java/simple/Makefile: Use --html to generate *.html directly. No longer demonstrate --xml. No longer show rules for xml to html. Use --header, not --defines. Use --graph without specifying the output file now that we generate *.gv by default.
This commit is contained in:
@@ -4,12 +4,11 @@
|
||||
BASE = lexcalc
|
||||
BISON = bison
|
||||
FLEX = flex
|
||||
XSLTPROC = xsltproc
|
||||
|
||||
all: $(BASE)
|
||||
|
||||
%.c %.h %.xml %.gv: %.y
|
||||
$(BISON) $(BISONFLAGS) --header --xml --graph=$*.gv -o $*.c $<
|
||||
%.c %.h %.html %.xml %.gv: %.y
|
||||
$(BISON) $(BISONFLAGS) --header --html --graph -o $*.c $<
|
||||
|
||||
%.c: %.l
|
||||
$(FLEX) $(FLEXFLAGS) -o$@ $<
|
||||
@@ -22,10 +21,6 @@ run: $(BASE)
|
||||
@echo "Type arithmetic expressions. Quit with ctrl-d."
|
||||
./$<
|
||||
|
||||
html: parse.html
|
||||
%.html: %.xml
|
||||
$(XSLTPROC) $(XSLTPROCFLAGS) -o $@ $$($(BISON) --print-datadir)/xslt/xml2xhtml.xsl $<
|
||||
|
||||
CLEANFILES = \
|
||||
$(BASE) *.o \
|
||||
parse.[ch] parse.output parse.xml parse.html parse.gv \
|
||||
|
||||
Reference in New Issue
Block a user