-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (31 loc) · 899 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
38
39
40
41
42
43
44
SASS := node_modules/sass/sass.js
PYTHON := python
RM := rm
TEX := latexmk
TEXFILE := resume.tex
SASSFLAGS := --style compressed
RMFLAGS := -rf
TEXMAKEFLAGS := -quiet -pdf
TEXCLEANFLAGS := -C
TEXREMOVEFLAGS := -c
SCSS_DIR := assets/scss
CSS_OUT := assets/css
SCSS_SRC := $(shell find $(SCSS_DIR) -name "*.scss")
CSS_OBJS := $(patsubst $(SCSS_DIR)%, $(CSS_OUT)%, $(patsubst %.scss, %.css, $(SCSS_SRC)))
CSS_MAPS := $(patsubst $(SCSS_DIR)%, $(CSS_OUT)%, $(patsubst %.scss, %.css.map, $(SCSS_SRC)))
ALL_OBJS := $(CSS_OBJS)
$(CSS_OUT)/%.css: $(SCSS_DIR)/%.scss
$(SASS) $(SASSFLAGS) $< $@
all: $(ALL_OBJS)
watch:
@$(SASS) --watch $(SASSFLAGS) $(SCSS_DIR):$(CSS_OUT)
server:
@$(PYTHON) -m http.server
clean:
$(RM) $(RMFLAGS) $(ALL_OBJS) $(CSS_MAPS) .sass-cache
$(TEX) $(TEXCLEANFLAGS)
tex:
@$(TEX) $(TEXMAKEFLAGS) $(TEXFILE)
cleanaux:
@$(TEX) $(TEXREMOVEFLAGS)
.PHONY: all watch clean