|
Packit Service |
9285f1 |
# This file is part of GNU paxutils
|
|
Packit Service |
9285f1 |
#
|
|
Packit Service |
9285f1 |
# Copyright (c) 2009, 2014 Free Software Foundation, Inc.
|
|
Packit Service |
9285f1 |
#
|
|
Packit Service |
9285f1 |
# Written by Sergey Poznyakoff
|
|
Packit Service |
9285f1 |
#
|
|
Packit Service |
9285f1 |
# GNU Paxutils is free software; you can redistribute it and/or modify it
|
|
Packit Service |
9285f1 |
# under the terms of the GNU General Public License as published by the
|
|
Packit Service |
9285f1 |
# Free Software Foundation; either version 3, or (at your option) any later
|
|
Packit Service |
9285f1 |
# version.
|
|
Packit Service |
9285f1 |
#
|
|
Packit Service |
9285f1 |
# GNU Paxutils is distributed in the hope that it will be useful, but
|
|
Packit Service |
9285f1 |
# without any warranty; without even the implied warranty of
|
|
Packit Service |
9285f1 |
# merchantability or fitness for a particular purpose. see the gnu general
|
|
Packit Service |
9285f1 |
# public license for more details.
|
|
Packit Service |
9285f1 |
#
|
|
Packit Service |
9285f1 |
# You should have received a copy of the GNU General Public License along
|
|
Packit Service |
9285f1 |
# with GNU Paxutils; if not, write to the Free Software Foundation, Inc.,
|
|
Packit Service |
9285f1 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
Packit Service |
9285f1 |
|
|
Packit Service |
9285f1 |
# Define the following variables in order to use the ChangeLog rule below:
|
|
Packit Service |
9285f1 |
# prev_change_log [optional] Name of the previous ChangeLog file.
|
|
Packit Service |
9285f1 |
# gen_start_date [optional] Start ChangeLog from this date.
|
|
Packit Service |
9285f1 |
# changelog_dir [mandatory] Directory where to create ChangeLog
|
|
Packit Service |
9285f1 |
# changelog_amend_file [optional] Amendment file
|
|
Packit Service |
9285f1 |
|
|
Packit Service |
9285f1 |
.PHONY: ChangeLog
|
|
Packit Service |
9285f1 |
ChangeLog:
|
|
Packit Service |
9285f1 |
if test -d .git; then \
|
|
Packit Service |
9285f1 |
cmd=$(top_srcdir)/build-aux/gitlog-to-changelog; \
|
|
Packit Service |
9285f1 |
if test -n "$(gen_start_date)"; then \
|
|
Packit Service |
9285f1 |
cmd="$$cmd --since=\"$(gen_start_date)\""; \
|
|
Packit Service |
9285f1 |
fi; \
|
|
Packit Service |
9285f1 |
if test -n "$(changelog_amend_file)"; then \
|
|
Packit Service |
9285f1 |
cmd="$$cmd --amend=$(changelog_amend_file)"; \
|
|
Packit Service |
9285f1 |
fi; \
|
|
Packit Service |
9285f1 |
$$cmd --format='%s%n%n%b%n' | \
|
|
Packit Service |
9285f1 |
sed '/<unknown>$$/d' | fmt -s > $(changelog_dir)/cl-t; \
|
|
Packit Service |
9285f1 |
if test -n "$(prev_change_log)" && test -f "$(prev_change_log)"; \
|
|
Packit Service |
9285f1 |
then \
|
|
Packit Service |
9285f1 |
echo "" >> $(changelog_dir)/cl-t; \
|
|
Packit Service |
9285f1 |
cat "$(prev_change_log)" | \
|
|
Packit Service |
9285f1 |
sed '/^Local Variables:/,/^End:/d' >> $(changelog_dir)/cl-t; \
|
|
Packit Service |
9285f1 |
fi; \
|
|
Packit Service |
9285f1 |
echo "Local Variables:" >> $(changelog_dir)/cl-t; \
|
|
Packit Service |
9285f1 |
echo "mode: change-log" >> $(changelog_dir)/cl-t; \
|
|
Packit Service |
9285f1 |
echo "version-control: never" >> $(changelog_dir)/cl-t; \
|
|
Packit Service |
9285f1 |
echo "buffer-read-only: t" >> $(changelog_dir)/cl-t; \
|
|
Packit Service |
9285f1 |
echo "End:" >> $(changelog_dir)/cl-t; \
|
|
Packit Service |
9285f1 |
rm -f $(changelog_dir)/ChangeLog; \
|
|
Packit Service |
9285f1 |
mv $(changelog_dir)/cl-t $(changelog_dir)/ChangeLog; \
|
|
Packit Service |
9285f1 |
fi
|
|
Packit Service |
9285f1 |
|