-include/bb_config.h: include/config.h
- @echo -e "#ifndef BB_CONFIG_H\n#define BB_CONFIG_H" > $@
- @sed -e 's/#undef CONFIG_\(.*\)/#define ENABLE_\1 0/' \
- -e 's/#define CONFIG_\(.*\)/#define CONFIG_\1\n#define ENABLE_\1/' \
- < $< >> $@
- @echo "#endif" >> $@
-
-# Create macros for usage.h, e.g.:
-#if ENABLE_HAVE_DOT_CONFIG
-#define USAGE_HAVE_DOT_CONFIG(a) a
-#else
-#define USAGE_HAVE_DOT_CONFIG(a)
-#endif
-include/_usage.h: .config
- awk '/CONFIG|BB_APPLET/{gsub("#[[:space:]]*|=y|.*CONFIG_|.*BB_APPLET_","");if(!/=/){print("#if ENABLE_"$$1"\n#define USAGE_"$$1"(a) a\n#else\n#define USAGE_"$$1"(a)\n#endif");}}' $(<) > $(@)
-