-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (20 loc) · 914 Bytes
/
Makefile
File metadata and controls
30 lines (20 loc) · 914 Bytes
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
SRC=$(shell find src -iname "*.markdown" -exec ls -t {} + )
DIRS=$(shell cd src && find . -mindepth 1 -type d \! -path "./templates")
DEPS=$(wildcard src/templates/*.html) src/templates/navigation-level-0.html lib/filter.pl make-html.sh lib/fix-styles.pl lib/generatedoc
HTML=${patsubst src/%,%,${SRC:.markdown=.html}}
reverse = $(if $(wordlist 2,2,$(1)),$(call reverse,$(wordlist 2,$(words $(1)),$(1))) $(firstword $(1)),$(1))
all: ${DIRS} ${HTML}
lib/generatedoc: lib/generatedoc.hs
ghc lib/generatedoc.hs
${DIRS}:
mkdir -p $@
src/templates/navigation-level-0.html: make-navigation.sh make-indexes.py ${DIRS}
./make-navigation.sh .
${TEMPLATES}:
${HTML}: %.html : src/%.markdown $@ ${DEPS}
./make-html.sh src/$*.markdown
clean: cleanpages
rm -f lib/generatedoc lib/generatedoc.o lib/generatedoc.hi
cleanpages:
rm -f ${HTML} src/templates/navigation-level-*.html
rmdir $(call reverse, ${DIRS} )