Run HTML files through tidy (if it's available) to clean them up.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 15 Feb 2002 12:36:26 +0000 (12:36 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 15 Feb 2002 12:36:26 +0000 (12:36 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@261 fdb21ef1-2011-0410-befe-b5e4ea1792b1

doc/SConscript
src/CHANGES.txt

index bba4837159ae70a77220e5a40496084f6e9c1e32..0356bf5de22f8b5be8af2e9ef9c185c00b3b6a66 100644 (file)
@@ -49,6 +49,7 @@ groff = whereis('groff')
 lynx = whereis('lynx')
 man2html = whereis('man2html')
 jw = whereis('jw')
+tidy = whereis('tidy')
 
 tar_deps = []
 tar_list = ""
@@ -176,17 +177,23 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE.  DO NOT EDIT.
             File(main).scanner_set(s)
 
         if docs[doc].get('html'):
-            env.Command(htmlindex, main, [
+            cmds = [
                 "rm -f ${TARGET.dir}/*.html",
                 "jw -b html -o ${TARGET.dir} $SOURCES",
                 "mv -v ${TARGET.dir}/index.html $TARGET || true",
-            ])
+            ]
+            if tidy:
+                cmds.append("tidy -m -q $TARGET || true")
+            env.Command(htmlindex, main, cmds)
 
-            env.Command(html, main, [
+            cmds = [
                 "rm -f ${TARGET.dir}/main.html",
                 "jw -u -b html -o ${TARGET.dir} $SOURCES",
                 "mv -v ${TARGET.dir}/main.html $TARGET || true",
-            ])
+            ]
+            if tidy:
+                cmds.append("tidy -m -q $TARGET || true")
+            env.Command(html, main, cmds)
 
             env.Ignore([html, htmlindex], "version.sgml")
 
@@ -261,7 +268,10 @@ if groff:
 if man2html:
     html = os.path.join('HTML' , 'scons-man.html')
 
-    env.Command(html, scons_1, "man2html $SOURCES > $TARGET")
+    cmds = [ "man2html $SOURCES > $TARGET" ]
+    if tidy:
+        cmds.append("tidy -m -q $TARGET || true")
+    env.Command(html, scons_1, cmds)
 
     tar_deps.append(html)
     tar_list = tar_list + " " + html
index f058b982c0ef462da1c32ab12b60ebcecb37f8da..9783116bf5a963bc4d2765711046406bde433215 100644 (file)
@@ -61,6 +61,8 @@ RELEASE 0.05 -
 
   - Put the man page in the Debian distribution.
 
+  - Run HTML docs through tidy to clean up the HTML (for Konqueror).
+
   From Anthony Roach:
 
   - Make the scons script return an error code on failures.