forked from BFO-ontology/BFO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (56 loc) · 1.42 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
66
67
68
# BFO 2.0 classes only ontology Makefile
# Jie Zheng
#
# This Makefile is used to build artifacts for the BFO 2.0 classes only ontology.
#
# Run `make` to build both OWL and OBO format BFO classes only release files.
### Configuration
#
# prologue:
# <http://clarkgrubb.com/makefile-style-guide#toc2>
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.SUFFIXES:
### Definitions
OBO := http://purl.obolibrary.org/obo
BFO := $(OBO)/BFO_
TODAY := $(shell date +%Y-%m-%d)
### Directories
#
# This is a temporary place to put things.
build:
mkdir -p $@
### ROBOT
#
# We use the official released version of ROBOT
build/robot.jar: | build
curl -L -o $@ https://github.com/ontodev/robot/releases/download/v1.4.1/robot.jar
ROBOT := java -jar build/robot.jar
### Build
#
# Here we create a standalone OWL file appropriate for release.
# This involves annotating.
bfo_classes_only.owl: src/ontology/owl-group/bfo_classes_only_dev.owl | build/robot.jar
$(ROBOT) reason \
--input $< \
--reasoner HermiT \
annotate \
--ontology-iri "$(OBO)/bfo.owl" \
--version-iri "$(OBO)/bfo/$(TODAY)/bfo.owl" \
--output $@
bfo_classes_only.obo: bfo_classes_only.owl | build/robot.jar
$(ROBOT) convert \
--input $< \
--output $@
###
#
# Full build
.PHONY: all
all: bfo_classes_only.owl | bfo_classes_only.obo
# Remove generated files
.PHONY: clean
clean:
rm -rf build