From 8cc304c6e0f141b0fb00dffb9a8f592e540d23cd Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 3 Nov 2006 01:20:56 +0000 Subject: [PATCH] dist emacs patches too. sort commits, and use .git-commits-done file. --- ChangeLog | 9 +++++++++ GNUmakefile.in | 3 +-- autogen.sh | 5 +++-- buildscripts/git-update-changelog.py | 21 +++++++++++++++++++++ elisp/GNUmakefile | 1 + lily/include/program-option.hh | 2 ++ lily/program-option.cc | 12 ++++++++++++ 7 files changed, 49 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 22532fc9b2..fdde79a462 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-11-03 Han-Wen Nienhuys + + * buildscripts/git-update-changelog.py: + sort commits, and use .git-commits-done file. + + * GNUmakefile.in: + * elisp/GNUmakefile: + dist emacs patches too. + 2006-11-02 Han-Wen Nienhuys * scm/autochange.scm: diff --git a/GNUmakefile.in b/GNUmakefile.in index 8ecc6f65bf..fc35f91245 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -22,9 +22,8 @@ TOPDOC_FILES=AUTHORS README INSTALL NEWS TOPDOC_TXT_FILES = $(addprefix $(top-build-dir)/Documentation/topdocs/$(outdir)/,$(addsuffix .txt,$(TOPDOC_FILES))) IN_FILES := $(call src-wildcard,*.in) -PATCH_FILES = emacsclient.patch server.el.patch EXTRA_DIST_FILES = VERSION .cvsignore SConstruct \ - $(README_FILES) $(SCRIPTS) $(IN_FILES) $(PATCH_FILES) + $(README_FILES) $(SCRIPTS) $(IN_FILES) INSTALLATION_DIR=$(local_lilypond_datadir) INSTALLATION_FILES=$(config_make) VERSION diff --git a/autogen.sh b/autogen.sh index 6db6ec12e2..d5033d9ec7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,7 @@ #!/bin/sh +# WARNING WARNING WARNING +# do not edit! this is autogen.sh, generated from /home/lilydev/src/lilypond/stepmake/autogen.sh +#!/bin/sh # Run this to generate configure and initial GNUmakefiles srcdir=`dirname $0` @@ -50,8 +53,6 @@ do done #conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c -#conf_flags="--with-ncsb-dir=/usr/share/fonts/default/Type1/" - if test -n "$NOCONFIGURE"; then echo Skipping configure process. exit 0 diff --git a/buildscripts/git-update-changelog.py b/buildscripts/git-update-changelog.py index 5ad922be93..4b98c6c199 100644 --- a/buildscripts/git-update-changelog.py +++ b/buildscripts/git-update-changelog.py @@ -17,6 +17,15 @@ def system (x): class PatchFailed(Exception): pass +def sign (x): + if x < 0: + return -1 + if x > 0: + return 1 + + return 0 + + class Commit: def __init__ (self, dict): for v in ('message', @@ -32,6 +41,8 @@ class Commit: self.email = m.group (2).strip () self.name = m.group (1).strip () self.diff = read_pipe ('git show %s' % self.committish) + def compare (self, other): + return sign (time.mktime (self.date) - time.mktime (other.date)) def touched_files (self): files = [] @@ -173,6 +184,15 @@ Run this file from the CVS directory, with commits from the repository in --git- if first == log[:len (first)]: log = log[len (first):] + try: + previously_done = dict((c, 1) for c in open ('.git-commits-done').read ().split ('\n')) + except OSError: + previously_done = {} + + commits = [c for c in commits if not previously_done.has_key (c.committish)] + commits = sorted (commits, cmp=Commit.compare) + + file_adddel = [] collated_log = '' collated_message = '' @@ -181,6 +201,7 @@ Run this file from the CVS directory, with commits from the repository in --git- while commits: c = commits[0] commits = commits[1:] + commits_done.append (c) if not c.has_patch (): diff --git a/elisp/GNUmakefile b/elisp/GNUmakefile index a92370d521..0eab184cd0 100644 --- a/elisp/GNUmakefile +++ b/elisp/GNUmakefile @@ -9,6 +9,7 @@ INSTALLATION_OUT_DIR=$(elispdir) INSTALLATION_OUT_FILES=$(outdir)/lilypond-words.el STEPMAKE_TEMPLATES=elisp install install-out +EXTRA_DIST_FILES= emacsclient.patch server.el.patch include $(depth)/make/stepmake.make diff --git a/lily/include/program-option.hh b/lily/include/program-option.hh index 55971a1fa1..7a119b46e5 100644 --- a/lily/include/program-option.hh +++ b/lily/include/program-option.hh @@ -22,4 +22,6 @@ SCM ly_set_option (SCM, SCM); bool get_program_option (const char *); +bool get_program_option (const char *); + #endif /* SCM_OPTION_HH */ diff --git a/lily/program-option.cc b/lily/program-option.cc index be81de380b..04f8292a74 100644 --- a/lily/program-option.cc +++ b/lily/program-option.cc @@ -211,6 +211,9 @@ LY_DEFINE (ly_command_line_verbose_p, "ly:command-line-verbose?", 0, 0, 0, (), + + + LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var), "Get a global option setting.") { @@ -220,6 +223,15 @@ LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var), } +bool +get_program_option (const char *s) +{ + SCM sym = ly_symbol2scm (s); + + return to_boolean (ly_get_option (sym)); +} + + bool get_program_option (const char *s) { -- 2.39.2