aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 3 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 1e48bc500..c816c9de9 100644
--- a/Makefile
+++ b/Makefile
@@ -386,7 +386,7 @@ docs/busybox.net/BusyBox.html: docs/busybox.pod
386scripts/bb_mkdep: $(top_srcdir)/scripts/bb_mkdep.c 386scripts/bb_mkdep: $(top_srcdir)/scripts/bb_mkdep.c
387 $(HOSTCC) $(HOSTCFLAGS) -o $@ $< 387 $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
388 388
389DEP_INCLUDES := include/config.h include/bb_config.h 389DEP_INCLUDES := include/bb_config.h
390 390
391ifeq ($(strip $(CONFIG_BBCONFIG)),y) 391ifeq ($(strip $(CONFIG_BBCONFIG)),y)
392DEP_INCLUDES += include/bbconfigopts.h 392DEP_INCLUDES += include/bbconfigopts.h
@@ -401,25 +401,15 @@ depend dep: .depend
401 $(disp_gen) 401 $(disp_gen)
402 $(Q)$(RM_F) .depend 402 $(Q)$(RM_F) .depend
403 $(Q)mkdir -p include/config 403 $(Q)mkdir -p include/config
404 $(Q)scripts/bb_mkdep -c include/config.h -c include/bb_config.h \ 404 $(Q)scripts/bb_mkdep -I $(top_srcdir)/include $(top_srcdir) > $@.tmp
405 -I $(top_srcdir)/include $(top_srcdir) > $@.tmp
406 $(Q)mv $@.tmp $@ 405 $(Q)mv $@.tmp $@
407 406
408include/config.h: .config 407include/bb_config.h: .config
409 @if [ ! -x $(top_builddir)/scripts/config/conf ] ; then \ 408 @if [ ! -x $(top_builddir)/scripts/config/conf ] ; then \
410 $(MAKE) -C scripts/config conf; \ 409 $(MAKE) -C scripts/config conf; \
411 fi; 410 fi;
412 @$(top_builddir)/scripts/config/conf -o $(CONFIG_CONFIG_IN) 411 @$(top_builddir)/scripts/config/conf -o $(CONFIG_CONFIG_IN)
413 412
414include/bb_config.h: include/config.h
415 @echo -e "#ifndef BB_CONFIG_H\n#define BB_CONFIG_H" > $@
416 @sed -e h -e 's/#undef CONFIG_\(.*\)/#define ENABLE_\1 0/p' -e g \
417 -e 's/#undef CONFIG_\(.*\)/#define USE_\1(...)/p' -e g \
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 $< >> $@
421 @echo "#endif" >> $@
422
423clean: 413clean:
424 - $(MAKE) -C scripts/config $@ 414 - $(MAKE) -C scripts/config $@
425 - $(RM_F) docs/busybox.dvi docs/busybox.ps \ 415 - $(RM_F) docs/busybox.dvi docs/busybox.ps \