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:
Akim Demaille
2020-09-07 06:34:00 +02:00
parent 413d318940
commit 0c0cf6f5a4
15 changed files with 28 additions and 98 deletions

View File

@@ -3,12 +3,11 @@
BISON = bison
DC = dmd
XSLTPROC = xsltproc
all: calc
%.d %.xml %.gv: %.y
$(BISON) $(BISONFLAGS) --xml --graph=$*.gv -o $*.d $<
%.d %.html %.gv: %.y
$(BISON) $(BISONFLAGS) --html --graph -o $*.d $<
%: %.d
$(DC) $(DCFLAGS) $<
@@ -17,9 +16,5 @@ run: calc
@echo "Type arithmetic expressions. Quit with ctrl-d."
./$<
html: calc.html
%.html: %.xml
$(XSLTPROC) $(XSLTPROCFLAGS) -o $@ $$($(BISON) --print-datadir)/xslt/xml2xhtml.xsl $<
clean:
rm -f calc calc.d calc.xml calc.gv calc.html *.o

View File

@@ -3,12 +3,11 @@
BISON = bison
DC = dmd
XSLTPROC = xsltproc
all: calc
%.d %.xml %.gv: %.y
$(BISON) $(BISONFLAGS) --xml --graph=$*.gv -o $*.d $<
%.d %.html %.gv: %.y
$(BISON) $(BISONFLAGS) --html --graph -o $*.d $<
%: %.d
$(DC) $(DCFLAGS) $<
@@ -17,9 +16,5 @@ run: calc
@echo "Type arithmetic expressions. Quit with ctrl-d."
./$<
html: calc.html
%.html: %.xml
$(XSLTPROC) $(XSLTPROCFLAGS) -o $@ $$($(BISON) --print-datadir)/xslt/xml2xhtml.xsl $<
clean:
rm -f calc calc.d calc.xml calc.gv calc.html *.o