Here are a few patches that do things I found useful.
1. Specify -p to run 'git pull' on each component before building it.
2. Specify -j <number> to pass the same parameter to make for parallel
building.
3. Specify -o <module/component> to build just that component.
1 and 3 are useful in combination to issue a single command to update,
build, and install a particular component.
Brian
>From 72e52ec68c3a6d08462a57422a0000ac67adecd6 Mon Sep 17 00:00:00 2001
From: Brian Rogers <[email protected]>
Date: Sun, 1 Feb 2009 02:47:39 -0800
Subject: [PATCH] Add support for pulling each component before building it.
---
build.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/build.sh b/build.sh
index f043240..f2d7dab 100755
--- a/build.sh
+++ b/build.sh
@@ -117,6 +117,10 @@ build() {
old_pwd=`pwd`
cd $SRCDIR || failed cd1 $1 $2
+ if test x"$PULL" = x1; then
+ git pull || failed "git pull" $1 $2
+ fi
+
# Build outside source directory
if [ "x$DIR_ARCH" != x ] ; then
mkdir -p "$DIR_ARCH" || failed mkdir $1 $2
@@ -619,6 +623,7 @@ usage() {
echo " -g : build with debug information"
echo " -m path-to-mesa-sources-for-xserver : full path to Mesa sources"
echo " -n : do not quit after error; just print error message"
+ echo " -p : run git pull on each component"
echo " -r module/component : resume building with this comonent"
echo " -s sudo-command : sudo command to use"
}
@@ -659,6 +664,9 @@ do
-n)
NOQUIT=1
;;
+ -p)
+ PULL=1
+ ;;
-r)
shift
RESUME=$1
--
1.6.0.4
>From 133bd9e5d38cef874a785ea7a4c03f5918fe2ae9 Mon Sep 17 00:00:00 2001
From: Brian Rogers <[email protected]>
Date: Mon, 16 Feb 2009 03:02:53 -0800
Subject: [PATCH] Add support for concurrency while building components.
---
build.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/build.sh b/build.sh
index f2d7dab..c64d928 100755
--- a/build.sh
+++ b/build.sh
@@ -153,7 +153,7 @@ build() {
${CACHE:+--cache-file=}${CACHE} ${CONFFLAGS} "$CONFCFLAGS" || \
failed ${CONFCMD} $1 $2
fi
- ${MAKE} $MAKEFLAGS || failed make $1 $2
+ ${MAKE} $JOBS $MAKEFLAGS || failed make $1 $2
if test x"$CLEAN" = x1; then
${MAKE} $MAKEFLAGS clean || failed clean $1 $2
fi
@@ -621,6 +621,7 @@ usage() {
echo " -d : run make distcheck in addition to others"
echo " -D : run make dist in addition to others"
echo " -g : build with debug information"
+ echo " -j jobs : specify number of jobs to run concurrently"
echo " -m path-to-mesa-sources-for-xserver : full path to Mesa sources"
echo " -n : do not quit after error; just print error message"
echo " -p : run git pull on each component"
@@ -657,6 +658,10 @@ do
export CFLAGS
CONFCFLAGS="CFLAGS=-g3 -O0"
;;
+ -j)
+ shift
+ JOBS="-j $1"
+ ;;
-m)
shift
MESAPATH=$1
--
1.6.0.4
>From cf24d7cc9ed01e0e5fd01f4b1ffdcb062e043eef Mon Sep 17 00:00:00 2001
From: Brian Rogers <[email protected]>
Date: Mon, 16 Feb 2009 03:11:40 -0800
Subject: [PATCH] Add option to build just one specified component.
---
build.sh | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/build.sh b/build.sh
index c64d928..ca5d76c 100755
--- a/build.sh
+++ b/build.sh
@@ -167,6 +167,11 @@ build() {
failed install $1 $2
cd ${old_pwd}
+
+ if test x"$BUILD_ONE" = x1; then
+ echo "Single-component build complete"
+ exit 0
+ fi
}
# protocol headers have no build order dependencies
@@ -624,6 +629,7 @@ usage() {
echo " -j jobs : specify number of jobs to run concurrently"
echo " -m path-to-mesa-sources-for-xserver : full path to Mesa sources"
echo " -n : do not quit after error; just print error message"
+ echo " -o module/component : build just this component"
echo " -p : run git pull on each component"
echo " -r module/component : resume building with this comonent"
echo " -s sudo-command : sudo command to use"
@@ -669,6 +675,11 @@ do
-n)
NOQUIT=1
;;
+ -o)
+ shift
+ RESUME=$1
+ BUILD_ONE=1
+ ;;
-p)
PULL=1
;;
--
1.6.0.4
_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel