mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
examples: d: duplicate the example as "simple" and "calc"
* examples/d/Makefile, examples/d/calc.d, examples/d/calc.test, examples/d/calc/local.mk: Move into... * examples/d/calc, examples/d/simple: these new directories.
This commit is contained in:
committed by
Akim Demaille
parent
f3bcb3de0e
commit
8032dde383
25
examples/d/simple/Makefile
Normal file
25
examples/d/simple/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
|
||||
Reference in New Issue
Block a user