From: Michal Marek <mmarek@suse.cz>
To: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: linux-kernel@vger.kernel.org, jolsa@redhat.com,
dsahern@gmail.com, mingo@kernel.org, sam@ravnborg.org,
namhyung@kernel.org
Subject: Re: [PATCH 01/15] kbuild: add support of custom paths for "auto.conf*" files
Date: Tue, 23 Sep 2014 15:01:45 +0200 [thread overview]
Message-ID: <54216F39.9030902@suse.cz> (raw)
In-Reply-To: <1411422796-27049-2-git-send-email-alexis.berlemont@gmail.com>
On 2014-09-22 23:53, Alexis Berlemont wrote:
> In the scripts/Makefile.build, use KCONFIG_AUTOCONFIG to include a
> custom path for the "auto.conf" file.
>
> The "*conf" programs were modified so as to work with the environment
> variable KCONFIG_AUTOCONFIG.
> ---
> scripts/Makefile.build | 3 ++-
> scripts/kconfig/confdata.c | 27 ++++++++++++++++++++++++++-
> scripts/kconfig/lkc.h | 1 +
> 3 files changed, 29 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index bf3e677..ef60769 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -31,7 +31,8 @@ subdir-asflags-y :=
> subdir-ccflags-y :=
>
> # Read auto.conf if it exists, otherwise ignore
> --include include/config/auto.conf
> +kconfig-autoconfig := $(if $(KCONFIG_AUTOCONFIG),$(KCONFIG_AUTOCONFIG),include/config/auto.conf)
> +-include $(kconfig-autoconfig)
>
> include scripts/Kbuild.include
>
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index f88d90f..d4d8920 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -75,6 +75,27 @@ const char *conf_get_autoconfig_name(void)
> return name ? name : "include/config/auto.conf";
> }
>
> +#define PATH_MAXLENGTH 4096
> +const char *conf_get_autoconfigdep_name(void)
> +{
> + static char res_value[PATH_MAXLENGTH];
> +
> + char *name = getenv("KCONFIG_AUTOCONFIG");
> +
> + if (name == NULL)
> + name = "include/config/auto.conf.cmd";
This will result in "include/config/auto.conf.cmd.cmd". Better simplify
it to name = conf_get_autoconfig_name().
> + if (strlen(name) > PATH_MAXLENGTH - 5)
> + name = NULL;
> + else {
> + res_value[0] = 0;
This assignment is superfluous.
> + strncpy(res_value, name, PATH_MAXLENGTH);
> + strcat(res_value, ".cmd");
> + name = res_value;
Michal
next prev parent reply other threads:[~2014-09-23 13:01 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 21:53 [PATCH 00/15] Kbuild for perf Alexis Berlemont
2014-09-22 21:53 ` [PATCH 01/15] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-09-23 13:01 ` Michal Marek [this message]
2014-10-23 21:47 ` Alexis Berlemont
2014-10-23 21:55 ` [PATCH v2 00/14] Kbuild for perf Alexis Berlemont
2014-10-23 22:11 ` [PATCH v3 02/14] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-10-23 22:11 ` [PATCH v3 03/14] perf tools: Kbuild " Alexis Berlemont
2014-10-23 22:11 ` [PATCH v3 04/14] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 00/14] Kbuild for perf Alexis Berlemont
2014-10-23 23:48 ` Arnaldo Carvalho de Melo
2014-10-24 12:39 ` Alexis Berlemont
2014-10-24 12:46 ` Arnaldo Carvalho de Melo
2014-10-25 22:20 ` [PATCH v4 " Alexis Berlemont
2014-10-27 22:37 ` Jiri Olsa
2014-10-28 23:54 ` Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 01/14] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 02/14] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 03/14] perf tools: Kbuild " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 04/14] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-10-29 8:16 ` Jiri Olsa
2014-10-29 23:05 ` Alexis Berlemont
2014-10-31 8:34 ` Jiri Olsa
2014-10-25 22:20 ` [PATCH v4 05/14] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 06/14] perf kbuild: remove legacy tui/gui-related build variables Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 07/14] perf kbuild: remove legacy demangle-related " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 08/14] perf kbuild: cross-compilation variables are now handled in Kconfig Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 09/14] perf kbuild: remove legacy misc build variables Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 10/14] perf kbuild: remove legacy libelf-related " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 11/14] perf kbuild: remove legacy libdwarf-related " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 12/14] perf kbuild: remove legacy script-related " Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 13/14] perf kbuild: final cosmetic changes Alexis Berlemont
2014-10-25 22:20 ` [PATCH v4 14/14] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 01/14] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 02/14] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 03/14] perf tools: Kbuild " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 04/14] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 05/14] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 06/14] perf kbuild: remove legacy tui/gui-related build variables Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 07/14] perf kbuild: remove legacy demangle-related " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 08/14] perf kbuild: cross-compilation variables are now handled in Kconfig Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 09/14] perf kbuild: remove legacy misc build variables Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 10/14] perf kbuild: remove legacy libelf-related " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 11/14] perf kbuild: remove legacy libdwarf-related " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 12/14] perf kbuild: remove legacy script-related " Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 13/14] perf kbuild: final cosmetic changes Alexis Berlemont
2014-10-23 22:28 ` [PATCH v3 14/14] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2015-05-31 19:22 ` Ulf Magnusson
2014-10-23 21:55 ` [PATCH v2 01/14] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 02/14] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 03/14] perf tools: Kbuild " Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 04/14] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 05/14] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 06/14] perf kbuild: remove legacy tui/gui-related build variables Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 07/14] perf kbuild: remove legacy demangle-related " Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 08/14] perf kbuild: cross-compilation variables are now handled in Kconfig Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 09/14] perf kbuild: remove legacy misc build variables Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 10/14] perf kbuild: remove legacy libelf-related " Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 11/14] perf kbuild: remove legacy libdwarf-related " Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 12/14] perf kbuild: remove legacy script-related " Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 13/14] perf kbuild: final cosmetic changes Alexis Berlemont
2014-10-23 21:56 ` [PATCH v2 14/14] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2014-09-23 13:13 ` [PATCH 01/15] kbuild: add support of custom paths for "auto.conf*" files Michal Marek
2014-10-23 21:44 ` Alexis Berlemont
2014-09-22 21:53 ` [PATCH 02/15] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-09-22 21:53 ` [PATCH 03/15] perf tools: Kbuild " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 04/15] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-09-22 21:53 ` [PATCH 05/15] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-09-22 21:53 ` [PATCH 06/15] perf kbuild: remove legacy tui/gui-related build variables Alexis Berlemont
2014-09-22 21:53 ` [PATCH 07/15] perf kbuild: remove legacy demangle-related " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 08/15] perf kbuild: cross-compilation variables are now handled in Kconfig Alexis Berlemont
2014-09-22 21:53 ` [PATCH 09/15] perf kbuild: remove legacy misc build variables Alexis Berlemont
2014-09-22 21:53 ` [PATCH 10/15] perf kbuild: remove legacy libelf-related " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 11/15] perf kbuild: remove legacy libdwarf-related " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 12/15] perf kbuild: remove legacy script-related " Alexis Berlemont
2014-09-22 21:53 ` [PATCH 13/15] perf kbuild: final cosmetic changes Alexis Berlemont
2014-09-22 21:53 ` [PATCH 14/15] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2014-09-22 21:53 ` [PATCH 15/15] perf: replace _BSD_SOURCE macro by _DEFAULT_SOURCE Alexis Berlemont
2014-09-28 22:15 ` Aaro Koskinen
2014-10-23 21:52 ` Alexis Berlemont
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=54216F39.9030902@suse.cz \
--to=mmarek@suse.cz \
--cc=alexis.berlemont@gmail.com \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=sam@ravnborg.org \
/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.