Patch for the debian-cvs package, ip* applets in /bin, patch from Bastian Blank
[oweals/busybox.git] / Makefile
index 69ab48ec30557b16d0486f0339dcb501daea5c69..55605af884ea6669b1681566f093b7cfd3d18c64 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ DIRS:=applets archival archival/libunarchive console-tools debianutils \
        networking/libiproute networking/udhcp procps loginutils shell \
        shellutils sysklogd textutils util-linux libbb libpwdgrp
 
-ifdef include_config
+ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
 
 all: busybox busybox.links #doc
 
@@ -39,7 +39,7 @@ all: busybox busybox.links #doc
 -include .config.cmd
 include $(patsubst %,%/Makefile.in, $(DIRS))
 
-busybox: depend $(libraries-y)
+busybox: .depend $(libraries-y)
        $(CC) $(LDFLAGS) -o $@ $(libraries-y) $(LIBRARIES)
        $(STRIPCMD) $@
 
@@ -142,7 +142,7 @@ include/config/MARKER: depend scripts/split-include
 
 include/config.h: .config
        @if [ ! -x ./scripts/config/conf ] ; then \
-           make -C scripts/config; \
+           make -C scripts/config conf; \
        fi;
        @./scripts/config/conf -o sysdeps/$(TARGET_OS)/Config.in
 
@@ -154,18 +154,20 @@ finished2:
        @echo Finished installing...
        @echo
 
-else # ifdef include_config
+else # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
 
 all: menuconfig
 
-ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
-# Targets which don't need .config
-
 # configuration
 # ---------------------------------------------------------------------------
 
-scripts/config/conf scripts/config/mconf:
-       make -C scripts/config
+scripts/config/conf:
+       make -C scripts/config conf
+       -@if [ ! -f .config ] ; then \
+               cp sysdeps/$(TARGET_OS)/defconfig .config; \
+       fi
+scripts/config/mconf:
+       make -C scripts/config ncurses conf mconf
        -@if [ ! -f .config ] ; then \
                cp sysdeps/$(TARGET_OS)/defconfig .config; \
        fi
@@ -201,7 +203,6 @@ check: busybox
 
 clean:
        - $(MAKE) -C tests clean
-       - $(MAKE) -C scripts/lxdialog clean
        - rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
            docs/busybox.net/BusyBox.html
        - rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
@@ -214,6 +215,7 @@ clean:
        - find . -name .depend -exec rm -f {} \;
        - find . -name \*.o -exec rm -f {} \;
        - find . -name \*.a -exec rm -f {} \;
+       - $(MAKE) -C scripts/config clean
 
 distclean: clean
        rm -f .config .config.old .config.cmd
@@ -239,8 +241,7 @@ tags:
        ctags -R .
 
 
-endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
-endif # ifdef include_config
+endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
 
 .PHONY: dummy subdirs release distclean clean config oldconfig \
        menuconfig tags check test tests depend