summaryrefslogtreecommitdiffstats
path: root/waflib/Build.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-17 17:31:03 +0100
committerDavid Robillard <d@drobilla.net>2019-03-17 18:14:27 +0100
commitdc15972a98d7b60bd81f9a6b456ecccaeb7c654d (patch)
tree1bb62d4a902388d4a0440c4524ab838a03aee9ea /waflib/Build.py
parentccc9b971ab206fa3dc32a432a3e76db976192f58 (diff)
parent8cb9c6430dc0056f8d40b4d8e0bdc616ff397e1f (diff)
downloadganv-dc15972a98d7b60bd81f9a6b456ecccaeb7c654d.tar.gz
ganv-dc15972a98d7b60bd81f9a6b456ecccaeb7c654d.tar.bz2
ganv-dc15972a98d7b60bd81f9a6b456ecccaeb7c654d.zip
Update autowaf and adapt to new API
Diffstat (limited to 'waflib/Build.py')
-rw-r--r--waflib/Build.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/waflib/Build.py b/waflib/Build.py
index 1afcba6..8143dbc 100644
--- a/waflib/Build.py
+++ b/waflib/Build.py
@@ -104,7 +104,7 @@ class BuildContext(Context.Context):
"""Amount of jobs to run in parallel"""
self.targets = Options.options.targets
- """List of targets to build (default: \*)"""
+ """List of targets to build (default: \\*)"""
self.keep = Options.options.keep
"""Whether the build should continue past errors"""
@@ -1055,12 +1055,16 @@ class inst(Task.Task):
"""
Returns the destination path where files will be installed, pre-pending `destdir`.
+ Relative paths will be interpreted relative to `PREFIX` if no `destdir` is given.
+
:rtype: string
"""
if isinstance(self.install_to, Node.Node):
dest = self.install_to.abspath()
else:
- dest = Utils.subst_vars(self.install_to, self.env)
+ dest = os.path.normpath(Utils.subst_vars(self.install_to, self.env))
+ if not os.path.isabs(dest):
+ dest = os.path.join(self.env.PREFIX, dest)
if destdir and Options.options.destdir:
dest = os.path.join(Options.options.destdir, os.path.splitdrive(dest)[1].lstrip(os.sep))
return dest
@@ -1314,7 +1318,8 @@ class CleanContext(BuildContext):
lst = []
for env in self.all_envs.values():
lst.extend(self.root.find_or_declare(f) for f in env[CFG_FILES])
- for n in self.bldnode.ant_glob('**/*', excl='.lock* *conf_check_*/** config.log c4che/*', quiet=True):
+ excluded_dirs = '.lock* *conf_check_*/** config.log %s/*' % CACHE_DIR
+ for n in self.bldnode.ant_glob('**/*', excl=excluded_dirs, quiet=True):
if n in lst:
continue
n.delete()