-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 914 Bytes
/
Makefile
File metadata and controls
38 lines (28 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
31
32
33
34
35
36
37
38
.PHONY: all clean
PANDOC := pandoc
SRCDIR := src
OUTDIR := site
MDFILES := $(wildcard $(SRCDIR)/*.md)
HTMLFILES := ${MDFILES:$(SRCDIR)/%.md=$(OUTDIR)/%.html}
LANDINGTEMPLATE := templates/landing.html
SIMPLETEMPLATE := templates/simple.html
SYNTAXDEF := templates/fram.xml
all: $(HTMLFILES) $(OUTDIR)/css $(OUTDIR)/img
$(OUTDIR)/index.html: $(SRCDIR)/index.md $(LANDINGTEMPLATE) $(SYNTAXDEF) | $(OUTDIR)
$(PANDOC) -s -t html \
--template $(LANDINGTEMPLATE) \
--syntax-definition $(SYNTAXDEF) \
-o $(OUTDIR)/index.html $(SRCDIR)/index.md
$(OUTDIR)/%.html: $(SRCDIR)/%.md $(SIMPLETEMPLATE) $(SYNTAXDEF) | $(OUTDIR)
$(PANDOC) -s -t html \
--template $(SIMPLETEMPLATE) \
--syntax-definition $(SYNTAXDEF) \
-o $@ $<
$(OUTDIR)/css: css | $(OUTDIR)
cp -r css $(OUTDIR)
$(OUTDIR)/img: $(SRCDIR)/img | $(OUTDIR)
cp -r $(SRCDIR)/img $(OUTDIR)
$(OUTDIR):
mkdir -p $(OUTDIR)
clean:
rm -rf $(OUTDIR)