aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2017-05-03 17:32:40 +0800
committerYousong Zhou <yszhou4tech@gmail.com>2017-05-03 17:40:47 +0800
commitcf75fb5e1433c50c46008789806d9a07e9ad677c (patch)
treebd859504a54f98f0f23a3b3cb60d9216f74cf7aa /package/utils/busybox
parent7842ccecc053d1e3b4977334411bb276ace8ae17 (diff)
downloadupstream-cf75fb5e1433c50c46008789806d9a07e9ad677c.tar.gz
upstream-cf75fb5e1433c50c46008789806d9a07e9ad677c.tar.bz2
upstream-cf75fb5e1433c50c46008789806d9a07e9ad677c.zip
busybox: alternatives: accomodate CONFIG_BUSYBOX_CUSTOM=y
When busybox customisation is enabled, we should depend on config symbols CONFIG_BUSYBOX_CONFIG_xxx to form alternatives specs Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'package/utils/busybox')
-rw-r--r--package/utils/busybox/Makefile29
1 files changed, 15 insertions, 14 deletions
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index a3012da7d4..ebc824e435 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=busybox
PKG_VERSION:=1.26.2
-PKG_RELEASE:=6
+PKG_RELEASE:=7
PKG_FLAGS:=essential
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -36,6 +36,9 @@ else
BB_MAKE_VERBOSE :=
endif
+BUSYBOX_SYM=$(if $(CONFIG_BUSYBOX_CUSTOM),CONFIG,DEFAULT)
+BUSYBOX_IF_ENABLED=$(if $(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_$(1)),$(2))
+
define Package/busybox
SECTION:=base
CATEGORY:=Base system
@@ -45,17 +48,17 @@ define Package/busybox
DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter
MENU:=1
ALTERNATIVES:=\
- $(if $(CONFIG_BUSYBOX_DEFAULT_KILL), 100:/bin/kill:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_PS), 100:/bin/ps:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_WATCH), 100:/bin/watch:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_IP), 100:/sbin/ip:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_FREE), 100:/usr/bin/free:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_PGREP), 100:/usr/bin/pgrep:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_PKILL), 100:/usr/bin/pkill:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_PMAP), 100:/usr/bin/pmap:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_PWDX), 100:/usr/bin/pwdx:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_TOP), 100:/usr/bin/top:/bin/busybox) \
- $(if $(CONFIG_BUSYBOX_DEFAULT_UPTIME), 100:/usr/bin/uptime:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,KILL, 100:/bin/kill:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,PS, 100:/bin/ps:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,WATCH, 100:/bin/watch:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,IP, 100:/sbin/ip:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,FREE, 100:/usr/bin/free:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,PGREP, 100:/usr/bin/pgrep:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,PKILL, 100:/usr/bin/pkill:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,PMAP, 100:/usr/bin/pmap:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,PWDX, 100:/usr/bin/pwdx:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,TOP, 100:/usr/bin/top:/bin/busybox) \
+ $(call BUSYBOX_IF_ENABLED,UPTIME, 100:/usr/bin/uptime:/bin/busybox) \
endef
@@ -68,8 +71,6 @@ define Package/busybox/config
source "$(SOURCE)/Config.in"
endef
-BUSYBOX_SYM=$(if $(CONFIG_BUSYBOX_CUSTOM),CONFIG,DEFAULT)
-
# don't create a version string containing the actual timestamp
export KCONFIG_NOTIMESTAMP=1