Permalink
Browse files

- Make Makefile targets that depend on IC_VERSIONS non-fatal (elimina…

…te the

  requirement to have all versions actually present in sources/).
- Added README notes, improved the list of build dependencies
- Fixed a warning from mkreport (by enclosing in { no warnings; }
- bin/pp fix: Leave unrecognized entities as-is (don't mock them up)

- Support for <tag></tag> element. Renders tag as [tag]
  • Loading branch information...
docelic committed Jul 12, 2004
1 parent 5076176 commit 0130e5c8deecd8d1f871f8eab7ca2bef87f8e7d6
Showing with 83 additions and 43 deletions.
  1. +4 −4 Makefile
  2. +12 −4 README
  3. +2 −0 bin/mkreport
  4. +1 −1 bin/pp
  5. +4 −0 docbook/common.xsl
  6. +28 −2 docbook/docbookxi.dtd
  7. +32 −32 guides/iccattut.xml
View
@@ -96,7 +96,7 @@ cache: tree-stats objlists tags
objlists:
# Generate human-readable ctags information
- for p in $(IC_VERSIONS); do \
+ -for p in $(IC_VERSIONS); do \
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/ \
@@ -106,15 +106,15 @@ objlists:
tags:
# Generate ctags information
- for p in $(IC_VERSIONS); do \
+ -for p in $(IC_VERSIONS); do \
ctags -f $(CACHE)/$$p/.tags -R --extra=fq --fields=afikKlmnsSz --line-directives sources/$$p; \
cd sources \
; done
tree-stats:
# Generate stats to bin dump
# Only do that when sources/ is populated
- for p in $(IC_VERSIONS); do \
+ -for p in $(IC_VERSIONS); do \
mkdir -p $(CACHE)/$$p; \
./bin/stattree sources/$$p \
; done
@@ -128,7 +128,7 @@ tree-reports:
tree-cache:
# Copy tree stats to $(OUTPUT)
- for p in $(IC_VERSIONS); do \
+ -for p in $(IC_VERSIONS); do \
cp -a $(CACHE)/$$p $(OUTPUT) \
; done
View
16 README
@@ -18,11 +18,13 @@ To build specific targets, see Makefile for target names.
PREREQUISITES
-To perform a successful build, this programs and modules must be available:
+To perform a successful build, the following programs and modules
+must be available:
- Perl
- Shell commands: mkdir, cp, tar, gzip, bzip2
- - DocBook XML
+ - docbook-xml
+ - docbook-xsl
- xsltproc
@@ -71,14 +73,20 @@ DEVELOPMENT NOTES
(Or the "sources" file can be a symlink to the right location where
you keep such directory structure).
- Once that's in place, run "make cache". This will regenerate files for
+ Once that's in place, add the appropriate version under IC_VERSIONS
+ in the Makefile and run "make cache". This will regenerate files for
the versions you have.
As this is only rarely done (only when the release changes due to an
important backport or something - and even then it probably doesn't
- change any figures because the updates are small), the generated files
+ change any figures because the updates are small), the generated dotfiles
*are* kept in the CVS because they can be considered static.
+ When bin/mkreport runs later, it parses the .cache.bin file and produces
+ number of output files (interesting "leaf nodes" in a hash). Those
+ files are filesystem interface to tree-level statistics, and can be
+ used in numerous ways, XInclude for example.
+
The XML "preprocessor" tool:
There's bin/pp tool which you can use to write XML more conveniently.
View
@@ -12,9 +12,11 @@ use Getopt::Long;
use Storable qw/nstore_fd fd_retrieve/;
use Fcntl qw/:DEFAULT :flock/;
+{ no warnings;
$Data::Dumper::Indent = 1;
$Data::Dumper::Terse++;
$Data::Dumper::Sortkeys++;
+}
my $dumpdb = 0;
my $verbose = 0;
View
2 bin/pp
@@ -143,7 +143,7 @@ while (<STDIN>) {
#
# 4: Simple entities replacement
- while ( $line =~ s/&(\S+?);/$entities{$1} || $1/ge ) {}
+ while ( $line =~ s/&(\S+?);/$entities{$1} || "&$1;"/ge ) {}
# Finished
View
@@ -21,5 +21,9 @@
<xsl:param name="use.extensions">1</xsl:param>
<xsl:param name="textinsert.extension">1</xsl:param>
+ <xsl:template match="tag">
+ [<xsl:call-template name="inline.monoseq"/>]
+ </xsl:template>
+
</xsl:stylesheet>
View
@@ -4,6 +4,7 @@
<!ENTITY % msgset.content.module "IGNORE">
+<!-- XInclude element -->
<!ELEMENT xi:include (xi:fallback?)>
<!ATTLIST xi:include
xmlns:xi CDATA #FIXED "http://www.w3.org/2003/XInclude"
@@ -20,12 +21,37 @@
<!ATTLIST xi:fallback
xmlns:xi CDATA #FIXED "http://www.w3.org/2003/XInclude"
>
-
-<!ENTITY % local.para.char.mix "|xi:include">
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED">
+
+<!ENTITY % local.para.char.mix "|xi:include">
+<!ENTITY % local.tech.char.class "|tag">
+
<!-- Load DocBook -->
<!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd"> %DocBookDTD;
+
+<!-- tag element -->
+<!ENTITY % tag.module "INCLUDE">
+<![%tag.module;[
+<!ENTITY % local.tag.attrib "">
+<!ENTITY % tag.role.attrib "%role.attrib;">
+
+<!ENTITY % tag.element "INCLUDE">
+<![%tag.element;[
+<!ELEMENT tag %ho; (%para.char.mix;|%para.mix;)*>
+<!--end of tag.element-->]]>
+
+<!ENTITY % tag.attlist "INCLUDE">
+<![%tag.attlist;[
+<!ATTLIST tag
+ %moreinfo.attrib;
+ %common.attrib;
+ %tag.role.attrib;
+ %local.tag.attrib;
+>
+<!--end of tagname.attlist-->]]>
+<!--end of tagname.module-->]]>
+
Oops, something went wrong.

0 comments on commit 0130e5c

Please sign in to comment.