re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / Make.rules
1 # This file is part of GNU paxutils
2 #
3 # Copyright (c) 2009, 2014 Free Software Foundation, Inc.
4 #
5 # Written by Sergey Poznyakoff
6 #
7 # GNU Paxutils is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by the
9 # Free Software Foundation; either version 3, or (at your option) any later
10 # version.
11 #
12 # GNU Paxutils is distributed in the hope that it will be useful, but
13 # without any warranty; without even the implied warranty of
14 # merchantability or fitness for a particular purpose.  see the gnu general
15 # public license for more details.
16 #
17 # You should have received a copy of the GNU General Public License along
18 # with GNU Paxutils; if not, write to the Free Software Foundation, Inc.,
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
21 # Define the following variables in order to use the ChangeLog rule below:
22 #  prev_change_log      [optional]  Name of the previous ChangeLog file.
23 #  gen_start_date       [optional]  Start ChangeLog from this date. 
24 #  changelog_dir        [mandatory] Directory where to create ChangeLog
25 #  changelog_amend_file [optional]  Amendment file
26
27 .PHONY: ChangeLog
28 ChangeLog: 
29         if test -d .git; then                                              \
30           cmd=$(top_srcdir)/build-aux/gitlog-to-changelog;                 \
31           if test -n "$(gen_start_date)"; then                             \
32             cmd="$$cmd --since=\"$(gen_start_date)\"";                     \
33           fi;                                                              \
34           if test -n "$(changelog_amend_file)"; then                       \
35             cmd="$$cmd --amend=$(changelog_amend_file)";                   \
36           fi;                                                              \
37           $$cmd --format='%s%n%n%b%n' |                                    \
38             sed '/<unknown>$$/d' | fmt -s > $(changelog_dir)/cl-t;         \
39           if test -n "$(prev_change_log)" && test -f "$(prev_change_log)"; \
40           then                                                             \
41             echo "" >> $(changelog_dir)/cl-t;                              \
42             cat "$(prev_change_log)" |                                     \
43               sed '/^Local Variables:/,/^End:/d' >> $(changelog_dir)/cl-t; \
44           fi;                                                              \
45           echo "Local Variables:" >> $(changelog_dir)/cl-t;                \
46           echo "mode: change-log" >> $(changelog_dir)/cl-t;                \
47           echo "version-control: never"  >> $(changelog_dir)/cl-t;         \
48           echo "buffer-read-only: t" >> $(changelog_dir)/cl-t;             \
49           echo "End:" >> $(changelog_dir)/cl-t;                            \
50           rm -f $(changelog_dir)/ChangeLog;                                \
51           mv $(changelog_dir)/cl-t $(changelog_dir)/ChangeLog;             \
52         fi
53