summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2019-03-29 18:20:52 +0100
committerRalph Boehme <slow@samba.org>2019-04-24 18:32:14 +0000
commitf52e4020653a3848efef47424e21481ed18d3935 (patch)
tree713c8f9b03408fa51765e89f3ff8834998dcf341 /source3/wscript
parentf79acc51a5f45da3936886eaec7b635e70ad4540 (diff)
downloadsamba-f52e4020653a3848efef47424e21481ed18d3935.tar.gz
s3:wscript: fix flex and bison detection message when not installed
If flex or bison are not installed, conf.env['BISON'] and conf.env['FLEX'] respectively return an empty string, so conf.CHECK_COMMAND() runs $ /bin/sh -c " --version | head -n1" and $ /bin/sh -c " --version" which results in the following message /bin/sh: []: command not found Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <npower@samba.org>
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript20
1 files changed, 11 insertions, 9 deletions
diff --git a/source3/wscript b/source3/wscript
index dcd2a303063..6f50f5bc552 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1652,18 +1652,20 @@ main() {
Logs.info("Checking for bison")
bison.configure(conf)
- conf.CHECK_COMMAND('%s --version | head -n1' % conf.env['BISON'],
- msg='Using bison version',
- define=None,
- on_target=False)
+ if conf.env['BISON']:
+ conf.CHECK_COMMAND('%s --version | head -n1' % conf.env.BISON,
+ msg='Using bison version',
+ define=None,
+ on_target=False)
Logs.info("Checking for flex")
conf.find_program('flex', var='FLEX')
- conf.env.FLEXFLAGS = ['-t']
- conf.CHECK_COMMAND('%s --version' % conf.env['FLEX'],
- msg='Using flex version',
- define=None,
- on_target=False)
+ if conf.env['FLEX']:
+ conf.env.FLEXFLAGS = ['-t']
+ conf.CHECK_COMMAND('%s --version' % conf.env.FLEX,
+ msg='Using flex version',
+ define=None,
+ on_target=False)
conf.env.with_spotlight = False
if Options.options.with_spotlight: