summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-07-09 15:08:38 -0400
committerColin Walters <walters@verbum.org>2010-07-09 15:08:38 -0400
commit056b7cb878817497f11db5164687ea13cfbeb1aa (patch)
tree44a14212de5453e3f90a49d00127d4915d04ed95
parent76ccb5a15a3ec3b741deefee1164ce972ac00ee1 (diff)
downloadhomegit-MOVED-TO-GNOME-056b7cb878817497f11db5164687ea13cfbeb1aa.zip
homegit-MOVED-TO-GNOME-056b7cb878817497f11db5164687ea13cfbeb1aa.tar.gz
homegit-MOVED-TO-GNOME-056b7cb878817497f11db5164687ea13cfbeb1aa.tar.xz
Various build fixes
-rwxr-xr-xbin/build26
1 files changed, 17 insertions, 9 deletions
diff --git a/bin/build b/bin/build
index b33955d..8d91a90 100755
--- a/bin/build
+++ b/bin/build
@@ -7,22 +7,30 @@ if test -z "$root"; then
exit 1
fi
shift || true
+if test -d /lib64; then
+ libdir=$root/lib64
+else
+ libdir=$root/lib
+fi
+configargs="--prefix=$root --libdir=$libdir $@"
if ! test -x configure; then
- if test -d /lib64; then
- libdir=$root/lib64
- else
- libdir=$root/lib
- fi
- configargs="--prefix=$root --libdir=$libdir $@"
if test -f autogen.sh; then
inroot $root ./autogen.sh $configargs
else
autoreconf -f -i
- inroot $root configure $configargs
+ inroot $root ./configure $configargs
+ fi
+fi
+# We need to rerun configure if the prefix changed
+prefix_matches=yes
+if test -f config.log; then
+ previous_prefix=$(grep '^prefix=' config.log | cut -f 2 -d '=')
+ if test previous_prefix != $root; then
+ prefix_matches=no
fi
fi
-if ! test -f Makefile; then
- inroot $root configure $configargs
+if ! test -f Makefile || test x$prefix_matches = xno; then
+ inroot $root ./configure $configargs
fi
nproc=$(($(grep -c ^processor /proc/cpuinfo) * 2))
make -j $nproc $MAKEARGS