summaryrefslogtreecommitdiff
path: root/gentree.py
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-04-13 07:13:38 -0700
committerJohannes Berg <johannes.berg@intel.com>2013-04-13 22:52:40 +0200
commite75f7716c994c17b8e926e107e76e26d0cb34a5e (patch)
treed138b22e897d9f47e97d7dab1eaed485b36e3506 /gentree.py
parent70fd5f3ab3332f1544fabec293fce2c9abe8fa64 (diff)
backports: add support for backport_srctree
The Linux kernel uses srctree to help prefix header files and scripts. When backporting we want to be able to override driver's Makefiles' usage of srctree with our own. Since we can't easily and sanely override the srctree itself without causing a lot of issues just use the python generator to do the change for us on the target Makefiles. This addresses the srctree usage case and where ccflags was used without prefixing any parent directory when used with drivers, the kernel tends to fix that with addtree command. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> [also remove now unnecessary patches] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'gentree.py')
-rwxr-xr-xgentree.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gentree.py b/gentree.py
index 476a3fc8..c0838ea9 100755
--- a/gentree.py
+++ b/gentree.py
@@ -478,11 +478,13 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
data = open(os.path.join(root, f), 'r').read()
for r in regexes:
data = r.sub(r'CPTCFG_\1', data)
+ data = re.sub(r'\$\(srctree\)', '$(backport_srctree)', data)
+ data = re.sub(r'-Idrivers', '-I$(backport_srctree)/drivers', data)
fo = open(os.path.join(root, f), 'w')
fo.write(data)
fo.close()
- git_debug_snapshot(args, "rename config symbol usage")
+ git_debug_snapshot(args, "rename config symbol / srctree usage")
# disable unbuildable Kconfig symbols and stuff Makefiles that doesn't exist
maketree = make.MakeTree(os.path.join(args.outdir, 'Makefile.kernel'))