-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
61 lines (45 loc) · 1.39 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
ifeq ($(ASYMPTOTE_USER),)
export ASYMPTOTE_USER=asymptote
endif
export ASYMPTOTE_UID=$(shell getent passwd $(ASYMPTOTE_USER) | sed -e 's/[^:]*:[^:]*:\([0-9]*\):.*/\1/')
export ASYMPTOTE_GID=$(shell getent passwd $(ASYMPTOTE_USER) | sed -e 's/[^:]*:[^:]*:[^:]*:\([0-9]*\):.*/\1/')
export ASYMPTOTE_HOME=$(shell getent passwd $(ASYMPTOTE_USER) | sed -e 's/[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/')
ifeq ($(ASYMPTOTE_UID),)
export ASYMPTOTE_UID=0
endif
ifeq ($(ASYMPTOTE_GID),)
export ASYMPTOTE_GID=0
endif
ifeq ($(ASYMPTOTE_HOME),)
export ASYMPTOTE_HOME=$HOME
endif
vpath %.asy icons
vpath %.asy logo
vpath %.svg src/assets
vpath %.html.gz public
ASY_ICONS=$(wildcard icons/*.asy)
ASY_LOGO=logo3d.html.gz
all: $(notdir $(ASY_ICONS:.asy=.svg)) $(ASY_LOGO) node_modules
npm run build
-cd build && rm static/js/*.LICENSE.txt
node_modules: package.json
npm install
run:
rm -rf clients/*
node server.js
# Run front end only (for testing)
frontend:
npm start
tidy:
-rm -rf logs/uncaughtExceptions
clean: tidy
-cd src/assets && rm -f $(notdir $(ASY_ICONS:.asy=.svg)) show.svg homeHover.svg
-cd public && rm -f $(ASY_LOGO)
-rm -rf node_modules build package-lock.json clients/* logs/*
.SUFFIXES: .asy .svg .html .gz .html.gz
%.svg: %.asy
asy -nowarn unbounded -f svg -o src/assets/ $<
%.html: %.asy
asy -nowarn unbounded -f html -o public/ $<
%.html.gz: %.html
cd public && gzip -f $<