]> git.saurik.com Git - bison.git/blobdiff - doc/Makefile.am
xml: documentation
[bison.git] / doc / Makefile.am
index d87f00f00b8cb4cf9703e4a9404b87261dc423ae..9c9c24ca77794e5bd09eadebd56b7c56e3b32b90 100644 (file)
@@ -30,7 +30,7 @@ $(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
        $(AM_V_at)rm -f $@.tmp
        $(AM_V_at)cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
        $(AM_V_at)$(top_builddir)/src/bison --help \
-         | perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
+         | $(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
        $(AM_V_at)diff -u $@~ $@.tmp || true
        $(AM_V_at)mv $@.tmp $@
 MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
@@ -96,6 +96,36 @@ PREPATH = $(top_builddir)/src
 
 nodist_man_MANS = yacc.1
 
+## ----------------------------- ##
+## Graphviz examples generation. ##
+## ----------------------------- ##
+
+CLEANDIRS += figs
+FIGS_DOT = figs/example-reduce.dot figs/example-shift.dot
+EXTRA_DIST +=                                                          \
+  $(FIGS_DOT)                                                          \
+  $(FIGS_DOT:.dot=.eps) $(FIGS_DOT:.dot=.pdf) $(FIGS_DOT:.dot=.png)
+SUFFIXES += .dot .eps .pdf .png
+
+bison.dvi:  $(FIGS_DOT:.dot=.eps)
+bison.html: $(FIGS_DOT:.dot=.png)
+bison.pdf:  $(FIGS_DOT:.dot=.pdf)
+
+.dot.eps:
+       $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
+       $(AM_V_at) $(DOT) -Gmargin=0 -Teps $< >$@.tmp
+       $(AM_V_at) mv $@.tmp $@
+
+.dot.pdf:
+       $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
+       $(AM_V_at) $(DOT) -Gmargin=0 -Tpdf $< >$@.tmp
+       $(AM_V_at) mv $@.tmp $@
+
+.dot.png:
+       $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
+       $(AM_V_at) $(DOT) -Gmargin=0 -Tpng $< >$@.tmp
+       $(AM_V_at) mv $@.tmp $@
+
 ## -------------- ##
 ## Doxygenation.  ##
 ## -------------- ##