Lines 518-523
autotools_run_tool() {
Link Here
|
518 |
set -- "${1}" $(autotools_m4dir_include) "${@:2}" $(autotools_m4sysdir_include) |
518 |
set -- "${1}" $(autotools_m4dir_include) "${@:2}" $(autotools_m4sysdir_include) |
519 |
fi |
519 |
fi |
520 |
|
520 |
|
|
|
521 |
# re-order arguments, bug #680210 |
522 |
local _old_args=( ${@} ) |
523 |
local _at_command= |
524 |
local _at_file= |
525 |
local -a _at_args=() |
526 |
local _argument= |
527 |
|
528 |
for _argument in ${_old_args[*]}; do |
529 |
if [[ -z "${_at_command}" ]]; then |
530 |
_at_command=${_argument} |
531 |
continue |
532 |
fi |
533 |
|
534 |
if [[ -z "${_at_file}" && "${_argument}" =~ \.(in|ac)$ ]]; then |
535 |
_at_file=${_argument} |
536 |
continue |
537 |
fi |
538 |
|
539 |
_at_args+=( ${_argument} ) |
540 |
done |
541 |
|
542 |
# make sure file is last argument |
543 |
if [[ -n "${_at_file}" ]]; then |
544 |
_at_args+=( ${_at_file} ) |
545 |
fi |
546 |
|
547 |
debug-print "\$@ before reordering of arguments: ${@}" |
548 |
set -- "${_at_command}" "${_at_args[@]}" |
549 |
debug-print "\$@ after reordering of arguments: ${@}" |
550 |
|
521 |
# If the caller wants to probe something, then let them do it directly. |
551 |
# If the caller wants to probe something, then let them do it directly. |
522 |
if ${return_output} ; then |
552 |
if ${return_output} ; then |
523 |
"$@" |
553 |
"$@" |