summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-04-21 13:45:32 +0200
committerDavid Robillard <d@drobilla.net>2019-04-21 13:45:32 +0200
commit4f98e1c2bed7beacf4d303e51f994fb932952f95 (patch)
tree60eb8d43b454b57f7340245ac8a21d2b077300a5
parent27c5c9327edf1bcea1bf5a74fc28603d92aaa1d1 (diff)
downloadautowaf-4f98e1c2bed7beacf4d303e51f994fb932952f95.tar.gz
autowaf-4f98e1c2bed7beacf4d303e51f994fb932952f95.tar.bz2
autowaf-4f98e1c2bed7beacf4d303e51f994fb932952f95.zip
Remove recursion hacks
This removes the kludgey recursive project mechanism, which did not work correctly for deeply nested subprojects. Instead, projects need to correctly build paths relative to the paths given by their contexts.
-rw-r--r--extras/autowaf.py26
1 files changed, 2 insertions, 24 deletions
diff --git a/extras/autowaf.py b/extras/autowaf.py
index 6036e07..870a69a 100644
--- a/extras/autowaf.py
+++ b/extras/autowaf.py
@@ -7,9 +7,6 @@ import time
from waflib import Configure, ConfigSet, Build, Context, Logs, Options, Utils
from waflib.TaskGen import feature, before, after
-global g_is_child
-g_is_child = False
-
NONEMPTY = -10
if sys.platform == 'win32':
@@ -518,14 +515,6 @@ def compile_flags(env, lib):
return ' '.join(map(lambda x: env['CPPPATH_ST'] % x,
env['INCLUDES_' + lib]))
-def set_recursive():
- global g_is_child
- g_is_child = True
-
-def is_child():
- global g_is_child
- return g_is_child
-
def build_pc(bld, name, version, version_suffix, libs, subst_dict={}):
"""Build a pkg-config file for a library.
@@ -580,13 +569,6 @@ def build_pc(bld, name, version, version_suffix, libs, subst_dict={}):
obj.__dict__.update(subst_dict)
-def build_dir(name, subdir):
- if is_child():
- return os.path.join('build', name, subdir)
- else:
- return os.path.join('build', subdir)
-
-
def make_simple_dox(name):
"Clean up messy Doxygen documentation after it is built"
name = name.lower()
@@ -633,12 +615,8 @@ def build_dox(bld, name, version, srcdir, blddir, outdir='', versioned=True):
if not bld.env['DOCS']:
return
- # Doxygen paths in are relative to the doxygen file, not build directory
- if is_child():
- src_dir = os.path.join(srcdir, name.lower())
- else:
- src_dir = srcdir
-
+ # Doxygen paths in are relative to the doxygen file
+ src_dir = bld.path.srcpath()
subst_tg = bld(features='subst',
source='doc/reference.doxygen.in',
target='doc/reference.doxygen',