From: Jan Nieuwenhuizen Date: Sun, 19 May 2002 12:50:47 +0000 (+0000) Subject: * stepmake/aclocal.m4: Bugfix: complain if program not found. X-Git-Tag: release/1.5.58~12 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0fa4be4e9d80d9870104252d04e49975367f64a3;p=lilypond.git * stepmake/aclocal.m4: Bugfix: complain if program not found. * scripts/update-lily.py (next_version, prev_version, diff_name): New function. Patches now named name-prev-latest.diff.gz. Bugfix: import shutil. --- diff --git a/ChangeLog b/ChangeLog index 887100f5b1..3a2b8f4e3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-05-19 Jan Nieuwenhuizen + + * stepmake/aclocal.m4: Bugfix: complain if program not found. + + * scripts/update-lily.py (next_version, prev_version, diff_name): + New function. Patches now named name-prev-latest.diff.gz. + Bugfix: import shutil. + 2002-05-19 Han-Wen * lily/note-collision.cc (check_meshing_chords): move file from diff --git a/config.make.in b/config.make.in index 891e913eeb..e976cfe25f 100644 --- a/config.make.in +++ b/config.make.in @@ -56,6 +56,7 @@ BIBTEX2HTML_FLAGS=@BIBTEX2HTML_FLAGS@ BISON = @BISON@ FIND = @FIND@ FLEX = @FLEX@ +GROFF = @GROFF@ GUILE = @GUILE@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_CFLAGS = @GUILE_CFLAGS@ @@ -72,7 +73,7 @@ PERL = @PERL@ PKTRACE = @PKTRACE@ PYTHON = @PYTHON@ SHELL = @SHELL@ -TAR= @TAR@ +TAR = @TAR@ TBL = @TBL@ TROFF = @TROFF@ ZIP = @ZIP@ diff --git a/scripts/update-lily.py b/scripts/update-lily.py index f0493769e5..ad34a284ab 100644 --- a/scripts/update-lily.py +++ b/scripts/update-lily.py @@ -26,6 +26,7 @@ import re import operator import os import tempfile +import shutil import stat import string import sys @@ -386,13 +387,44 @@ def version_str_to_tuple (s): return (string.atoi (t[0]), string.atoi (t[1]), string.atoi (t[2]), my_name, my_number) +def next_version (t): + l = list (t) + if len (l) >= 4: + if l[4]: + l[4] += 1 + else: + l[3] = l[4] = '' + l[2] += 1 + else: + l[2] += 1 + + return tuple (l) + +def prev_version(t): + l = list (t) + if len (l) >= 4: + if l[4]: + l[4] += 1 + else: + l[3] = l[4] = '' + l[2] -= 1 + else: + l[2] -= 1 + + return tuple (l) + def split_package (p): - m = re.match ('(.*)-([0-9]*.*).tar.gz', p) + m = re.match ('(.*)-([0-9]*.*?)(.tar.gz)?$', p) return (m.group (1), version_str_to_tuple (m.group (2))) def join_package (t): return t[0] + '-' + version_tuple_to_str (t[1]) +def diff_name (p): + t = split_package (p) + return '%s-%s-%s' % (t[0], version_tuple_to_str (prev_version (t[1])), + version_tuple_to_str (t[1])) + def find_latest (url): progress (_ ("Listing `%s'...") % url) list = map (split_package, list_url (url)) @@ -469,8 +501,9 @@ if 1: get_base = url[:string.rindex (url, '/')] + '/' if os.path.isdir (patch_dir): os.chdir (patch_dir) - if not os.path.isfile (latest + '.diff.gz'): - get = get_base + latest + '.diff.gz' + latest_diff = diff_name (latest) + if not os.path.isfile (latest_diff + '.diff.gz'): + get = get_base + latest_diff + '.diff.gz' progress (_ ("Fetching `%s'...") % get) copy_url (get, '.') diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index cf2176ed43..b32e9fcc99 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -55,11 +55,11 @@ AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [ # Return if tested proram ($1) was found (true) or not (false). AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [ r="`eval echo '$'"$1"`" - if test -n "$r" -a "$r" != "error" -a "$r" != "no" && ! expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then + true + else ##STEPMAKE_WARN(cannot find $2. $3) false - else - true fi ]) @@ -596,8 +596,9 @@ AC_DEFUN(STEPMAKE_INIT, [ AC_SUBST(INSTALL) AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}') AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}') - AC_SUBST(PATHSEP) AC_SUBST(DIRSEP) + AC_SUBST(PATHSEP) + AC_SUBST(ROOTSEP) STEPMAKE_DATADIR ])