mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-21 01:40:57 +08:00
New libtoolize --no-warn option and LIBTOOLIZE_OPTIONS parsing.
* libltdl/config/general.m4sh (opt_warning): New option. (func_warning): Only display a warning message if $opt_warning is true. * libtoolize.m4sh: Accept options in LIBTOOLIZE_OPTIONS environment variable. (--no-warn): Parse new option. (func_serial_update_check, func_keyword_update): Use func_warning. (func_check_macros): Bail out before style issues nags when $opt_warning is false. * doc/libtool.texi (Invoking Libtoolize): Document it. * tests/libtoolize.at: Test it. * NEWS: Updated.
This commit is contained in:
parent
2826832999
commit
a53fd09bed
14
ChangeLog
14
ChangeLog
@ -1,5 +1,19 @@
|
||||
2008-04-29 Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
New libtoolize --no-warn option and LIBTOOLIZE_OPTIONS parsing.
|
||||
* libltdl/config/general.m4sh (opt_warning): New option.
|
||||
(func_warning): Only display a warning message if $opt_warning
|
||||
is true.
|
||||
* libtoolize.m4sh: Accept options in LIBTOOLIZE_OPTIONS
|
||||
environment variable.
|
||||
(--no-warn): Parse new option.
|
||||
(func_serial_update_check, func_keyword_update): Use func_warning.
|
||||
(func_check_macros): Bail out before style issues nags when
|
||||
$opt_warning is false.
|
||||
* doc/libtool.texi (Invoking Libtoolize): Document it.
|
||||
* tests/libtoolize.at: Test it.
|
||||
* NEWS: Updated.
|
||||
|
||||
Fix libtoolize test failure with aclocal-1.10.1.
|
||||
* tests/libtoolize.at
|
||||
(verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR): Force aclocal to
|
||||
|
9
NEWS
9
NEWS
@ -2,6 +2,15 @@ NEWS - list of user-visible changes between releases of GNU Libtool
|
||||
|
||||
New in 2.2.4: 2008-??-??: CVS version 2.2.3a, Libtool team:
|
||||
|
||||
* New features:
|
||||
|
||||
- New libtoolize option --no-warn, for users that want to continue to
|
||||
use old libtool style without being nagged.
|
||||
- Options --debug, --no-warn, --quiet and --verbose can be passed to
|
||||
libtoolize through the environment variable LIBTOOLIZE_OPTIONS, for
|
||||
cleaner interaction between the user and libtoolize when called by
|
||||
autoreconf.
|
||||
|
||||
* Bug fixes:
|
||||
|
||||
- The documentation for lt_dlopenadvise showed the wrong type for
|
||||
|
@ -2329,6 +2329,12 @@ also specify a subdirectory name here if you are not using Autoconf
|
||||
for example. If @command{libtoolize} can't determine the target
|
||||
directory, @samp{libltdl} is used as the default.
|
||||
|
||||
@item --no-warn
|
||||
Normally, Libtoolize tries to diagnose use of deprecated libtool macros
|
||||
and other stylistic issues. If you are deliberately using outdated
|
||||
calling conventions, this option prevents Libtoolize from explaining
|
||||
how to update your project's Libtool conventions.
|
||||
|
||||
@item --nonrecursive
|
||||
If passed in conjunction with @option{--ltdl}, this option will cause
|
||||
the @command{libltdl} installed by @samp{libtoolize} to be set up for
|
||||
@ -2407,6 +2413,27 @@ Work noisily! Give a blow by blow account of what
|
||||
Print @command{libtoolize} version information and exit.
|
||||
@end table
|
||||
|
||||
@cindex LIBTOOLIZE_OPTIONS
|
||||
Sometimes it can be useful to pass options to @command{libtoolize} even
|
||||
though it is called by another program, such as @command{autoreconf}. A
|
||||
limited number of options are parsed from the environment variable
|
||||
@code{LIBTOOLIZE_OPTIONS}: currently @option{--debug}, @option{--no-warn},
|
||||
@option{--quiet} and @option{--verbose}. Multiple options passed in
|
||||
@code{LIBTOOLIZE_OPTIONS} must be separated with a space, comma or a
|
||||
colon.
|
||||
|
||||
By default, a warning is issued for unknown options found in
|
||||
@code{LIBTOOLIZE_OPTIONS} unless the first such option is
|
||||
@option{--no-warn}. Where @command{libtoolize} has always quit
|
||||
on receipt of an unknown option at the command line, this and all
|
||||
previous releases of @command{libtoolize} will continue unabated whatever
|
||||
the content of @code{LIBTOOLIZE_OPTIONS} (modulo some possible warning
|
||||
messages).
|
||||
|
||||
@example
|
||||
trick$ @kbd{LIBTOOLIZE_OPTIONS=--no-warn,--quiet autoreconf --install}
|
||||
@end example
|
||||
|
||||
@findex AC_CONFIG_MACRO_DIR
|
||||
If @command{libtoolize} detects an explicit call to
|
||||
@code{AC_CONFIG_MACRO_DIR} (@pxref{Input, , The Autoconf Manual,
|
||||
@ -2442,8 +2469,8 @@ autoconf, The Autoconf Manual}) in your @file{configure.ac}, it
|
||||
will put the other support files in the specified directory.
|
||||
Otherwise they too end up in the project root directory.
|
||||
|
||||
@command{libtoolize} displays hints for adding libtool support to your
|
||||
package, as well.
|
||||
Unless @option{--no-warn} is passed, @command{libtoolize} displays
|
||||
hints for adding libtool support to your package, as well.
|
||||
|
||||
@node Autoconf and LTLIBOBJS
|
||||
@subsection Autoconf and @code{LTLIBOBJS}
|
||||
|
@ -153,6 +153,7 @@ opt_dry_run=false
|
||||
opt_help=false
|
||||
opt_quiet=false
|
||||
opt_verbose=false
|
||||
opt_warning=:
|
||||
|
||||
# func_echo arg...
|
||||
# Echo program name prefixed message, along with the current mode
|
||||
@ -185,7 +186,10 @@ func_error ()
|
||||
# Echo program name prefixed warning message to standard error.
|
||||
func_warning ()
|
||||
{
|
||||
$ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
|
||||
$opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
|
||||
|
||||
# bash bug again:
|
||||
:
|
||||
}
|
||||
|
||||
# func_fatal_error arg...
|
||||
|
@ -35,6 +35,7 @@ m4_divert_push([SCRIPT])#! /bin/sh
|
||||
# -f, --force replace existing files
|
||||
# -i, --install copy missing auxiliary files
|
||||
# --ltdl[=DIR] install libltdl sources [default: libltdl]
|
||||
# --no-warn don't display warning messages
|
||||
# --nonrecursive prepare ltdl for non-recursive make
|
||||
# -q, --quiet work silently
|
||||
# --recursive prepare ltdl for recursive make
|
||||
@ -43,6 +44,15 @@ m4_divert_push([SCRIPT])#! /bin/sh
|
||||
# --version print version information and exit
|
||||
# -h, --help print short or long help message
|
||||
#
|
||||
# The following space or comma delimited options can be passed to $progname
|
||||
# via the environment variable LIBTOOLIZE_OPTIONS, unknown environment
|
||||
# options are ignored:
|
||||
#
|
||||
# --debug enable verbose shell tracing
|
||||
# --no-warn don't display warning messages
|
||||
# --quiet work silently
|
||||
# --verbose verbosely report processing
|
||||
#
|
||||
# You must `cd' to the top directory of your package before you run
|
||||
# `$progname'.
|
||||
#
|
||||
@ -108,6 +118,28 @@ ltdldir=
|
||||
configure_ac=configure.in
|
||||
|
||||
|
||||
# Parse environment options
|
||||
{
|
||||
my_sed_env_opt='1s/^\([^,:; ]*\).*$/\1/;q'
|
||||
my_sed_env_rest='1s/^[^,:; ]*[,:; ]*\(.*\)$/\1/;q'
|
||||
|
||||
while test -n "$LIBTOOLIZE_OPTIONS"; do
|
||||
opt=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_opt"`
|
||||
LIBTOOLIZE_OPTIONS=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_rest"`
|
||||
|
||||
case $opt in
|
||||
--debug) opt_debug=: ;;
|
||||
--no-warn) opt_warning=false ;;
|
||||
--quiet) opt_quiet=: ;;
|
||||
--verbose) opt_verbose=: ;;
|
||||
|
||||
--*) func_warning "unrecognized environment option \`$opt'" ;;
|
||||
*) func_fatal_help "garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Parse options once, thoroughly. This comes as soon as possible in
|
||||
# the script to make things like `libtoolize --version' happen quickly.
|
||||
{
|
||||
@ -153,6 +185,8 @@ configure_ac=configure.in
|
||||
fi
|
||||
;;
|
||||
|
||||
--no-warn) opt_warning=false ;;
|
||||
|
||||
--nonrecursive|--non-recursive)
|
||||
ltdl_mode=nonrecursive
|
||||
;;
|
||||
@ -743,7 +777,7 @@ func_serial_update_check ()
|
||||
|
||||
if test -f "$my_destfile"; then
|
||||
test "X$my_src_serial" = "X0" && {
|
||||
func_error "warning: no serial number on \`$my_srcfile', not copying."
|
||||
func_warning "no serial number on \`$my_srcfile', not copying."
|
||||
return
|
||||
}
|
||||
|
||||
@ -904,7 +938,7 @@ func_keyword_update ()
|
||||
if test -f "$my_destfile"; then
|
||||
my_src_serial=`$SED -e "$my_sed_script" "$my_srcfile"`
|
||||
test -z "$my_src_serial" && {
|
||||
func_error "warning: no serial number in \`$my_srcfile', not copying."
|
||||
func_warning "no serial number in \`$my_srcfile', not copying."
|
||||
return
|
||||
}
|
||||
|
||||
@ -1361,6 +1395,13 @@ func_check_macros ()
|
||||
fi
|
||||
fi
|
||||
|
||||
## ---------------------------------------------------------- ##
|
||||
## Since we return early here when --no-warn was given: ##
|
||||
## DO NOT PUT ANYTHING BUT UPGRADE ADVICE MESSAGES BELOW HERE ##
|
||||
## ---------------------------------------------------------- ##
|
||||
|
||||
$opt_warning || return
|
||||
|
||||
$seen_libtool ||
|
||||
func_echo "Remember to add \`LT_INIT' to $configure_ac."
|
||||
|
||||
|
@ -937,3 +937,49 @@ LT_AT_CHECK_LIBTOOLIZE([--copy --install], 0, expout)
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
## --------------------------- ##
|
||||
## Garbled LIBTOOLIZE_OPTIONS. ##
|
||||
## --------------------------- ##
|
||||
|
||||
AT_SETUP([LIBTOOLIZE_OPTIONS])
|
||||
|
||||
_LT_CONFIGURE_AC
|
||||
|
||||
LIBTOOLIZE_OPTIONS="narf"
|
||||
export LIBTOOLIZE_OPTIONS
|
||||
|
||||
AT_DATA(experr,
|
||||
[[libtoolize: garbled LIBTOOLIZE_OPTIONS near `narf'
|
||||
libtoolize: Try `libtoolize --help' for more information.
|
||||
]])
|
||||
|
||||
LT_AT_CHECK_LIBTOOLIZE([--copy], 1, [ignore], experr)
|
||||
|
||||
|
||||
## --------------------------- ##
|
||||
## Unknown LIBTOOLIZE_OPTIONS. ##
|
||||
## --------------------------- ##
|
||||
|
||||
LIBTOOLIZE_OPTIONS=--no-such-option
|
||||
export LIBTOOLIZE_OPTIONS
|
||||
|
||||
AT_DATA(experr,
|
||||
[[libtoolize: warning: unrecognized environment option `--no-such-option'
|
||||
]])
|
||||
|
||||
LT_AT_CHECK_LIBTOOLIZE([--copy], 0, [ignore], experr)
|
||||
|
||||
|
||||
## ----------------------------- ##
|
||||
## --no-warn environment option. ##
|
||||
## ----------------------------- ##
|
||||
|
||||
LIBTOOLIZE_OPTIONS=--no-warn,--no-such-option
|
||||
export LIBTOOLIZE_OPTIONS
|
||||
|
||||
AT_DATA(experr, [[]])
|
||||
|
||||
LT_AT_CHECK_LIBTOOLIZE([--copy], 0, [ignore], experr)
|
||||
|
||||
AT_CLEANUP
|
||||
|
Loading…
Reference in New Issue
Block a user