From: Lady Date: Wed, 1 Jan 2025 19:36:47 +0000 (-0500) Subject: Update ⛩📰 书社 to 0.13.3; “simplify” build X-Git-Url: https://git.ladys.computer/Vocab/commitdiff_plain/2e47aa87081f9ebdecdd7fb5e8a74271616ecb91?ds=sidebyside Update ⛩📰 书社 to 0.13.3; “simplify” build This now uses the official two‐step build mechanism instead of the old hacked‐together one. --- diff --git "a/.\342\233\251\360\237\223\260" "b/.\342\233\251\360\237\223\260" index 884130a..5c2f4a2 160000 --- "a/.\342\233\251\360\237\223\260" +++ "b/.\342\233\251\360\237\223\260" @@ -1 +1 @@ -Subproject commit 884130a52be6bfe21e524498385cb6486495b383 +Subproject commit 5c2f4a2d2c9913196c6092f0f72a8c4ff6e76752 diff --git a/DTD b/DTD index 577fb91..5e9b6fd 100644 --- a/DTD +++ b/DTD @@ -1,6 +1,6 @@ diff --git a/GNUmakefile b/GNUmakefile index 8714dc4..72bf292 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,9 +1,9 @@ -# SPDX-FileCopyrightText: 2023-2024 Lady +# SPDX-FileCopyrightText: 2023, 2024, 2025 Lady # SPDX-License-Identifier: MPL-2.0 SHELL = /bin/sh -# Copyright © 2023–2024 Lady [@ Ladys Computer]. +# Copyright © 2023–2025 Lady [@ Ladys Computer]. # # This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. # If a copy of the M·P·L was not distributed with this file, You can obtain one at . @@ -19,12 +19,9 @@ TEST := test TOUCH := touch XARGS := xargs -DATASRCDIR := data -SITESRCDIR := site +DATADIR := data +SRCDIR := site BUILDDIR := build -DATABUILDDIR := build/data -RDFBUILDDIR := build/rdf -SITEBUILDDIR := build/site BUILDTARGET := .grass DESTDIR := public @@ -32,56 +29,30 @@ THISDIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) SHUSHE := .⛩📰 MAKEOPTS := CP='$(CP)' FIND='$(FIND)' GIT='$(GIT)' MKDIR='$(MKDIR)' PRINTF='$(PRINTF)' RM='$(RM)' SED='$(SED)' TEST='$(TEST)' TOUCH='$(TOUCH)' XARGS='$(XARGS)' - -# Stage 1: Build R·D·F files to build/rdf -SHUSHEDATAOPTS := $(MAKEOPTS) SRCDIR='$(DATASRCDIR)' INCLUDEDIR='$(DATASRCDIR)' BUILDDIR='$(DATABUILDDIR)' DESTDIR='$(RDFBUILDDIR)' EXTRAPARSERS='$(wildcard $(THISDIR)/parsers/data/*.xslt)' EXTRAPARSERLIBS='$(DATASRCDIR)/ontologies/¦' EXTRAFINDINCLUDERULES='-not '"'"'('"'"' '"'"'('"'"' -name ontologies -o -name profiles '"'"')'"'"' -a -type d -a -prune '"'"')'"'"'' EXTRATRANSFORMS='$(wildcard $(THISDIR)/transforms/data/*.xslt)' - -# Stage 2: Build the actual site -SHUSHESITEOPTS := $(MAKEOPTS) SRCDIR='$(SITESRCDIR)' INCLUDEDIR='$(RDFBUILDDIR)' BUILDDIR='$(SITEBUILDDIR)' DESTDIR='$(DESTDIR)' EXTRAPARSERS='$(wildcard $(THISDIR)/parsers/site/*.xslt)' EXTRATRANSFORMS='$(wildcard $(THISDIR)/transforms/site/*.xslt)' +SHUSHEOPTS := $(MAKEOPTS) SRCDIR='$(SRCDIR)' DATADIR='$(DATADIR)' BUILDDIR='$(BUILDDIR)' DESTDIR='$(BUILDDIR)/public' EXTRAPARSERS='$(wildcard $(THISDIR)/parsers/*.xslt)' EXTRAPARSERLIBS='$(DATADIR)/ontologies/¦' EXTRATRANSFORMS='$(wildcard $(THISDIR)/transforms/*.xslt)' YSEME := .👥📤 -YSEMEOPTS := $(MAKEOPTS) BUILDTARGET='.grass' DESTDIR='$(DESTDIR)' SERVERPATH='lady/vocab' +YSEMEOPTS := $(MAKEOPTS) BUILDTARGET='$(BUILDTARGET)' DESTDIR='$(DESTDIR)' SERVERPATH='lady/vocab' -xmls := $(wildcard $(DATASRCDIR)/*/*) +xmls := $(wildcard $(DATADIR)/*/*) # ━ § Call out to ⛩📰 书社 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ install : $(SHUSHE)/GNUmakefile build - @for publicfile in $(patsubst %,"%",$(wildcard $(DESTDIR)/*)); do if $(GIT) check-ignore -q "$$publicfile"; then $(RM) -rf "$$publicfile"; fi; done - @for target in $$($(MAKE) -s -f '$<' listout QUIET=1 $(SHUSHEDATAOPTS)); do $(PRINTF) '%s\n' "$$target" | $(SED) 's/¦/:/g' | $(XARGS) $(PRINTF) 'Copying …\n' >&2; $(PRINTF) '%s\n' "$$target" | $(SED) 's:^:$(DESTDIR)/:;s/¦/:/g' | $(XARGS) $(CP) '$(RDFBUILDDIR)/'"$$target"; done - @for target in $$($(MAKE) -s -f '$<' listout QUIET=1 $(SHUSHESITEOPTS)); do for dir in $$($(FIND) "$(SITEBUILDDIR)/public/$$target" -not -name '.*' -and -type d); do if $(TEST) '!' -d "$(DESTDIR)/$$dir"; then $(PRINTF) '%s\n' "$$dir" | $(SED) 's:$(SITEBUILDDIR)/public/:$(DESTDIR)/:' | $(XARGS) $(MKDIR) -p; fi; done; for file in $$($(FIND) "$(SITEBUILDDIR)/public/$$target" -not '(' -name '.*' -or -type d ')'); do $(PRINTF) '%s\n' "$$file" | $(SED) 's:$(SITEBUILDDIR)/public/:/:;s:/_\(.*\)_\(\..*\)$$:/(\1)\2:g;s/¦/:/g' | $(XARGS) $(PRINTF) 'Copying <%s>…\n' >&2; $(PRINTF) '%s\n' "$$file" | $(SED) 's:$(SITEBUILDDIR)/public/:$(DESTDIR)/:;s:/_\(.*\)_\(\..*\)$$:/(\1)\2:g;s/¦/:/g' | $(XARGS) $(CP) "$$file"; done; done + @for publicfile in $(patsubst %,"%",$(shell $(FIND) '$(DESTDIR)'/*)); do if $(GIT) check-ignore -q "$$publicfile"; then $(RM) -R -f "$$publicfile"; fi; done + @for dir in $$($(FIND) '$(BUILDDIR)/public' -type d | $(SED) 's:$(BUILDDIR)/public/::'); do if $(TEST) '!' -d "$(DESTDIR)/$$dir"; then $(MKDIR) -p "$(DESTDIR)/$$dir"; fi; done + @for file in $$($(FIND) '$(BUILDDIR)/public' -type f | $(SED) 's:$(BUILDDIR)/public/::'); do $(PRINTF) '%s\n' "$$file" | $(SED) 's:/_\(.*\)_\(\..*\)$$:/(\1)\2:g;s/¦/:/g' | $(XARGS) $(PRINTF) 'Copying <%s>…\n' >&2; $(PRINTF) '%s\n' "$$file" | $(SED) 's:^:$(DESTDIR)/:;s:/_\(.*\)_\(\..*\)$$:/(\1)\2:g;s/¦/:/g' | $(XARGS) $(CP) "$(BUILDDIR)/public/$$file"; done $(TOUCH) '$(BUILDTARGET)' build : $(SHUSHE)/GNUmakefile - @$(RM) -rf '$(RDFBUILDDIR)/profiles' - @$(MAKE) -f '$<' install $(SHUSHEDATAOPTS) - @$(MAKE) -f '$<' $(SHUSHESITEOPTS) - -clean : $(SHUSHE)/GNUmakefile - @$(MAKE) -f '$<' $@ $(SHUSHEDATAOPTS) - @$(RM) -rf '$(RDFBUILDDIR)' - @$(MAKE) -f '$<' $@ $(SHUSHESITEOPTS) - -list listout : $(SHUSHE)/GNUmakefile - @$(RM) -rf '$(RDFBUILDDIR)/profiles' - @$(MAKE) -f '$<' install $(SHUSHEDATAOPTS) - @$(MAKE) -f '$<' $@ $(SHUSHESITEOPTS) - -$(BUILDDIR)/data/% : $(SHUSHE)/GNUmakefile FORCE - @$(MAKE) -f '$<' $@ $(SHUSHEDATAOPTS) - -$(BUILDDIR)/rdf/% : $(SHUSHE)/GNUmakefile FORCE - @$(MAKE) -f '$<' $@ $(SHUSHEDATAOPTS) - -$(BUILDDIR)/site/% : $(SHUSHE)/GNUmakefile FORCE - @$(RM) -rf '$(RDFBUILDDIR)/profiles' - @$(MAKE) -f '$<' install $(SHUSHEDATAOPTS) - @$(MAKE) -f '$<' $@ $(SHUSHESITEOPTS) - -$(DESTDIR)/% : $(SHUSHE)/GNUmakefile FORCE - @$(RM) -rf '$(RDFBUILDDIR)/profiles' - @$(MAKE) -f '$<' install $(SHUSHEDATAOPTS) - @$(MAKE) -f '$<' $@ $(SHUSHESITEOPTS) + @$(RM) -R -f '$(BUILDDIR)/public' + @$(MAKE) -f '$<' install $(SHUSHEOPTS) + +clean list listout : $(SHUSHE)/GNUmakefile + @$(MAKE) -f '$<' $@ $(SHUSHEOPTS) + +$(BUILDDIR)/% : $(SHUSHE)/GNUmakefile FORCE + @$(MAKE) -f '$<' $@ $(SHUSHEOPTS) # ━ § Call out to 👥📤 Yseme ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ diff --git a/data/object_properties/is "b/data/object_properties/\302\246is" similarity index 100% rename from data/object_properties/is rename to "data/object_properties/\302\246is" diff --git a/parsers/data/ontology.xslt b/parsers/ontology.xslt similarity index 86% rename from parsers/data/ontology.xslt rename to parsers/ontology.xslt index b5d7bf2..bd5d7b7 100644 --- a/parsers/data/ontology.xslt +++ b/parsers/ontology.xslt @@ -1,10 +1,10 @@ - <owl:Ontology - - xmlns - - : - - - =" - - " - - rdf:about=" - - - - "> - &continue; - </owl:Ontology> - <书社:link xlink:href="about:shushe?include=classes/" xlink:show="embed"/> - <书社:link xlink:href="about:shushe?include=datatypes/" xlink:show="embed"/> - <书社:link xlink:href="about:shushe?include=annotation_properties/" xlink:show="embed"/> - <书社:link xlink:href="about:shushe?include=object_properties/" xlink:show="embed"/> - <书社:link xlink:href="about:shushe?include=datatype_properties/" xlink:show="embed"/> - <书社:link xlink:href="about:shushe?include=named_individuals/" xlink:show="embed"/> - + (Technically, name·space nodes can be created with the `@namespace´ property on `´, but the resulting prefix is, ⅌ the specification text, implementation‐specific.) + --> + <owl:Ontology + + xmlns + + : + + + =" + + " + + rdf:about=" + + + + "> + &continue; + </owl:Ontology>