diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-13 17:18:40 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-13 17:18:44 +0100 |
commit | a94d74d9c875b4a1c07945bf9af282221d0178b3 (patch) | |
tree | daa2be873d758ad77006696efde6e76982f24d20 /target | |
parent | 74663fdbbd1dc92dd91f6f88dbc4f972df12c404 (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 'target')
-rw-r--r-- | target/Makefile | 19 | ||||
-rw-r--r-- | target/config/Config.in.adk | 25 | ||||
-rw-r--r-- | target/config/Config.in.target | 1 | ||||
-rw-r--r-- | target/config/Config.in.tools | 4 |
4 files changed, 14 insertions, 35 deletions
diff --git a/target/Makefile b/target/Makefile index d6cfa0bf8..180f5f05e 100644 --- a/target/Makefile +++ b/target/Makefile @@ -122,19 +122,25 @@ install: $(ADK_TARGET_ARCH)-imageclean $(ADK_TARGET_ARCH)-install $(ADK_TARGET_A clean: $(ADK_TARGET_ARCH)-clean $(ADK_TARGET_ARCH)-imageclean %-clean: - $(TRACE) target/$(patsubst %-clean,%,$@)-clean + $(START_TRACE) "target/$(patsubst %-clean,%,$@)-clean.. " $(MAKE) -C $(patsubst %-clean,%,$@) clean + $(CMD_TRACE) " done" + $(END_TRACE) %-imageclean: - $(TRACE) target/$(patsubst %-imageclean,%,$@)-imageclean + $(START_TRACE) "target/$(patsubst %-imageclean,%,$@)-imageclean.. " $(MAKE) -C $(patsubst %-imageclean,%,$@) imageclean + $(CMD_TRACE) " done" + $(END_TRACE) %-prepare: - $(TRACE) target/$(patsubst %-prepare,%,$@)-prepare + $(START_TRACE) "target/$(patsubst %-prepare,%,$@)-prepare.. " $(MAKE) -C $(patsubst %-prepare,%,$@) prepare + $(CMD_TRACE) " done" + $(END_TRACE) %-imageprepare: - $(TRACE) target/$(patsubst %-imageprepare,%,$@)-imageprepare + $(START_TRACE) "target/$(patsubst %-imageprepare,%,$@)-imageprepare.. " ifeq ($(ADK_RUNTIME_DEV_UDEV),y) # This should be made a package instead $(CP) -a $(BUILD_DIR)/linux-$(ADK_TARGET_ARCH)/modules/lib $(TARGET_DIR) @@ -146,20 +152,19 @@ endif break; \ done $(MAKE) -C $(patsubst %-imageprepare,%,$@) imageprepare + $(CMD_TRACE) " done" + $(END_TRACE) %-compile: %-prepare - $(TRACE) target/$(patsubst %-compile,%,$@)-compile $(MAKE) -C $(patsubst %-compile,%,$@) compile %-install: %-compile - $(TRACE) target/$(patsubst %-install,%,$@)-install $(MAKE) -C $(patsubst %-install,%,$@) install %-targethelp: $(MAKE) -C $(patsubst %-targethelp,%,$@) targethelp %-imageinstall: %-imageprepare - $(TRACE) target/$(patsubst %-imageinstall,%,$@)-imageinstall $(MAKE) -C $(patsubst %-imageinstall,%,$@) imageinstall @for x in $$(ls $(ADK_TOPDIR)/scripts/postimage/*.sh 2>/dev/null); do \ [[ -x "$$x" ]] && $$x; \ diff --git a/target/config/Config.in.adk b/target/config/Config.in.adk index 510809ce5..81144dc02 100644 --- a/target/config/Config.in.adk +++ b/target/config/Config.in.adk @@ -101,31 +101,6 @@ config ADK_TARGET_PORT help Port to use for SSH when running make check. -choice -prompt "Hostsystem (do not change!)" -config ADK_HOST_LINUX - bool "Linux" - -config ADK_HOST_FREEBSD - bool "FreeBSD" - -config ADK_HOST_MIRBSD - bool "MirBSD" - -config ADK_HOST_OPENBSD - bool "OpenBSD" - -config ADK_HOST_NETBSD - bool "NetBSD" - -config ADK_HOST_DARWIN - bool "Darwin" - -config ADK_HOST_CYGWIN - bool "Cygwin" - -endchoice - config ADK_PRELINK prompt "Prelink binaries and libraries in Image" boolean diff --git a/target/config/Config.in.target b/target/config/Config.in.target index 3c396f37e..4d1888c35 100644 --- a/target/config/Config.in.target +++ b/target/config/Config.in.target @@ -131,7 +131,6 @@ config ADK_TARGET_ROOTFS_ISO select ADK_HOST_NEED_CDRTOOLS select ADK_HOST_NEED_SYSLINUX select ADK_TARGET_QEMU_WITH_BLOCK if ADK_TARGET_QEMU - depends on ADK_HOST_LINUX depends on ADK_TARGET_ARCH_X86 help Use this option to create a bootable ISO image. diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index 702eea651..d8bec818d 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -37,11 +37,11 @@ config ADK_HOST_BUILD_LIBTOOL config ADK_HOST_BUILD_LIBRESSL bool - default y + default n config ADK_HOST_BUILD_WGET bool - default y + default n # always required, but can be provided by host config ADK_HOST_BUILD_BASH |