[PATCH modular] Clone if there are no source files with modfile.

Trevor Woerner twoerner at gmail.com
Wed Nov 3 03:25:32 PDT 2010


From: Trevor Woerner <twoerner at gmail.com>

If the user has not supplied the --clone flag but is using a --modfile
and there are neither sources or tarballs, assume --clone.

Signed-off-by: Trevor Woerner <twoerner at gmail.com>
---
 build.sh |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/build.sh b/build.sh
index 1593f4d..9878c4c 100755
--- a/build.sh
+++ b/build.sh
@@ -240,16 +240,21 @@ process() {
     if [ -f $1/$2/autogen.sh ]; then
         SRCDIR="$1/$2"
         CONFCMD="autogen.sh"
-    elif [ X"$CLONE" != X ]; then
+    else
+        checkfortars $1 $2
+        CONFCMD="configure"
+    fi
+
+    # if the user has provided the --clone flag OR
+    # if there are no sources or tarballs but a module file has been provided
+    # the user wants to build from git sources
+    if [ X"$CLONE" != X ] || ( [ X"$CONFCMD" = X ] && [ X"$MODFILE" != X ] ); then
         clone $1 $2
         if [ $? -eq 0 ]; then
 	    SRCDIR="$1/$2"
 	    CONFCMD="autogen.sh"
         fi
 	needs_config=1
-    else
-        checkfortars $1 $2
-        CONFCMD="configure"
     fi
 
     if [ X"$SRCDIR" = X ]; then
-- 
1.7.3.1.127.g1bb28



More information about the xorg-devel mailing list