[docs] xmldocs - docelic modified 3 files

docs at icdevgroup.org docs at icdevgroup.org
Sun Sep 26 16:01:53 EDT 2004


User:      docelic
Date:      2004-09-26 20:01:52 GMT
Modified:  .        Makefile TODO
Modified:  docbook  catalog.xml
Log:
- Makefile:

  This is the new Makefile. It:
  - Handles dependencies 100% correct
  - Allows more fine-grained build targets
  - Is easier to use (more reasonable target names)
  - Doesn't build the whole thing yet ;-)

- TODO: items

- docbook/catalog.xml:
  - I did some sniffing around, this file will need rework soon

Revision  Changes    Path
1.20      +187 -167  xmldocs/Makefile


rev 1.20, prev_rev 1.19
Index: Makefile
===================================================================
RCS file: /var/cvs/xmldocs/Makefile,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Makefile	22 Sep 2004 21:13:00 -0000	1.19
+++ Makefile	26 Sep 2004 20:01:52 -0000	1.20
@@ -1,185 +1,205 @@
 #
-# ICDEVGROUP Documentation makefile
+# ICDEVGROUP Documentation Makefile
 # http://www.icdevgroup.org
 # http://www.icdevgroup.org/cgi-bin/cvsweb/xmldocs
+# 
+# Davor Ocelic, docelic at icdevgroup.org
 #
 
+
+#############################################################
 # Base definitions
-SHELL = /bin/sh
-export OUTPUT = OUTPUT
-export LTMPDIR = tmp
-export XML_CATALOG_FILES = docbook/catalog.xml
-DEFAULT_CATALOG = "/etc/xml/catalog"
-XSLT = xsltproc
-XSLT_FLAGS = --xinclude --nonet
-XMLTO = xmlto
-XMLTO_FLAGS = --skip-validation
 IC_VERSIONS = 4.6.0 4.8.0 5.0.0 5.2.0 cvs-head
+SYMBOL_TYPES= pragmas globvars usertags uitags systemtags
+SHELL       = /bin/sh
+export O    = OUTPUT
+export T    = tmp
+export XCF  = docbook/catalog.xml
+DC          = "/etc/xml/catalog"
+
+# XSLT processor-specific
+PSR         = xsltproc
+PSR_FLAGS   = --xinclude --nonet
 
-VPATH = guides refs howtos
+#VPATH       = guides refs howtos glossary
 .SILENT:
