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>
* m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD) [MSVC]: Use
func_win32_libid as file_magic_cmd when the name lister
is MS dumpbin.
(_LT_CMD_GLOBAL_SYMBOLS): Export the new veriable nm_interface
to the libtool script.
* build-aux/ltmain.in (func_cygming_gnu_implib_p)
(func_cygming_ms_implib_p): Move up to before...
(func_win32_libid): ...which now uses them to determine if
the object is an import library when the nm_interface is
"MS dumpbin".
* NEWS: Update.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Previous releases of libtoolize used the final invocation when
there were several, and after the rewrite over extract-trace,
all the invocation directories were concatenated. This change
enforces correct and consistent behaviour.
* tests/libtoolize.at (multiple AC_CONFIG_MACRO_DIR invocation):
New test.
* build-aux/extract-trace (func_extract_trace_first): New function
for clients that source this file, which returns only the first
argument to the first invocation of the named macros.
* libtoolize.in (func_require_ac_macro_dir): Use it to make sure
the first argument is always used.
(func_require_ac_aux_dir, func_require_ac_ltdl_dir)
(func_require_ac_ltdl_options): Future proof these functions against
multiple invocations or additional arguments to the macros they
trace.
* News (Important incompatible changes): Note change in semantics.
Reported by Eric Blake.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
The lt_sed_naive_backslashify variable lost its lt_ prefix
when m4sh was dropped. But not everywhere.
* build-aux/ltmain.in (func_convert_core_file_wine_to_w32)
(func_convert_core_msys_to_w32): Drop the lt_ prefix from
the lt_sed_naive_backslashify variable.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* build-aux/funclib.sh (func_echo_infix_1): These quotes are not
actually nested, so add an exclude marker for the syntax-check.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.in: Declare relative paths to aux scripts from
source commands, for early inlining during bootstrap.
* Makefile.am (bootstrap_edit): Move auxscriptsdir
substitution from here....
(configure_edit): ...to here.
($(ltmain_sh)): Feed ltmain.in through inline-source as ltmain.sh
is generated to remove relative paths to aux scripts.
(install-data-local): Simplify. No need for special treatment for
ltmain.sh during installation, since aux scripts have already
been inlined.
Reported by Peter Rosin.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/extract-trace: $usage is too generic, and can cause
sourced extract-trace to re-source options-parser. We already
require that funclib.sh be sourced before sourcing options-parser,
so it's safer to check that $progname is correct before sourcing
options-parser again from here.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Now that the code base has coalesced around a single option
parser, there's no need for the unused getopt.m4sh and support.
* build-aux/getopt.m4sh, build-aux/general.m4sh,
tests/getopt-m4sh.at: Remove.
* Makefile.am (m4sh_dir, LT_M4SH, general_m4sh, getopt_m4sh)
(sh_files): Remove.
(TESTSUITE_AT): Remove tests/getopt-m4sh.at.
(TESTS_ENVIRONMENT): Remove M4SH.
* bootstrap.conf (libtool_build_prerequisites): Remove M4SH.
* configure.ac (M4SH): Remove.
* HACKING (Editing `.m4sh' Files): Remove and renumber following
sections.
* Makefile.am (ltmain_m4sh, ltmain_sh_edit): Remove.
(ltmain_in): Path to ltmain.in.
(ltmain_sh): Generate ltmain.sh from ltmain.in using
$(bootstrap_edit).
* build-aux/ltmain.m4sh: Remove.
* build-aux/ltmain.in: Rewritten as a client of funclib.sh.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
When any argument contains a shell meta-character, it needs to be
quoted when passed around. We already pass parameter lists as
space delimited strings of arguments, and pass the string through
eval to turn it back into a list before re-assigning using `set'.
To prevent the shell from interpreting any meta-characters during
an `eval set dummy $argumentlist', they must be quoted again
inside the quoted argument list.
* build-aux/funclib.sh (func_quote_for_eval): Be careful to keep
a separate tally of quoted and unquoted argument lists, to
conform to the API of the single argument func_quote_for_eval
implementation in build-aux/general.m4sh.
* bulid-aux/options-parser (func_run_hooks): To account for the
doubly quoted meta-character argument lists, we must eval the
parameter reassignment `set' call separately from evaluating the
dynamically named hook results variable.
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>
* build-aux/options-parser (_G_HAVE_XSI_OPS): Environment
overrideable defaults for bash and zsh, which are known to
support XSI extensions.
(_G_HAVE_PLUSEQ_OP): Similarly for new enough versions of bash,
which are known to have += support.
(func_append): Only perform the shell += probe when state of
support is unknown.
(func_split_equals, func_split_short_opt): Similarly for XSI
probe to select fastest working implementation.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/options-parser (func_parse_options): When there is
more than one non-option argument, "$*" forces all of them into
a single string. Use ${1+"$@"} to set arguments correctly.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* 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>
* build-aux/ltmain.m4sh (func_mode_link): Unroll a hard to
understad nested if statement into a more readable single case
statement.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Save an if statement
with '$skipped_export && { block; }' instead of 'if $skipped_export;
then block; fi'.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Reverse the branch
order for an if statement for readability.
* m4/libtool.m4: Likewise.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Save test invocations
by using 'test x,y = "$a,$b"' instead of 'test x = "$a" && test y
= "$b"'.
* m4/libtool.m4: Likewise.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): For readability, use
'test string = "$var" || { stuff; }' in preference to
'if test string != "$var"; then stuff; fi'.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_uninstall): Save a string
comparison by setting $rmforce to false or : and using it
directly as the first argument to if.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Save a string
comparison by setting $wrappers_required to false or : and using
it directly with a ored block rather than an if statement.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Save a string
comparison by setting $linkalldeplibs to false or : and using it
directly as the first argument to if.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Save a string
comparison by setting $valid_a_lib to false or : and using it
directly as the first argument to if.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Save a string
comparison by setting $found to false or : and using it directly
as the first argument to if.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Save a string
comparison by setting $alldeplibs to false or : and using it
directly as the first argument to if.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Save a string
comparison by setting $preload to false or : and using it directly
instead of if statements.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_generate_dlsyms): Save a string
comparison by setting $my_pic_p to false or : and using it directly
instead of calling if.
Adjust all callers.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_install): Save a string
comparison by setting $finalize to false or : and using it
directly as the first argument to if.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_install): Save a string
comparison by setting $isdir to false or : and using it directly
as the first argument to if.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/general.m4sh: Remove spurious braces around
${ZSH_VERSION} dereference.
* build-aux/ltmain.m4sh (func_mode_link): Likewise for ${wl}.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/cvsu: Remove. This script is not useful now that
Libtool's repository is hosted in git.
* Makefile.am (build_scripts): Remove cvsu reference.
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>
See maintain.texi (Copyright Notices) for rules for maintaining
the years in copyright notices.
* bootstrap.conf (gnulib_modules): Add update-copyright.
* cfg.mk (update-copyright-env): Set environment variables for
update-copyright script.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aub/general.m4sh (lt_HAVE_PLUSEQ_OP): Instead of using
$((..)) arithmetic, which causes an error on dash, use a case
based bash version check.
(lt_HAVE_ARITH_OP, lt_HAVE_XSI_OPS): Also short circuit the
feature probing forks and set these automatically when zsh is
detected.
Reported by Stefano Lattarini.
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>