From ca58d2c0642e9f5d3e979a5d7b9bc3ee4f82fbde Mon Sep 17 00:00:00 2001 From: stevenknight Date: Fri, 15 Feb 2002 12:36:26 +0000 Subject: [PATCH] Run HTML files through tidy (if it's available) to clean them up. git-svn-id: http://scons.tigris.org/svn/scons/trunk@261 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- doc/SConscript | 20 +++++++++++++++----- src/CHANGES.txt | 2 ++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/SConscript b/doc/SConscript index bba48371..0356bf5d 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 diff --git a/src/CHANGES.txt b/src/CHANGES.txt index f058b982..9783116b 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -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. -- 2.26.2