Support a CPUS=<n> argument for the `in-place' makefile target

Also, make `distro-build/drive-clients' use `#:j' configuration
for `PLT_SETUP_OPTIONS'.
This commit is contained in:
Matthew Flatt 2013-07-05 10:29:28 -06:00
parent 8e7a5aa7e3
commit ddbc8e5f40
4 changed files with 21 additions and 2 deletions

View File

@ -38,6 +38,14 @@ dependencies. The default value of `PKGS' reaches all packages in
Mode", below, for more information on package links and the way that
`PKGS' is remembered for future `make in-place's.
Note that `make -j <n>' controls parallelism for the makefile part of
a build, but not for the `raco setup' part. To control both the
makefile and the `raco setup' part, use
make CPUS=<n>
which recurs with `make -j <n> PLT_SETUP_OPTIONS="-j <n>"'.
Building Racket Pieces
======================

View File

@ -29,7 +29,15 @@ WIN32_PLAIN_RACKET = racket\racket
MACOSX_CHECK = $(PLAIN_RACKET) -I racket/base -e '(case (system-type) [(macosx) (exit 0)] [else (exit 1)])'
CPUS =
in-place:
if [ "$(CPUS)" = "" ] ; then $(MAKE) plain-in-place ; else $(MAKE) cpus-in-place ; fi
cpus-in-place:
$(MAKE) -j $(CPUS) plain-in-place PLT_SETUP_OPTIONS="-j $(CPUS)"
plain-in-place:
$(MAKE) core
if $(MACOSX_CHECK) ; then $(MAKE) native-from-git ; fi
$(MAKE) pkg-links

View File

@ -151,8 +151,8 @@
;; #:bits <integer> --- 32 or 64, affects Visual Studio path
;; #:vc <string*> --- "x86" or "x64" to select the Visual C build mode;
;; default depends on bits
;; #:j <integer> --- parallelism for `make' on Unix and Mac OS X;
;; defaults to 1
;; #:j <integer> --- parallelism for `make' on Unix and Mac OS X and
;; for `raco setup' on all platforms; defaults to 1
;; #:timeout <number> --- numbers of seconds to wait before declaring
;; failure; defaults to 30 minutes
;; #:clean? <boolean> --- if true, then the build process on the client

View File

@ -237,6 +237,7 @@
(sh "cd " (q dir) " ; "
"make -j " j " client"
(client-args c server 'unix)
" PLT_SETUP_OPTIONS=\"-j " j "\""
" CONFIGURE_ARGS_qq=" (qq (get-opt c '#:configure null) 'unix))))
(define (windows-build c host port user server repo clean? pull?)
@ -247,6 +248,7 @@
(if (= bits 32)
"x86"
"x64")))
(define j (or (get-opt c '#:j) 1))
(define (cmd . args)
(list "cmd" "/c" (apply ~a args)))
(ssh-script
@ -261,6 +263,7 @@
" && \"c:\\Program Files" (if (= bits 64) " (x86)" "") "\\Microsoft Visual Studio 9.0\\vc\\vcvarsall.bat\""
" " vc
" && nmake win32-client"
" PLT_SETUP_OPTIONS=\"-j " j "\""
(client-args c server 'windows))))
(define (client-build c)