# If you add to DOCBOOK_FILES, don't forget to add to:
#	- man/Makefile.am
#	- html/Makefile.am
#	- docbook/Makefile.am
#
# Duplicating the DOCBOOK_FILES list in this way is ugly, if someone knows
# of a better way of using autoconf to build and distribute doco, please
# send an email to serel@fastboot.org
#
DOCBOOK_FILES = serelhistory serelc lsb2rdf serel-rdfgen

SUBDIRS = man html docbook
MAINTAINERCLEANFILES = Makefile.in html/*.html man/*.8 man/*.1

DOCBOOK_MAN    = $(DOCBOOK_FILES:%=html/%.html)
DOCBOOK_HTML   = $(DOCBOOK_FILES:%=man/%.1) $(DOCBOOK_FILES:%=man/%.8)
DOCBOOK_COMMON = docbook/*-sect.xml
# DOCBOOK_TEX    = $(DOCBOOK_FILES:%=texi/%.texi)
# info_TEXINFOS will appear once the maintainer's platform supports docbook2texi

@MAINT@doc : $(DOCBOOK_MAN) $(DOCBOOK_HTML)

@MAINT@man/%.8 man/%.1: docbook/%.sgml $(DOCBOOK_COMMON)
@MAINT@	docbook2man -o man $<
@MAINT@	rm man/manpage.links man/manpage.refs
@MAINT@	echo

@MAINT@html/%.html : docbook/%.sgml $(DOCBOOK_COMMON)
@MAINT@	docbook2html -o html $<
@MAINT@	echo
