diff mbox

[02/34] kbuild: Introduce KCONFIG_AUTOCONFIGDEP variable for conf tool

Message ID 1400018609-20486-3-git-send-email-alexis.berlemont@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alexis Berlemont May 13, 2014, 10:02 p.m. UTC
From: Jiri Olsa <jolsa@redhat.com>

Introducing KCONFIG_AUTOCONFIGDEP variable for conf tool
allowing to specify custom auto.conf.cmd file.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Cc: Stephane Eranian <eranian@google.com>
---
 scripts/kconfig/confdata.c | 11 ++++++++++-
 scripts/kconfig/lkc.h      |  1 +
 2 files changed, 11 insertions(+), 1 deletion(-)

Comments

Sam Ravnborg May 14, 2014, 5:02 a.m. UTC | #1
On Wed, May 14, 2014 at 12:02:57AM +0200, Alexis Berlemont wrote:
> From: Jiri Olsa <jolsa@redhat.com>
> 
> Introducing KCONFIG_AUTOCONFIGDEP variable for conf tool
> allowing to specify custom auto.conf.cmd file.

The change looks good at it complments what we already have of overrides.
But please document this in Documentation/kbuild/...

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Marek May 14, 2014, 10:17 a.m. UTC | #2
On 2014-05-14 00:02, Alexis Berlemont wrote:
> From: Jiri Olsa <jolsa@redhat.com>
> 
> Introducing KCONFIG_AUTOCONFIGDEP variable for conf tool
> allowing to specify custom auto.conf.cmd file.
> 
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Michal Marek <mmarek@suse.cz>
> Cc: linux-kbuild@vger.kernel.org
> Cc: Stephane Eranian <eranian@google.com>
> ---
>  scripts/kconfig/confdata.c | 11 ++++++++++-
>  scripts/kconfig/lkc.h      |  1 +
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index f88d90f..7afb2a7 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -75,6 +75,14 @@ const char *conf_get_autoconfig_name(void)
>  	return name ? name : "include/config/auto.conf";
>  }
>  
> +const char *conf_get_autoconfigdep_name(void)
> +{
> +	char *name = getenv("KCONFIG_AUTOCONFIGDEP");
> +
> +	return name ? name : "include/config/auto.conf.cmd";
> +}

In both the kernel and perf usage case, the name of the dep file will be
$KCONFIG_AUTOCONFIG.dep. buildroot does not seem to use it at all. So
I'd just append the .cmd suffix here instead of introducing another knob.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index f88d90f..7afb2a7 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -75,6 +75,14 @@  const char *conf_get_autoconfig_name(void)
 	return name ? name : "include/config/auto.conf";
 }
 
+const char *conf_get_autoconfigdep_name(void)
+{
+	char *name = getenv("KCONFIG_AUTOCONFIGDEP");
+
+	return name ? name : "include/config/auto.conf.cmd";
+}
+
+
 static char *conf_expand_value(const char *in)
 {
 	struct symbol *sym;
@@ -953,7 +961,8 @@  int conf_write_autoconf(void)
 
 	sym_clear_all_valid();
 
-	file_write_dep("include/config/auto.conf.cmd");
+	name = conf_get_autoconfigdep_name();
+	file_write_dep(name);
 
 	if (conf_split_config())
 		return 1;
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index d5daa7a..ac99004 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -84,6 +84,7 @@  const char *zconf_curname(void);
 /* confdata.c */
 const char *conf_get_configname(void);
 const char *conf_get_autoconfig_name(void);
+const char *conf_get_autoconfigdep_name(void);
 char *conf_get_default_confname(void);
 void sym_set_change_count(int count);
 void sym_add_change_count(int count);