- fixes for bugs introduced with the MacOS10 support (Heikki Lindholm)
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 10 Mar 2007 10:29:08 +0000 (10:29 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 10 Mar 2007 10:29:08 +0000 (10:29 -0000)
package/sed/sed.mk
toolchain/dependencies/check-host-sed.sh

index 978abe7be96294178b0a66aff90941321f030212..640e7dd42be2cb44f27b2741c12d52f710ac075f 100644 (file)
@@ -42,7 +42,7 @@ $(SED_DIR1)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
 $(SED_DIR1)/.configured: $(SED_DIR1)/.unpacked
        (cd $(SED_DIR1); rm -rf config.cache; \
                ./configure \
-               --prefix=$(HOST_SED_DIR) \
+               --prefix=/usr \
        );
        touch $(SED_DIR1)/.configured
 
index ba99a4258806e834794513b3d34a7b537911b0df..55104debdc43e318cb6fae82f40ca77ebb319aca 100755 (executable)
@@ -1,11 +1,5 @@
 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
@@ -17,20 +11,20 @@ do
        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