summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 5d102ae24b6907eb2abc878f0802f48eeb10762a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
BOOKS = inclusion
FORMATS = html txt

# Default format in case a book target is called without FORMAT=*
FORMAT = html

all: $(FORMATS)

books: $(BOOKS)

$(FORMATS):
	@make 'FORMAT=$@' books

$(BOOKS):
	@printf '  RENDER %s as %s\n' '$@' '$(FORMAT)'
	@PERL5LIB=scripts scripts/markdownbook.pl $(FORMAT) 'policies/$@'

clean:
	@for book in $(BOOKS); do \
		printf '  CLEAN %s\n' "$${book}"; \
		rm -f "policies/$${book}/"*.html; \
		rm -f "policies/$${book}/"*.txt; \
	done