Commit Graph

69 Commits

Author SHA1 Message Date
Gary V. Vaughan
711f2f3d45 bootstrap: move into local gl overrides directory.
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>
2012-10-21 19:39:04 +07:00
Peter Rosin
2fc9d079d6 libtool: make func_win32_libid work when the name lister is MS dumpbin
* 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>
2012-10-19 11:51:12 +02:00
Gary V. Vaughan
55262b6fe4 tests: always extract only the first AC_CONFIG_MACRO_DIR arg.
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>
2012-10-19 14:24:21 +07:00
Peter Rosin
cfe82e7f85 libtool: unbreak Windows path quoting
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>
2012-10-19 00:18:10 +02:00
Peter Rosin
92b77ed8bb libtool: kill leftover m4 quoting
* build-aux/ltmain.in (func_mode_compile): Use literal ] and [.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2012-10-18 23:49:58 +02:00
Gary V. Vaughan
a3b06455e9 syntax-check: exclude false positive nested quote test.
* 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>
2012-10-19 00:49:01 +07:00
Gary V. Vaughan
b07f86e9ea libtool: don't set auxscriptsdir at bootstrap time.
* 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>
2012-10-19 00:38:28 +07:00
Gary V. Vaughan
64c02af9f1 extract-trace: only source funclib.sh when $progname is extract-trace.
* 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>
2012-10-18 23:41:53 +07:00
Peter Rosin
cfcb7afd26 libtool: fix spelling nit
* build-aux/ltmain.in (func_generate_dlsyms): Fix spelling nit.
* libltdl/libltdl/lt_system.h: Likewise.
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Likewise.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2012-10-18 14:27:10 +02:00
Gary V. Vaughan
bbfb7d0580 maint: remove m4sh support.
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.
2012-10-12 20:18:30 +07:00
Gary V. Vaughan
0a42997c60 libtool: rewritten over funclib.sh instead of general.m4sh.
* 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>
2012-10-12 20:18:29 +07:00
Gary V. Vaughan
75ca37e267 libtoolize: inline sourced helper scripts during install.
* build-aux/inline-source: New file.
* Makefile.am (inline_source): Path to inline-source script.
(EXTRA_DIST): Distribute inline-source too.
(helper_scripts): Remove.
(install-data-local): Inline sourced helper scripts during
installation.
Don't install helper_scripts.
(uninstall-hook): Don't uninstall helper_scripts.
2012-10-12 20:18:29 +07:00
Gary V. Vaughan
4930ebf6b1 options-parser: correctly quote shell meta-characters in arguments.
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>
2012-10-12 20:18:28 +07:00
Gary V. Vaughan
a73a99b88a maint: factor common shell code into build-aux/funclib.sh.
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>
2012-10-12 20:18:28 +07:00
Gary V. Vaughan
125eb722e4 options-parser: employ fork minimisation.
* 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>
2012-10-12 18:36:37 +07:00
Gary V. Vaughan
95e3f5ee75 options-parser: keep non-option arguments separate!
* 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>
2012-10-12 18:36:37 +07:00
Gary V. Vaughan
ff7555a5aa options-parser: prefix usage message with "Usage: ".
* build-aux/options-parser (func_usage_message): Prefix usage
message with "Usage: ".

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-12 18:36:37 +07:00
Gary V. Vaughan
941797e273 maint: simplify "Local variables:" footer with time-stamp-pattern.
* 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>
2012-10-12 18:36:36 +07:00
Gary V. Vaughan
9847559cef syntax-check: fix violations and implement sc_prohibit_space_semicolon.
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>
2012-10-04 20:11:04 +07:00
Gary V. Vaughan
aab8048367 libtool: unroll complex nested compound statements
* build-aux/ltmain.m4sh: Use an if statement instead of ugified
compound statements.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-02 21:08:00 +07:00
Gary V. Vaughan
a252d59d91 libtool: unroll nested if into a single case statement.
* 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>
2012-10-02 21:07:56 +07:00
Gary V. Vaughan
c0228e02d1 libtool: simplify $skipped_export blocks
* 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>
2012-10-02 21:07:52 +07:00
Gary V. Vaughan
2e7ba6d709 libtool: simplify an if statement
* 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>
2012-10-02 21:07:48 +07:00
Gary V. Vaughan
9053a05940 libtool: save an if statement, with a compound statement.
* build-aux/ltmain.m4sh (func_mode_link): Simplify.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-02 21:07:44 +07:00
Gary V. Vaughan
59ec249278 libtool: simplify multiple string tests
* 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>
2012-10-02 21:07:39 +07:00
Gary V. Vaughan
8f0ee8aeeb libtool: fold if into a compound OR statement when more readable
* 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>
2012-10-02 21:07:34 +07:00
Gary V. Vaughan
9a4cac8342 libtool: use false or : for $rmforce, and simplify
* 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>
2012-10-02 21:07:30 +07:00
Gary V. Vaughan
0d3ae55697 libtool: use false or : for $wrappers_required, and simplify
* 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>
2012-10-02 21:07:26 +07:00
Gary V. Vaughan
d61e83993b libtool: use false or : for $linkalldeplibs, and simplify
* 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>
2012-10-02 21:07:22 +07:00
Gary V. Vaughan
3b802dd319 libtool: use false or : for $valid_a_lib, and simplify
* 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>
2012-10-02 21:07:13 +07:00
Gary V. Vaughan
de7482d17c libtool: use false or : for $found, and simplify
* 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>
2012-10-02 21:06:47 +07:00
Gary V. Vaughan
934c0382de libtool: use false or : for $alldeplibs, and simplify
* 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>
2012-10-02 21:06:41 +07:00
Gary V. Vaughan
fd1151fe85 libtool: use false or : for $preload, and simplify
* 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>
2012-10-02 21:06:37 +07:00
Gary V. Vaughan
4e05284e51 libtool: use false or : for $my_pic_p, and simplify
* 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>
2012-10-02 21:06:32 +07:00
Gary V. Vaughan
7ce429c527 libtool: use false or : for $finalize, and simplify
* 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>
2012-10-02 21:06:27 +07:00
Gary V. Vaughan
7510fd8bed libtool: use false or : for $isdir, and simplify
* 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>
2012-10-02 21:06:13 +07:00
Gary V. Vaughan
692bc68dc9 syntax-check: remove useless_braces_in_variable_derefs.
* 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>
2012-10-02 21:06:06 +07:00
Gary V. Vaughan
ae68608314 maint: remove unused cvsu script.
* 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>
2012-10-02 21:05:53 +07:00
Gary V. Vaughan
d576fa9da1 maint: run update-copyright for missing 2011 and 2012 years.
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>
2012-10-02 21:05:50 +07:00
Gary V. Vaughan
3cbc0e26f0 bootstrap: use gnulib update-copyright script.
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>
2012-10-02 21:05:47 +07:00
Gary V. Vaughan
83d52fd6d2 bootstrap: update bootstrap script to latest upstream.
* bootstrap, build-aux/options-parser: apply upstream fixes and
enhancements.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-02 21:05:41 +07:00
Gary V. Vaughan
1e70622d7c git: don't complain about new parallel tests driver and file droppings.
* build-aux/.gitignore: Ignore parallel `test-driver' script.
* tests/.gitignore: Ignore `test-driver' .trs file droppings.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-02 21:05:28 +07:00
Andreas Schwab
59f8a3a6e1 Pass through -g* so that debugging information is not dropped
* ltmain.m4sh (func_mode_link): Pass through -g*.
2012-10-02 21:05:15 +07:00
Peter Rosin
d702946c65 libtool: quote progpath properly
Attempt to handle spaces in paths better.

* build-aux/ltmain.m4sh (func_mode_install, func_mode_link): Quote
$progpath.
* THANKS: Update.
2012-10-02 21:05:10 +07:00
Titus von Boxberg
8f975a1368 Accept clang's -stdlib linker flag.
build-aux/ltmain.m4sh: Don't drop the -stdlib= flag.
2012-10-02 21:04:15 +07:00
Juergen Reuter
f8a4b90f9a Enable nagfor fortran compiler support
* build-aux/ltmain.m4sh: nagfor compatible version string.
* m4/libtool.m4: nagfor support.
2012-10-02 21:04:04 +07:00
Peter Rosin
baffe66191 cwrapper: avoid surplus strlen calculations.
* build-aux/ltmain.m4sh (func_emit_cwrapperexe_src:lt_update_exe_path):
Avoid surplus strlen calculations.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2012-10-02 21:03:17 +07:00
Gary V. Vaughan
822881fe3c bootstrap: fix Autoconf version typo.
* build-aux/options-parses: s/2\.62/2.68/

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-02 21:03:15 +07:00
Gary V. Vaughan
c03789b8ee libtool: make fork minimisation compatible with dash and zsh.
* 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>
2012-10-02 21:03:11 +07:00
Gary V. Vaughan
78385ffd8a bootstrap: adopt autoconf echo normalization code.
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>
2012-10-02 21:03:09 +07:00