The --cmd option recognise git | make | gmake as legitimate cmd names.
Some system have both make and gmake and the user may have set $MAKE.
Using $MAKE to issue the make command will insure the same make
command (either make or gmake) is used on all invocation of build.sh.

Signed-off-by: Gaetan Nadon <[email protected]>
---
 build.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/build.sh b/build.sh
index bee76a9..7c759c7 100755
--- a/build.sh
+++ b/build.sh
@@ -422,14 +422,14 @@ process() {
        fi
     fi
 
-    # a 'make' command has been specified by the user
+    # A custom 'make' target list was supplied through --cmd option
     if [ X"$MAKECMD" != X ]; then
-       $MAKECMD
+       ${MAKE} $MAKECMD
        rtn=$?
        cd $old_pwd
 
        if [ $rtn -ne 0 ]; then
-           failed "$MAKECMD" $1 $2
+           failed "$MAKE $MAKECMD" $1 $2
            return 1
        fi
        return 0
@@ -1179,7 +1179,7 @@ do
                GITCMD=$1
                ;;
            X"make" | X"gmake")
-               MAKECMD=$1
+               MAKECMD=$cmd2
                ;;
            *)
                echo "The script can only process 'make', 'gmake', or 'git' 
commands"
-- 
1.6.0.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to