mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
build-sys: update bootstrap from gnulib
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
544e7ec0a5
commit
e48768b041
4 changed files with 188 additions and 129 deletions
1
THANKS
1
THANKS
|
|
@ -46,3 +46,4 @@ Jeff Bailey
|
||||||
José Bollo
|
José Bollo
|
||||||
Sebastián Cramatte
|
Sebastián Cramatte
|
||||||
Mark Sangster
|
Mark Sangster
|
||||||
|
Brent Swingle
|
||||||
|
|
|
||||||
173
bootstrap
173
bootstrap
|
|
@ -1,10 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Print a version string.
|
# Print a version string.
|
||||||
scriptversion=2017-09-13.06; # UTC
|
scriptversion=2019-01-04.17; # UTC
|
||||||
|
|
||||||
# Bootstrap this package from checked-out sources.
|
# Bootstrap this package from checked-out sources.
|
||||||
|
|
||||||
# Copyright (C) 2003-2017 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -47,6 +47,8 @@ PERL="${PERL-perl}"
|
||||||
|
|
||||||
me=$0
|
me=$0
|
||||||
|
|
||||||
|
default_gnulib_url=git://git.sv.gnu.org/gnulib
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: $me [OPTION]...
|
Usage: $me [OPTION]...
|
||||||
|
|
@ -76,6 +78,37 @@ contents are read as shell variables to configure the bootstrap.
|
||||||
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||||
are honored.
|
are honored.
|
||||||
|
|
||||||
|
Gnulib sources can be fetched in various ways:
|
||||||
|
|
||||||
|
* If this package is in a git repository with a 'gnulib' submodule
|
||||||
|
configured, then that submodule is initialized and updated and sources
|
||||||
|
are fetched from there. If \$GNULIB_SRCDIR is set (directly or via
|
||||||
|
--gnulib-srcdir) and is a git repository, then it is used as a reference.
|
||||||
|
|
||||||
|
* Otherwise, if \$GNULIB_SRCDIR is set (directly or via --gnulib-srcdir),
|
||||||
|
then sources are fetched from that local directory. If it is a git
|
||||||
|
repository and \$GNULIB_REVISION is set, then that revision is checked
|
||||||
|
out.
|
||||||
|
|
||||||
|
* Otherwise, if this package is in a git repository with a 'gnulib'
|
||||||
|
submodule configured, then that submodule is initialized and updated and
|
||||||
|
sources are fetched from there.
|
||||||
|
|
||||||
|
* Otherwise, if the 'gnulib' directory does not exist, Gnulib sources are
|
||||||
|
cloned into that directory using git from \$GNULIB_URL, defaulting to
|
||||||
|
$default_gnulib_url.
|
||||||
|
If \$GNULIB_REVISION is set, then that revision is checked out.
|
||||||
|
|
||||||
|
* Otherwise, the existing Gnulib sources in the 'gnulib' directory are
|
||||||
|
used. If it is a git repository and \$GNULIB_REVISION is set, then that
|
||||||
|
revision is checked out.
|
||||||
|
|
||||||
|
If you maintain a package and want to pin a particular revision of the
|
||||||
|
Gnulib sources that has been tested with your package, then there are two
|
||||||
|
possible approaches: either configure a 'gnulib' submodule with the
|
||||||
|
appropriate revision, or set \$GNULIB_REVISION (and if necessary
|
||||||
|
\$GNULIB_URL) in $me.conf.
|
||||||
|
|
||||||
Running without arguments will suffice in most cases.
|
Running without arguments will suffice in most cases.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
@ -129,18 +162,11 @@ bootstrap_post_import_hook() { :; }
|
||||||
# Override it via your own definition in bootstrap.conf.
|
# Override it via your own definition in bootstrap.conf.
|
||||||
bootstrap_epilogue() { :; }
|
bootstrap_epilogue() { :; }
|
||||||
|
|
||||||
# The command to download all .po files for a specified domain into
|
# The command to download all .po files for a specified domain into a
|
||||||
# a specified directory. Fill in the first %s is the domain name, and
|
# specified directory. Fill in the first %s with the destination
|
||||||
# the second with the destination directory. Use rsync's -L and -r
|
# directory and the second with the domain name.
|
||||||
# options because the latest/%s directory and the .po files within are
|
|
||||||
# all symlinks.
|
|
||||||
po_download_command_format=\
|
po_download_command_format=\
|
||||||
"rsync --delete --exclude '*.s1' -Lrtvz \
|
"wget --mirror --level=1 -nd -nv -A.po -P '%s' \
|
||||||
'translationproject.org::tp/latest/%s/' '%s'"
|
|
||||||
|
|
||||||
# Fallback for downloading .po files (if rsync fails).
|
|
||||||
po_download_command_format2=\
|
|
||||||
"wget --mirror -nd -q -np -A.po -P '%s' \
|
|
||||||
https://translationproject.org/latest/%s/"
|
https://translationproject.org/latest/%s/"
|
||||||
|
|
||||||
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
||||||
|
|
@ -171,7 +197,15 @@ source_base=lib
|
||||||
m4_base=m4
|
m4_base=m4
|
||||||
doc_base=doc
|
doc_base=doc
|
||||||
tests_base=tests
|
tests_base=tests
|
||||||
gnulib_extra_files=''
|
gnulib_extra_files="
|
||||||
|
build-aux/install-sh
|
||||||
|
build-aux/mdate-sh
|
||||||
|
build-aux/texinfo.tex
|
||||||
|
build-aux/depcomp
|
||||||
|
build-aux/config.guess
|
||||||
|
build-aux/config.sub
|
||||||
|
doc/INSTALL
|
||||||
|
"
|
||||||
|
|
||||||
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
||||||
gnulib_tool_option_extras=
|
gnulib_tool_option_extras=
|
||||||
|
|
@ -265,24 +299,18 @@ case "$0" in
|
||||||
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Extra files from gnulib, which override files from other sources.
|
|
||||||
test -z "${gnulib_extra_files}" && \
|
|
||||||
gnulib_extra_files="
|
|
||||||
build-aux/install-sh
|
|
||||||
build-aux/mdate-sh
|
|
||||||
build-aux/texinfo.tex
|
|
||||||
build-aux/depcomp
|
|
||||||
build-aux/config.guess
|
|
||||||
build-aux/config.sub
|
|
||||||
doc/INSTALL
|
|
||||||
"
|
|
||||||
|
|
||||||
if test "$vc_ignore" = auto; then
|
if test "$vc_ignore" = auto; then
|
||||||
vc_ignore=
|
vc_ignore=
|
||||||
test -d .git && vc_ignore=.gitignore
|
test -d .git && vc_ignore=.gitignore
|
||||||
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x"$gnulib_modules$gnulib_files$gnulib_extra_files" = x; then
|
||||||
|
use_gnulib=false
|
||||||
|
else
|
||||||
|
use_gnulib=true
|
||||||
|
fi
|
||||||
|
|
||||||
# Translate configuration into internal form.
|
# Translate configuration into internal form.
|
||||||
|
|
||||||
# Parse options.
|
# Parse options.
|
||||||
|
|
@ -613,16 +641,17 @@ git_modules_config () {
|
||||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
if $use_git; then
|
if $use_gnulib; then
|
||||||
|
if $use_git; then
|
||||||
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
||||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
|
# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
|
||||||
# submodule, for use in the rest of the script.
|
# submodule, for use in the rest of the script.
|
||||||
|
|
||||||
case ${GNULIB_SRCDIR--} in
|
case ${GNULIB_SRCDIR--} in
|
||||||
-)
|
-)
|
||||||
# Note that $use_git is necessarily true in this case.
|
# Note that $use_git is necessarily true in this case.
|
||||||
if git_modules_config submodule.gnulib.url >/dev/null; then
|
if git_modules_config submodule.gnulib.url >/dev/null; then
|
||||||
echo "$0: getting gnulib files..."
|
echo "$0: getting gnulib files..."
|
||||||
|
|
@ -635,15 +664,17 @@ case ${GNULIB_SRCDIR--} in
|
||||||
trap cleanup_gnulib 1 2 13 15
|
trap cleanup_gnulib 1 2 13 15
|
||||||
|
|
||||||
shallow=
|
shallow=
|
||||||
|
if test -z "$GNULIB_REVISION"; then
|
||||||
git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
|
git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
|
||||||
git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
|
fi
|
||||||
cleanup_gnulib
|
git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \
|
||||||
|
|| cleanup_gnulib
|
||||||
|
|
||||||
trap - 1 2 13 15
|
trap - 1 2 13 15
|
||||||
fi
|
fi
|
||||||
GNULIB_SRCDIR=$gnulib_path
|
GNULIB_SRCDIR=$gnulib_path
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Use GNULIB_SRCDIR directly or as a reference.
|
# Use GNULIB_SRCDIR directly or as a reference.
|
||||||
if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
|
if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
|
||||||
git_modules_config submodule.gnulib.url >/dev/null; then
|
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||||
|
|
@ -670,12 +701,17 @@ case ${GNULIB_SRCDIR--} in
|
||||||
GNULIB_SRCDIR=$gnulib_path
|
GNULIB_SRCDIR=$gnulib_path
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# $GNULIB_SRCDIR now points to the version of gnulib to use, and
|
if test -d "$GNULIB_SRCDIR"/.git && test -n "$GNULIB_REVISION" \
|
||||||
# we no longer need to use git or $gnulib_path below here.
|
&& ! git_modules_config submodule.gnulib.url >/dev/null; then
|
||||||
|
(cd "$GNULIB_SRCDIR" && git checkout "$GNULIB_REVISION") || cleanup_gnulib
|
||||||
|
fi
|
||||||
|
|
||||||
if $bootstrap_sync; then
|
# $GNULIB_SRCDIR now points to the version of gnulib to use, and
|
||||||
|
# we no longer need to use git or $gnulib_path below here.
|
||||||
|
|
||||||
|
if $bootstrap_sync; then
|
||||||
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
|
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
|
||||||
echo "$0: updating bootstrap and restarting..."
|
echo "$0: updating bootstrap and restarting..."
|
||||||
case $(sh -c 'echo "$1"' -- a) in
|
case $(sh -c 'echo "$1"' -- a) in
|
||||||
|
|
@ -687,10 +723,11 @@ if $bootstrap_sync; then
|
||||||
$ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
$ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||||
"$0" "$@" --no-bootstrap-sync
|
"$0" "$@" --no-bootstrap-sync
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||||
<$gnulib_tool || exit $?
|
<$gnulib_tool || exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
# Get translations.
|
# Get translations.
|
||||||
|
|
||||||
|
|
@ -698,10 +735,7 @@ download_po_files() {
|
||||||
subdir=$1
|
subdir=$1
|
||||||
domain=$2
|
domain=$2
|
||||||
echo "$me: getting translations into $subdir for $domain..."
|
echo "$me: getting translations into $subdir for $domain..."
|
||||||
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
|
cmd=$(printf "$po_download_command_format" "$subdir" "$domain")
|
||||||
eval "$cmd" && return
|
|
||||||
# Fallback to HTTP.
|
|
||||||
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
|
|
||||||
eval "$cmd"
|
eval "$cmd"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -793,7 +827,7 @@ symlink_to_dir()
|
||||||
# aren't confused into doing unnecessary builds. Conversely, if the
|
# aren't confused into doing unnecessary builds. Conversely, if the
|
||||||
# existing symlink's timestamp is older than the source, make it afresh,
|
# existing symlink's timestamp is older than the source, make it afresh,
|
||||||
# so that broken tools aren't confused into skipping needed builds. See
|
# so that broken tools aren't confused into skipping needed builds. See
|
||||||
# <https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
|
# <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
|
||||||
test -h "$dst" &&
|
test -h "$dst" &&
|
||||||
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
||||||
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
||||||
|
|
@ -899,36 +933,47 @@ fi
|
||||||
|
|
||||||
# Import from gnulib.
|
# Import from gnulib.
|
||||||
|
|
||||||
gnulib_tool_options="\
|
if $use_gnulib; then
|
||||||
--import\
|
gnulib_tool_options="\
|
||||||
--no-changelog\
|
--no-changelog\
|
||||||
--aux-dir $build_aux\
|
--aux-dir=$build_aux\
|
||||||
--doc-base $doc_base\
|
--doc-base=$doc_base\
|
||||||
--lib $gnulib_name\
|
--lib=$gnulib_name\
|
||||||
--m4-base $m4_base/\
|
--m4-base=$m4_base/\
|
||||||
--source-base $source_base/\
|
--source-base=$source_base/\
|
||||||
--tests-base $tests_base\
|
--tests-base=$tests_base\
|
||||||
--local-dir $local_gl_dir\
|
--local-dir=$local_gl_dir\
|
||||||
$gnulib_tool_option_extras\
|
$gnulib_tool_option_extras\
|
||||||
"
|
"
|
||||||
if test $use_libtool = 1; then
|
if test $use_libtool = 1; then
|
||||||
case "$gnulib_tool_options " in
|
case "$gnulib_tool_options " in
|
||||||
*' --libtool '*) ;;
|
*' --libtool '*) ;;
|
||||||
*) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
|
*) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
|
$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
|
||||||
|| die "gnulib-tool failed"
|
|| die "gnulib-tool failed"
|
||||||
|
|
||||||
for file in $gnulib_files; do
|
for file in $gnulib_files; do
|
||||||
symlink_to_dir "$GNULIB_SRCDIR" $file \
|
symlink_to_dir "$GNULIB_SRCDIR" $file \
|
||||||
|| die "failed to symlink $file"
|
|| die "failed to symlink $file"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
bootstrap_post_import_hook \
|
bootstrap_post_import_hook \
|
||||||
|| die "bootstrap_post_import_hook failed"
|
|| die "bootstrap_post_import_hook failed"
|
||||||
|
|
||||||
|
# Don't proceed if there are uninitialized submodules. In particular,
|
||||||
|
# the next step will remove dangling links, which might be links into
|
||||||
|
# uninitialized submodules.
|
||||||
|
#
|
||||||
|
# Uninitialized submodules are listed with an initial dash.
|
||||||
|
if $use_git && git submodule | grep '^-' >/dev/null; then
|
||||||
|
die "some git submodules are not initialized. " \
|
||||||
|
"Run 'git submodule init' and bootstrap again."
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||||
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||||
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
||||||
|
|
@ -1021,7 +1066,7 @@ bootstrap_epilogue
|
||||||
echo "$0: done. Now you can run './configure'."
|
echo "$0: done. Now you can run './configure'."
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC0"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Bootstrap configuration.
|
# Bootstrap configuration.
|
||||||
|
|
||||||
# Copyright (C) 2006-2017 Free Software Foundation, Inc.
|
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
# gnulib modules used by this package.
|
# gnulib modules used by this package.
|
||||||
|
|
|
||||||
13
lib/.gitignore
vendored
13
lib/.gitignore
vendored
|
|
@ -65,11 +65,15 @@
|
||||||
/hard-locale.h
|
/hard-locale.h
|
||||||
/inet_pton.c
|
/inet_pton.c
|
||||||
/intprops.h
|
/intprops.h
|
||||||
|
/inttypes.h
|
||||||
|
/inttypes.in.h
|
||||||
/isnan.c
|
/isnan.c
|
||||||
/isnand.c
|
/isnand.c
|
||||||
/isnanf.c
|
/isnanf.c
|
||||||
/isnanl.c
|
/isnanl.c
|
||||||
/itold.c
|
/itold.c
|
||||||
|
/lc-charset-dispatch.c
|
||||||
|
/lc-charset-dispatch.h
|
||||||
/libc-config.h
|
/libc-config.h
|
||||||
/libdhcpd_pools.la
|
/libdhcpd_pools.la
|
||||||
/.libs/
|
/.libs/
|
||||||
|
|
@ -78,6 +82,8 @@
|
||||||
/*.lo
|
/*.lo
|
||||||
/localcharset.c
|
/localcharset.c
|
||||||
/localcharset.h
|
/localcharset.h
|
||||||
|
/locale.h
|
||||||
|
/locale.in.h
|
||||||
/localtime-buffer.c
|
/localtime-buffer.c
|
||||||
/localtime-buffer.h
|
/localtime-buffer.h
|
||||||
/lseek.c
|
/lseek.c
|
||||||
|
|
@ -89,7 +95,11 @@
|
||||||
/math.h
|
/math.h
|
||||||
/math.in.h
|
/math.in.h
|
||||||
/mbrtowc.c
|
/mbrtowc.c
|
||||||
|
/mbrtowc-impl.h
|
||||||
|
/mbrtowc-impl-utf8.h
|
||||||
/mbsinit.c
|
/mbsinit.c
|
||||||
|
/mbtowc-lock.c
|
||||||
|
/mbtowc-lock.h
|
||||||
/memchr.c
|
/memchr.c
|
||||||
/memchr.valgrind
|
/memchr.valgrind
|
||||||
/minmax.h
|
/minmax.h
|
||||||
|
|
@ -110,6 +120,9 @@
|
||||||
/quote.h
|
/quote.h
|
||||||
/realloc.c
|
/realloc.c
|
||||||
/setenv.c
|
/setenv.c
|
||||||
|
/setlocale-lock.c
|
||||||
|
/setlocale_null.c
|
||||||
|
/setlocale_null.h
|
||||||
/stat.c
|
/stat.c
|
||||||
/stat-time.c
|
/stat-time.c
|
||||||
/stat-time.h
|
/stat-time.h
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue