Debian Codegraph @

docs/Makefile.am

raw
1 # -*- Mode: Makefile -*-
2 #
3 # Makefile.am - docs automake file for Redland Bindings
4 #
5 # Copyright (C) 2000-2005, David Beckett http://www.dajobe.org/
6 # Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/
7 #
8 # This package is Free Software and part of Redland http://librdf.org/
9 #
10 # It is licensed under the following three licenses as alternatives:
11 # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
12 # 2. GNU General Public License (GPL) V2 or any newer version
13 # 3. Apache License, V2.0 or any newer version
14 #
15 # You may not use this file except in compliance with at least one of
16 # the above three licenses.
17 #
18 # See LICENSE.html or LICENSE.txt at the top of this package for the
19 # complete terms and further detail along with the license texts for
20 # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively.
21 #
22 #
23
24 EXTRA_DIST=\
25 README.html README \
26 perl.html python.html ruby.html php.html \
27 fix-pod-xhtml fix-python-xhtml fix-rdoc-xhtml \
28 pod pydoc rdoc
29
30 POD_MODULES=RDF/Redland RDF/Redland/Iterator RDF/Redland/Model RDF/Redland/Node RDF/Redland/Parser RDF/Redland/Query RDF/Redland/QueryResults RDF/Redland/RSS RDF/Redland/Serializer RDF/Redland/Statement RDF/Redland/Storage RDF/Redland/Stream RDF/Redland/URI RDF/Redland/BlankNode RDF/Redland/URINode RDF/Redland/LiteralNode RDF/Redland/XMLLiteralNode
31
32 DOC_C_FILES=$(DOC_CLASSES:%=$(srcdir)/../librdf/rdf_%.c)
33
34 PERL_HTML_POD_FILES=$(POD_MODULES:%=pod/%.html)
35 PYTHON_HTML_PYDOC_FILES=pydoc/RDF.html
36
37 RUBY_FILES= model node parser query resource serializer statement \
38 store stream uri schemas/foaf schemas/owl schemas/rdfs dc util \
39 queryresults
40
41 RUBY_CLASSES= FOAF DC Redland Redland/OWL Redland/Util Redland/RDFS \
42 Redland/Serializer Redland/NodeTypeError Redland/Uri \
43 Redland/HashStore Redland/Query Redland/HashOpen Redland/Parser \
44 Redland/Node Redland/Model Redland/ContextParser Redland/Stream \
45 Redland/MemoryStore Redland/Statement Redland/Literal \
46 Redland/RedlandError Redland/NodeIterator Redland/FileStore \
47 Redland/Namespace Redland/World Redland/TripleStore Redland/Resource \
48 Redland/MergedModel Redland/BNode Redland/QueryResults
49
50 RUBY_HTML_SOURCE_FILES=$(RUBY_FILES:%=rdoc/rdf/redland/%_rb.html)
51 RUBY_HTML_CLASS_FILES=$(RUBY_CLASSES:%=rdoc/%.html)
52
53 RUBY_HTML_RDOC_FILES= \
54 $(RUBY_HTML_SOURCE_FILES) \
55 rdoc/rdf/redland_rb.html \
56 $(RUBY_HTML_CLASS_FILES) \
57 rdoc/index.html
58
59 RUBY_EXTRA_RDOC_FILES= \
60 rdoc/rdoc.css rdoc/rdoc-style.css \
61 rdoc/js/darkfish.js rdoc/js/jquery.js rdoc/js/navigation.js rdoc/js/searcher.js \
62 rdoc/js/search_index.js rdoc/js/search.js
63
64 CLEANFILES=README
65
66 MAINTAINERCLEANFILES=pod pydoc rdoc-dirs-stamp
67
68 PERL=perl
69
70 # Create some text files from HTML sources
71 LYNX=lynx
72 LYNXARGS=-dump -nolist
73
74 SUFFIXES = .html .txt .sgml .ps .pdf .pm .pod .3
75
76 pod: $(PERL_HTML_POD_FILES)
77
78 pydoc: $(PYTHON_HTML_PYDOC_FILES)
79
80 rdoc: $(RUBY_HTML_RDOC_FILES) $(RUBY_EXTRA_RDOC_FILES)
81
82 .html.txt:
83 $(LYNX) $(LYNXARGS) $< > $@
84
85 if MAINTAINER_MODE
86 # PERL
87 $(PERL_HTML_POD_FILES): pod/%.html: $(srcdir)/../perl/lib/%.pm $(srcdir)/fix-pod-xhtml
88 mkdir -p pod/RDF/Redland
89 -pod2html --noindex --htmlroot /docs/pod --infile=$< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(srcdir)/fix-pod-xhtml $@
90 rm -f pod2htm*
91
92 $(srcdir)/../python/RDF.html: $(srcdir)/../python/RDF.py
93 cd $(srcdir)/../python && $(MAKE) RDF.html
94
95 # PYTHON
96 $(PYTHON_HTML_PYDOC_FILES): pydoc/%.html: $(srcdir)/../python/RDF.html $(srcdir)/fix-python-xhtml
97 mkdir -p pydoc
98 -tidy -asxml -wrap 1000 $< 2>/dev/null | $(PERL) $(srcdir)/fix-python-xhtml $@
99
100 .pod.html: $(srcdir)/fix-pod-xhtml
101 -pod2html --noindex --htmlroot /docs/pod --infile=$< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(srcdir)/fix-pod-xhtml $@
102 rm -f pod2htm*
103
104 # RUBY
105 $(RUBY_HTML_RDOC_FILES): rdoc/%.html: $(srcdir)/fix-rdoc-xhtml rdoc-dirs-stamp
106 -tidy --new-blocklevel-tags nav,section,footer -asxml -wrap 1000 $(srcdir)/../ruby/$@ 2>/dev/null | $(PERL) $(srcdir)/fix-rdoc-xhtml $@
107
108 $(RUBY_EXTRA_RDOC_FILES): rdoc-dirs-stamp
109 @for file in $(RUBY_EXTRA_RDOC_FILES); do \
110 if test -r $(srcdir)/../ruby/$$file; then \
111 echo $(INSTALL_DATA) $(srcdir)/../ruby/$$file $$file; \
112 $(INSTALL_DATA) $(srcdir)/../ruby/$$file $$file; \
113 else \
114 echo touch $$file; \
115 touch $$file; \
116 fi; \
117 done
118
119 rdoc-dirs-stamp: $(srcdir)/../ruby/rdoc-stamp
120 mkdir -p rdoc rdoc/js rdoc/Redland rdoc/rdf rdoc/rdf/redland rdoc/rdf/redland/schemas && touch $@
121
122 $(srcdir)/../ruby/rdoc-stamp:
123 cd $(srcdir)/../ruby && $(MAKE) docs
124 endif
125
126
127 clean-local:
128 rm -rf pod2htm*
129
130 README: README.html
131 $(LYNX) $(LYNXARGS) $< > $@
132
133 @SET_MAKE@