diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 482c447..77df972 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,3 @@ # This file is part of guile-sql. -# Copyright (C) 2002, 2007, Sergey Poznyakoff +# Copyright (C) 2002, 2007, 2010 Sergey Poznyakoff # @@ -11,5 +11,36 @@ -AUTOMAKE_OPTIONS = gnu 1.8 -ACLOCAL_AMFLAGS = -I m4 +ACLOCAL_AMFLAGS = -I m4 -I am SUBDIRS = src scripts examples po + +# Define the following variables in order to use the ChangeLog rule below: +# prev_change_log [optional] Name of the previous ChangeLog file. +# gen_start_date [optional] Start ChangeLog from this date. +# changelog_dir [mandatory] Directory where to create ChangeLog +gen_start_date = 2008-06-21 +prev_change_log = ChangeLog.cvs +changelog_dir = . + +.PHONY: ChangeLog +ChangeLog: + if test -d .git; then \ + cmd=$(top_srcdir)/scripts/gitlog-to-changelog; \ + if test -n "$(gen_start_date)"; then \ + cmd="$$cmd --since=\"$(gen_start_date)\""; \ + fi; \ + $$cmd --format='%s%n%n%b%n' | \ + sed '/<unknown>$$/d' | fmt -s > $(changelog_dir)/cl-t; \ + if test -n "$(prev_change_log)" && test -f "$(prev_change_log)"; \ + then \ + echo "" >> $(changelog_dir)/cl-t; \ + cat "$(prev_change_log)" | \ + sed '/^Local Variables:/,/^End:/d' >> $(changelog_dir)/cl-t; \ + fi; \ + echo "Local Variables:" >> $(changelog_dir)/cl-t; \ + echo "mode: change-log" >> $(changelog_dir)/cl-t; \ + echo "version-control: never" >> $(changelog_dir)/cl-t; \ + echo "buffer-read-only: t" >> $(changelog_dir)/cl-t; \ + echo "End:" >> $(changelog_dir)/cl-t; \ + rm -f $(changelog_dir)/ChangeLog; \ + mv $(changelog_dir)/cl-t $(changelog_dir)/ChangeLog; \ + fi |