summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-05 13:35:48 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-05 15:52:21 +0200
commit4d15e451c95220f682e262d125ef3fba38ac44ed (patch)
treef4e4386b4c23039c4654f8eca20b3b94a80959ca
parente487421e991f8c9c61f61be4188ab42c8dba6706 (diff)
gnu sed no longer required, will be build as hosttool
-rw-r--r--README1
-rw-r--r--docs/prerequisite.txt1
-rw-r--r--mk/kernel-vars.mk2
-rw-r--r--mk/vars.mk5
-rw-r--r--package/busybox/Makefile6
-rw-r--r--package/sed/Makefile31
-rw-r--r--scripts/scan-tools.sh25
-rwxr-xr-xscripts/sed9
-rw-r--r--target/config/Config.in.tools4
-rw-r--r--toolchain/kernel-headers/Makefile4
10 files changed, 55 insertions, 33 deletions
diff --git a/README b/README
index 0064b343e..25e980eb6 100644
--- a/README
+++ b/README
@@ -9,7 +9,6 @@ Before you can start you need to install some tools:
- g++ or clang++
- binutils
- GNU make
-- GNU sed
- tar
- gzip
- wget
diff --git a/docs/prerequisite.txt b/docs/prerequisite.txt
index 0a86e1d53..d1ceab705 100644
--- a/docs/prerequisite.txt
+++ b/docs/prerequisite.txt
@@ -25,7 +25,6 @@ package names may vary between host systems.
** +binutils+
** +C compiler (gcc or clang)+
** `C++ compiler (g++ or clang++)`
-** +GNU sed+
** +GNU make+
** +gzip+
** +perl+
diff --git a/mk/kernel-vars.mk b/mk/kernel-vars.mk
index 7d8de54e3..edcb45854 100644
--- a/mk/kernel-vars.mk
+++ b/mk/kernel-vars.mk
@@ -15,4 +15,4 @@ else
KERNEL_MAKE_OPTS+= HOSTCFLAGS='${CFLAGS_FOR_BUILD}'
endif
-KERNEL_MAKE_ENV+= PATH="${STAGING_HOST_DIR}/usr/bin:$$PATH"
+KERNEL_MAKE_ENV:= PATH="${STAGING_HOST_DIR}/usr/bin:$$PATH"
diff --git a/mk/vars.mk b/mk/vars.mk
index 96a42592d..ffb26fb18 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -199,9 +199,10 @@ HOST_CONFIGURE_OPTS= CC_FOR_BUILD='${CC_FOR_BUILD}' \
PKG_SUFFIX:= $(strip $(subst ",, $(ADK_PACKAGE_SUFFIX)))
ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
-PKG_BUILD:= PATH='${TARGET_PATH}' \
+PKG_BUILD:= PATH='${HOST_PATH}' \
${BASH} ${SCRIPT_DIR}/ipkg-build
-PKG_INSTALL:= IPKG_TMP=$(BUILD_DIR)/tmp \
+PKG_INSTALL:= PATH='${HOST_PATH}' \
+ IPKG_TMP=$(BUILD_DIR)/tmp \
IPKG_INSTROOT=$(TARGET_DIR) \
IPKG_CONF_DIR=$(STAGING_TARGET_DIR)/etc \
IPKG_OFFLINE_ROOT=$(TARGET_DIR) \
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index 687043bcd..b62855399 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -52,10 +52,10 @@ do-configure:
cp ${WRKBUILD}/.config.tmp ${WRKBUILD}/.config; \
done
$(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
- yes '' | $(MAKE) ${BB_MAKE_FLAGS} oldconfig $(MAKE_TRACE)
+ yes '' | PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} oldconfig $(MAKE_TRACE)
do-build:
- $(MAKE) ${BB_MAKE_FLAGS} busybox
+ PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} busybox
BBDEFS:=(
define BBDEF
@@ -68,7 +68,7 @@ endef
$(foreach OPTION,CROND WATCHDOG SYSLOGD INETD NTPD,$(eval $(call BBDEF,$(OPTION))))
do-install:
- $(MAKE) ${BB_MAKE_FLAGS} install $(MAKE_TRACE)
+ PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} install $(MAKE_TRACE)
$(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
$(INSTALL_DIR) $(IDIR_BUSYBOX)/etc
${BBDEFS} :) >$(IDIR_BUSYBOX)/etc/.bb_defaults
diff --git a/package/sed/Makefile b/package/sed/Makefile
new file mode 100644
index 000000000..e8c723eb2
--- /dev/null
+++ b/package/sed/Makefile
@@ -0,0 +1,31 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= sed
+PKG_VERSION:= 4.2.2
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 4111de4faa3b9848a0686b2f260c5056
+PKG_DESCR:= stream editor
+PKG_SECTION:= editor
+PKG_URL:= http://www.gnu.org/software/sed/
+PKG_SITES:= ${MASTER_SITE_GNU:=sed/}
+
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
+
+include $(TOPDIR)/mk/host.mk
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,SED,sed,$(PKG_VERSION)-${PKG_RELEASE}))
+$(eval $(call PKG_template,SED,sed,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+HOST_STYLE:= auto
+
+sed-install:
+ $(INSTALL_DIR) $(IDIR_SED)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/sed \
+ $(IDIR_SED)/usr/bin
+
+include ${TOPDIR}/mk/host-bottom.mk
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index 40486e1fe..930e8df0b 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -158,20 +158,6 @@ if [[ ! -s /usr/include/ncurses.h ]]; then
fi
fi
-if ! which sed >/dev/null 2>&1; then
- echo You must install GNU sed to continue.
- echo
- out=1
-fi
-
-if ! sed --version 2>/dev/null|grep GNU >/dev/null;then
- if ! which gsed >/dev/null 2>&1; then
- echo You must install GNU sed to continue.
- echo
- out=1
- fi
-fi
-
if ! which wget >/dev/null 2>&1; then
echo You must install wget to continue.
echo
@@ -270,6 +256,16 @@ if ! which gawk >/dev/null 2>&1; then
host_build_gawk=1
fi
+host_build_sed=0
+if ! which gsed >/dev/null 2>&1; then
+ if which sed >/dev/null 2>&1; then
+ if ! sed --version 2>/dev/null|grep GNU >/dev/null;then
+ echo "No GNU sed found, will build one."
+ host_build_sed=1
+ fi
+ fi
+fi
+
host_build_xz=0
if ! which xz >/dev/null 2>&1; then
echo "No xz found, will build one."
@@ -328,6 +324,7 @@ if [ $host_build_mksh -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_MKSH"
if [ $host_build_patch -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PATCH" >> $topdir/target/config/Config.in.prereq ;fi
if [ $host_build_pkgconf -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PKGCONF" >> $topdir/target/config/Config.in.prereq ;fi
if [ $host_build_findutils -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FINDUTILS" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_sed -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_SED" >> $topdir/target/config/Config.in.prereq ;fi
if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi
# optional
if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi
diff --git a/scripts/sed b/scripts/sed
deleted file mode 100755
index 36cfdbfa7..000000000
--- a/scripts/sed
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-if [ -z "$(which gsed 2>/dev/null)" ];then
- /bin/sed "$@"
-else
- gsed "$@"
-fi
diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools
index 8223a8823..3cb9c1537 100644
--- a/target/config/Config.in.tools
+++ b/target/config/Config.in.tools
@@ -53,6 +53,10 @@ config ADK_HOST_BUILD_PKGCONF
boolean
default n
+config ADK_HOST_BUILD_SED
+ boolean
+ default n
+
config ADK_HOST_BUILD_XZ
boolean
default n
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index 89ebf340f..36f562dc9 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -8,8 +8,8 @@ include ${TOPDIR}/mk/kernel-vars.mk
include ${TOPDIR}/mk/buildhlp.mk
$(WRKBUILD)/.headers:
- $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} headers_check
- $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} \
+ ${KERNEL_MAKE_ENV} $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} headers_check
+ ${KERNEL_MAKE_ENV} $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} \
INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)/usr \
headers_install
@-find $(STAGING_TARGET_DIR)/usr/include -name .install -delete