From 719e1949a19da35b43581f524482ae901c44a6ca Mon Sep 17 00:00:00 2001 From: "Meredith L. Patterson" <mlp@thesmartpolitenerd.com> Date: Thu, 21 Nov 2013 00:12:31 -0600 Subject: [PATCH] scons works with BINDINGS=none --- SConstruct | 1 + src/SConscript | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index 422efe64..2d67046a 100644 --- a/SConstruct +++ b/SConstruct @@ -7,6 +7,7 @@ import sys vars = Variables(None, ARGUMENTS) vars.Add(PathVariable('DESTDIR', "Root directory to install in (useful for packaging scripts)", None, PathVariable.PathIsDirCreate)) vars.Add(PathVariable('prefix', "Where to install in the FHS", "/usr/local", PathVariable.PathAccept)) +vars.Add(ListVariable('BINDINGS', 'Language bindings to build', 0, ['php'])) env = Environment(ENV = {'PATH' : os.environ['PATH']}, variables = vars, tools=['default', 'scanreplace'], toolpath=['tools']) diff --git a/src/SConscript b/src/SConscript index 1240fd08..98ce6c47 100644 --- a/src/SConscript +++ b/src/SConscript @@ -1,8 +1,6 @@ # -*- python -*- Import('env') -bindings = ['php'] - dist_headers = [ "hammer.h", "allocator.h", @@ -73,5 +71,6 @@ testenv.Program('test_suite', tests + ['test_suite.c']) Export("libhammer_static libhammer_shared") -for b in bindings: - env.SConscript(["bindings/%s/SConscript" % b]) +if 'BINDINGS' in env: + for b in env['BINDINGS']: + env.SConscript(["bindings/%s/SConscript" % b]) -- GitLab