# HG changeset patch # User Rob Landley # Date 1298172744 21600 # Node ID 01b77829d010c7de89cda34bc8357d6af0db2ea7 # Parent cfaf44286c4a6669cbd26763d3b3e51473b6c276 Lots of stuff bit-rotted in scripts to extract documentation from current kernel sources. De-bit-rot it. diff -r cfaf44286c4a -r 01b77829d010 make/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/README Sat Feb 19 21:32:24 2011 -0600 @@ -0,0 +1,15 @@ +Run make/mirror.py to download resources we mirror from elsewhere into +the "mirror" directory. + +Run make/splitols.py to break up the OLS proceedings into individual +papers. (Run mirror.py and install pdftk first.) + +Run make/make.sh to rebuild documentation extracted from the kernel +source tarball. You may want to set $WEBDIR and $LNXDIR to values appropriate +for your system, and install mercurial and xmlto first. This calls most +of the other scripts in this directory. + +Run make/doclinkcheck.py to check the Documentation/index.html files for +404 errors or files not mentioned from the index. (These are generated +from 00-INDEX files in each subdirectory, so the errors it reports should +be fixed upstream in the Linux kernel source.) diff -r cfaf44286c4a -r 01b77829d010 make/functions.sh --- a/make/functions.sh Sat Feb 19 21:31:09 2011 -0600 +++ b/make/functions.sh Sat Feb 19 21:32:24 2011 -0600 @@ -55,7 +55,7 @@ # Make the chdir local ( cd "$LNXDIR" && - make -j 2 htmldocs + make -j 4 htmldocs ) } @@ -65,12 +65,12 @@ ( cd "$LNXDIR" && # Probably redundant, but just in case... - make -j 2 xmldocs && + make -j 4 xmldocs && cd Documentation/DocBook && for i in *.xml do echo "Converting $i" - xmlto xhtml-nochunks $i -o xhtml-nochunks + xmlto --skip-validation xhtml-nochunks $i -o xhtml-nochunks done ) } @@ -128,10 +128,10 @@ do echo Converting "$i" && ARCH=$(echo $i | sed -r 's@.*/(.*)/.*@\1@') && - echo "
  • ${ARCH}
  • " >> \ + echo "
  • $ARCH
  • " >> \ "$WEBDIR"/menuconfig/index.html && - "$WEBDIR"/make/menuconfig2html.py $i "$WEBDIR"/menuconfig "$LNXTAG" > \ - "$WEBDIR"/menuconfig/$ARCH.html + "$WEBDIR"/make/menuconfig2html.py $i "$WEBDIR/menuconfig" \ + "$LNXTAG" > "$WEBDIR/menuconfig/$ARCH.html" [ $? -eq 0 ] || exit 1 done @@ -220,9 +220,9 @@ for i in $(sed 's/.*://' temp-linuxrfc.txt | sort -u | sort -t c -k 2,2 -n) do echo '
  • '$i'

    ' - for j in $(sed -rn 's@\'"$LNXDIR"'(.*):'$i'$@\1@p' temp-linuxrfc.txt) + for j in $(sed -rn 's@\'"$LNXDIR"/'(.*):'$i'$@\1@p' temp-linuxrfc.txt) do - echo ''$j'' + echo ''$j'' done echo "

  • " done @@ -258,7 +258,7 @@ # Do setup we'll need later. make allnoconfig > /dev/null && - make -j 2 xmldocs + make -j 4 xmldocs ) } diff -r cfaf44286c4a -r 01b77829d010 make/make.sh --- a/make/make.sh Sat Feb 19 21:31:09 2011 -0600 +++ b/make/make.sh Sat Feb 19 21:32:24 2011 -0600 @@ -31,7 +31,7 @@ update_documentation_dir || exit 1 echo "Update master index." -update_master || exit 1 +#update_master || exit 1 echo "Mirror resources" mirror_files || exit 1 diff -r cfaf44286c4a -r 01b77829d010 make/menuconfig2html.py --- a/make/menuconfig2html.py Sat Feb 19 21:31:09 2011 -0600 +++ b/make/menuconfig2html.py Sat Feb 19 21:32:24 2011 -0600 @@ -17,9 +17,9 @@ def htmlescape(str): return str.strip().replace("&","&").replace("<","<").replace(">",">") -def starthtml(out): +def starthtml(out, myfn): - out.write("%s %s

    %s %s

    \n" % (sys.argv[1],sys.argv[3],sys.argv[1],sys.argv[3])) + out.write("%s %s

    %s %s

    \n" % (myfn,sys.argv[3],myfn,sys.argv[3])) def readfile(filename): global helplen @@ -33,7 +33,7 @@ except IOError: sys.stderr.write("File %s missing\n" % filename) return - starthtml(out) + starthtml(out,filename) config = None description = None for i in lines: @@ -75,13 +75,13 @@ elif words[0] == "source": fn=zapquotes(words[1]) readfile(fn) - out.write('

    %(link)s

    \n' % {"link": "%s/%s.html" % (sys.argv[2], "-".join(fn.split("/")))}) + out.write('

    %s

    \n' % ("%s.html" % "-".join(fn.split("/")), fn)) elif words[0] in ("default","depends", "select", "if", "endif", "#"): pass #else: sys.stderr.write("unknown: %s\n" % i) if helplen: out.write("\n") out.write("\n") -starthtml(sys.stdout) +starthtml(sys.stdout,sys.argv[1]) sys.stdout.write("\n\n")