1 # Bootstrap configuration.
3 # Copyright (C) 2006-2013, 2015-2024 Free Software Foundation, Inc.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 avoided_gnulib_modules='
26 # gnulib modules used by this package.
46 do-release-commit-and-tag
134 # Additional xgettext options to use. Use "\\\newline" to break lines.
135 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
136 --flag=asnprintf:3:c-format\\\
137 --flag=asprintf:2:c-format\\\
139 --flag=message:1:c-format\\\
140 --flag=try_help:1:c-format\\\
141 --flag=vasprintf:2:c-format\\\
142 --flag=vasnprintf:3:c-format\\\
145 gnulib_tool_option_extras="--tests-base=gnulib-tests
149 --makefile-name=gnulib.mk
150 $avoided_gnulib_modules
153 # Build prerequisites
172 bootstrap_post_import_hook ()
174 # Automake requires that ChangeLog exist.
175 touch ChangeLog || exit 1
177 # Copy pkg-config's pkg.m4 so that our downstream users don't need to.
178 local ac_dir=`aclocal --print-ac-dir`
179 test -s "$ac_dir/dirlist" && ac_dir=$ac_dir:`tr '\n' : < "$ac_dir/dirlist"`
183 $ACLOCAL_PATH $ac_dir /usr/share/aclocal ''
186 if test -n "$dir" && test -r "$dir/pkg.m4"; then
187 cp "$dir/pkg.m4" m4/pkg.m4
192 die 'Cannot find pkg.m4; perhaps you need to install pkg-config'
197 perl -pi -e "s/\@PACKAGE\@/$package/g" README-release
199 # Since this is a "GNU" package, replace this line
200 # if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
201 # | grep -v 'libtool:' >/dev/null; then
204 # Why? That pipeline searches all files in $(top_srcdir), and if you
205 # happen to have large files (or apparently large sparse files), the
206 # first grep may well run out of memory.
207 perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
210 # Install our git hooks, as long as "cp" accepts the --backup option,
211 # so that we can back up any existing files.
212 case $(cp --help) in *--backup*) backup=1;; *) backup=0;; esac
213 if test $backup = 1; then
214 hooks=$(cd scripts/git-hooks && git ls-files)
216 # If it is identical, skip it.
217 cmp scripts/git-hooks/$f .git/hooks/$f > /dev/null \
219 cp --backup=numbered scripts/git-hooks/$f .git/hooks
220 chmod a-w .git/hooks/$f