aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-01-31 13:50:16 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-01-31 13:50:16 +0000
commitcc7b3e2465f57c92879e39690021b3276d4c61aa (patch)
tree441b554f3f955f9051e08a14220d799fd635d303 /package/utils/busybox/Makefile
parentc85705ce8dee363f2ff5c4b0e8f82416a8c4416f (diff)
downloadupstream-cc7b3e2465f57c92879e39690021b3276d4c61aa.tar.gz
upstream-cc7b3e2465f57c92879e39690021b3276d4c61aa.tar.bz2
upstream-cc7b3e2465f57c92879e39690021b3276d4c61aa.zip
busybox: add a reworked implementation of menuconfig support, this time with a guard option that keeps all symbols at default values until an extra option is activated
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39435
Diffstat (limited to 'package/utils/busybox/Makefile')
-rw-r--r--package/utils/busybox/Makefile39
1 files changed, 17 insertions, 22 deletions
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 94bc620d87..4fc89bbf2a 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads \
http://distfiles.gentoo.org/distfiles/
PKG_MD5SUM:=9c0cae5a0379228e7b55e5b29528df8e
-PKG_CONFIG_DEPENDS:=CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
+PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2 BSD-4c
@@ -25,6 +25,10 @@ PKG_LICENSE_FILES:=LICENSE archival/libarchive/bz/LICENSE
include $(INCLUDE_DIR)/package.mk
+ifeq ($(DUMP),)
+ STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell $(SH_FUNC) grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | md5s)
+endif
+
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
BB_MAKE_VERBOSE := V=1
else
@@ -34,10 +38,10 @@ endif
define Package/busybox
SECTION:=base
CATEGORY:=Base system
- MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+ MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
TITLE:=Core utilities for embedded Linux
URL:=http://busybox.net/
- DEPENDS:=+BUSYBOX_CONFIG_FEATURE_MOUNT_NFS:librpc
+ DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc
MENU:=1
endef
@@ -50,27 +54,11 @@ define Package/busybox/config
source "$(SOURCE)/Config.in"
endef
-CONFIG_TEMPLATE:=./config/default
-
-LDLIBS:=m crypt
-ifdef CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
- TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
- export LDFLAGS=$(TARGET_LDFLAGS)
- LDLIBS += rpc
-endif
-
-CONFIG_TEMPLATE:=+ $(CONFIG_TEMPLATE) $(PKG_BUILD_DIR)/.config.build
-
-ENV_CONFIG:=$(wildcard $(TOPDIR)/env/busybox-config)
-ifneq ($(ENV_CONFIG),)
- CONFIG_TEMPLATE:=+ $(CONFIG_TEMPLATE) $(ENV_CONFIG)
- STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(shell $(SH_FUNC) md5s < $(ENV_CONFIG))
-endif
+BUSYBOX_SYM=$(if $(CONFIG_BUSYBOX_CUSTOM),CONFIG,DEFAULT)
define Build/Configure
- grep -E '^(# )?CONFIG_BUSYBOX_CONFIG_' $(TOPDIR)/.config | \
- sed -e 's,CONFIG_BUSYBOX_CONFIG_,CONFIG_,' > $(PKG_BUILD_DIR)/.config.build
- $(SCRIPT_DIR)/kconfig.pl $(CONFIG_TEMPLATE) > $(PKG_BUILD_DIR)/.config
+ rm -f $(PKG_BUILD_DIR)/.configured*
+ grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" > $(PKG_BUILD_DIR)/.config
yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
@@ -84,6 +72,13 @@ ifdef CONFIG_GCC_VERSION_LLVM
TARGET_CFLAGS += -fnested-functions
endif
+LDLIBS:=m crypt
+ifdef CONFIG_BUSYBOX_USE_LIBRPC
+ TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
+ export LDFLAGS=$(TARGET_LDFLAGS)
+ LDLIBS += rpc
+endif
+
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \