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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 714 - (show annotations)
Wed Aug 6 20:02:09 2008 UTC (12 years, 3 months ago) by norman.x.gray
File size: 4228 byte(s)
Change the way that vocabulary.html is generated from vocabulary.xml,
  after discovering some weirdness with the rendering of the
  previously generated file in some browsers -- some odd interaction
  between XHTML content and links and maybe the text/html MIME type, I
  don't know.
I now generate the XHTML and then convert it to HTML using an identity
  transform.

1 # DOCURI is the location of the document...
2 DOCURI=@DOCURI@
3 # ...and BASEURI is the base URI of the vocabularies, and thus the
4 # distribution location of the vocabulary files
5 BASEURI=@BASEURI@
6
7 #ERSION=@PACKAGE_VERSION@
8 #RELEASEDATE=@RELEASEDATE@
9
10 # Following should/will be overridden by the Makefile which calls this one
11 #DISTNAME=@DISTNAME@
12
13 # Use Saxon if necessary: some xsltproc versions seem to have trouble with
14 # the structure.xslt file. If this is indeed necessary, adjust the SAXONJAR
15 # line below.
16 SAXONJAR="@SAXONJAR@"
17 XSLTPROC="@XSLTPROC@"
18 BIBTEX="@BIBTEX@"
19 RAPPER="@RAPPER@"
20
21 # The following is becoming unwieldy: it would seem better if the vocabularies.xml
22 # and vocabularies-issues.xml files were replaced by foo.xml.in, and substituted
23 # by configure. However that makes the build process that little bit more
24 # opaque, so it's probably best overall to this as it is.
25 edit=sed -e 's/@VERSION\@/@PACKAGE_VERSION@/g' \
26 -e 's/@RELEASEDATE\@/@RELEASEDATE@/g' \
27 -e 's,@DOCURI\@,@DOCURI@,g' \
28 -e 's,@BASEURI\@,@BASEURI@,g' \
29 -e 's,@DISTNAME\@,@DISTNAME@,g' \
30 -e 's,@ISSUESLIST\@,@ISSUESLIST@,g' \
31 -e 's,\$$\([A-Z][A-Za-z]*:[^$$]*\)\$$,\1,g'
32 #edit=sed -e 's/@VERSION\@/$(VERSION)/g' \
33 # -e 's/@RELEASEDATE\@/$(RELEASEDATE)/g' \
34 # -e 's,@DISTURI\@,$(DISTURI),g' \
35 # -e 's,@BASEURI\@,$(BASEURI),g' \
36 # -e 's,@DISTNAME\@,$(DISTNAME),g' \
37 # -e 's,@ISSUESLIST\@,$(ISSUESLIST),g' \
38 # -e 's,\$$\([A-Z][A-Za-z]*:[^$$]*\)\$$,\1,g'
39
40 # Rules for creating note.xhtml from note.xml
41
42 %.aux: %.xml structure.xslt
43 rm -f $@ $@.tmp
44 @USE_XSLTPROC@ $(XSLTPROC) --stringparam document-id $< --stringparam target aux \
45 @USE_XSLTPROC@ structure.xslt $< >$@.tmp && mv $@.tmp $@
46 @USE_SAXON@ java -jar $(SAXONJAR) $< structure.xslt document-id=$< target=aux >$@.tmp && mv $@.tmp $@
47 # Use printf rather than echo, since difference echo implementations treat
48 # \b in different ways (some as the pair of characters "\b", others as a backspace).
49 printf '\\bibstyle{plainhtml}\n' >> $@
50
51 # Following relies on BIBINPUTS and BSTINPUTS being set OK.
52 %.bbl: %.aux rm-refs.bib
53 rm -f $@ $@.tmp
54 $(BIBTEX) $*
55 sed -e '1s+<dl>+<dl xmlns="http://www.w3.org/1999/xhtml">+' -f detex.sed $@ >$@.tmp && mv $@.tmp $@
56
57 %.xhtml: %.xml
58 rm -f $@ $@.tmp
59 # This version converts certain characters to numeric entities
60 @USE_XSLTPROC@ $(XSLTPROC) --stringparam document-id $< structure.xslt $< | \
61 @USE_XSLTPROC@ $(edit) | sed -f to-entities.sed >$@.tmp && mv $@.tmp $@
62 # Convert to ISO-8859-1 and dumb down certain characters not represented there
63 #@USE_XSLTPROC@ $(edit) >$@ | sed -e 's/“/"/g' -e 's/”/"/g' -e 's/–/-/g' -e 's/—/--/g' | iconv -f UTF-8 -t ISO-8859-1 >tmp && mv tmp $@
64 # The original and best -- just use UTF-8 and stop messing around
65 #@USE_XSLTPROC@ $(edit) >tmp && mv tmp $@
66 @USE_SAXON@ java -jar $(SAXONJAR) $< structure.xslt document-id=$< | $(edit) >$@.tmp && mv $@.tmp $@
67
68 # Check the RDFa content of vocabularies.xhtml
69 %.rdf: %.xhtml RDFa2RDFXML.xsl
70 rm -f $@ $@.tmp
71 @USE_XSLTPROC@ $(XSLTPROC) RDFa2RDFXML.xsl $< >$@.tmp && mv $@.tmp $@
72 @USE_SAXON@ java -jar $(SAXONJAR) $< RDFa2RDFXML.xsl >$@.tmp && mv $@.tmp $@
73
74 # Reformat to Turtle
75 %.ttl: %.rdf
76 rm -f $@ $@.tmp
77 $(RAPPER) --output turtle $< $(BASEURI) >$@.tmp && mv $@.tmp $@
78
79
80 ########################################
81 #
82 # Default target
83
84 all: vocabularies.html vocabularies-issues.xhtml
85
86 # Add extra dependency
87 vocabularies.xhtml: vocabularies.bbl
88 vocabularies-issues.xhtml: vocabularies-issues.bbl
89
90 vocabularies.html: vocabularies.xhtml
91 rm -f $@ $@.tmp
92 @USE_XSLTPROC@ $(XSLTPROC) identity-html.xslt $< >$@.tmp && mv $@.tmp $@
93 @USE_SAXON@ java -jar $(SAXONJAR) $< identity-html.xslt >$@.tmp && mv $@.tmp $@
94
95 ########################################
96 #
97 # Extras
98
99 # This refers to a local copy of the current version of the script
100 # RDFa2RDFXML.xsl available from <http://ns.inria.fr/grddl/rdfa/>
101 RDFa2RDFXML.xsl:
102 curl http://ns.inria.fr/grddl/rdfa/2007/09/19/RDFa2RDFXML.xsl >$@
103
104 ########################################
105 #
106 # Maintenance
107
108 clean:
109 rm -f *~ vocabularies.xhtml vocabularies.html vocabularies.aux vocabularies.bbl \
110 vocabularies.blg vocabularies.rdf vocabularies.ttl tmp \
111 vocabularies-issues.xhtml
112
113 realclean: clean
114 rm -f Makefile

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