Skip to content

Commit 064c712

Browse files
committed
Default MAKEFLAGS to -j
This tells `make` to run in parallel by default. If I do ``` $ rake clobber; time rake compile ``` On the main branch it's like this: ``` ________________________________________________________ Executed in 9.71 secs fish external usr time 8.41 secs 128.00 micros 8.41 secs sys time 1.16 secs 530.00 micros 1.16 secs ``` On this branch it's like this: ``` ________________________________________________________ Executed in 3.89 secs fish external usr time 11.49 secs 127.00 micros 11.49 secs sys time 2.00 secs 553.00 micros 2.00 secs ``` So this buys me about 6 seconds on my machine
1 parent f57e9dd commit 064c712

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Rakefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ desc "Generate all ERB template based files"
1111
task templates: Prism::Template::TEMPLATES
1212

1313
make = RUBY_PLATFORM.match?(/openbsd|freebsd/) ? "gmake" : "make"
14-
task(make: :templates) { sh(make) }
14+
task(make: :templates) {
15+
ENV["MAKEFLAGS"] ||= "-j"
16+
sh(make)
17+
}
1518
task(make_no_debug: :templates) { sh("#{make} all-no-debug") }
1619
task(make_minimal: :templates) { sh("#{make} minimal") }
1720

0 commit comments

Comments
 (0)