|
| 1 | +#!/usr/bin/make -f |
| 2 | + |
| 3 | +# Portions of this file contributed by NIST are governed by the |
| 4 | +# following statement: |
| 5 | +# |
| 6 | +# This software was developed at the National Institute of Standards |
| 7 | +# and Technology by employees of the Federal Government in the course |
| 8 | +# of their official duties. Pursuant to Title 17 Section 105 of the |
| 9 | +# United States Code, this software is not subject to copyright |
| 10 | +# protection within the United States. NIST assumes no responsibility |
| 11 | +# whatsoever for its use by other parties, and makes no guarantees, |
| 12 | +# expressed or implied, about its quality, reliability, or any other |
| 13 | +# characteristic. |
| 14 | +# |
| 15 | +# We would appreciate acknowledgement if the software is used. |
| 16 | + |
| 17 | +SHELL := /bin/bash |
| 18 | + |
| 19 | +top_srcdir := $(shell cd .. ; pwd) |
| 20 | + |
| 21 | +RDF_TOOLKIT_JAR := $(top_srcdir)/dependencies/CASE-develop/dependencies/UCO/lib/rdf-toolkit.jar |
| 22 | + |
| 23 | +# Set up descending into each directory that has a Makefile. |
| 24 | +illustration_dirs := $(shell ls */Makefile | xargs dirname) |
| 25 | + |
| 26 | +all_drafting_ttl := $(wildcard */drafting.ttl) |
| 27 | + |
| 28 | +all_jsonld := $(foreach illustration_dir,$(illustration_dirs),$(illustration_dir)/$(illustration_dir).json) |
| 29 | + |
| 30 | +all: \ |
| 31 | + kb.ttl |
| 32 | + |
| 33 | +all-drafting.ttl: \ |
| 34 | + $(all_drafting_ttl) |
| 35 | + source $(top_srcdir)/venv/bin/activate \ |
| 36 | + && rdfpipe \ |
| 37 | + --output-format turtle \ |
| 38 | + $^ \ |
| 39 | + > _$@ |
| 40 | + mv _$@ $@ |
| 41 | + |
| 42 | +check: \ |
| 43 | + kb.ttl |
| 44 | + |
| 45 | +clean: |
| 46 | + @rm -f \ |
| 47 | + _all-drafting.ttl \ |
| 48 | + _kb.ttl \ |
| 49 | + all-drafting.ttl \ |
| 50 | + kb.ttl |
| 51 | + |
| 52 | +kb.ttl: \ |
| 53 | + $(all_jsonld) \ |
| 54 | + all-drafting.ttl |
| 55 | + source $(top_srcdir)/venv/bin/activate \ |
| 56 | + && rdfpipe \ |
| 57 | + --output-format turtle \ |
| 58 | + $(all_jsonld) \ |
| 59 | + > _$@ |
| 60 | + source $(top_srcdir)/venv/bin/activate \ |
| 61 | + && case_validate \ |
| 62 | + --allow-infos \ |
| 63 | + --metashacl \ |
| 64 | + --ontology-graph all-drafting.ttl \ |
| 65 | + _$@ |
| 66 | + mv _$@ $@ |
0 commit comments