~smlavine/smlavine.com

smlavine.com/Makefile -rw-r--r-- 1.2 KiB
00625fe7Sebastian LaVine Change cover photo 1 year, 2 months ago
                                                                                
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.POSIX:

OUTDIR = public

REMOTEPATH = /var/www/smlavine.com

####

all: \
	kiln \
	$(OUTDIR)/style.css \
	$(OUTDIR)/pages/style.css \
	$(OUTDIR)/blog/style.css

# Kiln builds and templates site content and copies static content into the
# proper place.
kiln:
	kiln build

etc/dracula/dracula:
	go build -C etc/dracula

etc/dracula/dracula.css: etc/dracula/dracula
	etc/dracula/dracula > etc/dracula/dracula.css

$(OUTDIR)/style.css: \
	style/main.scss \
	style/style.scss \
	style/blog-posts.scss \
	etc/dracula/dracula.css
	sass --no-source-map style/style.scss $@

$(OUTDIR)/pages/style.css: style/style.scss style/pages/style.scss
	sass --no-source-map style/pages/style.scss $@

$(OUTDIR)/blog/style.css: style/style.scss style/blog/style.scss
	sass --no-source-map style/blog/style.scss $@

check: accessibility

accessibility: all
	./check-accessibility $(OUTDIR)

deploy: $(OUTDIR)
	@if [ ! "$(deploy)" ]; then echo 'Error: deploy must be set.'; exit 1; fi
	@# The slash at the end of $(OUTDIR) is needed; see 81076bc.
	rsync --rsh='ssh -o StrictHostKeyChecking=no' -r $(OUTDIR)/ '$(deploy):$(REMOTEPATH)'

clean:
	rm -rf $(OUTDIR)
	rm etc/dracula/dracula etc/dracula/dracula.css

serve: all
	http-server public/

.PHONY: all accessibility check deploy clean kiln serve