$(SED_DIR1)/.configured: $(SED_DIR1)/.unpacked
(cd $(SED_DIR1); rm -rf config.cache; \
./configure \
- --prefix=$(HOST_SED_DIR) \
+ --prefix=/usr \
);
touch $(SED_DIR1)/.configured
SEDLIST="/usr/bin/sed /bin/sed sed gnused gsed"
-DIFF=$(which diff)
-if ! test -x "$DIFF" ; then
- /bin/echo -e "\n\ntesting for sed needs 'diff' on your build machine\n";
- exit 1;
-fi;
-
for SED in $SEDLIST
do
if ! test -x $SED ; then
fi
echo "HELLO" > .sedtest
- echo "GOODBYE" > .sedtest-correct
$SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
+ RESULT=$(cat .sedtest)
if test $? != 0 ; then
SED=""
elif test -e ".sedtest-e" ; then
rm -f ".sedtest-e"
SED=""
- elif ! $DIFF ".sedtest" ".sedtest-correct" > /dev/null ; then
- echo "diff failed"
+ elif [ -z "${RESULT}" ] || [ "${RESULT}" != "GOODBYE"] > /dev/null ;
+ then
SED=""
fi
- rm -f .sedtest .sedtest-correct
+ rm -f .sedtest
if [ ! -z "$SED" ] ; then
break
fi