]> git.cworth.org Git - tar/blob - Make.rules
upstream: Fix extraction of device nodes.
[tar] / Make.rules
1 # This file is part of GNU paxutils
2 #
3 # Copyright (c) 2009 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 # This file is part of GNU paxutils
22 #
23 # Copyright (c) 2009 Free Software Foundation, Inc.
24 #
25 # Written by Sergey Poznyakoff
26 #
27 # GNU Paxutils is free software; you can redistribute it and/or modify it
28 # under the terms of the GNU General Public License as published by the
29 # Free Software Foundation; either version 3, or (at your option) any later
30 # version.
31 #
32 # GNU Paxutils is distributed in the hope that it will be useful, but
33 # without any warranty; without even the implied warranty of
34 # merchantability or fitness for a particular purpose.  see the gnu general
35 # public license for more details.
36 #
37 # You should have received a copy of the GNU General Public License along
38 # with GNU Paxutils; if not, write to the Free Software Foundation, Inc.,
39 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
40
41 # Define the following variables in order to use the ChangeLog rule below:
42 #  prev_change_log  [optional]  Name of the previous ChangeLog file.
43 #  gen_start_date   [optional]  Start ChangeLog from this date. 
44 #  changelog_dir    [mandatory] Directory where to create ChangeLog
45
46 .PHONY: ChangeLog
47 ChangeLog: 
48         if test -d .git; then                                              \
49           cmd=$(top_srcdir)/build-aux/gitlog-to-changelog;                 \
50           if test -n "$(gen_start_date)"; then                             \
51             cmd="$$cmd --since=\"$(gen_start_date)\"";                     \
52           fi;                                                              \
53           $$cmd |                                                          \
54             sed '/<unknown>$$/d' | fmt -s > $(changelog_dir)/cl-t;         \
55           if test -n "$(prev_change_log)" && test -f "$(prev_change_log)"; \
56           then                                                             \
57             echo "" >> $(changelog_dir)/cl-t;                              \
58             cat "$(prev_change_log)" |                                     \
59               sed '/^Local Variables:/,/^End:/d' >> $(changelog_dir)/cl-t; \
60           fi;                                                              \
61           echo "Local Variables:" >> $(changelog_dir)/cl-t;                \
62           echo "mode: change-log" >> $(changelog_dir)/cl-t;                \
63           echo "version-control: never"  >> $(changelog_dir)/cl-t;         \
64           echo "buffer-read-only: t" >> $(changelog_dir)/cl-t;             \
65           echo "End:" >> $(changelog_dir)/cl-t;                            \
66           rm -f $(changelog_dir)/ChangeLog;                                \
67           mv $(changelog_dir)/cl-t $(changelog_dir)/ChangeLog;             \
68         fi
69