Skip to content

Commit

Permalink
minor build improvements (#1281)
Browse files Browse the repository at this point in the history
* fix maiden-repl dependency checking

* edge.sh: fail fast, limit build parallelism

assuming the target audience for `edge.sh` is a less technical
person testing unreleased features it makes sense to exit as
soon as one of the commands fails (such as `waf configure`) instead
of continuing on to produce a bad build or errors which obscure
the initial problem.

limiting parallelism is a safety. building more than two of the
c++ components in parallel with the matron/crone/supercollider running
will somewhat often run out of memory and fail. limiting the build
to two jobs leaves ~100Mb of headroom during a clean build
  • Loading branch information
ngwese authored Dec 27, 2020
1 parent 427e70b commit 9a2e08b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions edge.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
cd "$(dirname "$0")"
git pull
git submodule update
./waf configure
./waf

./waf -j2
5 changes: 1 addition & 4 deletions maiden-repl/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ def options(opt):
def configure(conf):
conf.load('compiler_c compiler_cxx')

conf.check_cfg(package='pthread', args=['--cflags', '--libs'])
conf.check_cfg(package='readline', args=['--cflags', '--libs'])
# libraries with full pkg-config data
conf.check_cfg(package='ncursesw', args=['--cflags', '--libs'])
conf.check_cfg(package='panel', args=['--cflags', '--libs'])
conf.check_cfg(package='nanomsg', args=['--cflags', '--libs'])
Expand All @@ -31,8 +30,6 @@ def build(bld):
],

use=[
'PTHREAD',
'READLINE',
'NCURSESW',
'PANEL',
'NANOMSG'
Expand Down
4 changes: 4 additions & 0 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def options(opt):
opt.add_option('--enable-ableton-link', action='store_true', default=True)
opt.add_option('--profile-matron', action='store_true', default=False)

opt.recurse('maiden-repl')

def configure(conf):
conf.load('compiler_c compiler_cxx boost')

Expand Down Expand Up @@ -72,6 +74,8 @@ def configure(conf):
conf.env.ENABLE_ABLETON_LINK = conf.options.enable_ableton_link
conf.define('HAVE_ABLETON_LINK', conf.options.enable_ableton_link)

conf.recurse('maiden-repl')

def build(bld):
bld.recurse('matron')
bld.recurse('maiden-repl')
Expand Down

0 comments on commit 9a2e08b

Please sign in to comment.