mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: Nick Desaulniers <ndesaulniers@google.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Richard Purdie <richard.purdie@linuxfoundation.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH 1/3] kconfig: move declarations for prepossessing to internal.h
Date: Fri, 19 Aug 2022 15:56:01 +0900	[thread overview]
Message-ID: <20220819065604.295572-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20220819065604.295572-1-masahiroy@kernel.org>

These are used by the kconfig core part.

The user interface part (conf, mconf, nconf, gconf, or xconf variants)
does not need them.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/kconfig/confdata.c   |  1 +
 scripts/kconfig/internal.h   | 17 +++++++++++++++++
 scripts/kconfig/lexer.l      |  1 +
 scripts/kconfig/lkc_proto.h  | 13 -------------
 scripts/kconfig/preprocess.c |  1 +
 5 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c4340c90e172..aa8e73828de3 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -19,6 +19,7 @@
 #include <unistd.h>
 
 #include "lkc.h"
+#include "internal.h"
 
 /* return true if 'path' exists, false otherwise */
 static bool is_present(const char *path)
diff --git a/scripts/kconfig/internal.h b/scripts/kconfig/internal.h
index 2f7298c21b64..8e0e6d315b6c 100644
--- a/scripts/kconfig/internal.h
+++ b/scripts/kconfig/internal.h
@@ -1,4 +1,8 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Declarations necessary for the kconfig core, but not for
+ * conf, mconf, nconf, gconf, or xconf variants.
+ */
 #ifndef INTERNAL_H
 #define INTERNAL_H
 
@@ -6,4 +10,17 @@ struct menu;
 
 extern struct menu *current_menu, *current_entry;
 
+/* preprocess.c */
+enum variable_flavor {
+	VAR_SIMPLE,
+	VAR_RECURSIVE,
+	VAR_APPEND,
+};
+void env_write_dep(FILE *f, const char *auto_conf_name);
+void variable_add(const char *name, const char *value,
+		  enum variable_flavor flavor);
+void variable_all_del(void);
+char *expand_dollar(const char **str);
+char *expand_one_token(const char **str);
+
 #endif /* INTERNAL_H */
diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l
index cc386e443683..43e12d0945a7 100644
--- a/scripts/kconfig/lexer.l
+++ b/scripts/kconfig/lexer.l
@@ -14,6 +14,7 @@
 #include <string.h>
 
 #include "lkc.h"
+#include "internal.h"
 #include "parser.tab.h"
 
 #define YY_DECL		static int yylex1(void)
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index edd1e617b25c..7fb4953d16ca 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -35,18 +35,5 @@ const char * sym_get_string_value(struct symbol *sym);
 
 const char * prop_get_type_name(enum prop_type type);
 
-/* preprocess.c */
-enum variable_flavor {
-	VAR_SIMPLE,
-	VAR_RECURSIVE,
-	VAR_APPEND,
-};
-void env_write_dep(FILE *f, const char *auto_conf_name);
-void variable_add(const char *name, const char *value,
-		  enum variable_flavor flavor);
-void variable_all_del(void);
-char *expand_dollar(const char **str);
-char *expand_one_token(const char **str);
-
 /* expr.c */
 void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken);
diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c
index 748da578b418..aeb3fe362c04 100644
--- a/scripts/kconfig/preprocess.c
+++ b/scripts/kconfig/preprocess.c
@@ -11,6 +11,7 @@
 
 #include "list.h"
 #include "lkc.h"
+#include "internal.h"
 
 #define ARRAY_SIZE(arr)		(sizeof(arr) / sizeof((arr)[0]))
 
-- 
2.34.1


  reply	other threads:[~2022-08-19  6:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  6:56 [RFC PATCH 0/3] kbuild: change the default shell to bash Masahiro Yamada
2022-08-19  6:56 ` Masahiro Yamada [this message]
2022-08-19  6:56 ` [RFC PATCH 2/3] kconfig: allow to choose the shell for $(shell ) functions Masahiro Yamada
2022-08-19  8:58   ` Bagas Sanjaya
2022-08-19 21:37     ` David Laight
2022-08-19  6:56 ` [RFC PATCH 3/3] kbuild: use bash as the default shell for Make and Kconfig Masahiro Yamada

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=20220819065604.295572-2-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=rdunlap@infradead.org \
    --cc=richard.purdie@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome