aboutsummaryrefslogtreecommitdiff
path: root/scripts/bb_mkdep.c
diff options
context:
space:
mode:
authorvodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-02-15 12:29:37 +0000
committervodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-02-15 12:29:37 +0000
commitb4f1d9939d4ab3f45c7feb1774fc00f63865efe0 (patch)
tree35ee2aa8216995e7665272e8e2b58f017f7dfdcd /scripts/bb_mkdep.c
parent78f86409549faa383de5d405fdaae57c0ff932cb (diff)
downloadbusybox-w32-b4f1d9939d4ab3f45c7feb1774fc00f63865efe0.tar.gz
busybox-w32-b4f1d9939d4ab3f45c7feb1774fc00f63865efe0.tar.bz2
busybox-w32-b4f1d9939d4ab3f45c7feb1774fc00f63865efe0.zip
full removed config.h, use bb_config.h only
git-svn-id: svn://busybox.net/trunk/busybox@14055 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'scripts/bb_mkdep.c')
-rw-r--r--scripts/bb_mkdep.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/scripts/bb_mkdep.c b/scripts/bb_mkdep.c
index ca48c6a28..a4f97c211 100644
--- a/scripts/bb_mkdep.c
+++ b/scripts/bb_mkdep.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Another fast dependencies generator for Makefiles, Version 4.0 2 * Another fast dependencies generator for Makefiles, Version 4.1
3 * 3 *
4 * Copyright (C) 2005,2006 by Vladimir Oleynik <dzo@simtreas.ru> 4 * Copyright (C) 2005,2006 by Vladimir Oleynik <dzo@simtreas.ru>
5 * 5 *
@@ -26,7 +26,7 @@
26 * - more verbose --help output. 26 * - more verbose --help output.
27 * 27 *
28 * This program does: 28 * This program does:
29 * 1) find #define KEY VALUE or #undef KEY from include/config.h 29 * 1) find #define KEY VALUE or #undef KEY from include/bb_config.h
30 * 2) recursive find and scan *.[ch] files, but skips scan of include/config/ 30 * 2) recursive find and scan *.[ch] files, but skips scan of include/config/
31 * 3) find #include "*.h" and KEYs using, if not as #define and #undef 31 * 3) find #include "*.h" and KEYs using, if not as #define and #undef
32 * 4) generate dependencies to stdout 32 * 4) generate dependencies to stdout
@@ -39,7 +39,7 @@
39 39
40#define LOCAL_INCLUDE_PATH "include" 40#define LOCAL_INCLUDE_PATH "include"
41#define INCLUDE_CONFIG_PATH LOCAL_INCLUDE_PATH"/config" 41#define INCLUDE_CONFIG_PATH LOCAL_INCLUDE_PATH"/config"
42#define INCLUDE_CONFIG_KEYS_PATH LOCAL_INCLUDE_PATH"/config.h" 42#define INCLUDE_CONFIG_KEYS_PATH LOCAL_INCLUDE_PATH"/bb_config.h"
43 43
44#define bb_mkdep_full_options \ 44#define bb_mkdep_full_options \
45"\nOptions:" \ 45"\nOptions:" \
@@ -308,7 +308,7 @@ typedef unsigned char operator;
308#define TOK_UMINUS tok_decl(UNARYPREC+1,0) 308#define TOK_UMINUS tok_decl(UNARYPREC+1,0)
309#define TOK_UPLUS tok_decl(UNARYPREC+1,1) 309#define TOK_UPLUS tok_decl(UNARYPREC+1,1)
310 310
311#define SPEC_PREC (UNARYPREC+1) 311#define SPEC_PREC (UNARYPREC+2)
312 312
313#define TOK_NUM tok_decl(SPEC_PREC, 0) 313#define TOK_NUM tok_decl(SPEC_PREC, 0)
314#define TOK_RPAREN tok_decl(SPEC_PREC, 1) 314#define TOK_RPAREN tok_decl(SPEC_PREC, 1)
@@ -521,13 +521,6 @@ endofname(const char *name)
521} 521}
522 522
523 523
524/* Like strncpy but make sure the resulting string is always 0 terminated. */
525static inline char * safe_strncpy(char *dst, const char *src, size_t size)
526{
527 dst[size-1] = '\0';
528 return strncpy(dst, src, size-1);
529}
530
531static arith_t arith (const char *expr, int *perrcode) 524static arith_t arith (const char *expr, int *perrcode)
532{ 525{
533 char arithval; /* Current character under analysis */ 526 char arithval; /* Current character under analysis */
@@ -1400,7 +1393,10 @@ static void store_keys(void)
1400 if(*val == '\0') { 1393 if(*val == '\0') {
1401 recordsz = sprintf(record_buf, "#define %s\n", k); 1394 recordsz = sprintf(record_buf, "#define %s\n", k);
1402 } else { 1395 } else {
1403 recordsz = sprintf(record_buf, "#define %s %s\n", k, val); 1396 if(val[0] != '(')
1397 recordsz = sprintf(record_buf, "#define %s %s\n", k, val);
1398 else
1399 recordsz = sprintf(record_buf, "#define %s%s\n", k, val);
1404 } 1400 }
1405 } 1401 }
1406 /* size_t -> ssize_t :( */ 1402 /* size_t -> ssize_t :( */