mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
java, d: add a Makefile for the example
* examples/java/Makefile, examples/d/Makefile: New.
This commit is contained in:
25
examples/d/Makefile
Normal file
25
examples/d/Makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
# This Makefile is designed to be simple and readable. It does not
|
||||
# aim at portability. It requires GNU Make.
|
||||
|
||||
BISON = bison
|
||||
DC = dmd
|
||||
XSLTPROC = xsltproc
|
||||
|
||||
all: calc
|
||||
|
||||
%.d %.xml %.gv: %.y
|
||||
$(BISON) $(BISONFLAGS) --xml --graph=$*.gv -o $*.d $<
|
||||
|
||||
%: %.d
|
||||
$(DC) $(DCFLAGS) $<
|
||||
|
||||
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
|
||||
@@ -31,5 +31,5 @@ endif
|
||||
%D%/calc: %D%/calc.d
|
||||
$(AM_V_GEN) $(DC) $(DCFLAGS) -of$@ $<
|
||||
|
||||
dist_d_DATA = %D%/calc.y
|
||||
dist_d_DATA = %D%/calc.y %D%/Makefile
|
||||
CLEANFILES += %D%/calc %D%/Calc.d
|
||||
|
||||
Reference in New Issue
Block a user