scons: support passing multiple paths to PATH_REMOVE option - useful to strip - after the fact - paths that might come from pkg-config calls to cairo - closes #1980
This commit is contained in:
parent
29abb9a7c0
commit
3a2a8dbfde
1 changed files with 9 additions and 9 deletions
|
@ -297,7 +297,7 @@ opts.AddVariables(
|
||||||
('PYTHON_PREFIX','Custom install path "prefix" for python bindings (default of no prefix)',''),
|
('PYTHON_PREFIX','Custom install path "prefix" for python bindings (default of no prefix)',''),
|
||||||
('DESTDIR', 'The root directory to install into. Useful mainly for binary package building', '/'),
|
('DESTDIR', 'The root directory to install into. Useful mainly for binary package building', '/'),
|
||||||
('PATH', 'A custom path (or multiple paths divided by ":") to append to the $PATH env to prioritize usage of command line programs (if multiple are present on the system)', ''),
|
('PATH', 'A custom path (or multiple paths divided by ":") to append to the $PATH env to prioritize usage of command line programs (if multiple are present on the system)', ''),
|
||||||
('PATH_REMOVE', 'A path prefix to exclude from all known command and compile paths', ''),
|
('PATH_REMOVE', 'A path prefix to exclude from all known command and compile paths (create multiple excludes separated by :)', ''),
|
||||||
('PATH_REPLACE', 'Two path prefixes (divided with a :) to search/replace from all known command and compile paths', ''),
|
('PATH_REPLACE', 'Two path prefixes (divided with a :) to search/replace from all known command and compile paths', ''),
|
||||||
|
|
||||||
# Boost variables
|
# Boost variables
|
||||||
|
@ -1815,7 +1815,7 @@ if not HELP_REQUESTED:
|
||||||
env['ENV']['PATH'] = os.path.realpath(env['PATH']) + ':' + env['ENV']['PATH']
|
env['ENV']['PATH'] = os.path.realpath(env['PATH']) + ':' + env['ENV']['PATH']
|
||||||
|
|
||||||
if env['PATH_REMOVE']:
|
if env['PATH_REMOVE']:
|
||||||
p = env['PATH_REMOVE']
|
for p in env['PATH_REMOVE'].split(':'):
|
||||||
if p in env['ENV']['PATH']:
|
if p in env['ENV']['PATH']:
|
||||||
env['ENV']['PATH'].replace(p,'')
|
env['ENV']['PATH'].replace(p,'')
|
||||||
rm_path(p,'LIBPATH',env)
|
rm_path(p,'LIBPATH',env)
|
||||||
|
|
Loading…
Reference in a new issue