aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-11-18 21:12:18 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-11-18 21:12:18 +0000
commitaef03f09b5e9a115a249500b0bdd71f12c292efe (patch)
treeb1b1890572d054629da998299f966da752b9233c
parent0a699b0a9f7b8ada67cea99f7168f33944c759a4 (diff)
downloadupstream-aef03f09b5e9a115a249500b0bdd71f12c292efe.tar.gz
upstream-aef03f09b5e9a115a249500b0bdd71f12c292efe.tar.bz2
upstream-aef03f09b5e9a115a249500b0bdd71f12c292efe.zip
add prereq checks for target/linux/* and target/image/*, check for fdisk for the x86 builds
SVN-Revision: 5569
-rw-r--r--Makefile14
-rw-r--r--include/image.mk1
-rw-r--r--include/kernel-build.mk2
-rw-r--r--target/Makefile4
-rw-r--r--target/image/x86/Makefile5
-rw-r--r--target/linux/x86-2.6/Makefile2
6 files changed, 24 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index eed9335a5b..3551a64151 100644
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,7 @@ endif
ifeq ($(FORCE),)
.config scripts/config/conf scripts/config/mconf: tmp/.prereq-build
- world: tmp/.prereq-packages
+ world: tmp/.prereq-packages tmp/.prereq-target
endif
tmp/.pkginfo:
@@ -133,8 +133,16 @@ tmp/.prereq-packages: include/prereq.mk tmp/.pkginfo .config
false; \
}
@touch $@
-
-prereq: tmp/.prereq-build tmp/.prereq-packages FORCE
+
+tmp/.prereq-target: include/prereq.mk tmp/.targetinfo .config
+ @mkdir -p tmp
+ @$(NO_TRACE_MAKE) -s -C target prereq 2>/dev/null || { \
+ echo "Prerequisite check failed. Use FORCE=1 to override."; \
+ false; \
+ }
+ @touch $@
+
+prereq: tmp/.prereq-build tmp/.prereq-packages tmp/.prereq-target FORCE
download: .config FORCE
$(MAKE) tools/download
diff --git a/include/image.mk b/include/image.mk
index 6805389d72..70677b9c2f 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -5,6 +5,7 @@
# See /LICENSE for more information.
#
+include $(INCLUDE_DIR)/prereq.mk
include $(INCLUDE_DIR)/kernel.mk
KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index 35149d7686..4967dfb67e 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -6,6 +6,8 @@
#
KERNEL_BUILD:=1
+include $(INCLUDE_DIR)/prereq.mk
+
# For target profile selection - the default set
DEFAULT_PACKAGES:=base-files libgcc uclibc bridge busybox dnsmasq dropbear iptables mtd ppp ppp-mod-pppoe mtd
diff --git a/target/Makefile b/target/Makefile
index dc21033e5f..c00eea0d66 100644
--- a/target/Makefile
+++ b/target/Makefile
@@ -25,6 +25,10 @@ compile: linux-compile image_compile
install: image_clean $(patsubst %,%-install,$(TARGETS-y)) image_install
clean: $(patsubst %,%-clean,$(TARGETS-y)) image_clean
+prereq: FORCE
+ $(MAKE) -C linux/$(BOARD)-$(KERNEL) prereq
+ $(MAKE) -C image/$(BOARD) prereq
+
image_clean: FORCE
$(MAKE) -C image/$(BOARD) clean
rm -f $(BIN_DIR)/openwrt-*
diff --git a/target/image/x86/Makefile b/target/image/x86/Makefile
index adace07dc4..d3bbe045be 100644
--- a/target/image/x86/Makefile
+++ b/target/image/x86/Makefile
@@ -54,5 +54,8 @@ define Image/Build
cp $(LINUX_DIR)/arch/i386/boot/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
endef
-
$(eval $(call BuildImage))
+
+$(eval $(call RequireCommand,fdisk, \
+ Please install fdisk \
+))
diff --git a/target/linux/x86-2.6/Makefile b/target/linux/x86-2.6/Makefile
index 77912e6fb9..8676aab8cf 100644
--- a/target/linux/x86-2.6/Makefile
+++ b/target/linux/x86-2.6/Makefile
@@ -16,4 +16,6 @@ LINUX_RELEASE:=1
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
include $(INCLUDE_DIR)/kernel-build.mk
+
$(eval $(call BuildKernel))
+