-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 805 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
27
28
29
30
31
32
33
34
35
36
37
all: post.pdf
STATIC_PATH := ../local-server/static
PAGES_PATH := $(STATIC_PATH)/pages/
ASSETS_PATH := $(STATIC_PATH)/assets/
IMAGES_PATH := ./imgs
CSS_PATH := ./css
post.pdf: post.md style.h.tex
pandoc ./post.md -H style.h.tex -o post.pdf
gio open post.pdf
# $(STATIC_PATH)/$(IMAGES_PATH)
post.html: clean_server post.md style.h.html | $(PAGES_PATH) $(ASSETS_PATH)
pandoc ./post.md -H style.h.html -o post.html
cp ./post.html $(PAGES_PATH)
cp -r $(IMAGES_PATH) $(ASSETS_PATH)
cp -r $(CSS_PATH) $(ASSETS_PATH)
PHONY: post.pdf post.html
clean:
rm -f post.html
rm -f post.pdf
$(PAGES_PATH):
mkdir -p $(PAGES_PATH)
$(ASSETS_PATH):
mkdir -p $(ASSETS_PATH)
clean_server:
rm -rf $(PAGES_PATH)
rm -rf $(ASSETS_PATH)
# $(STATIC_PATH)/$(IMAGES_PATH):
# mkdir -p $(STATIC_PATH)/$(IMAGES_PATH)