1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 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
|