1 # Bootstrap configuration.
3 # Copyright (C) 2006-2025 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 <https://www.gnu.org/licenses/>.
18 avoided_gnulib_modules='
24 --avoid=update-copyright-tests
27 # gnulib modules used by this package.
41 do-release-commit-and-tag
99 useless-if-before-free
109 gnulib_name=libgreputils
112 MSGID_BUGS_ADDRESS=bug-grep@gnu.org
114 # Additional xgettext options to use. Use "\\\newline" to break lines.
115 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
116 --flag=asnprintf:3:c-format\\\
117 --flag=asprintf:2:c-format\\\
118 --flag=error:3:c-format\\\
119 --flag=error_at_line:5:c-format\\\
120 --flag=vasnprintf:3:c-format\\\
121 --flag=vasprintf:2:c-format\\\
122 --flag=wrapf:1:c-format\\\
126 gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
127 --makefile-name=gnulib.mk
128 $avoided_gnulib_modules
131 # Build prerequisites
147 bootstrap_post_import_hook ()
149 # Automake requires that ChangeLog exist.
150 touch ChangeLog || return 1
152 # Copy tests/init.sh from Gnulib.
153 $gnulib_tool --copy-file tests/init.sh
155 # Copy pkg-config's pkg.m4 so that our downstream users don't need to.
156 local ac_dir=`aclocal --print-ac-dir`
157 test -s "$ac_dir/dirlist" && ac_dir=$ac_dir:`tr '\n' : < "$ac_dir/dirlist"`
161 $ACLOCAL_PATH $ac_dir /usr/share/aclocal ''
164 if test -n "$dir" && test -r "$dir/pkg.m4"; then
165 cp "$dir/pkg.m4" m4/pkg.m4
170 die 'Cannot find pkg.m4; perhaps you need to install pkg-config'
175 perl -pi -e "s/\@PACKAGE\@/$package/g" README-release
177 # Since this is a "GNU" package, replace this line
178 # if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
179 # | grep -v 'libtool:' >/dev/null; then
182 # Why? That pipeline searches all files in $(top_srcdir), and if you
183 # happen to have large files (or apparently large sparse files), the
184 # first grep may well run out of memory.
185 perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \