-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 1.06 KB
/
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
GO_SRC := $(shell find . -name "*.go")
FA_DIR := node_modules/@fortawesome/fontawesome-free/webfonts
FA_FONTS_SOURCE := $(wildcard $(FA_DIR)/*.ttf) $(wildcard $(FA_DIR)/*.woff) $(wildcard $(FA_DIR)/*.woff2) $(wildcard $(FA_DIR)/*.eot)
FA_FONTS_TARGET := $(patsubst $(FA_DIR)/%, internal/web/static/webfonts/%, $(FA_FONTS_SOURCE))
git47: $(GO_SRC) static
go build -o git47 cmd/serve/main.go
check:
gofmt -l -w $(GO_SRC)
golint $(GO_SRC)
clean:
rm git47
rm -r internal/web/static
internal/web/static/css/styles.css: css/styles.css css/content.css
npx postcss css/styles.css -o $@
internal/web/static/css/fontawesome.css: css/fontawesome.css
npx postcss $< -o $@
internal/web/static/favicon.ico: css/favicon.ico
@test -d internal/web/static || mkdir internal/web/static
cp $< $@
internal/web/static/webfonts/%: $(FA_DIR)/%
@test -d internal/web/static/webfonts || mkdir -p internal/web/static/webfonts
cp $< $@
static: internal/web/static/css/styles.css internal/web/static/css/fontawesome.css internal/web/static/favicon.ico $(FA_FONTS_TARGET)
all: git47
dev:
modd