-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (45 loc) · 1.16 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
62
63
64
65
SITE_TARBALL := dist/site.tar
UPLOAD_HOST ?= orgorgorgorgorg.org
UPLOAD_PATH ?= /home/ptgolden/apps/org_home/
# Files that will be included in the tarball
STATIC_DEPS = org.css graph.ttl org.js
# Files that generate the tarball
SITE_SCRIPTS := $(wildcard src/*js)
platform=$(shell uname -s)
ifeq ($(platform), Darwin)
TAR := gtar
else
TAR := tar
endif
.PHONY: all
all: $(SITE_TARBALL)
$(TAR) xf $< -C dist
.PHONY: clean
clean:
rm -rf dist node_modules
.PHONY: upload
upload: $(SITE_TARBALL)
$(TAR) xf $< -C dist
chmod g+w $(addprefix dist/,$(shell $(TAR) tf $<))
scp $(addprefix dist/,$(shell $(TAR) tf $<)) $(UPLOAD_HOST):$(UPLOAD_PATH)
dist:
mkdir -p $@
node_modules: package.json
npm ci
$(SITE_TARBALL): $(STATIC_DEPS) $(SITE_SCRIPTS) node_modules | dist
node . > $@ || rm $@
$(TAR) --owner=0 --group=0 -r -f $@ $(STATIC_DEPS)
#--- Utilities
.PHONY: add_meeting
add_meeting:
@python3 bin/add_meeting
.PHONY: sort_turtle
sort_turtle:
bin/clean_ttl.py graph.ttl | sponge graph.ttl
.PHONY: add_missing_entities
add_missing_entities:
bin/missing_entities graph.ttl >> graph.ttl
make sort_turtle
.PHONY: check
check:
shacl v -s shape.ttl -d graph.ttl