Changeset View
Changeset View
Standalone View
Standalone View
contrib/ldns/ltmain.sh
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show All 25 Lines | |||||
# General Public License for more details. | # General Public License for more details. | ||||
# | # | ||||
# You should have received a copy of the GNU General Public License | # 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 <http://www.gnu.org/licenses/>. | ||||
PROGRAM=libtool | PROGRAM=libtool | ||||
PACKAGE=libtool | PACKAGE=libtool | ||||
VERSION="2.4.6 Debian-2.4.6-1" | VERSION="2.4.6 Debian-2.4.6-15build2" | ||||
package_revision=2.4.6 | package_revision=2.4.6 | ||||
## ------ ## | ## ------ ## | ||||
## Usage. ## | ## Usage. ## | ||||
## ------ ## | ## ------ ## | ||||
# Run './libtool --help' for help with using this script from the | # Run './libtool --help' for help with using this script from the | ||||
▲ Show 20 Lines • Show All 339 Lines • ▼ Show 20 Lines | |||||
EXIT_FAILURE=1 | EXIT_FAILURE=1 | ||||
EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. | EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. | ||||
EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. | EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. | ||||
# Allow overriding, eg assuming that you follow the convention of | # Allow overriding, eg assuming that you follow the convention of | ||||
# putting '$debug_cmd' at the start of all your functions, you can get | # putting '$debug_cmd' at the start of all your functions, you can get | ||||
# bash to show function call trace with: | # bash to show function call trace with: | ||||
# | # | ||||
# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name | # debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name | ||||
debug_cmd=${debug_cmd-":"} | debug_cmd=${debug_cmd-":"} | ||||
exit_cmd=: | exit_cmd=: | ||||
# By convention, finish your script with: | # By convention, finish your script with: | ||||
# | # | ||||
# exit $exit_status | # exit $exit_status | ||||
# | # | ||||
# so that you can set exit_status to non-zero if you want to indicate | # so that you can set exit_status to non-zero if you want to indicate | ||||
▲ Show 20 Lines • Show All 966 Lines • ▼ Show 20 Lines | |||||
# sh-indentation: 2 | # sh-indentation: 2 | ||||
# eval: (add-hook 'before-save-hook 'time-stamp) | # eval: (add-hook 'before-save-hook 'time-stamp) | ||||
# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" | # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" | ||||
# time-stamp-time-zone: "UTC" | # time-stamp-time-zone: "UTC" | ||||
# End: | # End: | ||||
#! /bin/sh | #! /bin/sh | ||||
# Set a version string for this script. | # Set a version string for this script. | ||||
scriptversion=2014-01-07.03; # UTC | scriptversion=2015-10-07.11; # UTC | ||||
# A portable, pluggable option parser for Bourne shell. | # A portable, pluggable option parser for Bourne shell. | ||||
# Written by Gary V. Vaughan, 2010 | # Written by Gary V. Vaughan, 2010 | ||||
# Copyright (C) 2010-2015 Free Software Foundation, Inc. | # Copyright (C) 2010-2015 Free Software Foundation, Inc. | ||||
# This is free software; see the source for copying conditions. There is NO | # This is free software; see the source for copying conditions. There is NO | ||||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||
▲ Show 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | |||||
# It is assumed that the list of hook functions contains nothing more | # It is assumed that the list of hook functions contains nothing more | ||||
# than a whitespace-delimited list of legal shell function names, and | # than a whitespace-delimited list of legal shell function names, and | ||||
# no effort is wasted trying to catch shell meta-characters or preserve | # no effort is wasted trying to catch shell meta-characters or preserve | ||||
# whitespace. | # whitespace. | ||||
func_run_hooks () | func_run_hooks () | ||||
{ | { | ||||
$debug_cmd | $debug_cmd | ||||
_G_rc_run_hooks=false | |||||
case " $hookable_fns " in | case " $hookable_fns " in | ||||
*" $1 "*) ;; | *" $1 "*) ;; | ||||
*) func_fatal_error "'$1' does not support hook funcions.n" ;; | *) func_fatal_error "'$1' does not support hook funcions.n" ;; | ||||
esac | esac | ||||
eval _G_hook_fns=\$$1_hooks; shift | eval _G_hook_fns=\$$1_hooks; shift | ||||
for _G_hook in $_G_hook_fns; do | for _G_hook in $_G_hook_fns; do | ||||
eval $_G_hook '"$@"' | if eval $_G_hook '"$@"'; then | ||||
# store returned options list back into positional | # store returned options list back into positional | ||||
# parameters for next 'cmd' execution. | # parameters for next 'cmd' execution. | ||||
eval _G_hook_result=\$${_G_hook}_result | eval _G_hook_result=\$${_G_hook}_result | ||||
eval set dummy "$_G_hook_result"; shift | eval set dummy "$_G_hook_result"; shift | ||||
_G_rc_run_hooks=: | |||||
fi | |||||
done | done | ||||
func_quote_for_eval ${1+"$@"} | $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result | ||||
func_run_hooks_result=$func_quote_for_eval_result | |||||
} | } | ||||
## --------------- ## | ## --------------- ## | ||||
## Option parsing. ## | ## Option parsing. ## | ||||
## --------------- ## | ## --------------- ## | ||||
# In order to add your own option parsing hooks, you must accept the | # In order to add your own option parsing hooks, you must accept the | ||||
# full positional parameter list in your hook function, remove any | # full positional parameter list in your hook function, you may remove/edit | ||||
# options that you action, and then pass back the remaining unprocessed | # any options that you action, and then pass back the remaining unprocessed | ||||
# options in '<hooked_function_name>_result', escaped suitably for | # options in '<hooked_function_name>_result', escaped suitably for | ||||
# 'eval'. Like this: | # 'eval'. In this case you also must return $EXIT_SUCCESS to let the | ||||
# hook's caller know that it should pay attention to | |||||
# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that | |||||
# arguments are left untouched by the hook and therefore caller will ignore the | |||||
# result variable. | |||||
# | # | ||||
# Like this: | |||||
# | |||||
# my_options_prep () | # my_options_prep () | ||||
# { | # { | ||||
# $debug_cmd | # $debug_cmd | ||||
# | # | ||||
# # Extend the existing usage message. | # # Extend the existing usage message. | ||||
# usage_message=$usage_message' | # usage_message=$usage_message' | ||||
# -s, --silent don'\''t print informational messages | # -s, --silent don'\''t print informational messages | ||||
# ' | # ' | ||||
# | # # No change in '$@' (ignored completely by this hook). There is | ||||
# func_quote_for_eval ${1+"$@"} | # # no need to do the equivalent (but slower) action: | ||||
# my_options_prep_result=$func_quote_for_eval_result | # # func_quote_for_eval ${1+"$@"} | ||||
# # my_options_prep_result=$func_quote_for_eval_result | |||||
# false | |||||
# } | # } | ||||
# func_add_hook func_options_prep my_options_prep | # func_add_hook func_options_prep my_options_prep | ||||
# | # | ||||
# | # | ||||
# my_silent_option () | # my_silent_option () | ||||
# { | # { | ||||
# $debug_cmd | # $debug_cmd | ||||
# | # | ||||
# args_changed=false | |||||
# | |||||
# # Note that for efficiency, we parse as many options as we can | # # Note that for efficiency, we parse as many options as we can | ||||
# # recognise in a loop before passing the remainder back to the | # # recognise in a loop before passing the remainder back to the | ||||
# # caller on the first unrecognised argument we encounter. | # # caller on the first unrecognised argument we encounter. | ||||
# while test $# -gt 0; do | # while test $# -gt 0; do | ||||
# opt=$1; shift | # opt=$1; shift | ||||
# case $opt in | # case $opt in | ||||
# --silent|-s) opt_silent=: ;; | # --silent|-s) opt_silent=: | ||||
# args_changed=: | |||||
# ;; | |||||
# # Separate non-argument short options: | # # Separate non-argument short options: | ||||
# -s*) func_split_short_opt "$_G_opt" | # -s*) func_split_short_opt "$_G_opt" | ||||
# set dummy "$func_split_short_opt_name" \ | # set dummy "$func_split_short_opt_name" \ | ||||
# "-$func_split_short_opt_arg" ${1+"$@"} | # "-$func_split_short_opt_arg" ${1+"$@"} | ||||
# shift | # shift | ||||
# args_changed=: | |||||
# ;; | # ;; | ||||
# *) set dummy "$_G_opt" "$*"; shift; break ;; | # *) # Make sure the first unrecognised option "$_G_opt" | ||||
# # is added back to "$@", we could need that later | |||||
# # if $args_changed is true. | |||||
# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | |||||
# esac | # esac | ||||
# done | # done | ||||
# | # | ||||
# if $args_changed; then | |||||
# func_quote_for_eval ${1+"$@"} | # func_quote_for_eval ${1+"$@"} | ||||
# my_silent_option_result=$func_quote_for_eval_result | # my_silent_option_result=$func_quote_for_eval_result | ||||
# fi | |||||
# | |||||
# $args_changed | |||||
# } | # } | ||||
# func_add_hook func_parse_options my_silent_option | # func_add_hook func_parse_options my_silent_option | ||||
# | # | ||||
# | # | ||||
# my_option_validation () | # my_option_validation () | ||||
# { | # { | ||||
# $debug_cmd | # $debug_cmd | ||||
# | # | ||||
# $opt_silent && $opt_verbose && func_fatal_help "\ | # $opt_silent && $opt_verbose && func_fatal_help "\ | ||||
# '--silent' and '--verbose' options are mutually exclusive." | # '--silent' and '--verbose' options are mutually exclusive." | ||||
# | # | ||||
# func_quote_for_eval ${1+"$@"} | # false | ||||
# my_option_validation_result=$func_quote_for_eval_result | |||||
# } | # } | ||||
# func_add_hook func_validate_options my_option_validation | # func_add_hook func_validate_options my_option_validation | ||||
# | # | ||||
# You'll alse need to manually amend $usage_message to reflect the extra | # You'll also need to manually amend $usage_message to reflect the extra | ||||
# options you parse. It's preferable to append if you can, so that | # options you parse. It's preferable to append if you can, so that | ||||
# multiple option parsing hooks can be added safely. | # multiple option parsing hooks can be added safely. | ||||
# func_options_finish [ARG]... | |||||
# ---------------------------- | |||||
# Finishing the option parse loop (call 'func_options' hooks ATM). | |||||
func_options_finish () | |||||
{ | |||||
$debug_cmd | |||||
_G_func_options_finish_exit=false | |||||
if func_run_hooks func_options ${1+"$@"}; then | |||||
func_options_finish_result=$func_run_hooks_result | |||||
_G_func_options_finish_exit=: | |||||
fi | |||||
$_G_func_options_finish_exit | |||||
} | |||||
# func_options [ARG]... | # func_options [ARG]... | ||||
# --------------------- | # --------------------- | ||||
# All the functions called inside func_options are hookable. See the | # All the functions called inside func_options are hookable. See the | ||||
# individual implementations for details. | # individual implementations for details. | ||||
func_hookable func_options | func_hookable func_options | ||||
func_options () | func_options () | ||||
{ | { | ||||
$debug_cmd | $debug_cmd | ||||
func_options_prep ${1+"$@"} | _G_rc_options=false | ||||
eval func_parse_options \ | |||||
${func_options_prep_result+"$func_options_prep_result"} | |||||
eval func_validate_options \ | |||||
${func_parse_options_result+"$func_parse_options_result"} | |||||
eval func_run_hooks func_options \ | for my_func in options_prep parse_options validate_options options_finish | ||||
${func_validate_options_result+"$func_validate_options_result"} | do | ||||
if eval func_$my_func '${1+"$@"}'; then | |||||
eval _G_res_var='$'"func_${my_func}_result" | |||||
eval set dummy "$_G_res_var" ; shift | |||||
_G_rc_options=: | |||||
fi | |||||
done | |||||
# save modified positional parameters for caller | # Save modified positional parameters for caller. As a top-level | ||||
func_options_result=$func_run_hooks_result | # options-parser function we always need to set the 'func_options_result' | ||||
# variable (regardless the $_G_rc_options value). | |||||
if $_G_rc_options; then | |||||
func_options_result=$_G_res_var | |||||
else | |||||
func_quote_for_eval ${1+"$@"} | |||||
func_options_result=$func_quote_for_eval_result | |||||
fi | |||||
$_G_rc_options | |||||
} | } | ||||
# func_options_prep [ARG]... | # func_options_prep [ARG]... | ||||
# -------------------------- | # -------------------------- | ||||
# All initialisations required before starting the option parse loop. | # All initialisations required before starting the option parse loop. | ||||
# Note that when calling hook functions, we pass through the list of | # Note that when calling hook functions, we pass through the list of | ||||
# positional parameters. If a hook function modifies that list, and | # positional parameters. If a hook function modifies that list, and | ||||
# needs to propogate that back to rest of this script, then the complete | # needs to propagate that back to rest of this script, then the complete | ||||
# modified list must be put in 'func_run_hooks_result' before | # modified list must be put in 'func_run_hooks_result' before | ||||
# returning. | # returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). | ||||
func_hookable func_options_prep | func_hookable func_options_prep | ||||
func_options_prep () | func_options_prep () | ||||
{ | { | ||||
$debug_cmd | $debug_cmd | ||||
# Option defaults: | # Option defaults: | ||||
opt_verbose=false | opt_verbose=false | ||||
opt_warning_types= | opt_warning_types= | ||||
func_run_hooks func_options_prep ${1+"$@"} | _G_rc_options_prep=false | ||||
if func_run_hooks func_options_prep ${1+"$@"}; then | |||||
_G_rc_options_prep=: | |||||
# save modified positional parameters for caller | # save modified positional parameters for caller | ||||
func_options_prep_result=$func_run_hooks_result | func_options_prep_result=$func_run_hooks_result | ||||
fi | |||||
$_G_rc_options_prep | |||||
} | } | ||||
# func_parse_options [ARG]... | # func_parse_options [ARG]... | ||||
# --------------------------- | # --------------------------- | ||||
# The main option parsing loop. | # The main option parsing loop. | ||||
func_hookable func_parse_options | func_hookable func_parse_options | ||||
func_parse_options () | func_parse_options () | ||||
{ | { | ||||
$debug_cmd | $debug_cmd | ||||
func_parse_options_result= | func_parse_options_result= | ||||
_G_rc_parse_options=false | |||||
# this just eases exit handling | # this just eases exit handling | ||||
while test $# -gt 0; do | while test $# -gt 0; do | ||||
# Defer to hook functions for initial option parsing, so they | # Defer to hook functions for initial option parsing, so they | ||||
# get priority in the event of reusing an option name. | # get priority in the event of reusing an option name. | ||||
func_run_hooks func_parse_options ${1+"$@"} | if func_run_hooks func_parse_options ${1+"$@"}; then | ||||
# Adjust func_parse_options positional parameters to match | |||||
eval set dummy "$func_run_hooks_result"; shift | eval set dummy "$func_run_hooks_result"; shift | ||||
_G_rc_parse_options=: | |||||
fi | |||||
# Break out of the loop if we already parsed every option. | # Break out of the loop if we already parsed every option. | ||||
test $# -gt 0 || break | test $# -gt 0 || break | ||||
_G_match_parse_options=: | |||||
_G_opt=$1 | _G_opt=$1 | ||||
shift | shift | ||||
case $_G_opt in | case $_G_opt in | ||||
--debug|-x) debug_cmd='set -x' | --debug|-x) debug_cmd='set -x' | ||||
func_echo "enabling shell trace mode" | func_echo "enabling shell trace mode" | ||||
$debug_cmd | $debug_cmd | ||||
;; | ;; | ||||
--no-warnings|--no-warning|--no-warn) | --no-warnings|--no-warning|--no-warn) | ||||
set dummy --warnings none ${1+"$@"} | set dummy --warnings none ${1+"$@"} | ||||
shift | shift | ||||
;; | ;; | ||||
--warnings|--warning|-W) | --warnings|--warning|-W) | ||||
test $# = 0 && func_missing_arg $_G_opt && break | if test $# = 0 && func_missing_arg $_G_opt; then | ||||
_G_rc_parse_options=: | |||||
break | |||||
fi | |||||
case " $warning_categories $1" in | case " $warning_categories $1" in | ||||
*" $1 "*) | *" $1 "*) | ||||
# trailing space prevents matching last $1 above | # trailing space prevents matching last $1 above | ||||
func_append_uniq opt_warning_types " $1" | func_append_uniq opt_warning_types " $1" | ||||
;; | ;; | ||||
*all) | *all) | ||||
opt_warning_types=$warning_categories | opt_warning_types=$warning_categories | ||||
;; | ;; | ||||
Show All 36 Lines | --*=*) func_split_equals "$_G_opt" | ||||
# Separate non-argument short options: | # Separate non-argument short options: | ||||
-\?*|-h*|-v*|-x*) | -\?*|-h*|-v*|-x*) | ||||
func_split_short_opt "$_G_opt" | func_split_short_opt "$_G_opt" | ||||
set dummy "$func_split_short_opt_name" \ | set dummy "$func_split_short_opt_name" \ | ||||
"-$func_split_short_opt_arg" ${1+"$@"} | "-$func_split_short_opt_arg" ${1+"$@"} | ||||
shift | shift | ||||
;; | ;; | ||||
--) break ;; | --) _G_rc_parse_options=: ; break ;; | ||||
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;; | -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; | ||||
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | *) set dummy "$_G_opt" ${1+"$@"}; shift | ||||
_G_match_parse_options=false | |||||
break | |||||
;; | |||||
esac | esac | ||||
$_G_match_parse_options && _G_rc_parse_options=: | |||||
done | done | ||||
if $_G_rc_parse_options; then | |||||
# save modified positional parameters for caller | # save modified positional parameters for caller | ||||
func_quote_for_eval ${1+"$@"} | func_quote_for_eval ${1+"$@"} | ||||
func_parse_options_result=$func_quote_for_eval_result | func_parse_options_result=$func_quote_for_eval_result | ||||
fi | |||||
$_G_rc_parse_options | |||||
} | } | ||||
# func_validate_options [ARG]... | # func_validate_options [ARG]... | ||||
# ------------------------------ | # ------------------------------ | ||||
# Perform any sanity checks on option settings and/or unconsumed | # Perform any sanity checks on option settings and/or unconsumed | ||||
# arguments. | # arguments. | ||||
func_hookable func_validate_options | func_hookable func_validate_options | ||||
func_validate_options () | func_validate_options () | ||||
{ | { | ||||
$debug_cmd | $debug_cmd | ||||
_G_rc_validate_options=false | |||||
# Display all warnings if -W was not given. | # Display all warnings if -W was not given. | ||||
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" | test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" | ||||
func_run_hooks func_validate_options ${1+"$@"} | if func_run_hooks func_validate_options ${1+"$@"}; then | ||||
# save modified positional parameters for caller | |||||
func_validate_options_result=$func_run_hooks_result | |||||
_G_rc_validate_options=: | |||||
fi | |||||
# Bail if the options were screwed! | # Bail if the options were screwed! | ||||
$exit_cmd $EXIT_FAILURE | $exit_cmd $EXIT_FAILURE | ||||
# save modified positional parameters for caller | $_G_rc_validate_options | ||||
func_validate_options_result=$func_run_hooks_result | |||||
} | } | ||||
## ----------------- ## | ## ----------------- ## | ||||
## Helper functions. ## | ## Helper functions. ## | ||||
## ----------------- ## | ## ----------------- ## | ||||
▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | |||||
# mode: shell-script | # mode: shell-script | ||||
# sh-indentation: 2 | # sh-indentation: 2 | ||||
# eval: (add-hook 'before-save-hook 'time-stamp) | # eval: (add-hook 'before-save-hook 'time-stamp) | ||||
# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" | # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" | ||||
# time-stamp-time-zone: "UTC" | # time-stamp-time-zone: "UTC" | ||||
# End: | # End: | ||||
# Set a version string. | # Set a version string. | ||||
scriptversion='(GNU libtool) 2.4.6 Debian-2.4.6-1' | scriptversion='(GNU libtool) 2.4.6' | ||||
# func_echo ARG... | # func_echo ARG... | ||||
# ---------------- | # ---------------- | ||||
# Libtool also displays the current mode in messages, so override | # Libtool also displays the current mode in messages, so override | ||||
# funclib.sh func_echo with this custom definition. | # funclib.sh func_echo with this custom definition. | ||||
func_echo () | func_echo () | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
When reporting a bug, please describe a test case to reproduce it and | When reporting a bug, please describe a test case to reproduce it and | ||||
include the following information: | include the following information: | ||||
host-triplet: $host | host-triplet: $host | ||||
shell: $SHELL | shell: $SHELL | ||||
compiler: $LTCC | compiler: $LTCC | ||||
compiler flags: $LTCFLAGS | compiler flags: $LTCFLAGS | ||||
linker: $LD (gnu? $with_gnu_ld) | linker: $LD (gnu? $with_gnu_ld) | ||||
version: $progname $scriptversion | version: $progname $scriptversion Debian-2.4.6-15build2 | ||||
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` | automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` | ||||
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` | autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` | ||||
Report bugs to <bug-libtool@gnu.org>. | Report bugs to <bug-libtool@gnu.org>. | ||||
GNU libtool home page: <http://www.gnu.org/s/libtool/>. | GNU libtool home page: <http://www.gnu.org/s/libtool/>. | ||||
General help using GNU software: <http://www.gnu.org/gethelp/>." | General help using GNU software: <http://www.gnu.org/gethelp/>." | ||||
exit 0 | exit 0 | ||||
} | } | ||||
▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | libtool_options_prep () | ||||
opt_help=false | opt_help=false | ||||
opt_mode= | opt_mode= | ||||
opt_preserve_dup_deps=false | opt_preserve_dup_deps=false | ||||
opt_quiet=false | opt_quiet=false | ||||
nonopt= | nonopt= | ||||
preserve_args= | preserve_args= | ||||
_G_rc_lt_options_prep=: | |||||
# Shorthand for --mode=foo, only valid as the first argument | # Shorthand for --mode=foo, only valid as the first argument | ||||
case $1 in | case $1 in | ||||
clean|clea|cle|cl) | clean|clea|cle|cl) | ||||
shift; set dummy --mode clean ${1+"$@"}; shift | shift; set dummy --mode clean ${1+"$@"}; shift | ||||
;; | ;; | ||||
compile|compil|compi|comp|com|co|c) | compile|compil|compi|comp|com|co|c) | ||||
shift; set dummy --mode compile ${1+"$@"}; shift | shift; set dummy --mode compile ${1+"$@"}; shift | ||||
;; | ;; | ||||
execute|execut|execu|exec|exe|ex|e) | execute|execut|execu|exec|exe|ex|e) | ||||
shift; set dummy --mode execute ${1+"$@"}; shift | shift; set dummy --mode execute ${1+"$@"}; shift | ||||
;; | ;; | ||||
finish|finis|fini|fin|fi|f) | finish|finis|fini|fin|fi|f) | ||||
shift; set dummy --mode finish ${1+"$@"}; shift | shift; set dummy --mode finish ${1+"$@"}; shift | ||||
;; | ;; | ||||
install|instal|insta|inst|ins|in|i) | install|instal|insta|inst|ins|in|i) | ||||
shift; set dummy --mode install ${1+"$@"}; shift | shift; set dummy --mode install ${1+"$@"}; shift | ||||
;; | ;; | ||||
link|lin|li|l) | link|lin|li|l) | ||||
shift; set dummy --mode link ${1+"$@"}; shift | shift; set dummy --mode link ${1+"$@"}; shift | ||||
;; | ;; | ||||
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) | uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) | ||||
shift; set dummy --mode uninstall ${1+"$@"}; shift | shift; set dummy --mode uninstall ${1+"$@"}; shift | ||||
;; | ;; | ||||
*) | |||||
_G_rc_lt_options_prep=false | |||||
;; | |||||
esac | esac | ||||
if $_G_rc_lt_options_prep; then | |||||
# Pass back the list of options. | # Pass back the list of options. | ||||
func_quote_for_eval ${1+"$@"} | func_quote_for_eval ${1+"$@"} | ||||
libtool_options_prep_result=$func_quote_for_eval_result | libtool_options_prep_result=$func_quote_for_eval_result | ||||
fi | |||||
$_G_rc_lt_options_prep | |||||
} | } | ||||
func_add_hook func_options_prep libtool_options_prep | func_add_hook func_options_prep libtool_options_prep | ||||
# libtool_parse_options [ARG]... | # libtool_parse_options [ARG]... | ||||
# --------------------------------- | # --------------------------------- | ||||
# Provide handling for libtool specific options. | # Provide handling for libtool specific options. | ||||
libtool_parse_options () | libtool_parse_options () | ||||
{ | { | ||||
$debug_cmd | $debug_cmd | ||||
_G_rc_lt_parse_options=false | |||||
# Perform our own loop to consume as many options as possible in | # Perform our own loop to consume as many options as possible in | ||||
# each iteration. | # each iteration. | ||||
while test $# -gt 0; do | while test $# -gt 0; do | ||||
_G_match_lt_parse_options=: | |||||
_G_opt=$1 | _G_opt=$1 | ||||
shift | shift | ||||
case $_G_opt in | case $_G_opt in | ||||
--dry-run|--dryrun|-n) | --dry-run|--dryrun|-n) | ||||
opt_dry_run=: | opt_dry_run=: | ||||
;; | ;; | ||||
--config) func_config ;; | --config) func_config ;; | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | while test $# -gt 0; do | ||||
shift | shift | ||||
;; | ;; | ||||
--verbose|-v) opt_quiet=false | --verbose|-v) opt_quiet=false | ||||
opt_verbose=: | opt_verbose=: | ||||
func_append preserve_args " $_G_opt" | func_append preserve_args " $_G_opt" | ||||
;; | ;; | ||||
# An option not handled by this hook function: | # An option not handled by this hook function: | ||||
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | *) set dummy "$_G_opt" ${1+"$@"} ; shift | ||||
_G_match_lt_parse_options=false | |||||
break | |||||
;; | |||||
esac | esac | ||||
$_G_match_lt_parse_options && _G_rc_lt_parse_options=: | |||||
done | done | ||||
if $_G_rc_lt_parse_options; then | |||||
# save modified positional parameters for caller | # save modified positional parameters for caller | ||||
func_quote_for_eval ${1+"$@"} | func_quote_for_eval ${1+"$@"} | ||||
libtool_parse_options_result=$func_quote_for_eval_result | libtool_parse_options_result=$func_quote_for_eval_result | ||||
fi | |||||
$_G_rc_lt_parse_options | |||||
} | } | ||||
func_add_hook func_parse_options libtool_parse_options | func_add_hook func_parse_options libtool_parse_options | ||||
# libtool_validate_options [ARG]... | # libtool_validate_options [ARG]... | ||||
# --------------------------------- | # --------------------------------- | ||||
# Perform any sanity checks on option settings and/or unconsumed | # Perform any sanity checks on option settings and/or unconsumed | ||||
▲ Show 20 Lines • Show All 4,864 Lines • ▼ Show 20 Lines | ;; | ||||
# -fstack-protector* stack protector flags for GCC | # -fstack-protector* stack protector flags for GCC | ||||
# @file GCC response files | # @file GCC response files | ||||
# -tp=* Portland pgcc target processor selection | # -tp=* Portland pgcc target processor selection | ||||
# --sysroot=* for sysroot support | # --sysroot=* for sysroot support | ||||
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization | # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization | ||||
# -specs=* GCC specs files | # -specs=* GCC specs files | ||||
# -stdlib=* select c++ std lib with clang | # -stdlib=* select c++ std lib with clang | ||||
# -fsanitize=* Clang/GCC memory and address sanitizer | # -fsanitize=* Clang/GCC memory and address sanitizer | ||||
# -fuse-ld=* Linker select flags for GCC | |||||
# -static-* direct GCC to link specific libraries statically | |||||
# -fcilkplus Cilk Plus language extension features for C/C++ | |||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ | ||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ | -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ | ||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ | -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ | ||||
-specs=*|-fsanitize=*) | -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) | ||||
func_quote_for_eval "$arg" | func_quote_for_eval "$arg" | ||||
arg=$func_quote_for_eval_result | arg=$func_quote_for_eval_result | ||||
func_append compile_command " $arg" | func_append compile_command " $arg" | ||||
func_append finalize_command " $arg" | func_append finalize_command " $arg" | ||||
func_append compiler_flags " $arg" | func_append compiler_flags " $arg" | ||||
continue | continue | ||||
;; | ;; | ||||
▲ Show 20 Lines • Show All 3,867 Lines • Show Last 20 Lines |