Skip to content

Commit cee9e0f

Browse files
committed
Introduce global_flags
Set this to True to export LDFLAGS and similar as global variables, as opposed to being local just for the configure step (the default). No packages are affected by this until you set 'global_flags: true'.
1 parent 8d7bb03 commit cee9e0f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

base/autotools_package.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def configure(ctx, stage_args):
1919
set_env_flags: true # default
2020
env_flags_append: {'LDFLAGS', '-Wl,-rpath=${ARTIFACT}/lib'} # only meaningful if set_env_flags: true
2121
configure_path: . # default
22+
global_flags: false # default
2223
2324
If set_env_flags is set, CPPFLAGS and LDFLAGS will be set, as appropriate for the
2425
platform.
@@ -45,4 +46,8 @@ def configure(ctx, stage_args):
4546
for env_var, value in env.items():
4647
env_lines.append('export %s="%s"' % (env_var, ' '.join(value)))
4748

48-
return ['('] + env_lines + conf_lines + [')']
49+
r = env_lines + conf_lines
50+
if not stage_args.get('global_flags', False):
51+
r = ['('] + r + [')']
52+
53+
return r

0 commit comments

Comments
 (0)