File: Makefile

package info (click to toggle)
kupfer 328-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,324 kB
  • sloc: python: 37,434; makefile: 88; sh: 78; xml: 3
file content (25 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (8)
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
pages=$(wildcard *.page plugin/*.page)
htmls=$(patsubst %.page,%.html,$(pages))

all: $(htmls) index.cache

index.cache : $(pages)
	echo '<cache:cache xmlns:cache="http://projectmallard.org/cache/1.0/"' >$@.in
	echo '             xmlns="http://projectmallard.org/1.0/">'           >> $@.in
	for page in $(pages); do \
		echo "<page cache:href='$$page'/>" >> $@.in; \
	done
	echo '</cache:cache>' >> $@.in
	xsltproc `pkg-config --variable xsltdir gnome-doc-utils`/mallard/cache/mal-cache.xsl $@.in | xmllint --format - > $@
	rm $@.in

$(htmls) : index.cache
$(htmls) : %.html : %.page
	xsltproc \
	  --stringparam mal.cache.file `pwd`/index.cache \
	  --param mal.chunk.chunk_top 1 \
	  `pkg-config --variable mal2html gnome-doc-utils` $<

.PHONY: clean
clean:
	rm -fv index.cache *.html