* gl/build-aux/bootstrap.in (func_require_buildreq_autoconf): Quote
the extracted version number correctly so that it is displayed in
verbose mode.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/funclib.sh (func_sort_ver): Much simplified.
(func_lt_ver): New function, return true if arguments are in
ascending order.
* gl/build-aux/bootstrap.in: Simplify with func_lt_ver.
* gl/build-aux/do-release-commit-and-tag.diff: Likewise.
* bootstrap: Regenerate.
Co-Authored-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (EGREP, FGREP, GREP, SED): Remove.
These are already set by funclib.sh.
(func_prep): After --verbose has been processed, show the paths
to GREP and SED found by funclib.sh.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/funclib.sh (func_path_progs): New function. Factor
out common code from GREP and SED searches.
(func_check_prog_sed, func_check_prog_grep): New functions, for
non-common code.
(scriptversion): Update.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
On at least Unixware 7.1.4, the first grep binary on PATH is
unable to process the extract-trace scripts.
* gl/build-aux/funclib.sh (GRUP): Search PATH for a grep binary
that doesn't truncate its own output if available, and set GREP
accordingly.
* Makefile.am (SCRIPT_ENV): Add setting for GREP.
* bootstrap: Regenerate.
Reported by Tim Rice.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
On at least Unixware 7.1.4, the first sed binary on PATH is
unable to process the extract-trace scripts.
* gl/build-aux/funclib.sh (PATH_SEPARATOR): Set to : or ;
according to a feature test.
(func_executable_p): New function.
(SED): Search PATH for a sed binary that doesn't truncate its
own output if available, and set SED accordingly.
(scriptversion): Update.
* Makefile.am (SCRIPT_ENV): New macro, for propagating configured
variables.
(ltdl_ac_aux_dir, $(ltmain_sh), install-data-local): Use it.
* bootstrap: Regenerate.
Reported by Tim Rice.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (func_reconfigure): Don't show an
error when running without gnulib-cache.m4.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (func_bootstrap): Move
func_changelog_ensure invocation from here...
(func_reconfigure): ...to here. If gnulib_modules is empty, then
grep gnulib-cache.m4 for gitlog-to-changelog before invoking
func_changelog_ensure.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Recent changes uncovered some bugs in handling of gnulib-tool
options for projects that check in gnulib-cache.m4 rather than
keep a separate list of modules and options in bootstrap.conf.
* gl/build-aux/bootstrap.in (func_require_doc_base)
(func_require_gnulib_name, func_require_local_gl_dir): New
functions to set defaults from gnulib-cache.m4 in projects that
use gnulib-tool in --update mode.
(func_require_gnulib_tool_base_options): Use them to fetch
defaults.
(func_require_gnulib_copy_cmd): New function to calculate the
options required for gnlib-tool copy command.
(func_gnulib_tool_copy_file): Simplify accordingly.
(scriptversion): Bump.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (func_require_gnulib_tool): No
sneaking off and cloning gnulib when the user already specified
gnulib_tool=true in their bootstrap.conf!
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Putting tab first in IFS breaks func_echo_all usage of $*,
resulting in failure of func_infer_tag to match a command line
using a $CC with trailing spaces. The trailing spaces were
stripped out of CC_expanded but words in $CC were separated by
tabs. This didn't match the makefile expansion of $CC using the
standard IFS with a first char of space.
* gl/build-aux/funclib.sh (IFS): Make first char a space.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (bootstrap_parse_options): Accept
--no-git as an alias for --skip-git for compatibility with gnulib
bootstrap, and --no-po for symmetry.
Reported by Mike Miller.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (func_gnulib_tool): Even though we
don't need it, support gnulib_tool_option_extras for bootstrap.conf
ported from gnulib bootstrap.
* bootstrap: Regenerate.
Reported by Mike Miller.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (func_check_tool): Check whether there
is an executable as given or on the command PATH.
(func_check_version): Use func_check_tool to avoid invoking --version
when buildreq specifies '-' for the version number.
* bootstrap: Regenerate.
Reported by Mike Miller.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Particularly when porting from gnulib bootstrap to libtool
bootstrap, it's easy to forget the extra URL column used for
error reporting.
* gl/build-aux/bootstrap.in (func_check_versions): A non-URL
pattern in the 3rd column of buildreq triggers a fatal error.
* bootstrap: Regenerate.
Reported by Mike Miller.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (func_insert_if_absent): Work around
the problem of OpenBSD sed not supporting '-' as a notation for
standard input.
* bootstrap: Regenerate.
* THANKS: Add Mike Miller.
Reported by Mike Miller.
Copyright-paperwork-exempt: Yes
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (func_insert_if_absent): Print verbose
message when there is a new entry to add.
Also, make sure to update the .gitignore file when changed.
* bootstrap: Regenerate.
* THANKS: Add Pádraig Brady.
Reported by Pádraig Brady.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (func_insert_if_absent): Make sure
test operands are quoted correctly.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (func_gitignore_entries): New function.
Strip comments and blank lines.
(func_insert_sorted_if_absent): Renamed...
(func_insert_if_absent): ...to this. Adjust all callers.
Instead of comparing the sorted new file with the original,
compare the line count, being careful to diagnose duplicate
entries which would otherwise skew the count.
Co-authored-by: Gary V. Vaughan <gary@gnu.org>
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (require_gnulib_submodule): Register
the gnulib submodule before updating it, even with a shallow
clone of gnulib.
* bootstrap: Regenerate.
Reported by Robert Boehne.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/funclib.sh: Fix a typo in fork minimisation for
bash versions 3.00.x.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/bootstrap.in (require_buildreq_automake)
(require_dotgitmodules_parameters, require_package)
(func_update_po_files): Use '\n' or -e to separate sed commands,
instead of ';'.
* gl/build-aux/extract-trace (func_autoconf_configure)
(func_extract_trace_first): Likewise.
* gl/funclib.sh: Likewise.
(func_tr_sh): Likewise.
* gl/build-aux/options-parser (func_usage_message): Likewise.
* bootstrap: Regenerate.
Reported by Robert Boehne.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/funclib.sh (func_error): Move the prefix indent
before $tc_standout to avoid bright red inverse spaces.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Be more helpful when a prerequisite program from $buildreq
cannot be located, by showing what variable to export if it
is already installed but not in PATH.
* gl/build-aux/bootstrap.in (func_check_versions): Display
associated environment variables for not found prerequisite
programs.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Plenty of machines use a terminfo database that doesn't have
entries for color escape sequences, even though the terminal
itself most likely supports ANSI color escapes.
* gl/build-aux/funclib.sh (require_term_colors): If COLORTERM
or USE_ANSI_COLORS are set, then ignore what terminfo says,
and use standard ANSI color escape sequences.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/funclib.sh (func_error): Indent 'error' prefix by
two additional spaces to line up nicely with 'warning' and
'running'.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* bootstrap.in (func_show_eval): Use $require_term_colors to
embolden the command about to be executed in output.
* bootstrap: Regenerate.
* bootstrap.conf (libtool_build_prerequisites): Use the standard
(colorful!) bootstrap func_show_eval here too.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Modern GNU ASCII quoting in output and comments is done
'like this'.
* cfg.mk (sc_old_style_quoting): Try to catch most instances
of `old style quoting' so that it is not accidentally re-
introduced to the code.
* HACKING, Makefile.am, NEWS, PORTING, README, TODO, bootstrap,
bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/git-hooks/commit-msg, build-aux/ltmain.in,
doc/libtool.texi, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/build-aux/inline-source, gl/build-aux/options-parser,
libltdl/libltdl/slist.h, libltdl/loaders/loadlibrary.c,
libltdl/ltdl.c, libltdl/slist.c, libtoolize.in, m4/argz.m4,
m4/libtool.m4, m4/ltdl.m4, m4/ltoptions.m4, m4/ltsugar.m4,
tests/cmdline_wrap.at, tests/configure-iface.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/execute-mode.at,
tests/f77demo.at, tests/fail.at, tests/inherited_flags.at,
tests/libtool.at, tests/libtoolize.at, tests/lt_dladvise.at,
tests/lt_dlexit.at, tests/mdemo.at, tests/need_lib_prefix.at,
tests/old-ltdl-iface.at, tests/old-m4-iface.at, tests/static.at,
tests/stresstest.at, tests/testsuite.at, tests/versioning.at:
Convert to upright quotes.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
In order to work as if it were already adopted by upstream
gnulib, put bootstrap and supporting scripts into the local
gnulib overrides directory.
* bootstrap, build-aux/extract-trace, build-aux/funclib.sh,
build-aux/inline-source, build-aux/options-parser: Move from
here...
* gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
gl/build-aux/funclib.sh, gl/build-aux/inline-source,
gl/build-aux/options-parser: ...to here.
* gl/build-aux/options-parser (func_version): Show only the
first copyright notice on files generated with inline-source.
* gl/doc/bootstrap.texi: Developer documentation for bootstrap.
* gl/modules/extract-trace, gl/modules/funclib.sh,
gl/modules/inline-source, gl/modules/options-parser: Describe
dependencies for gnulib-tool.
* bootstrap.conf (gnulib_modules): Add extract-trace,
inline-source and options-parser modules.
* bootstrap: Regenerated from gnulib overrides as a mono-
lithic script file using gl/build-aux/inline-source.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* tests/libtoolize.at (multiple AC_CONFIG_MACRO_DIRS directories):
New test to ensure multiple directory arguments mork correctly.
* libtoolize.in (func_require_ac_macro_dir): Use expr to discard
any additional space delimited entries in the first
AC_CONFIG_MACRO_DIRS argument.
* bootstrap (func_require_macro_dir): Likewise.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libtoolize.in (func_install_pkgmacro_files): Uee
AC_CONFIG_MACRO_DIRS.
(func_check_macros): Advise using AC_CONFIG_MACRO_DIRS.
(require_ac_macro_dir): Give priority to AC_CONFIG_MACRO_DIRS.
(require_macro_dir): Likewise.
* bootstrap: Give priority to AC_CONFIG_MACRO_DIRS.
* configure.ac: Define dummy AC_CONFIG_MACRO_DIRS for older
Autotools, that is allow bootstrap with current release versions.
Use AC_CONFIG_MACRO_DIRS instead of AC_CONFIG_MACRO_DIR.
* tests/testsuite.at: Source build-aux/extract-trace for access
to func_extract_trace.
(LT_AT_ACLOCAL): Use it to get the AC_CONFIG_MACRO_DIRS argument
to pass manually to aclocal for compatibility with old Automake.
Add a fallback AC_CONFIG_MACRO_DIRS definition to acinclude.m4
in the test directory.
(LT_AT_AUTORECONF): Likewise.
* tests/cdemo.at, tests/configure-iface.at, tests/darwin.at,
tests/demo.at, tests/depdemo.at, tests/early-libtool.at,
tests/libtoolize.at, tests/mdemo.at, tests/no-executables.at,
tests/nonrecursive.at, tests/old-ltdl-iface.at,
tests/recursive.at, tests/subproject.at, tests/tagdemo.at,
tests/template.at: Likewise.
* doc/libtool.texi: Update.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Previous versions of bootstrap concatenated all the arguments to
multiple invocations of AC_CONFIG_MACRO_DIR when extracting the
macro_dir directory name. This change enforces correct and
consistent behaviour.
* libtoolize.in (func_require_macro_dir): Use the new
func_extract_trace_first function to make sure the first argument
is always used.
(func_require_aux_dir, func_require_gnulib_mk)
(func_require_source_base): Future proof these functions against
multiple invocations or additional arguments to the macros they
trace.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* bootstrap (func_require_macro_dir): .* is greedy, so _G_sed_scan
as it was will always return the last -I argument, which is wrong.
Move to a shell loop to ensure we always get the first -I argument
if any. (code from libtoolize.in).
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Moving potentially reusable code into a common file that can
be sourced by clients, and adjusting for impedance mismatch
or necessary renames during integration.
* build-aux/funclib.sh: New file.
* build-aux/options-parser (Shell normalisation)
(User overrideable command paths, Global variables, func_append)
(require_term_colors, func_echo, func_echo_infix_1, func_warn)
(func_error, func_fatal_error, func_quote_for_eval, func_verbose):
Move from here...
* build-aux/funclib.sh (Shell normalisation, User overrideable
command paths, Global variables, func_append)
(require_term_colors, func_echo, func_echo_infix_1)
(func_warn_and_continue, func_error, func_fatal_error)
(func_quote_for_eval, func_verbose): ...to here.
* build-aux/general.m4sh (func_arith, func_basename)
(func_dirname, func_dirname_and_basename, func_echo_all)
(func_grep, func_len, func_mkdir_p, func_mktempdir)
(func_normal_abspath, func_relative_path, func_quote_for_expand)
(func_stripname, func_show_eval, func_tr_sh): Move from here...
* build-aux/funclib.sh(func_arith, func_basename)
(func_dirname, func_dirname_and_basename, func_echo_all)
(func_grep, func_len, func_mkdir_p, func_mktempdir)
(func_normal_abspath, func_relative_path, func_quote_for_expand)
(func_stripname, func_show_eval, func_tr_sh): ...to here.
* bootstrap (usage message): Document `-no-warn' option.
(func_append_u, func_warning): Move from here...
* build-aux/funclib.sh (func_append_uniq, func_warning): ...to
here.
* bootstrap, build-aux/extract-trace: Source build-aux/funclib.sh
before build-aux/options-parser.
* build-aux/options-parser (usage, long_help_message): Set
default values to match what is parsed by the unmodified parser.
* build-aux/extract-trace (usage, long_help_message): Only set
from func_main, so that clients sourcing this file can still use
the correct defaults from build-aux/options-parser.
* bootstrap (bootstrap_options_prep, bootstrap_parse_options):
Move warning option parsing from here...
* build-aux/option-parser (func_options_prep)
(func_parse_options): ...to here, where all clients can benefit.
* Makefile.am (funclib_sh): New macro; path to funclib.sh.
(EXTRA_DIST): Add $(funclib_sh).
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Bootstrapping without --gnulib-srcdir creates a shallow gnulib
clone to run gnulib-tool out of, except that the parent package
is almost certainly using a revision of gnulib before just tha
most recent 2 gnulib revisions.
* bootstrap (func_require_gnulib_submodule): Pull the most
recent 365 revisions, which ought to be enough for a well-
maintained parent package.
Don't forget to run 'git submodule update' to select the correct
gnulib revision.
* bootstrap, build-aux/extract-trace, build-aux/options-parser
(Local variables): Use time-stamp-pattern to set number of
searched lines to 10, and to replace time-stamp-start,
time-stamp-end and time-stamp-format.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
No need for a spurious space before a command ending semi-colon.
* cfg.mk (sc_prohibit_space_semicolon): New test to catch
accidental reintroduction of spurious spaces removed by this
changeset.
* bootstrap, build-aux/general.m4sh, build-aux/ltmain.m4sh,
libltdl/lt__strl.c, m4/libtool.m4, m4/ltdl.m4, tests/bindir.at:
Remove spurious spaces.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
See maintain.texi (Copyright Notices) for rules for maintaining
the years in copyright notices.
* All Files (Copyright): Updated with missing 2011 and 2012.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Dash shipped with Ubutu-11.10 as /bin/sh, among others, still
has a crippled echo builtin that mis-handles backslashes.
* build-aux/options-parser (bs_echo): Adopt the autoconf echo
normalization code to find a suitable replacement for buggy echo
commands.
Adjust all uses of echo to $bs_echo.
* build-aux/extract-trace (func_extract_trace, func_main):
Likewise.
* bootstrap: To retain some execution speed on platforms with
buggy builtin echo, replace most occurrences of `echo' with
`$bs_echo' - except where its arguments will obviously never
contain backslashes or be overly long.
Reported by Reuben Thomas.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* bootstrap (func_require_buildreq_autobuild)
(func_require_buildreq_automake): Vi's delete word command is
too greedy and also eats trailing whitespace before following
non-word-chars. Put back the spaces it ate so that
syntax-checks pass once again.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* bootstrap: Although not a real bug, for consistency, be sure
to correctly escape single quotes inside a single quoted
function generator.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>