mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-14 14:57:00 +00:00
build-sys: routine update
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
5126e63665
commit
1d20604519
8 changed files with 224 additions and 175 deletions
|
|
@ -1,7 +1,6 @@
|
|||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = \
|
||||
.version \
|
||||
|
|
|
|||
322
bootstrap
322
bootstrap
|
|
@ -1,10 +1,10 @@
|
|||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2019-01-04.17; # UTC
|
||||
scriptversion=2022-06-04.00; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
|
|
@ -47,7 +47,7 @@ PERL="${PERL-perl}"
|
|||
|
||||
me=$0
|
||||
|
||||
default_gnulib_url=git://git.sv.gnu.org/gnulib
|
||||
default_gnulib_url=https://git.savannah.gnu.org/git/gnulib.git
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
|
|
@ -71,7 +71,9 @@ Options:
|
|||
--no-git do not use git to update gnulib. Requires that
|
||||
--gnulib-srcdir point to a correct gnulib snapshot
|
||||
--skip-po do not download po files
|
||||
|
||||
EOF
|
||||
bootstrap_print_option_usage_hook
|
||||
cat <<EOF
|
||||
If the file $me.conf exists in the same directory as this script, its
|
||||
contents are read as shell variables to configure the bootstrap.
|
||||
|
||||
|
|
@ -113,6 +115,12 @@ Running without arguments will suffice in most cases.
|
|||
EOF
|
||||
}
|
||||
|
||||
copyright_year=`echo "$scriptversion" | sed -e 's/[^0-9].*//'`
|
||||
copyright="Copyright (C) ${copyright_year} Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
|
||||
# warnf_ FORMAT-STRING ARG1...
|
||||
warnf_ ()
|
||||
{
|
||||
|
|
@ -154,6 +162,18 @@ gnulib_files=
|
|||
: ${AUTOPOINT=autopoint}
|
||||
: ${AUTORECONF=autoreconf}
|
||||
|
||||
# A function to be called for each unrecognized option. Returns 0 if
|
||||
# the option in $1 has been processed by the function. Returns 1 if
|
||||
# the option has not been processed by the function. Override it via
|
||||
# your own definition in bootstrap.conf
|
||||
|
||||
bootstrap_option_hook() { return 1; }
|
||||
|
||||
# A function to be called in order to print the --help information
|
||||
# corresponding to user-defined command-line options.
|
||||
|
||||
bootstrap_print_option_usage_hook() { :; }
|
||||
|
||||
# A function to be called right after gnulib-tool is run.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
bootstrap_post_import_hook() { :; }
|
||||
|
|
@ -170,7 +190,7 @@ po_download_command_format=\
|
|||
https://translationproject.org/latest/%s/"
|
||||
|
||||
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
||||
# fall back to the package name (1st argument with munging)
|
||||
# fall back to the package name (1st argument with munging).
|
||||
extract_package_name='
|
||||
/^AC_INIT(\[*/{
|
||||
s///
|
||||
|
|
@ -188,8 +208,11 @@ extract_package_name='
|
|||
p
|
||||
}
|
||||
'
|
||||
package=$(sed -n "$extract_package_name" configure.ac) \
|
||||
|| die 'cannot find package name in configure.ac'
|
||||
package=$(${AUTOCONF:-autoconf} --trace AC_INIT:\$4 configure.ac 2>/dev/null)
|
||||
if test -z "$package"; then
|
||||
package=$(sed -n "$extract_package_name" configure.ac) \
|
||||
|| die 'cannot find package name in configure.ac'
|
||||
fi
|
||||
gnulib_name=lib$package
|
||||
|
||||
build_aux=build-aux
|
||||
|
|
@ -229,7 +252,7 @@ excluded_files=
|
|||
|
||||
# File that should exist in the top directory of a checked out hierarchy,
|
||||
# but not in a distribution tarball.
|
||||
checkout_only_file=TODO
|
||||
checkout_only_file=src/dhcpd-pools.c
|
||||
|
||||
# Whether to use copies instead of symlinks.
|
||||
copy=false
|
||||
|
|
@ -291,62 +314,6 @@ find_tool ()
|
|||
eval "export $find_tool_envvar"
|
||||
}
|
||||
|
||||
# Override the default configuration, if necessary.
|
||||
# Make sure that bootstrap.conf is sourced from the current directory
|
||||
# if we were invoked as "sh bootstrap".
|
||||
case "$0" in
|
||||
*/*) test -r "$0.conf" && . "$0.conf" ;;
|
||||
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||
esac
|
||||
|
||||
if test "$vc_ignore" = auto; then
|
||||
vc_ignore=
|
||||
test -d .git && vc_ignore=.gitignore
|
||||
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
||||
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.
|
||||
|
||||
# Parse options.
|
||||
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
--help)
|
||||
usage
|
||||
exit;;
|
||||
--gnulib-srcdir=*)
|
||||
GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
|
||||
--skip-po)
|
||||
SKIP_PO=t;;
|
||||
--force)
|
||||
checkout_only_file=;;
|
||||
--copy)
|
||||
copy=true;;
|
||||
--bootstrap-sync)
|
||||
bootstrap_sync=true;;
|
||||
--no-bootstrap-sync)
|
||||
bootstrap_sync=false;;
|
||||
--no-git)
|
||||
use_git=false;;
|
||||
*)
|
||||
die "$option: unknown option";;
|
||||
esac
|
||||
done
|
||||
|
||||
$use_git || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: --no-git requires --gnulib-srcdir"
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
# Strip blank and comment lines to leave significant entries.
|
||||
gitignore_entries() {
|
||||
sed '/^#/d; /^$/d' "$@"
|
||||
|
|
@ -388,9 +355,140 @@ insert_vc_ignore() {
|
|||
insert_if_absent "$vc_ignore_file" "$pattern"
|
||||
}
|
||||
|
||||
symlink_to_dir()
|
||||
{
|
||||
src=$1/$2
|
||||
dst=${3-$2}
|
||||
|
||||
test -f "$src" && {
|
||||
|
||||
# If the destination directory doesn't exist, create it.
|
||||
# This is required at least for "lib/uniwidth/cjk.h".
|
||||
dst_dir=$(dirname "$dst")
|
||||
if ! test -d "$dst_dir"; then
|
||||
mkdir -p "$dst_dir"
|
||||
|
||||
# If we've just created a directory like lib/uniwidth,
|
||||
# tell version control system(s) it's ignorable.
|
||||
# FIXME: for now, this does only one level
|
||||
parent=$(dirname "$dst_dir")
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_vc_ignore $ig "${dst_dir##*/}"
|
||||
done
|
||||
fi
|
||||
|
||||
if $copy; then
|
||||
{
|
||||
test ! -h "$dst" || {
|
||||
echo "$me: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
} &&
|
||||
test -f "$dst" &&
|
||||
cmp -s "$src" "$dst" || {
|
||||
echo "$me: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
# Leave any existing symlink alone, if it already points to the source,
|
||||
# so that broken build tools that care about symlink times
|
||||
# aren't confused into doing unnecessary builds. Conversely, if the
|
||||
# existing symlink's timestamp is older than the source, make it afresh,
|
||||
# so that broken tools aren't confused into skipping needed builds. See
|
||||
# <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
|
||||
test -h "$dst" &&
|
||||
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 &&
|
||||
test "$src_i" = "$dst_i" &&
|
||||
both_ls=$(ls -dt "$src" "$dst") &&
|
||||
test "X$both_ls" = "X$dst$nl$src" || {
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
die "invalid symlink calculation: $src -> $dst";;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
echo "$me: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
}
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
# Override the default configuration, if necessary.
|
||||
# Make sure that bootstrap.conf is sourced from the current directory
|
||||
# if we were invoked as "sh bootstrap".
|
||||
case "$0" in
|
||||
*/*) test -r "$0.conf" && . "$0.conf" ;;
|
||||
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||
esac
|
||||
|
||||
if test "$vc_ignore" = auto; then
|
||||
vc_ignore=
|
||||
test -d .git && vc_ignore=.gitignore
|
||||
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
||||
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.
|
||||
|
||||
# Parse options.
|
||||
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
--help)
|
||||
usage
|
||||
exit;;
|
||||
--version)
|
||||
set -e
|
||||
echo "bootstrap $scriptversion"
|
||||
echo "$copyright"
|
||||
exit 0
|
||||
;;
|
||||
--gnulib-srcdir=*)
|
||||
GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
|
||||
--skip-po)
|
||||
SKIP_PO=t;;
|
||||
--force)
|
||||
checkout_only_file=;;
|
||||
--copy)
|
||||
copy=true;;
|
||||
--bootstrap-sync)
|
||||
bootstrap_sync=true;;
|
||||
--no-bootstrap-sync)
|
||||
bootstrap_sync=false;;
|
||||
--no-git)
|
||||
use_git=false;;
|
||||
*)
|
||||
bootstrap_option_hook $option || die "$option: unknown option";;
|
||||
esac
|
||||
done
|
||||
|
||||
$use_git || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: --no-git requires --gnulib-srcdir"
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
|
||||
found_aux_dir=no
|
||||
grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
|
||||
grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'])' configure.ac \
|
||||
>/dev/null && found_aux_dir=yes
|
||||
grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
|
||||
>/dev/null && found_aux_dir=yes
|
||||
|
|
@ -666,9 +764,26 @@ if $use_gnulib; then
|
|||
shallow=
|
||||
if test -z "$GNULIB_REVISION"; then
|
||||
git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
|
||||
git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \
|
||||
|| cleanup_gnulib
|
||||
else
|
||||
git fetch -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
|
||||
mkdir -p "$gnulib_path"
|
||||
# Only want a shallow checkout of $GNULIB_REVISION, but git does not
|
||||
# support cloning by commit hash. So attempt a shallow fetch by commit
|
||||
# hash to minimize the amount of data downloaded and changes needed to
|
||||
# be processed, which can drastically reduce download and processing
|
||||
# time for checkout. If the fetch by commit fails, a shallow fetch can
|
||||
# not be performed because we do not know what the depth of the commit
|
||||
# is without fetching all commits. So fallback to fetching all commits.
|
||||
git -C "$gnulib_path" init
|
||||
git -C "$gnulib_path" remote add origin \
|
||||
${GNULIB_URL:-$default_gnulib_url}
|
||||
git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" \
|
||||
|| git -C "$gnulib_path" fetch origin \
|
||||
|| cleanup_gnulib
|
||||
git -C "$gnulib_path" reset --hard FETCH_HEAD
|
||||
fi
|
||||
git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \
|
||||
|| cleanup_gnulib
|
||||
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
|
|
@ -785,75 +900,6 @@ case $SKIP_PO in
|
|||
fi;;
|
||||
esac
|
||||
|
||||
symlink_to_dir()
|
||||
{
|
||||
src=$1/$2
|
||||
dst=${3-$2}
|
||||
|
||||
test -f "$src" && {
|
||||
|
||||
# If the destination directory doesn't exist, create it.
|
||||
# This is required at least for "lib/uniwidth/cjk.h".
|
||||
dst_dir=$(dirname "$dst")
|
||||
if ! test -d "$dst_dir"; then
|
||||
mkdir -p "$dst_dir"
|
||||
|
||||
# If we've just created a directory like lib/uniwidth,
|
||||
# tell version control system(s) it's ignorable.
|
||||
# FIXME: for now, this does only one level
|
||||
parent=$(dirname "$dst_dir")
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_vc_ignore $ig "${dst_dir##*/}"
|
||||
done
|
||||
fi
|
||||
|
||||
if $copy; then
|
||||
{
|
||||
test ! -h "$dst" || {
|
||||
echo "$me: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
} &&
|
||||
test -f "$dst" &&
|
||||
cmp -s "$src" "$dst" || {
|
||||
echo "$me: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
# Leave any existing symlink alone, if it already points to the source,
|
||||
# so that broken build tools that care about symlink times
|
||||
# aren't confused into doing unnecessary builds. Conversely, if the
|
||||
# existing symlink's timestamp is older than the source, make it afresh,
|
||||
# so that broken tools aren't confused into skipping needed builds. See
|
||||
# <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
|
||||
test -h "$dst" &&
|
||||
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 &&
|
||||
test "$src_i" = "$dst_i" &&
|
||||
both_ls=$(ls -dt "$src" "$dst") &&
|
||||
test "X$both_ls" = "X$dst$nl$src" || {
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
die "invalid symlink calculation: $src -> $dst";;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
echo "$me: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
}
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
version_controlled_file() {
|
||||
parent=$1
|
||||
file=$2
|
||||
|
|
@ -971,7 +1017,7 @@ bootstrap_post_import_hook \
|
|||
# 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."
|
||||
"Run 'git submodule update --init' and bootstrap again."
|
||||
fi
|
||||
|
||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||
|
|
@ -1065,7 +1111,7 @@ bootstrap_epilogue
|
|||
|
||||
echo "$0: done. Now you can run './configure'."
|
||||
|
||||
# Local variables:
|
||||
# Local Variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2022 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
|
|
@ -64,7 +64,7 @@ XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
|||
gettext_external=0
|
||||
grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
|
||||
gettext_external=1
|
||||
grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
|
||||
grep '^[ ]*AM_GNU_GETTEXT(\[external]' configure.ac > /dev/null &&
|
||||
gettext_external=1
|
||||
|
||||
if test $gettext_external = 1; then
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#!/bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2012-12-31.23; # UTC
|
||||
scriptversion=2022-01-27.18; # UTC
|
||||
|
||||
# Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2022 Free Software Foundation, Inc.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
|
|
@ -15,9 +15,9 @@ scriptversion=2012-12-31.23; # UTC
|
|||
# GNU General Public License for more details.
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
|
||||
# This script is derived from GIT-VERSION-GEN from GIT: https://git-scm.com/.
|
||||
# It may be run two ways:
|
||||
# - from a git repository in which the "git describe" command below
|
||||
# produces useful output (thus requiring at least one signed tag)
|
||||
|
|
@ -65,19 +65,21 @@ scriptversion=2012-12-31.23; # UTC
|
|||
# EXTRA_DIST = $(top_srcdir)/.version
|
||||
# BUILT_SOURCES = $(top_srcdir)/.version
|
||||
# $(top_srcdir)/.version:
|
||||
# echo $(VERSION) > $@-t && mv $@-t $@
|
||||
# echo '$(VERSION)' > $@-t
|
||||
# mv $@-t $@
|
||||
# dist-hook:
|
||||
# echo $(VERSION) > $(distdir)/.tarball-version
|
||||
# echo '$(VERSION)' > $(distdir)/.tarball-version
|
||||
|
||||
|
||||
me=$0
|
||||
|
||||
year=`expr "$scriptversion" : '\([^-]*\)'`
|
||||
version="git-version-gen $scriptversion
|
||||
|
||||
Copyright 2011 Free Software Foundation, Inc.
|
||||
There is NO warranty. You may redistribute this software
|
||||
under the terms of the GNU General Public License.
|
||||
For more information about these matters, see the files named COPYING."
|
||||
Copyright (C) ${year} Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
|
||||
usage="\
|
||||
Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
|
||||
|
|
@ -85,8 +87,9 @@ Print a version string.
|
|||
|
||||
Options:
|
||||
|
||||
--prefix prefix of git tags (default 'v')
|
||||
--fallback fallback version to use if \"git --version\" fails
|
||||
--prefix PREFIX prefix of git tags (default 'v')
|
||||
--fallback VERSION
|
||||
fallback version to use if \"git --version\" fails
|
||||
|
||||
--help display this help and exit
|
||||
--version output version information and exit
|
||||
|
|
@ -100,8 +103,8 @@ while test $# -gt 0; do
|
|||
case $1 in
|
||||
--help) echo "$usage"; exit 0;;
|
||||
--version) echo "$version"; exit 0;;
|
||||
--prefix) shift; prefix="$1";;
|
||||
--fallback) shift; fallback="$1";;
|
||||
--prefix) shift; prefix=${1?};;
|
||||
--fallback) shift; fallback=${1?};;
|
||||
-*)
|
||||
echo "$0: Unknown option '$1'." >&2
|
||||
echo "$0: Try '--help' for more information." >&2
|
||||
|
|
@ -140,11 +143,9 @@ then
|
|||
v=`cat $tarball_version_file` || v=
|
||||
case $v in
|
||||
*$nl*) v= ;; # reject multi-line output
|
||||
[0-9]*) ;;
|
||||
*) v= ;;
|
||||
esac
|
||||
test "x$v" = x \
|
||||
&& echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
|
||||
&& echo "$0: WARNING: $tarball_version_file is damaged" 1>&2
|
||||
fi
|
||||
|
||||
if test "x$v" != x
|
||||
|
|
@ -166,9 +167,10 @@ then
|
|||
# tag or the previous older version that did not?
|
||||
# Newer: v6.10-77-g0f8faeb
|
||||
# Older: v6.10-g0f8faeb
|
||||
case $v in
|
||||
*-*-*) : git describe is okay three part flavor ;;
|
||||
*-*)
|
||||
vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v
|
||||
case $vprefix in
|
||||
*-*) : git describe is probably okay three part flavor ;;
|
||||
*)
|
||||
: git describe is older two part flavor
|
||||
# Recreate the number of commits and rewrite such that the
|
||||
# result is the same as if we were using the newer version
|
||||
|
|
@ -183,9 +185,9 @@ then
|
|||
;;
|
||||
esac
|
||||
|
||||
# Change the first '-' to a '.', so version-comparing tools work properly.
|
||||
# Remove the "g" in git describe's output string, to save a byte.
|
||||
v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
|
||||
# Change the penultimate "-" to ".", for version-comparing tools.
|
||||
# Remove the "g" to save a byte.
|
||||
v=`echo "$v" | sed 's/-\([^-]*\)-g\([^-]*\)$/.\1-\2/'`;
|
||||
v_from_git=1
|
||||
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
|
||||
v=UNKNOWN
|
||||
|
|
@ -199,7 +201,7 @@ v=`echo "$v" |sed "s/^$prefix//"`
|
|||
# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
|
||||
# or if it came from .tarball-version.
|
||||
if test "x$v_from_git" != x; then
|
||||
# Don't declare a version "dirty" merely because a time stamp has changed.
|
||||
# Don't declare a version "dirty" merely because a timestamp has changed.
|
||||
git update-index --refresh > /dev/null 2>&1
|
||||
|
||||
dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
|
||||
|
|
@ -214,12 +216,12 @@ if test "x$v_from_git" != x; then
|
|||
fi
|
||||
|
||||
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
|
||||
echo "$v" | tr -d "$nl"
|
||||
printf %s "$v"
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_MACRO_DIRS([m4])
|
||||
AC_INIT([dhcpd-pools],
|
||||
[m4_esyscmd([build-aux/git-version-gen .tarball-version])],
|
||||
[kerolasa@iki.fi],[],
|
||||
|
|
|
|||
2
lib/.gitignore
vendored
2
lib/.gitignore
vendored
|
|
@ -150,6 +150,8 @@
|
|||
/stdio.h
|
||||
/stdio-impl.h
|
||||
/stdio.in.h
|
||||
/stdio-read.c
|
||||
/stdio-write.c
|
||||
/stdlib.h
|
||||
/stdlib.in.h
|
||||
/stpncpy.c
|
||||
|
|
|
|||
|
|
@ -628,8 +628,8 @@ static void html_header(struct conf_t *state, FILE *restrict f)
|
|||
fprintf(f, "<meta charset=\"utf-8\">\n");
|
||||
fprintf(f, "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n");
|
||||
fprintf(f, "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n");
|
||||
fprintf(f, "<link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\" type=\"text/css\">\n");
|
||||
fprintf(f, "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css\">\n");
|
||||
fprintf(f, "<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" type=\"text/css\">\n");
|
||||
fprintf(f, "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css\">\n");
|
||||
fprintf(f, "<style type=\"text/css\">\n");
|
||||
fprintf(f, "table.dhcpd-pools th { text-transform: capitalize }\n");
|
||||
fprintf(f, "</style>\n");
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ All networks 100 43 43.000 0 43 43.000
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css">
|
||||
<style type="text/css">
|
||||
table.dhcpd-pools th { text-transform: capitalize }
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue