From: Arnaud Lacombe <lacombar@gmail.com>
To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>,
Arnaud Lacombe <lacombar@gmail.com>,
Steven Rostedt <srostedt@redhat.com>
Subject: [RFC 4/4] kconfig/streamline_config.pl: move config generation to script
Date: Fri, 1 Jul 2011 19:31:16 -0400 [thread overview]
Message-ID: <1309563076-5050-5-git-send-email-lacombar@gmail.com> (raw)
In-Reply-To: <1309563076-5050-1-git-send-email-lacombar@gmail.com>
This avoid having to deals with multiline shell command in the Makefile and
increase readability.
Cc: Steven Rostedt <srostedt@redhat.com>
---
scripts/kconfig/Makefile | 14 +-------------
scripts/kconfig/localconfig.sh | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+), 13 deletions(-)
create mode 100755 scripts/kconfig/localconfig.sh
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 8a59adf..d48ddc9 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -34,19 +34,7 @@ silentoldconfig: $(obj)/conf
$< --$@ $(Kconfig)
localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
- $(Q)mkdir -p include/generated
- $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
- $(Q)if [ -f .config ]; then \
- cmp -s .tmp.config .config || \
- (mv -f .config .config.old.1; \
- mv -f .tmp.config .config; \
- $(obj)/conf --silentoldconfig $(Kconfig); \
- mv -f .config.old.1 .config.old) \
- else \
- mv -f .tmp.config .config; \
- $(obj)/conf --silentoldconfig $(Kconfig); \
- fi
- $(Q)rm -f .tmp.config
+ $(Q)$(src)/localconfig.sh
# Create new linux.pot file
# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
diff --git a/scripts/kconfig/localconfig.sh b/scripts/kconfig/localconfig.sh
new file mode 100755
index 0000000..64dd295
--- /dev/null
+++ b/scripts/kconfig/localconfig.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+
+mkdir -p include/generated
+
+perl "${srctree}/scripts/kconfig/streamline_config.pl" ${srctree}/ ${Kconfig} $1 > .tmp.config
+
+if [ -f .config ]; then
+ if ! cmp -s .tmp.config .config; then
+ mv -f .config .config.old.1
+ mv -f .tmp.config .config
+ ${obj}/conf --silentoldconfig ${Kconfig}
+ mv -f .config.old.1 .config.old
+ fi
+else
+ mv -f .tmp.config .config
+ ${obj}/conf --silentoldconfig ${Kconfig}
+fi
+
+rm -f .tmp.config
--
1.7.3.4.574.g608b.dirty
next prev parent reply other threads:[~2011-07-01 23:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 23:31 [RFC 0/4] streamline_config clean-ups Arnaud Lacombe
2011-07-01 23:31 ` [RFC 1/4] kbuild: export MAKECMDGOALS Arnaud Lacombe
2011-07-18 19:05 ` Arnaud Lacombe
2011-07-19 14:07 ` Michal Marek
2011-07-19 16:28 ` Arnaud Lacombe
2011-07-25 13:14 ` Steven Rostedt
2011-07-01 23:31 ` [RFC 2/4] kconfig/streamline_config.pl: directly access LSMOD Arnaud Lacombe
2011-07-01 23:31 ` [RFC 3/4] kconfig/streamline_config.pl: merge local{mod,yes}config Arnaud Lacombe
2011-07-01 23:31 ` Arnaud Lacombe [this message]
2011-07-08 21:47 ` [RFC 0/4] streamline_config clean-ups Arnaud Lacombe
2011-07-09 0:19 ` Steven Rostedt
2011-07-14 0:54 ` Steven Rostedt
2011-07-14 2:41 ` Arnaud Lacombe
2011-07-14 13:09 ` Steven Rostedt
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=1309563076-5050-5-git-send-email-lacombar@gmail.com \
--to=lacombar@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=srostedt@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox