[PATCH modular] Configure cloned repositories.

Trevor Woerner twoerner at gmail.com
Wed Oct 20 10:23:58 PDT 2010


From: Trevor Woerner <twoerner at gmail.com>

If the user has specified the '--clone' cmdline option, be sure to run
the configuration on the newly cloned sub-project, even if the '-a' cmdline
option has been specified (since configuring is likely to be what is
wanted on newly cloned sub-project).

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

diff --git a/build.sh b/build.sh
index bbe4d46..1593f4d 100755
--- a/build.sh
+++ b/build.sh
@@ -225,6 +225,7 @@ clone() {
 #   1 - bad
 process() {
     local rtn
+    local needs_config=0
 
     # preconds
     if [ X"$1" = X ]; then
@@ -245,6 +246,7 @@ process() {
 	    SRCDIR="$1/$2"
 	    CONFCMD="autogen.sh"
         fi
+	needs_config=1
     else
         checkfortars $1 $2
         CONFCMD="configure"
@@ -304,18 +306,6 @@ process() {
 	fi
     fi
 
-    if [ X"$MAKECMD" != X ]; then
-	$MAKECMD
-	rtn=$?
-	cd $old_pwd
-
-	if [ $rtn -ne 0 ]; then
-	    failed "$MAKECMD" $1 $2
-	    return 1
-	fi
-	return 0
-    fi
-
     # Special configure flags for certain modules
     MOD_SPECIFIC=
 
@@ -329,7 +319,7 @@ process() {
     fi
 
     # Use "sh autogen.sh" since some scripts are not executable in CVS
-    if [ X"$NOAUTOGEN" = X ]; then
+    if [ $needs_config -eq 1 ] || [ X"$NOAUTOGEN" = X ]; then
 	sh ${DIR_CONFIG}/${CONFCMD} --prefix=${PREFIX} ${LIB_FLAGS} \
 	    ${MOD_SPECIFIC} ${QUIET:+--quiet} \
 	    ${CACHE:+--cache-file=}${CACHE} ${CONFFLAGS} "$CONFCFLAGS"
@@ -340,6 +330,19 @@ process() {
 	fi
     fi
 
+    # a 'make' command has been specified by the user
+    if [ X"$MAKECMD" != X ]; then
+	$MAKECMD
+	rtn=$?
+	cd $old_pwd
+
+	if [ $rtn -ne 0 ]; then
+	    failed "$MAKECMD" $1 $2
+	    return 1
+	fi
+	return 0
+    fi
+
     ${MAKE} $MAKEFLAGS
     if [ $? -ne 0 ]; then
 	failed make $1 $2
-- 
1.7.3.1.104.gc752e



More information about the xorg-devel mailing list