Mercurial > hg > kdocs
changeset 86:ca7e38053195
Updates and bug fixes, should work now. Options to make.sh are --nonet and
--long. (Must occur in that order if you supply both.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 07 Nov 2007 02:54:10 -0600 |
parents | 9ca9c2104cf9 |
children | 490dd648a9bf |
files | make/functions.sh make/make.sh |
diffstat | 2 files changed, 44 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/make/functions.sh Wed Nov 07 01:45:48 2007 -0600 +++ b/make/functions.sh Wed Nov 07 02:54:10 2007 -0600 @@ -14,8 +14,8 @@ function update_documentation_dir() { - rm -rf $WEBDIR/Documentation/ - cp -a $LNXDIR/hg/Documentation $WEBDIR/Documentation + rm -rf "$WEBDIR"/Documentation/ + cp -a "$LNXDIR"/hg/Documentation "$WEBDIR"/Documentation # Make the change directory local to this function ( cd $WEBDIR @@ -81,8 +81,8 @@ function install_htmldocs() { ( - rm -f $WEBDIR/htmldocs - cd "$LNXDIR"/Documentation/DocBook && + rm -rf $WEBDIR/htmldocs + cd "$LNXDIR"/temp/Documentation/DocBook && # Install nochunks versions mv xhtml-nochunks "$WEBDIR"/htmldocs && @@ -135,6 +135,8 @@ "$WEBDIR"/menuconfig/index.html && "$WEBDIR"/make/menuconfig2html.py $i "$WEBDIR"/menuconfig "$LNXTAG" > \ "$WEBDIR"/menuconfig/$ARCH.html + + [ $? -eq 0 ] || exit 1 done ) && echo "</ul></body></html>" >> "$WEBDIR"/menuconfig/index.html @@ -188,6 +190,7 @@ function findrfc() { ( + > "$WEBDIR"/temp-linuxrfc.txt && cd "$LNXDIR" || exit 1 echo -n "Search for RFC references" x=0 @@ -196,19 +199,19 @@ do # Progress indicator x=$[$x+1] - if [ $x -gt 250 ] + if [ $x -gt 100 ] then - echo -n . >&2 + echo -n . x=0 fi # Grep each source file for mention of an RFC, filtering out the more # obvious false positives. for j in $(grep -io "rfc *[1-9][0-9]*" $i | grep -v " " | grep -v "@rfc822\.org" | sed -r 's/[Rr][Ff][Cc] *([0-9]*)/rfc\1/g') do - echo $i:$j + echo $i:$j >> "$WEBDIR"/temp-linuxrfc.txt done done - ) > "$WEBDIR">temp-linuxrfc.txt + ) && # Process the temporary directory into an html file. @@ -227,7 +230,7 @@ echo "</p></li>" done echo "</ul></html>" - ) > "$WEBDIR"/rfc-linux.html + ) > "$WEBDIR"/rfc-linux.html && # Remove the temporary file rm temp-linuxrfc.txt @@ -239,16 +242,30 @@ { if [ ! -d "$WEBDIR"/Documentation ] then - "$WEBDIR"/make/do-Documentation.sh || exit 1 + echo "Need Documentation dir first" + exit 1 fi rm -rf "$LNXDIR"/temp && mkdir "$LNXDIR"/temp && ( cd "$LNXDIR"/hg && - make allnoconfig O=$LNXDIR/temp && + make allnoconfig O=$LNXDIR/temp > /dev/null && # Adjust to use the patched Documentation directory ln -s "$WEBDIR"/Documentation "$LNXDIR"/temp && # We'll need this later. make -j 2 xmldocs ) } + +function wait4background() +{ + # Wait for background task to finish + while [ $(jobs | wc -l) -ne 0 ] + do + sleep 1 + # Without this next line, bash never notices a change in the number of jobs. + # Bug noticed in Ubuntu 7.04 + jobs > /dev/null + done +} +
--- a/make/make.sh Wed Nov 07 01:45:48 2007 -0600 +++ b/make/make.sh Wed Nov 07 02:54:10 2007 -0600 @@ -12,6 +12,8 @@ then echo "Update Linux source from mercurial on kernel.org" get_hg || exit 1 +else + shift fi echo "Install updated (and patched) Documentation directory." @@ -25,12 +27,7 @@ # I have a dual processor laptop, so overlap work here. Have make htmldocs # produce split-up versions in the background (which is very slow) # while other work is done in the foreground. - make_htmldocs > /dev/null & - - # This is also very slow. - - # Search for references to RFC documents - "$WEBDIR"/make/do-rfc.sh & + make_htmldocs > /dev/null 2>/dev/null & fi echo "Update master index." @@ -45,17 +42,21 @@ echo Convert kconfig to html for all architectures htmlize_menuconfig || exit 1 -echo Build nochunks htmldocs. -make_htmlnochunks || exit 1 +# Install the htmldocs +if [ "$1" == "--long" ] +then + echo Build nochunks htmldocs. + make_htmlnochunks || exit 1 -# Wait for background task(s) to finish. If there aren't any, this continues -# immediately. -"$WEBDIR"/do-wait.sh + echo Search for references to RFC documents + findrfc || exit 1 -# Install the htmldocs -install_htmldocs || exit 1 + # Wait for background task(s) to finish. If there aren't any, this continues + # immediately. + wait4background -# Search for references to RFC documents -"$WEBDIR"/make/do-rfc.sh > "$WEBDIR"/rfc-linux.html || exit 1 + # Install the htmldocs + install_htmldocs || exit 1 +fi echo "Done with kdocs"