summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Landley2005-07-28 19:36:33 +0000
committerRob Landley2005-07-28 19:36:33 +0000
commitef8f423e908c74e5de49b8dbe02730815f275bfa (patch)
treec5c63db86b458a88cede6d64ead21248ff89b4c7 /Makefile
parente5ba382b9919ca0844c37725bddd7acbdc9ee255 (diff)
downloadbusybox-ef8f423e908c74e5de49b8dbe02730815f275bfa.zip
busybox-ef8f423e908c74e5de49b8dbe02730815f275bfa.tar.gz
Erik pointed out that in the last try at the #ifdef cleanup
infrastructure, the compiler isn't smart enough to replace const static int with the constant, and allocates space for each set of them, bloating the executable something fierce. Oops. So now, we #define ENABLE_XXX to 0 or 1 for each CONFIG_XXX (which is still there so the 1000+ #ifdef/#ifndef tests don't have to be replaced wholesale). Changed the test instance in networking/ifconfig.c to use this.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 807ab50..33954db 100644
--- a/Makefile
+++ b/Makefile
@@ -214,7 +214,9 @@ include/config.h: .config
include/bb_config.h: include/config.h
echo "#ifndef AUTOCONF_INCLUDED" > $@
- sed -e 's/#undef \(.*\)/static const int \1 = 0;/' < $< >> $@
+ sed -e 's/#undef CONFIG_\(.*\)/#define ENABLE_\1 0/' \
+ -e 's/#define CONFIG_\(.*\)/#define CONFIG_\1\n#define ENABLE_\1/' \
+ < $< >> $@
echo "#endif" >> $@
finished2: