Author: vedge
Date: 2008-06-26 05:31:11 -0300 (Thu, 26 Jun 2008)
New Revision: 711

Modified:
   trunk/BSDBuild/Core.pm
   trunk/BSDBuild/cc.pm
Log:
always use the first item when scanning $PATH


Modified: trunk/BSDBuild/Core.pm
===================================================================
--- trunk/BSDBuild/Core.pm      2008-06-26 08:30:43 UTC (rev 710)
+++ trunk/BSDBuild/Core.pm      2008-06-26 08:31:11 UTC (rev 711)
@@ -82,6 +82,7 @@
 for path in `echo \$PATH | sed 's/:/ /g'`; do
        if [ -x "\${path}/$bin" ]; then
                $define=`\${path}/$bin $args`
+               break
        fi
 done
 EOF
@@ -98,6 +99,7 @@
 for path in `echo \$PATH | sed 's/:/ /g'`; do
        if [ -x "\${path}/$bin" ]; then
                $define=`\${path}/$bin $args`
+               break
        fi
 done
 EOF

Modified: trunk/BSDBuild/cc.pm
===================================================================
--- trunk/BSDBuild/cc.pm        2008-06-26 08:30:43 UTC (rev 710)
+++ trunk/BSDBuild/cc.pm        2008-06-26 08:31:11 UTC (rev 711)
@@ -33,8 +33,10 @@
        for i in `echo $PATH |sed 's/:/ /g'`; do
                if [ -x "${i}/cc" ]; then
                        CC="${i}/cc"
+                       break
                elif [ -x "${i}/gcc" ]; then
                        CC="${i}/gcc"
+                       break
                fi
        done
        if [ "$CC" = "" ]; then

_______________________________________________
BSDBuild-Commits mailing list
[email protected]
http://mail231.csoft.net/mailman/listinfo/bsdbuild-commits

Reply via email to