-
-############## No need to modify below ##############
-
-.PHONY: all guides refs howtos %.man cache refxmls
-
-all: $(LTMPDIR)/refs-autogen $(LTMPDIR)/olinkdbs guides refs howtos
-	echo all done
-
-guides: $(OUTPUT)/images $(OUTPUT)/files \
-  $(patsubst guides/%.xml,OUTPUT/%.html,$(wildcard guides/*.xml))  \
-  $(patsubst guides/%.xml,OUTPUT/%,$(wildcard guides/*.xml))
-
-refs: $(OUTPUT)/images $(OUTPUT)/files
-	make $(OUTPUT)/pragmas.html $(OUTPUT)/pragmas $(OUTPUT)/pragmas.man
-	make $(OUTPUT)/globvars.html $(OUTPUT)/globvars $(OUTPUT)/globvars.man
-	make $(OUTPUT)/usertags.html $(OUTPUT)/usertags $(OUTPUT)/usertags.man
-	make $(OUTPUT)/systemtags.html $(OUTPUT)/systemtags $(OUTPUT)/systemtags.man
-	make $(OUTPUT)/uitags.html $(OUTPUT)/uitags $(OUTPUT)/uitags.man
-
-howtos: howtos/howtos.xml howtos/*.xml
-	make $(OUTPUT)/howtos.html
-	make $(OUTPUT)/howtos
-
-guides/glossary.xml:
-	bin/glossary-autogen
-
-#
-# All documents
-#
-
-# Unchunked documents
-$(OUTPUT)/%.html: %.xml $(OUTPUT)/xmldocs.css
-	$(XSLT) $(XSLT_FLAGS)                                          \
-	--stringparam current.docid $*                                 \
-	--stringparam target.database.document ../docbook/olinkdb-nc.xml  \
-	-o $@ docbook/html-nochunks.xsl $<
-
-# Man pages
-$(OUTPUT)/%.man: %.xml
-	mkdir -p $(OUTPUT)/man
-	$(XMLTO) $(XMLTO_FLAGS)                                        \
-	-x docbook/reference.xsl                                       \
-	-o $(OUTPUT)/man/                                              \
-	man $<
-
-# Chunked documents
-$(OUTPUT)/%: %.xml $(OUTPUT)/xmldocs.css
-	$(XSLT) $(XSLT_FLAGS)                                          \
-	--stringparam current.docid $*                                 \
-	--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
-$(LTMPDIR)/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 $(LTMPDIR)/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
-#
-
-mkreport: $(LTMPDIR)/mkreport $(LTMPDIR)
-	./bin/mkreport $(IC_VERSIONS)
-	touch $(LTMPDIR)/mkreport
-
-refxmls: $(LTMPDIR)/refs-autogen
-$(LTMPDIR)/refs-autogen: $(LTMPDIR) bin/refs-autogen
-	./bin/refs-autogen $(IC_VERSIONS)
-	touch $(LTMPDIR)/refs-autogen
-
-$(OUTPUT): $(LTMPDIR)
-	mkdir -p $(OUTPUT)
-
-$(OUTPUT)/xmldocs.css: docbook/xmldocs.css $(OUTPUT)
-	cp docbook/xmldocs.css $(OUTPUT)/xmldocs.css
-
-$(OUTPUT)/images: $(wildcard images/*.jpg images/*.png images/*.gif)
-	mkdir -p $(OUTPUT)/images/
-	cp $(wildcard images/*.jpg images/*.png images/*.gif) $(OUTPUT)/images/
-
-$(OUTPUT)/files: files/*
-	rm -rf $(OUTPUT)/files
-	mkdir -p $(OUTPUT)/files/
-	cp bin/dbgen $(OUTPUT)/files/
-	cd files; for p in *; do                                      \
-		if test "$$p" != "CVS"; then                              \
+.PHONY: all skel
+.PHONY: refs
+.PHONY: cache clean-cache up-all up-%
+.PHONY: clean distclean
+
+
+#############################################################
+# Complete build
+all: skel refs howtos/howtos.xml glossary/glossary.xml
+
+#############################################################
+# Skel
+skel: $T $O $O/files $O/images
+$T:
+	echo "U     $T/"
+	mkdir -p $T
+$O:
+	echo "U     $O/"
+	mkdir -p $O
+$O/files: $O $(shell find files)
+	echo "U     $@/"
+	rm -rf $@/
+	cp -a files $O/
+	rm -rf `find $@ -name CVS`
+	cp bin/dbgen $O/files/
+	cd files; for p in *; do                                  \
+		if test "$$p" != "CVS"; then                            \
 			if test -d "$$p"; then                                \
-				cp -a $$p ../$(OUTPUT)/files/;                    \
-				tar --exclude=CVS -cf ../$(OUTPUT)/files/$$p.tar $$p;            \
-				tar --exclude=CVS -zcf ../$(OUTPUT)/files/$$p.tar.gz $$p;           \
-				tar --exclude=CVS -jcf ../$(OUTPUT)/files/$$p.tar.bz2 $$p           \
+				cp -a $$p ../$O/files/;                             \
+				tar --exclude=CVS -cf ../$O/files/$$p.tar $$p;      \
+				tar --exclude=CVS -zcf ../$O/files/$$p.tar.gz $$p;  \
+				tar --exclude=CVS -jcf ../$O/files/$$p.tar.bz2 $$p  \
 			; fi                                                  \
-		; fi                                                      \
+		; fi                                                    \
 	; done
-	rm -rf `find $(OUTPUT)/files/ -name CVS`
+$O/images: $(shell find images)
+	echo "U     $@/"
+	rm -rf $@/
+	cp -a images $O/
+	rm -rf `find $@ -name CVS`
+$O/xmldocs.css: docbook/xmldocs.css $O
+	echo "U     $@/"
+	cp $< $@
 
-$(LTMPDIR):
-	mkdir -p $(LTMPDIR)
-
-
-# STATTREE
-cache: $(LTMPDIR)/stattrees
-$(LTMPDIR)/stattrees: $(LTMPDIR)
-	-for p in $(IC_VERSIONS); do \
-	./bin/stattree sources/$$p; \
-	ctags -R -x --languages=perl --perl-kinds=cls sources/$$p/ \
-	> cache/$$p/.objectlist.perl.txt; \
-	ctags -R -x --languages=c --c-kinds=cdf sources/$$p/ \
-	> cache/$$p/.objectlist.c.txt; \
-	ctags -f cache/$$p/.tags -R --extra=fq --fields=afikKlmnsSz --line-directives sources/$$p \
-	; done
-	touch $(LTMPDIR)/stattrees
-
-
-#
-# Cleanup
-#
 
+#############################################################
+# Cleaning
 clean:
-	-rm -rf $(OUTPUT)
-
+	-rm -rf $O
 distclean: clean
-	-rm -rf $(LTMPDIR)
-	-rm -rf refs/*.xml
-	-for p in $(IC_VERSIONS); do rm cache/$$p/* 2>/dev/null; done
+	-rm -rf $T
+	-rm -rf {refs,glossary}/*.xml
 
 
-# OLD
-#
-#
-#
-## TODO Make target that conveniently checks out all IC releases from CVS
-#
+#############################################################
+# sources/ directory management
+sources:
+	echo "U     $@/"
+	mkdir -p $@
+sources/%: sources $T
+	bin/coup $(subst sources/,,$@)
+up-all cvs-sources srcs: $(foreach icver,$(IC_VERSIONS),sources/$(icver)/) $T
+	for p in $(IC_VERSIONS); do      \
+		bin/coup -u $$p                \
+	; done
+up-% cvs-%: sources/%
+	bin/coup -u $(subst sources/,,$<)
+
+#############################################################
+# Cache files
+cache caches: 
+cache/%/.cache.bin: sources/%
+	echo "U     $@"
+	bin/stattree $<
+clean-cache:
+	-rm -rf cache/*/.cache.bin
+
+
+#############################################################
+# Reference .xmls
+refs: BOTH = --both
+refs: bin/refs-autogen $(foreach stype,$(SYMBOL_TYPES),refs/$(stype).xml)
+	:
+$T/%.list: BNAME = $(subst $T/,,$@)
+refs/%.xml: BNAME = $(subst refs/,,$@)
+$T/%.list: FNAME = $(subst .list,,$(BNAME))
+refs/%.xml: FNAME = $(subst .xml,,$(BNAME))
+$T/%.list refs/%.xml: bin/refs-autogen $(foreach icver,$(IC_VERSIONS),cache/$(icver)/.cache.bin)
+	bin/refs-autogen -g $(FNAME) -o $@ $(BOTH) $(IC_VERSIONS)
+
+
+#############################################################
+# One-shot targets # XXX possible to 'compress' into single rule?
+glossary/glossary.xml: $(shell find glossary/ -regex '.+[^(\.xml)]$$')
+	bin/generic-autogen glossary
+howtos/howtos.xml: $(shell find howtos/ -regex '.+[^(\.xml)]$$')
+	bin/generic-autogen howtos
+
+
+
+
+# Not needed right now
+# ctags -R -x --languages=perl --perl-kinds=cls sources/$$p/ \
+# > cache/$$p/.objectlist.perl.txt; \
+# ctags -R -x --languages=c --c-kinds=cdf sources/$$p/ \
+# > cache/$$p/.objectlist.c.txt; \
+# ctags -f cache/$$p/.tags -R --extra=fq --fields=afikKlmnsSz --line-directives sources/$$p \
+#
+#mkreport: $(LTMPDIR)/mkreport $(LTMPDIR)
+#./bin/mkreport $(IC_VERSIONS)
+#  touch $(LTMPDIR)/mkreport
+#
+#guides: $(OUTPUT)/images $(OUTPUT)/files \
+#  $(patsubst guides/%.xml,OUTPUT/%.html,$(wildcard guides/*.xml))  \
+#  $(patsubst guides/%.xml,OUTPUT/%,$(wildcard guides/*.xml))
+#
+#refs: $(OUTPUT)/images $(OUTPUT)/files
+#	make $(OUTPUT)/pragmas.html $(OUTPUT)/pragmas $(OUTPUT)/pragmas.man
+#	make $(OUTPUT)/globvars.html $(OUTPUT)/globvars $(OUTPUT)/globvars.man
+#	make $(OUTPUT)/usertags.html $(OUTPUT)/usertags $(OUTPUT)/usertags.man
+#	make $(OUTPUT)/systemtags.html $(OUTPUT)/systemtags $(OUTPUT)/systemtags.man
+#	make $(OUTPUT)/uitags.html $(OUTPUT)/uitags $(OUTPUT)/uitags.man
+#
+## Unchunked documents
+#$(OUTPUT)/%.html: %.xml $(OUTPUT)/xmldocs.css
+#	$(XSLT) $(XSLT_FLAGS)                                          \
+#	--stringparam current.docid $*                                 \
+#	--stringparam target.database.document ../docbook/olinkdb-nc.xml  \
+#	-o $@ docbook/html-nochunks.xsl $<
+#
+## Man pages
+#$(OUTPUT)/%.man: %.xml
+#	mkdir -p $(OUTPUT)/man
+#	$(XMLTO) $(XMLTO_FLAGS)                                        \
+#	-x docbook/reference.xsl                                       \
+#	-o $(OUTPUT)/man/                                              \
+#	man $<
+#
+## Chunked documents
+#$(OUTPUT)/%: %.xml $(OUTPUT)/xmldocs.css
+#	$(XSLT) $(XSLT_FLAGS)                                          \
+#	--stringparam current.docid $*                                 \
+#	--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
+#$(LTMPDIR)/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 $(LTMPDIR)/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 $@



1.26      +9 -4      xmldocs/TODO


rev 1.26, prev_rev 1.25
Index: TODO
===================================================================
RCS file: /var/cvs/xmldocs/TODO,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- TODO	25 Sep 2004 10:12:28 -0000	1.25
+++ TODO	26 Sep 2004 20:01:52 -0000	1.26
@@ -10,8 +10,9 @@
 - Source contexts get some weird values reported in header information
 - Contexts: in situation like "symbol \n symbol" where the symbol appears
   multiple times within +- of first occurence, we treat it like one context.
-	but the header says 'displaying 2/2 contexts', it doesn't remove
-	'duplicates'. fix that.
+  but the header says 'displaying 2/2 contexts', it doesn't remove
+  'duplicates'. fix that.
+- why crypt tag recognized as user when it's in UI_Tag
 
 - In iccattut:
   - under important file and directories, mention default username,
@@ -68,6 +69,9 @@
 - Visually mark obsolete items (those not present in cvs-head)
 - Visually mark undocumented items
 - leaf nodes
+- Make script which would be like: vim `our.script usertags synopsis`.
+  our.script would find all usertags and where their synopsis is defined,
+  somewhere in refs/.
 
  Long-term:
 - filenames in Source contexts should also be clickable. this is longterm
@@ -124,6 +128,7 @@
  - new developer howto
 
 ----------
-itl, scratch, catalog/global variable, html, interchange, pragma, tag,ui,
-scratchpad, action, form,  unix inet socket, low, high, rpc, prefork,
+itl, catalog/global variable, html, interchange, tag,ui,
+action, form,  unix inet socket, low, high, rpc, prefork, values,
 
+style: leave newline at end of file



1.5       +24 -8     xmldocs/docbook/catalog.xml


rev 1.5, prev_rev 1.4
Index: catalog.xml
===================================================================
RCS file: /var/cvs/xmldocs/docbook/catalog.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- catalog.xml	6 Aug 2004 11:26:47 -0000	1.4
+++ catalog.xml	26 Sep 2004 20:01:52 -0000	1.5
@@ -9,14 +9,30 @@
 	<public publicId="-//OASIS//DTD DocBook-Interchange XML V4.2//EN"
 	        uri="../docbook/docbookxi.dtd"/>
 	
-	<system systemId="iccattut-nc"
-		uri="../tmp/iccattut-nc.db" />
+	<system systemId="iccattut-nc" uri="../tmp/iccattut-nc.db" />
+	<system systemId="iccattut-c" uri="../tmp/iccattut-c.db" />
+	
+	<system systemId="globvars-nc" uri="../tmp/globvars-nc.db" />
+	<system systemId="globvars-c" uri="../tmp/globvars-c.db" />
+	
+	<system systemId="glossary-nc" uri="../tmp/glossary-nc.db" />
+	<system systemId="glossary-c" uri="../tmp/glossary-c.db" />
+	
+	<system systemId="pragmas-nc" uri="../tmp/pragmas-nc.db" />
+	<system systemId="pragmas-c" uri="../tmp/pragmas-c.db" />
+	
+	<system systemId="systemtags-nc" uri="../tmp/systemtags-nc.db" />
+	<system systemId="systemtags" uri="../tmp/systemtags.db" />
+	
+	<system systemId="uitags-nc" uri="../tmp/uitags-nc.db" />
+	<system systemId="uitags-c" uri="../tmp/uitags-c.db" />
+	
+	<system systemId="usertags-nc" uri="../tmp/usertags-nc.db" />
+	<system systemId="usertags-c" uri="../tmp/usertags-c.db" />
+	
+	<system systemId="xmldocs-nc" uri="../tmp/xmldocs-nc.db" />
+	<system systemId="xmldocs-c" uri="../tmp/xmldocs-c.db" />
 
-	<system systemId="iccattut-c"
-		uri="../tmp/iccattut-c.db" />
-
-	<system systemId="xmldocs.css"
-		uri="xmldocs.css" />
+	<system systemId="xmldocs.css" uri="xmldocs.css" />
 
 </catalog>
-








More information about the docs mailing list