public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: kbuild-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Cc: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Subject: [PATCH] Have split-include take another argument
Date: Mon, 11 Nov 2002 10:06:04 -0700	[thread overview]
Message-ID: <20021111170604.GA658@opus.bloom.county> (raw)

Hello.  The following patch makes split-include take another argument,
which is the prefix of what is being split up.  This is needed since I'm
working on a system which will allow for various params in the kernel to
be tweaked at compile-time, without offering numerous CONFIG options
(see http://marc.theaimsgroup.com/?l=linux-kernel&m=103669658505842&w=2).
I'm sending this out for two reasons.  First, does anyone see any
problems with the patch itself?  Second, Kai, would you be willing to
apply this patch now, or would should I wait until the system is ready?

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== Makefile 1.320 vs edited =====
--- 1.320/Makefile	Mon Nov 11 08:08:41 2002
+++ edited/Makefile	Mon Nov 11 09:30:45 2002
@@ -413,7 +413,7 @@
 
 include/config/MARKER: scripts/split-include include/linux/autoconf.h
 	@echo '  SPLIT  include/linux/autoconf.h -> include/config/*'
-	@scripts/split-include include/linux/autoconf.h include/config
+	@scripts/split-include include/linux/autoconf.h include/config CONFIG_
 	@touch $@
 
 # 	if .config is newer than include/linux/autoconf.h, someone tinkered
===== scripts/split-include.c 1.3 vs edited =====
--- 1.3/scripts/split-include.c	Sun Jun  2 18:34:13 2002
+++ edited/scripts/split-include.c	Mon Nov 11 09:29:55 2002
@@ -46,6 +46,7 @@
     const char * str_my_name;
     const char * str_file_autoconf;
     const char * str_dir_config;
+    const char * str_split_token;
 
     FILE * fp_config;
     FILE * fp_target;
@@ -61,7 +62,7 @@
     struct stat stat_buf;
 
     /* Check arg count. */
-    if (argc != 3)
+    if (argc != 4)
     {
 	fprintf(stderr, "%s: wrong number of arguments.\n", argv[0]);
 	exit(1);
@@ -70,6 +71,7 @@
     str_my_name       = argv[0];
     str_file_autoconf = argv[1];
     str_dir_config    = argv[2];
+    str_split_token   = argv[3];
 
     /* Find a buffer size. */
     if (stat(str_file_autoconf, &stat_buf) != 0)
@@ -110,11 +112,11 @@
 
 	if (line[0] != '#')
 	    continue;
-	if ((str_config = strstr(line, "CONFIG_")) == NULL)
+	if ((str_config = strstr(line, str_split_token)) == NULL)
 	    continue;
 
 	/* Make the output file name. */
-	str_config += sizeof("CONFIG_") - 1;
+	str_config += strlen(str_split_token);
 	for (itarget = 0; !isspace(str_config[itarget]); itarget++)
 	{
 	    int c = (unsigned char) str_config[itarget];

             reply	other threads:[~2002-11-11 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-11 17:06 Tom Rini [this message]
2002-11-11 23:37 ` [PATCH] Have split-include take another argument Peter Samuelson
2002-11-12 15:09   ` Tom Rini
2002-11-14 21:01 ` Kai Germaschewski
2002-11-14 23:17   ` Tom Rini

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=20021111170604.GA658@opus.bloom.county \
    --to=trini@kernel.crashing.org \
    --cc=kai@tp1.ruhr-uni-bochum.de \
    --cc=kbuild-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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