java: examples: split in two

* examples/java: Split in...
* examples/java/simple, examples/java/calc: these.
This commit is contained in:
Akim Demaille
2020-02-02 16:01:42 +01:00
parent d727e0ff23
commit 48be689a73
11 changed files with 261 additions and 25 deletions

View File

@@ -0,0 +1,26 @@
# 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