-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
27 lines (18 loc) · 775 Bytes
/
Makefile
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
SOURCES := $(wildcard docs/*.adoc)
HTML := $(patsubst docs/%.adoc, site/%.html, $(SOURCES))
PDF := $(patsubst docs/%.adoc, site/%.pdf, $(SOURCES))
CLOJURE_COURSE_SOURCES := $(wildcard docs/clojure/*.adoc)
CLOJURE_COURSE := $(patsubst docs/clojure/%.adoc, site/clojure/%.html, $(CLOJURE_COURSE_SOURCES))
.PHONY: all clean setup
all: setup $(HTML) $(PDF) $(CLOJURE_COURSE)
clean:
rm site/*.html site/*.pdf site/clojure/*.html
setup: .bundle
.bundle:
bundle --path=.bundle/gems --binstubs=.bundle/.bin
site/clojure/%.html: docs/clojure/%.adoc
bundle exec asciidoctor-revealjs --destination-dir=site/clojure $<
site/%.html: docs/%.adoc
bundle exec asciidoctor --destination-dir=site $<
site/%.pdf: docs/%.adoc
bundle exec asciidoctor-pdf --destination-dir=site $<