* [Buildroot] svn commit: trunk/buildroot: package/sed toolchain/dependencies
@ 2007-03-10 10:29 aldot at uclibc.org
0 siblings, 0 replies; 2+ messages in thread
From: aldot at uclibc.org @ 2007-03-10 10:29 UTC (permalink / raw)
To: buildroot
Author: aldot
Date: 2007-03-10 02:29:08 -0800 (Sat, 10 Mar 2007)
New Revision: 18060
Log:
- fixes for bugs introduced with the MacOS10 support (Heikki Lindholm)
Modified:
trunk/buildroot/package/sed/sed.mk
trunk/buildroot/toolchain/dependencies/check-host-sed.sh
Changeset:
Modified: trunk/buildroot/package/sed/sed.mk
===================================================================
--- trunk/buildroot/package/sed/sed.mk 2007-03-09 22:48:08 UTC (rev 18059)
+++ trunk/buildroot/package/sed/sed.mk 2007-03-10 10:29:08 UTC (rev 18060)
@@ -42,7 +42,7 @@
$(SED_DIR1)/.configured: $(SED_DIR1)/.unpacked
(cd $(SED_DIR1); rm -rf config.cache; \
./configure \
- --prefix=$(HOST_SED_DIR) \
+ --prefix=/usr \
);
touch $(SED_DIR1)/.configured
Modified: trunk/buildroot/toolchain/dependencies/check-host-sed.sh
===================================================================
--- trunk/buildroot/toolchain/dependencies/check-host-sed.sh 2007-03-09 22:48:08 UTC (rev 18059)
+++ trunk/buildroot/toolchain/dependencies/check-host-sed.sh 2007-03-10 10:29:08 UTC (rev 18060)
@@ -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 @@
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
^ permalink raw reply [flat|nested] 2+ messages in thread* [Buildroot] svn commit: trunk/buildroot: package/sed toolchain/dependencies
@ 2007-03-09 8:33 aldot at uclibc.org
0 siblings, 0 replies; 2+ messages in thread
From: aldot at uclibc.org @ 2007-03-09 8:33 UTC (permalink / raw)
To: buildroot
Author: aldot
Date: 2007-03-09 00:33:34 -0800 (Fri, 09 Mar 2007)
New Revision: 18046
Log:
Improve the checking of sed by adding some common GNU sed installation
names (gsed/gnused), checking for a basic OS X sed feature in command
line option handling, checking the actual result of the sed run against
the expected result, and placing common code for the check under
toolchain/dependencies/. (Heikki Lindholm)
Added:
trunk/buildroot/toolchain/dependencies/check-host-sed.sh
Modified:
trunk/buildroot/package/sed/sedcheck.sh
trunk/buildroot/toolchain/dependencies/dependencies.sh
Changeset:
Modified: trunk/buildroot/package/sed/sedcheck.sh
===================================================================
--- trunk/buildroot/package/sed/sedcheck.sh 2007-03-09 08:26:10 UTC (rev 18045)
+++ trunk/buildroot/package/sed/sedcheck.sh 2007-03-09 08:33:34 UTC (rev 18046)
@@ -2,24 +2,10 @@
# Make sure the host sed supports '-i' (in-place).
# If it doesn't, we'll build and use our own.
+SED=$(toolchain/dependencies/check-host-sed.sh)
-if test -x /usr/bin/sed ; then
- SED="/usr/bin/sed"
-else
- if test -x /bin/sed ; then
- SED="/bin/sed"
- else
- SED="sed"
- fi
-fi
-
-echo "HELLO" > .sedtest
-$SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
-
-if test $? != 0 ; then
+if [ -z "$SED" ] ; then
echo build-sed-host-binary
else
echo use-sed-host-binary
fi
-
-rm -f .sedtest
Added: trunk/buildroot/toolchain/dependencies/check-host-sed.sh
===================================================================
--- trunk/buildroot/toolchain/dependencies/check-host-sed.sh (rev 0)
+++ trunk/buildroot/toolchain/dependencies/check-host-sed.sh 2007-03-09 08:33:34 UTC (rev 18046)
@@ -0,0 +1,38 @@
+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
+ SED=$(which $SED)
+ if ! test -x "$SED" > /dev/null ; then
+ SED=""
+ continue
+ fi
+ fi
+
+ echo "HELLO" > .sedtest
+ echo "GOODBYE" > .sedtest-correct
+ $SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
+
+ 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"
+ SED=""
+ fi
+
+ rm -f .sedtest .sedtest-correct
+ if [ ! -z "$SED" ] ; then
+ break
+ fi
+done
+echo $SED
Property changes on: trunk/buildroot/toolchain/dependencies/check-host-sed.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/buildroot/toolchain/dependencies/dependencies.sh
===================================================================
--- trunk/buildroot/toolchain/dependencies/dependencies.sh 2007-03-09 08:26:10 UTC (rev 18045)
+++ trunk/buildroot/toolchain/dependencies/dependencies.sh 2007-03-09 08:33:34 UTC (rev 18046)
@@ -88,30 +88,6 @@
#############################################################
#
-# check build system 'sed'
-#
-#############################################################
-if test -x /usr/bin/sed ; then
- SED="/usr/bin/sed"
-else
- if test -x /bin/sed ; then
- SED="/bin/sed"
- else
- SED="sed"
- fi
-fi
-echo "HELLO" > .sedtest
-$SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
-if test $? != 0 ; then
- echo "sed works: No, using buildroot version instead"
-else
- echo "sed works: Ok"
-fi
-rm -f .sedtest
-XSED=$HOST_SED_DIR/bin/sed
-
-#############################################################
-#
# check build system 'which'
#
#############################################################
@@ -123,8 +99,27 @@
echo "which installed: Ok"
+
#############################################################
#
+# check build system 'sed'
+#
+#############################################################
+SED=$(toolchain/dependencies/check-host-sed.sh)
+
+if [ -z "$SED" ] ; then
+ XSED=$HOST_SED_DIR/bin/sed
+ echo "sed works: No, using buildroot version instead"
+else
+ XSED=$SED
+ echo "sed works: Ok ($SED)"
+fi
+
+
+
+
+#############################################################
+#
# check build system 'make'
#
#############################################################
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-10 10:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-10 10:29 [Buildroot] svn commit: trunk/buildroot: package/sed toolchain/dependencies aldot at uclibc.org
-- strict thread matches above, loose matches on Subject: below --
2007-03-09 8:33 aldot at uclibc.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox