From 0e2dc805c23762c191fab62f45dfaed7d86fac32 Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Tue, 9 Jan 2024 21:35:31 -0500 Subject: [PATCH] Fix some typos; run "make" with -j`nproc` if possible. --- build.tk | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/build.tk b/build.tk index 468c3ec2..45ad48f7 100755 --- a/build.tk +++ b/build.tk @@ -293,9 +293,9 @@ proc BuildRemind {} { .msgs insert end "\n>>> Creating src/custom.h...\n\n" green CreateCustomH - .msgs insert end ">>> Calling `./configure'...\n\n" green + .msgs insert end "\n>>> Calling `./configure'...\n\n" green CallConfigure - .msgs insert end ">>> Calling `make'...\n\n" green + .msgs insert end "\n>>> Calling `make'...\n\n" green CallMake .msgs insert end "\n----------------------------------------------\n\n" .msgs insert end "Remind" red @@ -447,12 +447,12 @@ proc CreateCustomH {} { "#define DEFAULT_LATITUDE *" { set lat [expr $LAT_DEG + ($LAT_MIN/60.0) + ($LAT_SEC/3600.0)]; puts $out "#define DEFAULT_LATITUDE $lat" - .msgs insert end "#define DEFAULT_LATITUDE $lat" + .msgs insert end "#define DEFAULT_LATITUDE $lat\n" } "#define DEFAULT_LONGITUDE *" { set lon [expr -1.0 * ($LON_DEG + ($LON_MIN/60.0) + ($LON_SEC/3600.0))] puts $out "#define DEFAULT_LONGITUDE $lon" - .msgs insert end "#define DEFAULT_LONGITUDE $lon" + .msgs insert end "#define DEFAULT_LONGITUDE $lon\n" } "#define LOCATION *" { puts $out "#define LOCATION \"$Config(LOCATION)\"" @@ -506,7 +506,13 @@ proc CallMake {} { "Icelandic" { set lang ICELANDIC } default { set lang ENGLISH } } - RunCommand "make \"LANGDEF=-DLANG=$lang\"" + set nproc 0 + catch { set nproc [exec nproc] } + if { $nproc != 0 } { + RunCommand "make -j $nproc \"LANGDEF=-DLANG=$lang\"" + } else { + RunCommand "make \"LANGDEF=-DLANG=$lang\"" + } }