summaryrefslogtreecommitdiffstats
path: root/Makefile.inc
blob: 4c0b100d67f8df72ce98f8ec6a8ac6d28f0a4da3 (plain) (blame)
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
# vim:set ft=make:
# This source code is released into the public domain.

ADOCFLAGS=	-a linkcss -a stylesheet=${ROOTDIR}main.css
.SUFFIXES: .html .adoc

HTML=	${PAGES:.adoc=.html}

build: ${HTML} .PHONY
.for dir in ${SUBDIR}
	@echo "build ==> ${dir}"
	@make -C ${dir} ROOTDIR=${ROOTDIR}../ WWWROOT=${WWWROOT}/${dir} build
	@echo "build <== ${dir}"
.endfor

clean: .PHONY
	rm -f ${HTML}
.for dir in ${SUBDIR}
	@echo "clean ==> ${dir}"
	@make -C ${dir} clean
	@echo "clean <= ${dir}"
.endfor

install: ${HTML} .PHONY
	install -d ${WWWROOT}

.for file in ${HTML} ${FILES}
	install -C -m 0644 ${file} ${WWWROOT}
.endfor

.for dir in ${SUBDIR}
	@echo "build ==> ${dir}"
	@make -C ${dir} ROOTDIR=${ROOTDIR}../ WWWROOT=${WWWROOT}/${dir} install
	@echo "build <== ${dir}"
.endfor

.adoc.html:
	asciidoctor ${ADOCFLAGS} -o ${.TARGET} ${.IMPSRC}