summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-02-15 12:36:26 (GMT)
committerSteven Knight <knight@baldmt.com>2002-02-15 12:36:26 (GMT)
commit1b7469b4c6ac5c93974e8b2b895869b678881af6 (patch)
tree19817176d0c20dd006ab0d7ebf0fc147081239fd /doc
parentc6c569c6c367cc1d5f8b9743644e22e1916c8338 (diff)
downloadSCons-1b7469b4c6ac5c93974e8b2b895869b678881af6.zip
SCons-1b7469b4c6ac5c93974e8b2b895869b678881af6.tar.gz
SCons-1b7469b4c6ac5c93974e8b2b895869b678881af6.tar.bz2
Run HTML files through tidy (if it's available) to clean them up.
Diffstat (limited to 'doc')
-rw-r--r--doc/SConscript20
1 files changed, 15 insertions, 5 deletions
diff --git a/doc/SConscript b/doc/SConscript
index bba4837..0356bf5 100644
--- a/doc/SConscript
+++ b/doc/SConscript
@@ -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