2018-04-08 12:32:29 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2024-01-06 22:55:04 +00:00
|
|
|
# Copyright (C) 2014-2024 Free Software Foundation, Inc.
|
2018-04-08 12:32:29 +00:00
|
|
|
# This file is part of GNU Make.
|
|
|
|
#
|
2023-01-01 21:25:39 +00:00
|
|
|
# Update GNU Make copyrights using gnulib update-copyright
|
2018-04-08 12:32:29 +00:00
|
|
|
|
2019-08-24 18:41:10 +00:00
|
|
|
EXCLUDE='^\(\.[a-z].*\|.*/\.[a-z].*\|.*COPYING\|src/hash\.[ch]\|ChangeLog.*\|.*/ChangeLog.*\|INSTALL\|doc/make\.texi\|bootstrap\)$'
|
|
|
|
|
2019-05-19 15:25:06 +00:00
|
|
|
update=${UPDATE_COPYRIGHT:-${GNULIB_SRCDIR:-../../gnulib}/build-aux/update-copyright}
|
2018-04-08 12:32:29 +00:00
|
|
|
|
|
|
|
die () { echo "$*"; exit 1; }
|
|
|
|
|
2019-08-24 18:41:10 +00:00
|
|
|
getfiles () {
|
|
|
|
git ls-files | grep -v "$EXCLUDE"
|
|
|
|
}
|
|
|
|
|
2018-04-08 12:32:29 +00:00
|
|
|
run () {
|
2019-05-19 15:25:06 +00:00
|
|
|
cmd=$(command -v "$update") || die "Cannot locate update-copyright ($update)"
|
2020-05-03 17:39:55 +00:00
|
|
|
test -x "$cmd" || die "Cannot locate update-copyright ($update)"
|
2019-05-19 15:25:06 +00:00
|
|
|
|
2018-04-08 12:32:29 +00:00
|
|
|
force=false
|
|
|
|
|
|
|
|
case $1 in
|
2019-08-24 18:41:10 +00:00
|
|
|
(-v) getfiles | sort; exit 0 ;;
|
2018-04-08 12:32:29 +00:00
|
|
|
(-f) force=true ;;
|
|
|
|
(--) : ;;
|
|
|
|
(-*) echo "usage: $0 [-v]"; exit 1 ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if $force; then
|
|
|
|
: just do it
|
2020-05-03 17:39:55 +00:00
|
|
|
elif test ! -f src/makeint.h; then
|
2023-01-01 21:25:39 +00:00
|
|
|
die "Run in the root of the GNU Make workspace"
|
2020-05-03 17:39:55 +00:00
|
|
|
elif test -f configure; then
|
2018-04-08 12:32:29 +00:00
|
|
|
die "Run in a clean workspace (git clean -fdX)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# We use intervals
|
|
|
|
export UPDATE_COPYRIGHT_USE_INTERVALS=1
|
|
|
|
|
2019-08-24 18:41:10 +00:00
|
|
|
"$cmd" $(getfiles)
|
2018-04-08 12:32:29 +00:00
|
|
|
|
|
|
|
echo "*** Update doc/make.texi copyright by hand!"
|
|
|
|
echo "*** Update src/main.c:print_version() copyright by hand!"
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
run "$@"
|
|
|
|
|
|
|
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
|
|
|
# the terms of the GNU General Public License as published by the Free Software
|
|
|
|
# Foundation; either version 3 of the License, or (at your option) any later
|
|
|
|
# version.
|
|
|
|
#
|
|
|
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
# details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along with
|
2022-10-18 18:36:40 +00:00
|
|
|
# this program. If not, see <https://www.gnu.org/licenses/>.
|