From 89bc1e27704126919891b3219895d1f13cd2f1f9 Mon Sep 17 00:00:00 2001 From: Mark Probst Date: Fri, 30 Jul 2010 01:54:23 +0200 Subject: [PATCH] "make dist" updates the ChangeLogs automatically. When creating a distribution "make dist" now uses the commits-to-changelog script to automatically update all ChangeLog files since the last commit marked with the "last-commit-with-compulsory-changelog-entry" tag. --- Makefile.am | 1 + scripts/commits-to-changelog.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Makefile.am b/Makefile.am index 17c95137b57ed..9a2e871c2bbda 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,6 +25,7 @@ DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false # Distribute the 'mcs' tree too dist-hook: + ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry test -d $(distdir)/mcs || mkdir $(distdir)/mcs d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive diff --git a/scripts/commits-to-changelog.py b/scripts/commits-to-changelog.py index ef8ed099cb18b..38de6db57a488 100755 --- a/scripts/commits-to-changelog.py +++ b/scripts/commits-to-changelog.py @@ -228,11 +228,16 @@ def append_lines (file, lines): def main (): usage = "usage: %prog [options] " parser = OptionParser (usage) + parser.add_option ("-r", "--root", dest = "root", help = "Root directory of the working tree to be changed") (options, args) = parser.parse_args () if len (args) != 1: parser.error ("incorrect number of arguments") start_commit = args [0] + if options.root: + global path_to_root + path_to_root = options.root + "/" + for filename in git ("ls-tree", "-r", "--name-only", "HEAD").splitlines (): if re.search ("(^|/)Change[Ll]og$", filename): (path, name) = os.path.split (filename)