Description: Documentation Makefile
Author: Chuan-kai Lin <cklin@debian.org>
Last-Update: 2012-09-20

Index: package-bison-doc/Makefile
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ package-bison-doc/Makefile	2013-12-09 22:48:32.958134475 -0800
@@ -0,0 +1,22 @@
+BISON_TEXI = doc/bison.texi
+DESTDIR = $(CURDIR)/debian/tmp
+
+TEXI2PDF = /usr/bin/texi2pdf
+INSTALL = /usr/bin/install
+CP = /bin/cp
+SED = /bin/sed
+
+all: doc/bison.texi
+	$(MAKEINFO) --no-split $^
+	$(SED) -i -e 's/image src="figs/image src="\/usr\/share\/doc\/bison-doc\/html\/figs/' bison.info
+	$(MAKEINFO) -o html --html $^
+	$(TEXI2PDF) $^
+
+install:
+	$(INSTALL) -d $(DESTDIR)/usr/share/info
+	$(CP) bison.info $(DESTDIR)/usr/share/info
+	$(INSTALL) -d $(DESTDIR)/usr/share/doc/bison-doc
+	$(CP) -r bison.pdf html $(DESTDIR)/usr/share/doc/bison-doc
+	$(INSTALL) -d $(DESTDIR)/usr/share/doc/bison-doc/html/figs
+	$(CP) -r doc/figs/*.png $(DESTDIR)/usr/share/doc/bison-doc/html/figs
+
