aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-17 20:20:24 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-17 20:20:24 +0200
commit2f41e7ea5700aab61f32a1db97569f832563fbd8 (patch)
tree27718bc88b201f0f917fd249a62e37b587413c5c
parent3324c963352392c00bda9eb77b815f0db9f6bdb7 (diff)
downloadbusybox-w32-2f41e7ea5700aab61f32a1db97569f832563fbd8.tar.gz
busybox-w32-2f41e7ea5700aab61f32a1db97569f832563fbd8.tar.bz2
busybox-w32-2f41e7ea5700aab61f32a1db97569f832563fbd8.zip
fix extra bogus files generation in include/config/*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--scripts/basic/fixdep.c13
-rw-r--r--scripts/basic/split-include.c7
2 files changed, 13 insertions, 7 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index bbb575cec..1a5b10f84 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -243,22 +243,27 @@ void parse_config_file(char *map, size_t len)
243 if (!memcmp(p, "IF_NOT", 6)) goto conf7; 243 if (!memcmp(p, "IF_NOT", 6)) goto conf7;
244 } 244 }
245 /* we have at least 3 chars because of p <= end_3 */ 245 /* we have at least 3 chars because of p <= end_3 */
246 /*if (!memcmp(p, "IF_", 3)) goto conf3;*/ 246 /*if (!memcmp(p, "IF_", 3)) ...*/
247 if (p[0] == 'I' && p[1] == 'F' && p[2] == '_') goto conf3; 247 if (p[0] == 'I' && p[1] == 'F' && p[2] == '_') {
248 off = 3;
249 goto conf;
250 }
248 251
249 /* This identifier is not interesting, skip it */ 252 /* This identifier is not interesting, skip it */
250 while (p <= end_3 && (isalnum(*p) || *p == '_')) 253 while (p <= end_3 && (isalnum(*p) || *p == '_'))
251 p++; 254 p++;
252 continue; 255 continue;
253 256
254 conf3: off = 3;
255 conf7: off = 7; 257 conf7: off = 7;
258 conf:
256 p += off; 259 p += off;
257 for (q = p; q < end_3+3; q++) { 260 for (q = p; q < end_3+3; q++) {
258 if (!(isalnum(*q) || *q == '_')) 261 if (!(isalnum(*q) || *q == '_'))
259 break; 262 break;
260 } 263 }
261 use_config(p, q-p); 264 if (q != p) {
265 use_config(p, q-p);
266 }
262 } 267 }
263} 268}
264 269
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c
index 60934b5b1..e328788e2 100644
--- a/scripts/basic/split-include.c
+++ b/scripts/basic/split-include.c
@@ -110,11 +110,12 @@ int main(int argc, const char * argv [])
110 110
111 if (line[0] != '#') 111 if (line[0] != '#')
112 continue; 112 continue;
113 if ((str_config = strstr(line, "CONFIG_")) == NULL) 113 if ((str_config = strstr(line, " CONFIG_")) == NULL)
114 continue; 114 continue;
115 115
116 /* Make the output file name. */ 116 /* We found #define CONFIG_foo or #undef CONFIG_foo.
117 str_config += sizeof("CONFIG_") - 1; 117 * Make the output file name. */
118 str_config += sizeof(" CONFIG_") - 1;
118 for (itarget = 0; !isspace(str_config[itarget]); itarget++) 119 for (itarget = 0; !isspace(str_config[itarget]); itarget++)
119 { 120 {
120 int c = (unsigned char) str_config[itarget]; 121 int c = (unsigned char) str_config[itarget];