diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 23 |
1 files changed, 7 insertions, 16 deletions
| @@ -185,7 +185,6 @@ randconfig: scripts/config/conf | |||
| 185 | allyesconfig: scripts/config/conf | 185 | allyesconfig: scripts/config/conf |
| 186 | @./scripts/config/conf -y $(CONFIG_CONFIG_IN) | 186 | @./scripts/config/conf -y $(CONFIG_CONFIG_IN) |
| 187 | sed -i -r -e "s/^(USING_CROSS_COMPILER)=.*/# \1 is not set/" .config | 187 | sed -i -r -e "s/^(USING_CROSS_COMPILER)=.*/# \1 is not set/" .config |
| 188 | echo "CONFIG_FEATURE_SHARED_BUSYBOX=y" >> .config | ||
| 189 | @./scripts/config/conf -o $(CONFIG_CONFIG_IN) | 188 | @./scripts/config/conf -o $(CONFIG_CONFIG_IN) |
| 190 | 189 | ||
| 191 | allnoconfig: scripts/config/conf | 190 | allnoconfig: scripts/config/conf |
| @@ -197,7 +196,7 @@ allnoconfig: scripts/config/conf | |||
| 197 | 196 | ||
| 198 | defconfig: scripts/config/conf | 197 | defconfig: scripts/config/conf |
| 199 | @./scripts/config/conf -y $(CONFIG_CONFIG_IN) | 198 | @./scripts/config/conf -y $(CONFIG_CONFIG_IN) |
| 200 | sed -i -r -e "s/^(USING_CROSS_COMPILER|CONFIG_(DEBUG.*|STATIC|SELINUX|BUILD_(AT_ONCE|LIBBUSYBOX)|FEATURE_(DEVFS|FULL_LIBBUSYBOX|SHARED_BUSYBOX|MTAB_SUPPORT|CLEAN_UP)))=.*/# \1 is not set/" .config | 199 | sed -i -r -e "s/^(USING_CROSS_COMPILER|CONFIG_(DEBUG.*|STATIC|SELINUX|BUILD_(AT_ONCE|LIBBUSYBOX)|FEATURE_(DEVFS|FULL_LIBBUSYBOX|SHARED_BUSYBOX|MTAB_SUPPORT|CLEAN_UP|UDHCP_DEBUG)))=.*/# \1 is not set/" .config |
| 201 | @./scripts/config/conf -o $(CONFIG_CONFIG_IN) | 200 | @./scripts/config/conf -o $(CONFIG_CONFIG_IN) |
| 202 | 201 | ||
| 203 | 202 | ||
| @@ -387,7 +386,7 @@ docs/busybox.net/BusyBox.html: docs/busybox.pod | |||
| 387 | scripts/bb_mkdep: $(top_srcdir)/scripts/bb_mkdep.c | 386 | scripts/bb_mkdep: $(top_srcdir)/scripts/bb_mkdep.c |
| 388 | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< | 387 | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< |
| 389 | 388 | ||
| 390 | DEP_INCLUDES := include/config.h include/bb_config.h include/_usage.h | 389 | DEP_INCLUDES := include/config.h include/bb_config.h |
| 391 | 390 | ||
| 392 | ifeq ($(strip $(CONFIG_BBCONFIG)),y) | 391 | ifeq ($(strip $(CONFIG_BBCONFIG)),y) |
| 393 | DEP_INCLUDES += include/bbconfigopts.h | 392 | DEP_INCLUDES += include/bbconfigopts.h |
| @@ -414,21 +413,13 @@ include/config.h: .config | |||
| 414 | 413 | ||
| 415 | include/bb_config.h: include/config.h | 414 | include/bb_config.h: include/config.h |
| 416 | @echo -e "#ifndef BB_CONFIG_H\n#define BB_CONFIG_H" > $@ | 415 | @echo -e "#ifndef BB_CONFIG_H\n#define BB_CONFIG_H" > $@ |
| 417 | @sed -e 's/#undef CONFIG_\(.*\)/#define ENABLE_\1 0/' \ | 416 | @sed -e h -e 's/#undef CONFIG_\(.*\)/#define ENABLE_\1 0/p' -e g \ |
| 418 | -e 's/#define CONFIG_\(.*\)/#define CONFIG_\1\n#define ENABLE_\1/' \ | 417 | -e 's/#undef CONFIG_\(.*\)/#define USE_\1(...)/p' -e g \ |
| 419 | < $< >> $@ | 418 | -e 's/#define CONFIG_\([^ ]*\).*/#define ENABLE_\1 1/p' -e g -e \ |
| 419 | 's/#define CONFIG_\([^ ]*\).*/#define USE_\1(...) __VA_ARGS__/p' \ | ||
| 420 | -e g $< >> $@ | ||
| 420 | @echo "#endif" >> $@ | 421 | @echo "#endif" >> $@ |
| 421 | 422 | ||
| 422 | # Create macros for usage.h, e.g.: | ||
| 423 | #if ENABLE_HAVE_DOT_CONFIG | ||
| 424 | #define USAGE_HAVE_DOT_CONFIG(a) a | ||
| 425 | #else | ||
| 426 | #define USAGE_HAVE_DOT_CONFIG(a) | ||
| 427 | #endif | ||
| 428 | include/_usage.h: .config | ||
| 429 | $(disp_gen) | ||
| 430 | $(Q)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");}}' $(<) > $(@) | ||
| 431 | |||
| 432 | clean: | 423 | clean: |
| 433 | - $(MAKE) -C scripts/config $@ | 424 | - $(MAKE) -C scripts/config $@ |
| 434 | - $(RM_F) docs/busybox.dvi docs/busybox.ps \ | 425 | - $(RM_F) docs/busybox.dvi docs/busybox.ps \ |
