/[volute]/trunk/projects/vocabularies/doc/Makefile
ViewVC logotype

Contents of /trunk/projects/vocabularies/doc/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations)
Mon Dec 3 22:17:21 2007 UTC (12 years, 11 months ago) by norman.x.gray
File size: 2759 byte(s)
Create initial structure, and copy draft note-so-far from Explicator repository.

1 #BASEURI=file:note.html
2 BASEURI=http://www.ivoa.net/Document/Vocab-TBD
3
4 VERSION=0.01
5 RELEASEDATE=2007 December 3
6
7 # Use Saxon if necessary: some xsltproc versions seem to have trouble with
8 # the structure.xslt file. If this is indeed necessary, adjust the SAXONJAR
9 # line below.
10 SAXONJAR=saxon8.jar
11
12 edit=sed -e 's/\@VERSION@/$(VERSION)/' \
13 -e 's/\@RELEASEDATE@/$(RELEASEDATE)/' \
14 -e 's,\@BASEURI@,$(BASEURI),'
15
16 # Rules for creating note.xhtml from note.xml
17
18 %.aux: %.xml structure.xslt
19 rm -f $@
20 xsltproc --stringparam document-id $< --stringparam target aux \
21 structure.xslt $< >tmp && mv tmp $@
22 echo '\bibstyle{plainhtml}' >> $@
23
24 # Following relies on BIBINPUTS and BSTINPUTS being set OK.
25 %.bbl: %.aux
26 bibtex $<
27 sed '1s+<dl>+<dl xmlns="http://www.w3.org/1999/xhtml">+; /% *$$/{N;s/% *\n//;}; s/[{}]//g; s,\([^/]\)~,\1 ,g; s+\\,c+ç+g; s,\\'"'"'e,é,g; s,\\'"'"'a,á,g; s,\\\^o,ô,g; s,&,&amp;,g' $@ >$(@:=.tmp)
28 mv $(@:=.tmp) $@
29
30 ########################################
31 #
32 # Default target
33
34 vocabularies.xhtml: vocabularies.xml vocabularies.bbl structure.xslt
35 rm -f $@ tmp
36 xsltproc --stringparam document-id vocabularies.xml \
37 structure.xslt vocabularies.xml | $(edit) >tmp && mv tmp $@
38 # java -jar $(SAXONJAR) vocabularies.xml structure.xslt document-id=vocabularies.xml | $(edit) >tmp && mv tmp $@
39
40 ########################################
41 #
42 # Extras
43
44 # Check the RDFa content of vocabularies.xhtml
45 vocabularies.rdf: vocabularies.xhtml RDFa2RDFXML.xsl
46 rm -f $@ tmp
47 xsltproc RDFa2RDFXML.xsl vocabularies.xhtml >tmp && mv tmp $@
48
49 # This refers to a local copy of the current version of the script
50 # RDFa2RDFXML.xsl available from <http://ns.inria.fr/grddl/rdfa/>
51 RDFa2RDFXML.xsl:
52 curl http://ns.inria.fr/grddl/rdfa/2007/09/19/RDFa2RDFXML.xsl >$@
53
54 # 'rapper' is part of librdf.org, the Redland RDF libraries
55 vocabularies.ttl: vocabularies.rdf
56 rm -f $@ tmp
57 rapper --output turtle vocabularies.rdf $(BASEURI) >tmp && mv tmp $@
58
59 ########################################
60 #
61 # Maintainance
62
63 # The following extracts from Norman's compsci.bib database those entries
64 # which are referred to in vocabularies.aux. To use this, change the
65 # <?bibliography?> line to refer to "compsci", then make vocabularies.xhtml,
66 # then make this target, then change <?bibliography?> to refer again
67 # to "rm-refs". It doesn't work completely, because bibtool for some
68 # reason fails to pick up a crossref, but it's a start.
69 #rm-refs.bib:
70 # echo "new.entry.type = {electronic}" >bibtool.rsc
71 # echo "new.entry.type = {webpage}" >>bibtool.rsc
72 # /Data/tools/BibTool-2.46/bin/bibtool -r bibtool.rsc -x vocabularies.aux -o rm-refs.bib
73
74 clean:
75 rm -f vocabularies.xhtml vocabularies.aux vocabularies.bbl \
76 vocabularies.blg vocabularies.rdf vocabularies.ttl tmp

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26