[CalendarServer-changes] [5664] CalendarServer/trunk/support/build.sh
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 31 12:19:25 PDT 2010
Revision: 5664
http://trac.macosforge.org/projects/calendarserver/changeset/5664
Author: wsanchez at apple.com
Date: 2010-05-31 12:19:20 -0700 (Mon, 31 May 2010)
Log Message:
-----------
Use make -j for fasterness, per Dre
Modified Paths:
--------------
CalendarServer/trunk/support/build.sh
Modified: CalendarServer/trunk/support/build.sh
===================================================================
--- CalendarServer/trunk/support/build.sh 2010-05-27 18:54:09 UTC (rev 5663)
+++ CalendarServer/trunk/support/build.sh 2010-05-31 19:19:20 UTC (rev 5664)
@@ -395,7 +395,24 @@
fi;
}
+jmake () {
+ case "$(uname -s)" in
+ Darwin|Linux)
+ ncpu="$(getconf _NPROCESSORS_ONLN)";
+ ;;
+ FreeBSD)
+ ncpu="$(sysctl hw.ncpu)";
+ ncpu="${cpu##hw.ncpu: }";
+ ;;
+ esac;
+ if [ -n "${ncpu:-}" ] && [[ "${ncpu}" =~ ^[0-9]+$ ]]; then
+ make -j "${ncpu}" "$@";
+ else
+ make "$@";
+ fi;
+}
+
# Declare a dependency on a C project built with autotools.
c_dependency () {
local name="$1"; shift;
@@ -413,8 +430,8 @@
echo "Building ${name}...";
cd "${srcdir}";
./configure --prefix="${srcdir}/_root" "$@";
- make;
- make install;
+ jmake;
+ jmake install;
fi;
export PATH="${PATH}:${srcdir}/_root/bin";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100531/32aa4aea/attachment.html>
More information about the calendarserver-changes
mailing list