# DOCURI is the location of the document... DOCURI=@DOCURI@ # ...and BASEURI is the base URI of the vocabularies, and thus the # distribution location of the vocabulary files BASEURI=@BASEURI@ #ERSION=@PACKAGE_VERSION@ #RELEASEDATE=@RELEASEDATE@ # Following should/will be overridden by the Makefile which calls this one #DISTNAME=@DISTNAME@ # Use Saxon if necessary: some xsltproc versions seem to have trouble with # the structure.xslt file. If this is indeed necessary, adjust the SAXONJAR # line below. SAXONJAR="@SAXONJAR@" XSLTPROC="@XSLTPROC@" BIBTEX="@BIBTEX@" RAPPER="@RAPPER@" # The following is becoming unwieldy: it would seem better if the vocabularies.xml # and vocabularies-issues.xml files were replaced by foo.xml.in, and substituted # by configure. However that makes the build process that little bit more # opaque, so it's probably best overall to this as it is. edit=sed -e 's/@VERSION\@/@PACKAGE_VERSION@/g' \ -e 's/@RELEASEDATE\@/@RELEASEDATE@/g' \ -e 's,@DOCURI\@,@DOCURI@,g' \ -e 's,@BASEURI\@,@BASEURI@,g' \ -e 's,@DISTNAME\@,@DISTNAME@,g' \ -e 's,@ISSUESLIST\@,@ISSUESLIST@,g' \ -e 's,\$$\([A-Z][A-Za-z]*:[^$$]*\)\$$,\1,g' \ -e 's/@DRAFTVERSION\@{\([^}]*\)}/@DRAFTVERSION@/' #edit=sed -e 's/@VERSION\@/$(VERSION)/g' \ # -e 's/@RELEASEDATE\@/$(RELEASEDATE)/g' \ # -e 's,@DISTURI\@,$(DISTURI),g' \ # -e 's,@BASEURI\@,$(BASEURI),g' \ # -e 's,@DISTNAME\@,$(DISTNAME),g' \ # -e 's,@ISSUESLIST\@,$(ISSUESLIST),g' \ # -e 's,\$$\([A-Z][A-Za-z]*:[^$$]*\)\$$,\1,g' # Rules for creating note.xhtml from note.xml %.aux: %.xml structure.xslt rm -f $@ $@.tmp @USE_XSLTPROC@ $(XSLTPROC) --stringparam document-id $< --stringparam target aux \ @USE_XSLTPROC@ structure.xslt $< >$@.tmp && mv $@.tmp $@ @USE_SAXON@ java -jar $(SAXONJAR) $< structure.xslt document-id=$< target=aux >$@.tmp && mv $@.tmp $@ # Use printf rather than echo, since difference echo implementations treat # \b in different ways (some as the pair of characters "\b", others as a backspace). printf '\\bibstyle{plainhtml}\n' >> $@ # Following relies on BIBINPUTS and BSTINPUTS being set OK. %.bbl: %.aux rm-refs.bib rm -f $@ $@.tmp $(BIBTEX) $* sed -e '1s+
+
+' -f detex.sed $@ >$@.tmp && mv $@.tmp $@ # Convert .xml source to .xhtml output (which includes UTF-8 characters) %.xhtml: %.xml rm -f $@ $@.tmp @USE_XSLTPROC@ $(XSLTPROC) --stringparam document-id $< structure.xslt $< | $(edit) >$@.tmp && mv $@.tmp $@ @USE_SAXON@ java -jar $(SAXONJAR) $< structure.xslt document-id=$< | $(edit) >$@.tmp && mv $@.tmp $@ # Check the RDFa content of vocabularies.xhtml %.rdf: %.xhtml RDFa2RDFXML.xsl rm -f $@ $@.tmp @USE_XSLTPROC@ $(XSLTPROC) RDFa2RDFXML.xsl $< >$@.tmp && mv $@.tmp $@ @USE_SAXON@ java -jar $(SAXONJAR) $< RDFa2RDFXML.xsl >$@.tmp && mv $@.tmp $@ # Reformat to Turtle %.ttl: %.rdf rm -f $@ $@.tmp $(RAPPER) --output turtle $< $(BASEURI) >$@.tmp && mv $@.tmp $@ ######################################## # # Default target all: vocabularies.html vocabularies-issues.xhtml # Add extra dependency vocabularies.xhtml: vocabularies.bbl vocabularies-issues.xhtml: vocabularies-issues.bbl # Convert .xhtml to .html by doing an identity transformation using a # stylesheet which uses the "html" output method. vocabularies.html: vocabularies.xhtml rm -f $@ $@.tmp @USE_XSLTPROC@ $(XSLTPROC) identity-html.xslt $< | sed -f to-entities.sed >$@.tmp && mv $@.tmp $@ @USE_SAXON@ java -jar $(SAXONJAR) $< identity-html.xslt | sed -f to-entities.sed >$@.tmp && mv $@.tmp $@ ######################################## # # Extras # This refers to a local copy of the current version of the script # RDFa2RDFXML.xsl available from RDFa2RDFXML.xsl: curl http://ns.inria.fr/grddl/rdfa/2007/09/19/RDFa2RDFXML.xsl >$@ ######################################## # # Maintenance clean: rm -f *~ vocabularies.xhtml vocabularies.html vocabularies.aux vocabularies.bbl \ vocabularies.blg vocabularies.rdf vocabularies.ttl tmp \ vocabularies-issues.xhtml realclean: clean rm -f Makefile