-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (39 loc) · 1.26 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
PWD = $(shell pwd)
examples := $(wildcard example/*.ttl)
examples-val = $(examples:.ttl=.ttl-val.txt)
JENA-version = apache-jena-4.10.0
JENA = bin/$(JENA-version)
$(JENA):
mkdir -p bin
wget https://apache.uib.no/jena/binaries/$(JENA-version).zip -O [email protected]
unzip -u [email protected] -d bin
install: \
$(JENA)
.tangle: README.org
emacs --batch --quick -l org -l ${HOME}/.emacs --eval "(org-babel-tangle-file \"$<\")"
touch $@
pkg-vocabulary.shacl.ttl: .tangle
%.shacl.ttl-val.txt: %.shacl.ttl
$(JENA)/bin/shacl v --shapes http://www.w3.org/ns/shacl-shacl --data $< > $@
cat $@
%.json: %.ttl
$(JENA)/bin/riot --formatted=JSONLD $< > [email protected]
bin/ld-cli frame -i file:$(PWD)/[email protected] file:$(PWD)/... -po > $@
sed -i 's/http:\/\/purl.org\/pav\/\(\w\)/pav:\1/g' $@
%.html: %.ttl
rapper -gc $<
curl https://shacl-play.sparna.fr/play/doc -F includeDiagram=on -F shapesSource=file -F inputShapeFile=@$< > $@
%-val.txt: % pkg-vocabulary.shacl.ttl
$(JENA)/bin/shacl v --shapes pkg-vocabulary.shacl.ttl --data $< > $@
cat $@
all: \
pkg-vocabulary.shacl.html \
pkg-vocabulary.shacl.ttl-val.txt \
$(examples-val)
docs/%: all
mkdir -p $@
cp -u pkg-vocabulary.shacl.html $@/index.html
cp -u pkg-vocabulary.shacl.ttl $@
mkdir -p $@/example
cp -u example/* $@/example