-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (25 loc) · 974 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
BUILDING_GENERATORS = $(wildcard src/generate-*-building)
BUILDING_MODELS = $(patsubst src/generate-%-building,var/models/%.ttl,${BUILDING_GENERATORS})
BUILDING_RESULTS = $(patsubst src/generate-%-building,test/%,${BUILDING_GENERATORS})
TARGETS = \
var/sali.ttl \
${BUILDING_MODELS} \
${BUILDING_TARGETS} \
all: ${TARGETS} test
test: ${BUILDING_RESULTS}
clean:
touch ${TARGETS}
rm ${TARGETS}
mrproper: clean
touch dummy~ src/dummy~ var/dummy~ test/dummy~
rm *~ src/*~ var/*~ test/*~
var/models:
mkdir var/models
var/sali.ttl: src/inject-instances var/sal.ttl
./src/inject-instances var/sal.ttl var/sali.ttl
# generic rule for generating building models
${BUILDING_MODELS}: var/models/%.ttl: src/generate-%-building src/shared.py
./$< $@
# generic rule for processing sparql files
${BUILDING_RESULTS}: test/%: var/models/%.ttl src/query-model var/schema.ttl
./src/query-model var/schema.ttl var/Brick.ttl $< var/queries/ $@/ 100