Skip to content

Commit

Permalink
Merge pull request #412 from ucoProject/Feature-Issue-406
Browse files Browse the repository at this point in the history
Issue 406 v1: OWL 2 DL review with SHACL-SPARQL
  • Loading branch information
b0bkaT authored Aug 12, 2022
2 parents ba9da19 + 40e16b0 commit ed80dd0
Show file tree
Hide file tree
Showing 28 changed files with 1,346 additions and 143 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ all: \
|| (git submodule init dependencies/CASE-Utility-SHACL-Inheritance-Reviewer && git submodule update dependencies/CASE-Utility-SHACL-Inheritance-Reviewer)
@test -r dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/README.md \
|| (echo "ERROR:Makefile:CASE-Utility-SHACL-Inheritance-Reviewer submodule README.md file not found, even though that submodule is initialized." >&2 ; exit 2)
# collections-ontology
test -r dependencies/collections-ontology/README.md \
|| git submodule update \
--init \
dependencies/collections-ontology
# error ontology
test -r dependencies/error/README.md \
|| git submodule update \
--init \
dependencies/error
touch $@

.lib.done.log:
Expand Down
20 changes: 20 additions & 0 deletions ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,47 +17,67 @@ top_srcdir := $(shell cd .. ; pwd)

all: \
all-co \
all-owl \
all-uco

.PHONY: \
all-co \
all-owl \
all-uco \
check-co \
check-owl \
check-uco \
clean-co \
clean-owl \
clean-uco

all-co:
$(MAKE) \
--directory co

all-owl:
$(MAKE) \
--directory owl

all-uco:
$(MAKE) \
--directory uco

check: \
check-co \
check-owl \
check-uco

check-co:
$(MAKE) \
--directory co \
check

check-owl:
$(MAKE) \
--directory owl \
check

check-uco:
$(MAKE) \
--directory uco \
check

clean: \
clean-co \
clean-owl \
clean-uco

clean-co:
@$(MAKE) \
--directory co \
clean

clean-owl:
@$(MAKE) \
--directory owl \
clean

clean-uco:
@$(MAKE) \
--directory uco \
Expand Down
59 changes: 59 additions & 0 deletions ontology/owl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/make -f

# This software was developed at the National Institute of Standards
# and Technology by employees of the Federal Government in the course
# of their official duties. Pursuant to title 17 Section 105 of the
# United States Code this software is not subject to copyright
# protection and is in the public domain. NIST assumes no
# responsibility whatsoever for its use by other parties, and makes
# no guarantees, expressed or implied, about its quality,
# reliability, or any other characteristic.
#
# We would appreciate acknowledgement if the software is used.

# This Makefile is adapted from /src/review.mk. It is expected to be
# short-lived, because at the time of this writing, there is a separate
# proposal revising the CI process to no longer use Make for Turtle
# normalization.
# TODO https://github.com/ucoProject/UCO/issues/373

SHELL := /bin/bash

top_srcdir := $(shell cd ../.. ; pwd)

ttl_basenames := $(shell find *.ttl -type f | sort)

# These are reference files, named with a leading dot.
check_reference_basenames := $(foreach ttl_basename,$(ttl_basenames),.check-$(ttl_basename))

# These are recipe targets, not intended to be created files.
check_targets := $(foreach ttl_basename,$(ttl_basenames),check-$(ttl_basename))

all: \
$(check_reference_basenames)

.check-%.ttl: \
%.ttl \
$(top_srcdir)/.lib.done.log
java -jar $(top_srcdir)/lib/rdf-toolkit.jar \
--inline-blank-nodes \
--source $< \
--source-format turtle \
--target $@_ \
--target-format turtle
mv $@_ $@

check: \
$(check_targets)

# Reminder: diff exits non-0 on finding any differences.
# Reminder: The $^ automatic Make variable is the name of all recipe prerequisites.
check-%.ttl: \
%.ttl \
.check-%.ttl
diff $^ \
|| (echo "ERROR:ontology/owl/Makefile:The local $< does not match the normalized version. If the above reported changes look fine, run 'cp .check-$< $<' while in the sub-folder ontology/owl/ to get a file ready to commit to Git." >&2 ; exit 1)

clean:
@rm -f $(check_reference_basenames)

Loading

0 comments on commit ed80dd0

Please sign in to comment.