summaryrefslogtreecommitdiffstats
path: root/docs/Makefile
blob: ef05303cd809cb4448e2364e2d28708d671561e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Makefile for netcfg documentation

MANPAGES = netcfg.8 netcfg-profiles.5
WEBPAGES = index.html features.html $(MANPAGES:%=%.html)

.PHONY: manpages website clean
manpages: $(MANPAGES)
website: website.tar.xz

$(MANPAGES): %: %.txt footer.txt
	a2x -d manpage -f manpage -a manversion=$(VERSION) $<

$(WEBPAGES): %.html: %.txt
	asciidoc -a disable-javascript -a linkcss -a max-width=960px $<

website.tar.xz: $(WEBPAGES)
	tar --transform "s%^%netcfg/%" -cJf $@ $^ -C /etc/asciidoc/stylesheets asciidoc.css

clean:
	-@rm -vf $(MANPAGES) $(WEBPAGES) website.tar.xz 2>/dev/null