summaryrefslogtreecommitdiff
blob: ae7723527c8518811ca11d8b8fbe95b9c68eb3fb (plain)
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
XSLTPROC = xsltproc

XSL-NS-SS = http://docbook.sourceforge.net/release/xsl-ns/current/

BASEURI := $(shell pwd)/public/
CSS_THEME_NAME := localhost-html/
generate: main.docbook
	$(XSLTPROC) \
		--xinclude \
		--stringparam baseuri "${BASEURI}" \
		--stringparam base.dir public/ \
		--stringparam chunk.toc chunk.toc \
		--stringparam section.autolabel 1 \
		--stringparam section.label.includes.component.label 1 \
		--stringparam toc.section.depth 1 \
		--stringparam collect.xref.targets "yes" \
		--stringparam targets.filename "$(patsubst %.xhtml,%.olinkdb,$@)" \
		--stringparam css.theme.name "${CSS_THEME_NAME}" \
		stylesheets/gentoo.org.xsl $<

chunk.toc.new:
	$(XSLTPROC) \
		--output $@ \
		--xinclude \
		--stringparam chunk.section.depth 8 \
		--stringparam chunk.first.sections 1 \
		--stringparam use.id.as.filename 1 \
		$(XSL-NS-SS)/xhtml-1_1/maketoc.xsl \
		main.docbook

clean:
	rm -f *~ *.olinkdb
	find public -name '*.html' -delete

.PHONY: generate chunk.toc.new clean