# doc/nyacc/Makefile.nyacc
#
# Copyright (C) 2015,2017 Matthew R. Wette
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.  This file is offered as-is,
# without any warranty.
#
# build the documentation

DESTDIR=
infodir=$(sh guile -c "(display (assq-ref %guile-build-info 'infodir))")

.PHONY: all
all:
	@true

.PHONY: install
install: install-info

.PHONY: install-info
install-info:

.PHONY: dist-files
dist-files:

%_scm.texi: ../../module/nyacc/%.scm
	./pull-texi.scm $< >$@

%.info: %.texi
	makeinfo $<
	rm -f $*.fn $*.fns

%.pdf: %.texi
	texi2dvi --pdf --batch $<
	texi2dvi --pdf --batch $<
	rm -f $*.aux $*.log $*.toc $*.fn $*.fns

%.html: %.texi
	texi2any --html --no-split $<

COPYING.DOC: fdl.texi
	makeinfo --plaintext fdl.texi >$@

.PHONY: clean
clean:
	rm -f *.aux *.cp *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr

.PHONY: really-clean
really-clean:
	rm -f *.pdf *.info

# --- last line
