From d70edc951ac57a6f60a9e22df977bb4f0018565b Mon Sep 17 00:00:00 2001 From: g0dil <g0dil@wiback.org> Date: Tue, 11 Sep 2007 09:52:07 +0000 Subject: [PATCH] Fix build.sh to terminate correctly on error --- Packets/ParseArray.hh | 2 +- admin/build.sh | 8 ++++++-- doclib/fix-links.py | 28 +++++++++++++++++++++++++++- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Packets/ParseArray.hh b/Packets/ParseArray.hh index 52602010c..c4feca4e3 100644 --- a/Packets/ParseArray.hh +++ b/Packets/ParseArray.hh @@ -42,7 +42,7 @@ sub-field or sub-collection of the collection is changed). Some collections may provide even more lifetime guarantees but this guarantee should be met by all collection wrappers. - \important Parser lifetime has to be tightly checked when working with collection parsers since + \warning Parser lifetime has to be tightly checked when working with collection parsers since \e every change of the collections size will invalidate \e all parsers and iterators referencing the \e complete packet chain. Collection wrappers do \e not invalidate if the change is \e after the collection. diff --git a/admin/build.sh b/admin/build.sh index c7f2d3f77..ac3fdefc8 100755 --- a/admin/build.sh +++ b/admin/build.sh @@ -24,8 +24,12 @@ if grep -qv '^At ' ../svn-update.log; then fi rm -f ../svn-update.log -echo '$ scons -k all && scons fixlinks' -scons -k all && scons linklint && scons fixlinks +echo '$ scons -k all' +scons -k all +echo '$ scons linklint' +scons linklint +echo '$ scons fixlinks' +scons fixlinks echo -n '# Build completed at '; date --utc exec >../upload.log 2>&1 diff --git a/doclib/fix-links.py b/doclib/fix-links.py index 440a33bc7..27ee4d5ea 100644 --- a/doclib/fix-links.py +++ b/doclib/fix-links.py @@ -1,4 +1,30 @@ #!/usr/bin/python +# +# This tool will hack the doxygen generated documentation to fix link +# errors produced by doxygen. +# +# This works because most anchors doxygen generates are unique 32 char +# hash values. To speed up the operation, the tool will not check all +# the files itself but will let 'linklint' do the grunt +# work. fix-links.py reads the 'errorX.txt' and 'errorAX.txt' files +# generated by linklint. These files list links to missing files +# (errorX.html) and links to missing anchors +# (errorAX.html). fix-links.py works in the following way: +# +# - Build a complete index of all unique anchors found in any html +# file. The index will only include *unique* anchors. Anchors found +# multiple times are removed from the index +# +# - The index is extended to include all unique names of html files +# +# - Scn the linklint result and check the bad links against the +# index. If the file or anchor is found in the index, an accoringly +# corrected link is generated otherwise the link is removed. +# +# One additional twak is, that fix-links.py will successively remove +# initial 'g' charachters from anchors until the link is found in the +# index. Doxygen seems to create links with the wrong number of 'g' +# charachters in front sometimes. import sys,os.path,fnmatch, HTMLParser, getopt, re @@ -256,7 +282,7 @@ total, found, fixed, removed = fixer.stats() if verbose: sys.stderr.write("\nRemoved links:\n") for (anchor, label), files in removed.items(): - sys.stdout.write("%-36.36s %-48.48s %s\n" + sys.stderr.write("%-36.36s %-48.48s %s\n" % ( anchor, "(%s)" % label[:46], " ".join(files.keys())) ) -- GitLab