[docs] xmldocs - docelic modified 7 files

docs at icdevgroup.org docs at icdevgroup.org
Sat Oct 9 09:11:26 EDT 2004


User:      docelic
Date:      2004-10-09 13:11:26 GMT
Modified:  .        Makefile
Modified:  bin      refs-autogen
Removed:   cache/4.6.0 .cache.bin
Removed:   cache/4.8.0 .cache.bin
Removed:   cache/5.0.0 .cache.bin
Removed:   cache/5.2.0 .cache.bin
Removed:   cache/cvs-head .cache.bin
Log:
- Makefile:
 - Explicitly name documents to be generated
 - General style fix
 - Better dependencies handling
 - "all" target now works: you can build docs with it if sources/ is present
   and you ignore warnings you get in the output
 - Added 'look-clean' target which just renames tmp/, so you can perform
   CVS operations like diff/commit without errors. Then, it is renamed back
   to "tmp/". This happens automatically, and the purpose of this is to speed
   things up, to preserve tmp/*-n?c.db files which take a long time to rebuild.

- bin/refs-autogen:
 - Solved 2 problematic sections by turning warnings off, or skipping them.
   This isn't nice, but I don't have the patience needed right now.

- REMOVED CACHE FILES, since they weren't useful after checkout anyway.
  So, having sources/ directory as described in the README is now not optional
  but mandatory. (Will properly update README later).
	To generate sources/ and everything, run 'make cvs'. Then 'make' as usual.

Revision  Changes    Path
1.28      +37 -30    xmldocs/Makefile


rev 1.28, prev_rev 1.27
Index: Makefile
===================================================================
RCS file: /var/cvs/xmldocs/Makefile,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- Makefile	3 Oct 2004 19:05:05 -0000	1.27
+++ Makefile	9 Oct 2004 13:11:25 -0000	1.28
@@ -10,7 +10,11 @@
 #############################################################
 # Base definitions
 IC_VERSIONS = 4.6.0 4.8.0 5.0.0 5.2.0 cvs-head
-SYMBOL_TYPES= pragmas globvars usertags uitags systemtags
+SYMBOL_TYPES= pragmas globvars usertags uitags systemtags globconfs catconfs
+GUIDES      = iccattut xmldocs
+HOWTOS      = howtos
+GLOSSARY    = glossary
+ALL_DOCS    = $(GUIDES) $(HOWTOS) $(GLOSSARY) $(SYMBOL_TYPES)
 SHELL       = /bin/sh
 export O    = OUTPUT
 export T    = tmp
@@ -23,25 +27,33 @@
 
 VPATH       = guides refs howtos glossary
 .SILENT:
-.PHONY: all complete skel clean distclean
-.PHONY: guides refs howtos
-.PHONY: refxmls
-.PHONY: cache caches clean-cache up-all all-up %-up up-%
+.PHONY: all complete
+.PHONY: skel
 .PHONY: olinkdbs-nc olinks-nc olinkdbs-c olinks-c
+.PHONY: clean clean-cache clean-refs distclean look-clean
+.PHONY: up-all cvs-sources srcs cvsrcs cvs cvss all-up cvsup
+.PHONY: up-% cvs-% %-up %-cvs
+.PHONY: cache caches
+.PHONY: refxmls
 
 
 #############################################################
 # Complete build
-all: skel refxmls howtos/howtos.xml glossary/glossary.xml
-complete: skel srcs caches all
-
+all: $(foreach icver,$(IC_VERSIONS),cache/$(icver)/.cache.bin) \
+  skel                                                         \
+  refxmls                                                      \
+  olinks-nc olinks-c                                           \
+  $(foreach doc,$(ALL_DOCS),$O/$(doc).html)                    \
+  $(foreach doc,$(ALL_DOCS),$O/$(doc))
 
 #############################################################
 # Skel
 skel: $T $O $O/files $O/images $O/xmldocs.css
 $T:
-	echo "U     $T/"
-	mkdir -p $T
+	if test -e $T.temporary; then                                \
+		echo "U     $T/"; mv $T.temporary $T;                      \
+	else                                                         \
+		echo "C     $T/";  mkdir -p $T; fi
 $O:
 	echo "U     $O/"
 	mkdir -p $O
@@ -51,15 +63,15 @@
 	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 ../$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                                                    \
+	cd files; for p in *; do                                     \
+	  if test "$$p" != "CVS"; then                               \
+	    if test -d "$$p"; then                                   \
+	      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                                                       \
 	; done
 $O/images: $(shell find images)
 	echo "C     $@/"
@@ -73,11 +85,7 @@
 
 #############################################################
 # OLINK DBs (interlinking between documents)
-olinkdbs-nc olinks-nc:                                              \
-	$(patsubst %.xml,$T/%-nc.db,$(shell find $(VPATH) -name '*.xml' | \
-	awk -F/ '{ print $$2 }'))                                         \
-	$(patsubst %.xml,$T/%-nc.db,$(shell find $(VPATH) -name '*.xml' | \
-	awk -F/ '{ print $$2 }'))
+olinkdbs-nc olinks-nc: $(foreach f,$(ALL_DOCS),$T/$f-nc.db)
 $T/%-nc.db: %.xml $T
 	$(PSR) $(PSR_FLAGS)                                               \
 	  --stringparam collect.xref.targets only                         \
@@ -85,11 +93,7 @@
 	  docbook/html-nochunks.xsl $<
 	  tail +2 $@ > $T/tail
 	  mv $T/tail $@
-olinkdbs-c olinks-c:                                              \
-	$(patsubst %.xml,$T/%-c.db,$(shell find $(VPATH) -name '*.xml' | \
-	awk -F/ '{ print $$2 }'))                                         \
-	$(patsubst %.xml,$T/%-c.db,$(shell find $(VPATH) -name '*.xml' | \
-	awk -F/ '{ print $$2 }'))
+olinkdbs-c olinks-c: $(foreach f,$(ALL_DOCS),$T/$f-c.db)
 $T/%-c.db: %.xml $T
 	$(PSR) $(PSR_FLAGS)                                               \
 	  --stringparam collect.xref.targets only                         \
@@ -126,6 +130,9 @@
 distclean: clean clean-cache
 	-rm -rf $T
 	-rm -rf {refs,glossary}/*.xml
+look-clean: clean clean-cache
+	-mv $T $T.temporary 2>/dev/null
+
 
 
 #############################################################
@@ -169,7 +176,7 @@
 
 
 #############################################################
-# One-shot targets # XXX possible to 'compress' into single rule?
+# One-shot targets
 glossary/glossary.xml: $(shell find glossary/ -regex '.+[^(\.xml)]$$')
 	bin/generic-autogen glossary
 howtos/howtos.xml: $(shell find howtos/ -regex '.+[^(\.xml)]$$')



1.42      +3 -0      xmldocs/bin/refs-autogen


rev 1.42, prev_rev 1.41
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- refs-autogen	9 Oct 2004 11:30:28 -0000	1.41
+++ refs-autogen	9 Oct 2004 13:11:25 -0000	1.42
@@ -223,6 +223,7 @@
 			
 				# Support item types with only context info in this field
 				for my $arr ( @{ $covered{$key}{$fi} } ) {
+					next if !$ln or !$$arr[0] or !$$arr[1];
 					goto DONELOOP if $ln > $$arr[0] and $ln < $$arr[1];
 				}
 				# We 'shift' here because we unshifted 1 row to match line
@@ -261,6 +262,7 @@
 					}
 					my $r = $hash{revision}{$plf}->[0];
 					my $d = $hash{revision}{$plf}->[1];
+					{ no warnings; # XXX If someone can figure out which of the used vars here is undefined...
 					$$ag{source} .= <<ENDD;
 <para>
 </para>
@@ -273,6 +275,7 @@
 </example>
 
 ENDD
+					}
 					$$ag{"source ver"} = $hash{version};
 				}
 				push @{ $covered{$key}{$fi} }, [ $$ctx{ctxs}, $$ctx{ctxe} ];








More information about the docs mailing list