Skip to content

Commit

Permalink
build: Notice if flex is missing at configure time
Browse files Browse the repository at this point in the history
This may also fix the coverage build by ensuring --noline
is always specified to flex.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14586

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Mar 29 02:12:23 UTC 2021 on sn-devel-184
  • Loading branch information
abartlet committed Mar 29, 2021
1 parent 5bc1463 commit 942c0d2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
9 changes: 0 additions & 9 deletions source3/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -1828,15 +1828,6 @@ main() {
define=None,
on_target=False)

Logs.info("Checking for flex")
conf.find_program('flex', var='FLEX')
if conf.env['FLEX']:
conf.env.FLEXFLAGS = ['-t']
conf.CHECK_COMMAND('%s --version' % conf.env.FLEX[0],
msg='Using flex version',
define=None,
on_target=False)

with_spotlight_tracker_backend = (
conf.CONFIG_SET('HAVE_TRACKER')
and conf.CONFIG_SET('HAVE_GLIB')
Expand Down
16 changes: 13 additions & 3 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,19 @@ def configure(conf):
if not (Options.options.without_ad_dc):
conf.DEFINE('AD_DC_BUILD_IS_ENABLED', 1)

# Check for flex before doing the embedded heimdal checks so we can bail if we don't have it.
Logs.info("Checking for flex")
conf.find_program('flex', var='FLEX')
if conf.env['FLEX']:
conf.CHECK_COMMAND('%s --version' % conf.env.FLEX[0],
msg='Using flex version',
define=None,
on_target=False)
conf.env.FLEXFLAGS = ['-t']

# #line statements in these generated files cause issues for lcov
conf.env.FLEXFLAGS += ["--noline"]

if Options.options.with_system_mitkrb5:
if not Options.options.with_experimental_mit_ad_dc and \
not Options.options.without_ad_dc:
Expand Down Expand Up @@ -355,9 +368,6 @@ def configure(conf):
msg="Checking compiler for full RELRO support"):
conf.env['ENABLE_RELRO'] = True

# #line statements in these generated files cause issues for lcov
conf.env.FLEXFLAGS += ["--noline"]

conf.SAMBA_CONFIG_H('include/config.h')

def etags(ctx):
Expand Down
3 changes: 3 additions & 0 deletions wscript_configure_embedded_heimdal
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
if not conf.env['FLEX']:
conf.fatal("Embedded Heimdal build requires flex but it was not found. Install flex or use --with-system-mitkrb5 or --with-system-heimdalkrb5")

conf.RECURSE('source4/heimdal_build')

0 comments on commit 942c0d2

Please sign in to comment.