From 7d42562b13cdfb802e5dbb33aa274924619bbca9 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 29 Apr 2024 08:18:11 +0200 Subject: use pattern rules; add targets render-*-ontology --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 60af951..b21138b 100644 --- a/Makefile +++ b/Makefile @@ -148,18 +148,22 @@ $(ARTICLES:%=%/b.tex): %/b.tex: mv --force $*/index.tex $@ rm --force _site/b.pdf -$(ONTOLOGIES:%=rdf/%.svg): rdf/%.svg: rdf/%.sdm +rdf/%.svg: rdf/%.sdm sdml draw --diagram concepts -i $< -f svg -o $@ -$(ONTOLOGIES:%=rdf/%-er.svg): rdf/%-er.svg: rdf/%.sdm +rdf/%-er.svg: rdf/%.sdm sdml draw --diagram entity-relationship -i $< -f svg -o $@ -$(ONTOLOGIES:%=rdf/%-uml.svg): rdf/%-uml.svg: rdf/%.sdm +rdf/%-uml.svg: rdf/%.sdm sdml draw --diagram uml-class -i $< -f svg -o $@ -$(ONTOLOGIES:%=rdf/%.ttl): rdf/%.ttl: rdf/%.sdm +rdf/%.ttl: rdf/%.sdm sdml convert -i $< -f rdf -o $@ --no-color +rdf/%/index.html: rdf/%.ttl + mkdir --parents rdf/$* + ontospy gendocs --type 2 -x -o $(CURDIR)/rdf/$* $< + $(ONTOLOGIES:%=view-%-concept-diagram): view-%-concept-diagram: rdf/%.svg inkview $< @@ -171,3 +175,5 @@ $(ONTOLOGIES:%=view-%-uml-diagram): view-%-uml-diagram: rdf/%-uml.svg $(ONTOLOGIES:%=view-%-rdfs-graf): view-%-rdfs-graf: rdf/%.ttl rdfs2dot -f turtle $< | xdot - + +$(ONTOLOGIES:%=render-%-ontology): render-%-ontology: rdf/%/index.html -- cgit v1.2.3