summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2019-02-13 10:18:43 +1100
committerChris Johns <chrisj@rtems.org>2019-02-13 10:18:43 +1100
commit5d8b0ddd0ac055b5edb569f119e8a4c744fd1aae (patch)
tree58735c15172a49cbc567d6132771ebe91fd7b5ec
parentec95748f03ca6f45e60e32e3dc5b221cc168d803 (diff)
downloadrtems-docs-5d8b0ddd0ac055b5edb569f119e8a4c744fd1aae.tar.bz2
waf: Remove as many sys path hacks as we can.
There are still sys.path hacks in the conf.py files. They cannot be removed because the instance of python running the sphinx-build command does not see our top level path hacks. I looked at using PYTHONPATH but I could not figure out how to set a process environ var for a waf build instance.
-rw-r--r--bsp-howto/wscript18
-rw-r--r--c-user/wscript18
-rw-r--r--cpu-supplement/wscript18
-rw-r--r--develenv/wscript18
-rw-r--r--eclipse/wscript18
-rw-r--r--eng/wscript18
-rw-r--r--filesystem/wscript18
-rw-r--r--images/wscript10
-rw-r--r--networking/wscript18
-rw-r--r--porting/wscript18
-rw-r--r--posix-compliance/wscript18
-rw-r--r--posix-users/wscript18
-rw-r--r--rtemsconfig/wscript18
-rw-r--r--shell/wscript18
-rw-r--r--user/wscript18
-rw-r--r--wscript14
16 files changed, 111 insertions, 165 deletions
diff --git a/bsp-howto/wscript b/bsp-howto/wscript
index 1cb5736..4063cd4 100644
--- a/bsp-howto/wscript
+++ b/bsp-howto/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/c-user/wscript b/c-user/wscript
index 1cb5736..4063cd4 100644
--- a/c-user/wscript
+++ b/c-user/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/cpu-supplement/wscript b/cpu-supplement/wscript
index 1cb5736..4063cd4 100644
--- a/cpu-supplement/wscript
+++ b/cpu-supplement/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/develenv/wscript b/develenv/wscript
index 1cb5736..4063cd4 100644
--- a/develenv/wscript
+++ b/develenv/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/eclipse/wscript b/eclipse/wscript
index 1cb5736..4063cd4 100644
--- a/eclipse/wscript
+++ b/eclipse/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/eng/wscript b/eng/wscript
index 1cb5736..4063cd4 100644
--- a/eng/wscript
+++ b/eng/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/filesystem/wscript b/filesystem/wscript
index 1cb5736..4063cd4 100644
--- a/filesystem/wscript
+++ b/filesystem/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/images/wscript b/images/wscript
index 142b150..179938b 100644
--- a/images/wscript
+++ b/images/wscript
@@ -1,7 +1,3 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build_images as build
-from waf import cmd_options as options
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build_images as build
+from common.waf import cmd_options as options
diff --git a/networking/wscript b/networking/wscript
index 1cb5736..4063cd4 100644
--- a/networking/wscript
+++ b/networking/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/porting/wscript b/porting/wscript
index 1cb5736..4063cd4 100644
--- a/porting/wscript
+++ b/porting/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/posix-compliance/wscript b/posix-compliance/wscript
index 7ff4013..eae2174 100644
--- a/posix-compliance/wscript
+++ b/posix-compliance/wscript
@@ -1,14 +1,10 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as doc_build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as doc_build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
import posix_rst
diff --git a/posix-users/wscript b/posix-users/wscript
index 1cb5736..4063cd4 100644
--- a/posix-users/wscript
+++ b/posix-users/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/rtemsconfig/wscript b/rtemsconfig/wscript
index 1cb5736..4063cd4 100644
--- a/rtemsconfig/wscript
+++ b/rtemsconfig/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/shell/wscript b/shell/wscript
index 1cb5736..4063cd4 100644
--- a/shell/wscript
+++ b/shell/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/user/wscript b/user/wscript
index 1cb5736..4063cd4 100644
--- a/user/wscript
+++ b/user/wscript
@@ -1,11 +1,7 @@
-from sys import path
-from os.path import abspath
-path.insert(0, abspath('../common/'))
-
-from waf import cmd_configure as configure
-from waf import cmd_build as build
-from waf import cmd_options as options
-from waf import spell
-from waf import cmd_spell
-from waf import linkcheck
-from waf import cmd_linkcheck
+from common.waf import cmd_configure as configure
+from common.waf import cmd_build as build
+from common.waf import cmd_options as options
+from common.waf import spell
+from common.waf import cmd_spell
+from common.waf import linkcheck
+from common.waf import cmd_linkcheck
diff --git a/wscript b/wscript
index f10fcb4..7cdda9a 100644
--- a/wscript
+++ b/wscript
@@ -5,11 +5,10 @@
import sys
import os.path
-sys.path.insert(0, os.path.abspath('common'))
-
import waflib
-import waf as docs_waf
-import version
+
+from common import waf as docs_waf
+from common import version
#
# Branch version
@@ -17,6 +16,13 @@ import version
rtems_major_version = '5'
#
+# Set Python's system path to `common` from the top level so the
+# conf.py modules in subdirectories can be found. See xml_catalogue in
+# common/waf.py.
+#
+sys.path.append(os.path.abspath('common'))
+
+#
# The documents to build.
#
build_all = ['user',