summaryrefslogtreecommitdiff
path: root/scripts/adkprepare.sh
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-12-13 17:18:40 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2015-12-13 17:18:44 +0100
commita94d74d9c875b4a1c07945bf9af282221d0178b3 (patch)
treedaa2be873d758ad77006696efde6e76982f24d20 /scripts/adkprepare.sh
parent74663fdbbd1dc92dd91f6f88dbc4f972df12c404 (diff)
rework prereq check
The new prereq check is completely implemented in POSIX shell in scripts/prereq.sh. It combines the old features from Makefile, scan-tools.sh, scan-pkgs.sh, reloc.sh and some wrappers for tools. The big benefit is to have all portability stuff in one place. Furthermore we can compile GNU make and bash on the fly, for systems lacking the required tools. All changes on the host are detected on the fly, no make prereq required anymore. The build process is separated in following three phases: 1. small wrapper Makefile is used for BSD make or GNU make 2. prereq.sh is called, doing all checking, calling Makefile.adk 3. old logic in Makefile.adk or mk/build.mk is used Tested successfully on Linux, MacOS X, Cygwin, FreeBSD, OpenBSD and NetBSD. An old depmaker bug was fixed, only optional host tools are compiled. For example, even when a host provides xz, a local xz was compiled in the past, because other packages had a build dependency on it. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Diffstat (limited to 'scripts/adkprepare.sh')
-rwxr-xr-xscripts/adkprepare.sh67
1 files changed, 0 insertions, 67 deletions
diff --git a/scripts/adkprepare.sh b/scripts/adkprepare.sh
deleted file mode 100755
index 5b18d30e3..000000000
--- a/scripts/adkprepare.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-os=$(uname)
-ver=$(uname -r)
-arch=$(uname -m)
-
-linux() {
- echo "Preparing Linux for OpenADK is not implemented, yet"
- exit 1
-}
-
-darwin() {
- echo "Preparing MacOS X for OpenADK, is not implemented, yet"
- exit 1
-}
-
-openbsd() {
- echo "Preparing OpenBSD for OpenADK"
- PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/${ver}/packages/${arch}/"
- export PKG_PATH
- pkg_add -v gmake
- pkg_add -v bash
- pkg_add -v wget
- pkg_add -v gtar--
- pkg_add -v gawk
- pkg_add -v gsed
-}
-
-netbsd() {
- echo "Preparing NetBSD for OpenADK"
- PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/${arch}/${ver}/All/"
- export PKG_PATH
- pkg_add -vu gmake
- pkg_add -vu bash
- pkg_add -vu wget
- pkg_add -vu gtar
- pkg_add -vu gsed
- pkg_add -vu gawk
-}
-
-freebsd() {
- echo "Preparing FreeBSD for OpenADK"
- pkg_add -r gmake bash wget gtar gsed gawk
-}
-
-case $os in
- Linux)
- linux
- ;;
- FreeBSD)
- freebsd
- ;;
- OpenBSD)
- openbsd
- ;;
- NetBSD)
- netbsd
- ;;
- Darwin)
- darwin
- ;;
- *)
- echo "OS not supported"
- ;;
-esac