mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
Convert some of the READMEs to Markdown, which is now more common, and nicely displayed in some git hosting services. Add missing READMEs and Makefiles. Generate XML, HTML and Dot files. Be sure to ship the test files. Complete CLEANFILES to remove all generated files. * examples/calc++: Move into... * examples/c++: here. * examples/mfcalc, examples/rpcalc: Move into... * examples/c: here. * examples/README.md, examples/c++/calc++/Makefile, examples/c/local.mk, * examples/c/mfcalc/Makefile, examples/c/rpcalc/Makefile, * examples/d/README.md, examples/java/README.md: New files. * examples/test (medir): Be robust to deeper directory nesting.
27 lines
596 B
Makefile
27 lines
596 B
Makefile
# This Makefile is designed to be simple and readable. It does not
|
|
# aim at portability. It requires GNU Make.
|
|
|
|
BISON = bison
|
|
JAVAC = javac
|
|
JAVA = java
|
|
XSLTPROC = xsltproc
|
|
|
|
all: Calc.class
|
|
|
|
%.java %.xml %.gv: %.y
|
|
$(BISON) $(BISONFLAGS) --xml --graph=$*.gv -o $*.java $<
|
|
|
|
%.class: %.java
|
|
$(JAVAC) $(JAVACFLAGS) $<
|
|
|
|
run: Calc.class
|
|
@echo "Type arithmetic expressions. Quit with ctrl-d."
|
|
$(JAVA) $(JAVAFLAGS) Calc
|
|
|
|
html: Calc.html
|
|
%.html: %.xml
|
|
$(XSLTPROC) $(XSLTPROCFLAGS) -o $@ $$($(BISON) --print-datadir)/xslt/xml2xhtml.xsl $<
|
|
|
|
clean:
|
|
rm -f *.class Calc.java Calc.html Calc.xml Calc.gv
|