make: Make work in POSIX mode.

<(...) is not available in POSIX mode, and for example our test suite
is run in that mode.
This commit is contained in:
Ville Skyttä 2013-02-05 21:30:36 +02:00
parent 23406dcf20
commit c0818b005a

View File

@ -141,9 +141,11 @@ _make()
mode=-d # display-only mode
fi
local reset=$( set +o | grep -F posix ); set +o posix # for <(...)
COMPREPLY=( $( LC_ALL=C \
make -npq "${makef[@]}" "${makef_dir[@]}" .DEFAULT 2>/dev/null | \
sed -nrf <(_make_target_extract_script $mode "$cur") ) )
$reset
if [[ $mode != -d ]]; then
# Completion will occur if there is only one suggestion