From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: johannes@sipsolutions.net
Cc: backports@vger.kernel.org, "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Subject: [PATCH 1/7] backports: add support for backport_srctree
Date: Sat, 13 Apr 2013 07:13:38 -0700 [thread overview]
Message-ID: <1365862424-6530-2-git-send-email-mcgrof@do-not-panic.com> (raw)
In-Reply-To: <1365862424-6530-1-git-send-email-mcgrof@do-not-panic.com>
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
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>
---
backport/Makefile.kernel | 2 ++
gentree.py | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/backport/Makefile.kernel b/backport/Makefile.kernel
index 91e7dd6..59e95ef 100644
--- a/backport/Makefile.kernel
+++ b/backport/Makefile.kernel
@@ -15,6 +15,8 @@ NOSTDINC_FLAGS := \
$(BACKPORTS_GIT_TRACKER_DEF) \
$(CFLAGS)
+export backport_srctree = $(M)
+
obj-y += compat/
obj-$(CPTCFG_CFG80211) += net/wireless/
diff --git a/gentree.py b/gentree.py
index 476a3fc..c0838ea 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'))
--
1.7.10.4
next prev parent reply other threads:[~2013-04-13 14:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 14:13 [PATCH 0/7] backport: pending backlog Luis R. Rodriguez
2013-04-13 14:13 ` Luis R. Rodriguez [this message]
2013-04-13 20:55 ` [PATCH 1/7] backports: add support for backport_srctree Johannes Berg
2013-04-13 14:13 ` [PATCH 2/7] compat: add missing header includes for DMA backports Luis R. Rodriguez
2013-04-13 20:57 ` Johannes Berg
2013-04-13 14:13 ` [PATCH 3/7] compat: backport IORESOURCE_REG definition Luis R. Rodriguez
2013-04-13 20:57 ` Johannes Berg
2013-04-13 14:13 ` [PATCH 4/7] gentree.py: add support to explicitly disable a config Luis R. Rodriguez
2013-04-13 20:59 ` Johannes Berg
2013-04-13 14:13 ` [PATCH 5/7] backports: add support for voltage / current regulator drivers Luis R. Rodriguez
2013-04-13 21:01 ` Johannes Berg
2013-04-15 16:26 ` Mark Brown
2013-04-15 16:33 ` Johannes Berg
2013-04-22 13:11 ` Mark Brown
2013-04-23 6:18 ` Luis R. Rodriguez
2013-04-15 16:25 ` Mark Brown
2013-04-13 14:13 ` [PATCH 6/7] backports: add media subsystem drivers Luis R. Rodriguez
2013-04-13 21:02 ` Johannes Berg
2013-04-13 14:13 ` [PATCH 7/7] backports: add intel_ips support Luis R. Rodriguez
2013-04-13 21:03 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365862424-6530-2-git-send-email-mcgrof@do-not-panic.com \
--to=mcgrof@do-not-panic.com \
--cc=backports@vger.kernel.org \
--cc=johannes@sipsolutions.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.