summaryrefslogtreecommitdiff
path: root/stepmake
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>2006-05-31 23:38:23 +0000
committerHan-Wen Nienhuys <hanwen@xs4all.nl>2006-05-31 23:38:23 +0000
commit93330b4d33120b9330b311b7187551479e2341bd (patch)
treedc18d12b908a59e39b960de8ab2fc9b28db093b8 /stepmake
parent152e06f0da111668e6e530a48b23f462504072fa (diff)
* stepmake/aclocal.m4: revert version detection.
* buildscripts/output-distance.py (ComparisonData.create_html_result_page): copy only if file exists, fixup src paths. * stepmake/bin/add-html-footer.py (built): junk gulp_file()
Diffstat (limited to 'stepmake')
-rw-r--r--stepmake/aclocal.m48
-rw-r--r--stepmake/bin/add-html-footer.py23
2 files changed, 11 insertions, 20 deletions
diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4
index 19b9200a40..73cb599d53 100644
--- a/stepmake/aclocal.m4
+++ b/stepmake/aclocal.m4
@@ -32,8 +32,12 @@ AC_DEFUN(STEPMAKE_GET_VERSION, [
## FIXME: what systems still do not have $() in /bin/sh?
eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\.[0-9]' \
| head -n 1 \
- | sed -e 's/\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/' \
- -e 's/\([^0-9]*\|^\) //' -e 's/[^0-9]*$//'\`\"
+ | sed -e 's/.*[^-.0-9]\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/' \
+ -e 's/^[^.0-9]*//' -e 's/[^.0-9]*$//'\`\"
+
+## apparently breaks on darwin,
+# | sed -e 's/\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/' \
+# -e 's/\([^0-9]*\|^\) //' -e 's/[^0-9]*$//'\`\"
if test -z "$_ver"; then
## If empty, try date [fontforge]
eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\{6,8\}' \
diff --git a/stepmake/bin/add-html-footer.py b/stepmake/bin/add-html-footer.py
index 1a5cbccfc0..7f2ef65dcd 100644
--- a/stepmake/bin/add-html-footer.py
+++ b/stepmake/bin/add-html-footer.py
@@ -47,7 +47,7 @@ default_footer = r"""<hr>Please take me <a href=@INDEX@>back to the index</a>
of @PACKAGE_NAME@
"""
-built = r"""
+built = r'''
<div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;">
%(wiki_string)s
<p>
@@ -58,23 +58,10 @@ This page is for %(package_name)s-%(package_version)s (%(branch_str)s). <br>
Report errors to <a href="%(mail_address_url)s">%(mail_address)s</a>.</font></address>
</p>
</div>
-"""
+'''
+
-def gulp_file (f):
- try:
- i = open(f)
- i.seek (0, 2)
- n = i.tell ()
- i.seek (0,0)
- except:
- sys.stderr.write ("can't open file: %s\n" % f)
- return ''
- s = i.read (n)
- if len (s) <= 0:
- sys.stderr.write ("gulped empty file: %s\n" % f)
- i.close ()
- return s
def help ():
sys.stdout.write (r"""Usage: add-html-footer [OPTIONS]... HTML-FILE
@@ -138,7 +125,7 @@ def set_gcos ():
def compose (default, file):
s = default
if file:
- s = gulp_file (file)
+ s = open (file).read ()
return s
set_gcos ()
@@ -200,7 +187,7 @@ def remove_self_ref (s):
return s
def do_file (f):
- s = gulp_file (f)
+ s = open (f).read()
s = re.sub ('%', '%%', s)