From eab0a407ebac992e86e9b491ab964dd7720deb95 Mon Sep 17 00:00:00 2001 From: tg Date: Tue, 9 Oct 2007 14:29:42 +0000 Subject: [PATCH] =?UTF-8?q?implement=20parallel=20make=20(Build.sh=20-j)?= =?UTF-8?q?=20this=20is=20for=20the=2016-fold=20Itanium=20=E2=85=A1=20box?= =?UTF-8?q?=20with=2064=20GiB=20RAM=20=E2=98=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Build.sh b/Build.sh index 8d41b42..e21fd83 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $MirOS: src/bin/mksh/Build.sh,v 1.267 2007/10/09 14:21:54 tg Exp $ +# $MirOS: src/bin/mksh/Build.sh,v 1.268 2007/10/09 14:29:42 tg Exp $ #- # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI @@ -210,10 +210,14 @@ e=echo h=1 r=0 eq=0 +pm=0 for i do case $i in + -j) + pm=1 + ;; -Q) eq=1 ;; @@ -1013,10 +1017,18 @@ echo "$CC $CFLAGS $LDFLAGS -o mksh $objs $LIBS" >>Rebuild.sh test $ct = msc || echo 'test 0 = $? || exit 1' >>Rebuild.sh echo 'result=mksh; test -f mksh.exe && result=mksh.exe' >>Rebuild.sh echo 'test -f $result || exit 1; size $result' >>Rebuild.sh -for file in $SRCS; do - test -f $file || file=$srcdir/$file - v "$CC $CFLAGS $CPPFLAGS -c $file" || exit 1 -done +if test 1 = $pm; then + for file in $SRCS; do + test -f $file || file=$srcdir/$file + v "$CC $CFLAGS $CPPFLAGS -c $file" & + done + wait +else + for file in $SRCS; do + test -f $file || file=$srcdir/$file + v "$CC $CFLAGS $CPPFLAGS -c $file" || exit 1 + done +fi v "$CC $CFLAGS $LDFLAGS -o mksh $objs $LIBS" rv=$?; test $ct = msc || test 0 = $rv || exit 1 result=mksh