All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arseny Maslennikov <ar@cs.msu.ru>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Jeff Dike <jdike@addtoit.com>,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Arseny Maslennikov <ar@cs.msu.ru>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-um@lists.infradead.org
Subject: [PATCH 1/3] kconfig/Makefile: localmodconfig: use KCONFIG_CONFIG
Date: Mon,  4 Mar 2019 19:57:30 +0300	[thread overview]
Message-ID: <20190304165732.24043-2-ar@cs.msu.ru> (raw)
In-Reply-To: <20190304165732.24043-1-ar@cs.msu.ru>

If the config file is reassigned through the KCONFIG_CONFIG
makeflag/envvar, this rule still attempts to use the wrong, possibly
nonexistent file.
Let's fix that.

Signed-off-by: Arseny Maslennikov <ar@cs.msu.ru>
---
 scripts/kconfig/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 1c7ac07def4d..28be91964a20 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -44,14 +44,14 @@ build_xconfig: $(obj)/qconf
 
 localyesconfig localmodconfig: $(obj)/conf
 	$(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(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;			\
+	$(Q)if [ -f $(KCONFIG_CONFIG) ]; then 				\
+			cmp -s .tmp.config $(KCONFIG_CONFIG) ||		\
+			(mv -f $(KCONFIG_CONFIG) .tmp.config.old.1;	\
+			 mv -f .tmp.config $(KCONFIG_CONFIG);		\
 			 $< $(silent) --oldconfig $(Kconfig);		\
-			 mv -f .config.old.1 .config.old)		\
+			 mv -f .tmp.config.old.1 $(KCONFIG_CONFIG).old)	\
 	else								\
-			mv -f .tmp.config .config;			\
+			mv -f .tmp.config $(KCONFIG_CONFIG);		\
 			$< $(silent) --oldconfig $(Kconfig);		\
 	fi
 	$(Q)rm -f .tmp.config
-- 
2.20.1


WARNING: multiple messages have this Message-ID (diff)
From: Arseny Maslennikov <ar@cs.msu.ru>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Jeff Dike <jdike@addtoit.com>,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Arseny Maslennikov <ar@cs.msu.ru>,
	linux-um@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org
Subject: [PATCH 1/3] kconfig/Makefile: localmodconfig: use KCONFIG_CONFIG
Date: Mon,  4 Mar 2019 19:57:30 +0300	[thread overview]
Message-ID: <20190304165732.24043-2-ar@cs.msu.ru> (raw)
In-Reply-To: <20190304165732.24043-1-ar@cs.msu.ru>

If the config file is reassigned through the KCONFIG_CONFIG
makeflag/envvar, this rule still attempts to use the wrong, possibly
nonexistent file.
Let's fix that.

Signed-off-by: Arseny Maslennikov <ar@cs.msu.ru>
---
 scripts/kconfig/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 1c7ac07def4d..28be91964a20 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -44,14 +44,14 @@ build_xconfig: $(obj)/qconf
 
 localyesconfig localmodconfig: $(obj)/conf
 	$(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(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;			\
+	$(Q)if [ -f $(KCONFIG_CONFIG) ]; then 				\
+			cmp -s .tmp.config $(KCONFIG_CONFIG) ||		\
+			(mv -f $(KCONFIG_CONFIG) .tmp.config.old.1;	\
+			 mv -f .tmp.config $(KCONFIG_CONFIG);		\
 			 $< $(silent) --oldconfig $(Kconfig);		\
-			 mv -f .config.old.1 .config.old)		\
+			 mv -f .tmp.config.old.1 $(KCONFIG_CONFIG).old)	\
 	else								\
-			mv -f .tmp.config .config;			\
+			mv -f .tmp.config $(KCONFIG_CONFIG);		\
 			$< $(silent) --oldconfig $(Kconfig);		\
 	fi
 	$(Q)rm -f .tmp.config
-- 
2.20.1


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


  reply	other threads:[~2019-03-04 16:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 16:57 [PATCH 0/3] kbuild: More KCONFIG_CONFIG ignorance Arseny Maslennikov
2019-03-04 16:57 ` Arseny Maslennikov
2019-03-04 16:57 ` Arseny Maslennikov [this message]
2019-03-04 16:57   ` [PATCH 1/3] kconfig/Makefile: localmodconfig: use KCONFIG_CONFIG Arseny Maslennikov
2019-03-11 17:16   ` Masahiro Yamada
2019-03-11 17:16     ` Masahiro Yamada
2019-03-04 16:57 ` [PATCH 2/3] Makefile: kselftest: " Arseny Maslennikov
2019-03-04 16:57   ` Arseny Maslennikov
2019-03-11 17:25   ` Masahiro Yamada
2019-03-11 17:25     ` Masahiro Yamada
2019-03-04 16:57 ` [PATCH 3/3] arch/um/kernel/Makefile: " Arseny Maslennikov
2019-03-04 16:57   ` Arseny Maslennikov

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=20190304165732.24043-2-ar@cs.msu.ru \
    --to=ar@cs.msu.ru \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=jdike@addtoit.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=michal.lkml@markovi.net \
    --cc=richard@nod.at \
    --cc=yamada.masahiro@socionext.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 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.