Skip to content
Browse files

- Makefile:

  - Added olinkdb targets
  - restructured a bit
- TODO: added an item
- docbook/olinkdb-{c,nc}.db: OlinkDB sitemaps for chunked and unchunked outputs
- bin/refs-autogen: with olinkdb help, now properly links between both
  in-document and external See Also items!
- refs/MV_MAILFROM/notes: made the note more understandable
  • Loading branch information...
1 parent 2c69fa0 commit dc2ec387784582289210afcaa55f260da5011374 @docelic docelic committed Aug 6, 2004
Showing with 139 additions and 35 deletions.
  1. +43 −22 Makefile
  2. +14 −1 TODO
  3. +19 −11 bin/refs-autogen
  4. +39 −0 docbook/olinkdb-c.xml
  5. +23 −0 docbook/olinkdb-nc.xml
  6. +1 −1 refs/MV_MAILFROM/notes
View
65 Makefile
@@ -23,14 +23,14 @@ VPATH = guides refs
.PHONY: all guides refs %.man
-all: guides refs
+all: tmp/refs-autogen tmp/olinkdbs guides refs
echo 'all' done
guides: $(OUTPUT)/images $(OUTPUT)/files \
$(patsubst guides/%.xml,OUTPUT/%.html,$(wildcard guides/*.xml)) \
$(patsubst guides/%.xml,OUTPUT/%,$(wildcard guides/*.xml))
-refs: tmp/refs-autogen $(OUTPUT)/images $(OUTPUT)/files
+refs: $(OUTPUT)/images $(OUTPUT)/files
make $(OUTPUT)/pragmas.html $(OUTPUT)/pragmas $(OUTPUT)/pragmas.man
make $(OUTPUT)/globvars.html $(OUTPUT)/globvars $(OUTPUT)/globvars.man
@@ -43,7 +43,7 @@ refs: tmp/refs-autogen $(OUTPUT)/images $(OUTPUT)/files
$(OUTPUT)/%.html: %.xml $(OUTPUT)/xmldocs.css
$(XSLT) $(XSLT_FLAGS) \
--stringparam current.docid $* \
- --stringparam target.database.document ../docbook/olinkdb.xml \
+ --stringparam target.database.document ../docbook/olinkdb-nc.xml \
-o $@ docbook/html-nochunks.xsl $<
# Man pages
@@ -58,21 +58,57 @@ $(OUTPUT)/%.man: %.xml
$(OUTPUT)/%: %.xml $(OUTPUT)/xmldocs.css
$(XSLT) $(XSLT_FLAGS) \
--stringparam current.docid $* \
- --stringparam target.database.document ../docbook/olinkdb.xml \
+ --stringparam target.database.document ../docbook/olinkdb-c.xml \
-o $@/ docbook/html-chunks.xsl $<
touch $@
+
+#
+# OlinkDBs
+#
+# OlinkDB information for unchunked parts
+#tmp/olinkdbs: $(LTMPDIR) \
+# $(patsubst guides/%.xml,$(LTMPDIR)/%-c.db,$(wildcard guides/*.xml)) \
+# $(patsubst guides/%.xml,$(LTMPDIR)/%-nc.db,$(wildcard guides/*.xml)) \
+# $(patsubst refs/%.xml,$(LTMPDIR)/%-c.db,$(wildcard refs/*.xml)) \
+# $(patsubst refs/%.xml,$(LTMPDIR)/%-nc.db,$(wildcard refs/*.xml))
+# touch tmp/olinkdbs
+tmp/olinkdbs: $(LTMPDIR)
+ make $(patsubst guides/%.xml,$(LTMPDIR)/%-c.db,$(wildcard guides/*.xml))
+ make $(patsubst guides/%.xml,$(LTMPDIR)/%-nc.db,$(wildcard guides/*.xml))
+ make $(patsubst refs/%.xml,$(LTMPDIR)/%-c.db,$(wildcard refs/*.xml))
+ make $(patsubst refs/%.xml,$(LTMPDIR)/%-nc.db,$(wildcard refs/*.xml))
+ touch tmp/olinkdbs
+
+$(LTMPDIR)/%-nc.db: %.xml $(LTMPDIR)
+ $(XSLT) $(XSLT_FLAGS) \
+ --stringparam collect.xref.targets only \
+ --stringparam targets.filename $@ \
+ docbook/html-nochunks.xsl $<
+ tail +2 $@ > $(LTMPDIR)/tail
+ mv $(LTMPDIR)/tail $@
+
+# OlinkDB information for chunked parts
+$(LTMPDIR)/%-c.db: %.xml $(TMPDIR)
+ $(XSLT) $(XSLT_FLAGS) \
+ --stringparam collect.xref.targets only \
+ --stringparam targets.filename $@ \
+ docbook/html-chunks.xsl $<
+ tail +2 $@ > $(LTMPDIR)/tail
+ mv $(LTMPDIR)/tail $@
+
+
#
# Support targets
#
-tmp/mkreport: $(LTMPDIR)
+mkreport: tmp/mkreport $(LTMPDIR)
./bin/mkreport $(IC_VERSIONS)
- touch $@
+ touch tmp/mkreport
tmp/refs-autogen: $(LTMPDIR) bin/refs-autogen
./bin/refs-autogen $(IC_VERSIONS)
- touch $@
+ touch tmp/refs-autogen
$(OUTPUT): $(LTMPDIR)
mkdir -p $(OUTPUT)
@@ -131,21 +167,6 @@ distclean: clean
# OLD
#
-# OlinkDBs
-#
-# OlinkDB information for unchunked parts
-#$(LTMPDIR)/%-nc.db: %.xml $(LTMPDIR)
-# $(XSLT) $(XSLT_FLAGS) \
-# --stringparam collect.xref.targets only \
-# --stringparam targets.filename $@ \
-# docbook/html-nochunks.xsl $<
-#
-## OlinkDB information for chunked parts
-#$(TMPDIR)/%-c.db: %.xml $(TMPDIR)
-# $(XSLT) $(XSLT_FLAGS) \
-# --stringparam collect.xref.targets only \
-# --stringparam targets.filename $@ \
-# docbook/html-chunks.xsl $<
#
#
## TODO Make target that conveniently checks out all IC releases from CVS
View
15 TODO
@@ -1,10 +1,23 @@
DOCUMENTATION SYSTEM:
+ Mid-term:
+- Think about adding "online example" (role=html in combination with
+ a flag that says if html is to be static or for hosting on IC-enabled site)
+- for "online" docs, also provide a form where users can add comments or
+ ask for clarification. (this could be done with either pure IC (forum?), or
+ XML forms capability)..
+- filenames in Source contexts should also be clickable
+
Long-term:
- Support using refs/<filename> with all the documentation for a symbol
instead of refs/<directory>/<files>.
DOCUMENTATION ITSELF:
- Resolve items from tmp/missing file. (You need to run 'make' in your tree
- first, to get that file generated).
+ first, to get that file generated). I did what I could, now the list only
+ contains items which don't even exist in the old docs, so I can't copy/paste;
+ someone who is able to write the description/examples from scratch should
+ do that.
+
+
View
30 bin/refs-autogen
@@ -196,20 +196,28 @@ while ( my($k,$v) = each %autogenerated ) {
# Turn 'See Also' items to refentries
my @see_items = @{ $ag{'_see also'} };
- map {
- # XXX only if it's the symbol from same category, otherwise use
- # olink to link between documents
- if ( $autogenerated{$_} ) {
+ # XXX only if it's the symbol from same category, otherwise use
+ # olink to link between documents
+ for my $itm ( @see_items ) {
+ if ( $autogenerated{$itm} ) {
my $linktype = "link"; # the default, linking inside the same document
- if ( $autogenerated{$_}{'_symbol type'} eq $ag{'_symbol type'} ) {
- # Nothink
+ my $linkarg = "linkend";
+ if ( $autogenerated{$itm}{'_symbol type'} eq $ag{'_symbol type'} ) {
+ # Nothing, just use link linkend= if the targets are inside the same
+ # document.
} else {
- die "$_ and $ag{name} are not of the same type. Interlinking
- between documents not supported yet.\n";
+ # If they're not, find appropriate external document to link to
+ for my $sect ( keys %symbol_lists ) {
+ if ( grep {/^$itm$/} @{ $symbol_lists{$sect} } ) {
+ $linktype = "olink";
+ $linkarg = "targetdoc='${sect}s' targetptr";
+ }
+ }
}
- s/^(.+)$/<$linktype linkend='$1' role='html'><citerefentry><refentrytitle>$1<\/refentrytitle><manvolnum>7ic<\/manvolnum><\/citerefentry><\/$linktype>/
+ # Now that $linktype and $linkarg are set, make the link/citerefentry
+ $itm =~ s/^(.+)$/<$linktype $linkarg='$1'><citerefentry><refentrytitle>$1<\/refentrytitle><manvolnum>7ic<\/manvolnum><\/citerefentry><\/$linktype>/;
}
- } @see_items;
+ }
$ag{'see also'} = join ", ", @see_items;
# Finally, set default values if they weren't overriden by real information
@@ -246,7 +254,7 @@ while (my ($k,$v) = each %symbol_lists ) {
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook-Interchange XML V4.2//EN"
"../docbook/docbookxi.dtd">
-<reference id="$k">
+<reference id="${k}s">
<title>Interchange Reference Pages: $longname{$k}s</title>
ENDD
View
39 docbook/olinkdb-c.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!DOCTYPE targetset
+ SYSTEM "/usr/share/xml/docbook/stylesheet/nwalsh/common/targetdatabase.dtd" [
+ <!ENTITY iccattut SYSTEM "../tmp/iccattut-c.db">
+ <!ENTITY pragmas SYSTEM "../tmp/pragmas-c.db">
+ <!ENTITY globvars SYSTEM "../tmp/globvars-c.db">
+]>
+
+<targetset>
+ <targetsetinfo>
+ Interchange XML Documentation System Sitemap
+ </targetsetinfo>
+
+ <sitemap>
+ <dir name="OUTPUT">
+
+ <dir name='iccattut'>
+ <document targetdoc="iccattut">
+ &iccattut;
+ </document>
+ </dir>
+
+ <dir name='pragmas'>
+ <document targetdoc="pragmas">
+ &pragmas;
+ </document>
+ </dir>
+
+ <dir name='globvars'>
+ <document targetdoc="globvars">
+ &globvars;
+ </document>
+ </dir>
+
+ </dir>
+ </sitemap>
+
+</targetset>
+
View
23 docbook/olinkdb-nc.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE targetset
+ SYSTEM "/usr/share/xml/docbook/stylesheet/nwalsh/common/targetdatabase.dtd" [
+ <!ENTITY iccattut SYSTEM "../tmp/iccattut-nc.db">
+ <!ENTITY pragmas SYSTEM "../tmp/pragmas-nc.db">
+ <!ENTITY globvars SYSTEM "../tmp/globvars-nc.db">
+]>
+
+<targetset>
+ <targetsetinfo>
+ Interchange XML Documentation System Sitemap
+ </targetsetinfo>
+
+ <sitemap>
+ <dir name="OUTPUT">
+ <document targetdoc="iccattut" baseuri="iccattut.html"> &iccattut; </document>
+ <document targetdoc="pragmas" baseuri="pragmas.html"> &pragmas; </document>
+ <document targetdoc="globvars" baseuri="globvars.html"> &globvars; </document>
+ </dir>
+ </sitemap>
+
+</targetset>
+
View
2 refs/MV_MAILFROM/notes
@@ -1 +1 @@
-If present, this variable overrides the MailOrdersTo config directive.
+If this variable is not defined, the MailOrdersTo config value is used in place.

0 comments on commit dc2ec38

Please sign in to comment.
Something went wrong with that request. Please try again.