From ac96654175265aacb34f3660d35667d26feba138 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:50:46 +0000 Subject: Documentation support Author: jgg Date: 1998-07-13 02:01:28 GMT Documentation support --- buildlib/debiandoc.mak | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 buildlib/debiandoc.mak (limited to 'buildlib/debiandoc.mak') diff --git a/buildlib/debiandoc.mak b/buildlib/debiandoc.mak new file mode 100644 index 000000000..5e08bda6c --- /dev/null +++ b/buildlib/debiandoc.mak @@ -0,0 +1,58 @@ +# -*- make -*- + +# This processes debian-doc sgml to produce html and plain text output + +# Input +# $(SOURCE) - The documents to use + +# All output is writtin to files in the build doc directory + +# See defaults.mak for information about LOCAL + +# Some local definitions +LOCAL := debiandoc-$(firstword $(SOURCE)) +$(LOCAL)-HTML := $(addsuffix .html,$(addprefix $(DOC)/,$(basename $(SOURCE)))) +$(LOCAL)-TEXT := $(addsuffix .text,$(addprefix $(DOC)/,$(basename $(SOURCE)))) + +#--------- + +# Rules to build HTML documentations +ifdef DEBIANDOC_HTML + +# Install generation hooks +doc: $($(LOCAL)-HTML) +veryclean: veryclean/html/$(LOCAL) + +vpath %.sgml $(SUBDIRS) +$(DOC)/%.html: %.sgml + echo Creating html for $< to $@ + -rm -rf $@ + (HERE=`pwd`; cd $(@D) && debiandoc2html $$HERE/$<) + +# Clean rule +.PHONY: veryclean/html/$(LOCAL) +veryclean/html/$(LOCAL): + -rm -rf $($(@F)-HTML) + +endif + +#--------- + +# Rules to build Text documentations +ifdef DEBIANDOC_TEXT + +# Install generation hooks +doc: $($(LOCAL)-TEXT) +veryclean: veryclean/text/$(LOCAL) + +vpath %.sgml $(SUBDIRS) +$(DOC)/%.text: %.sgml + echo Creating text for $< to $@ + debiandoc2text -O $< > $@ + +# Clean rule +.PHONY: veryclean/text/$(LOCAL) +veryclean/text/$(LOCAL): + -rm -rf $($(@F)-TEXT) + +endif -- cgit v1.2.3