From 25559139cf5480ccfb1ac180e9038448d5d2410e Mon Sep 17 00:00:00 2001 From: Christopher Kenna Date: Mon, 22 Nov 2010 17:27:19 -0500 Subject: Patch so Make will die if it detects non-LITMUS^RT kernel headers. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 0738648..b22cb0d 100644 --- a/Makefile +++ b/Makefile @@ -238,6 +238,12 @@ $(info (!!) Edit the file .config to override the default configuration.) $(error Cannot build without access to the LITMUS^RT kernel source) endif +kernel-unistd-hdrs := $(foreach file,${unistd-headers},${LITMUS_KERNEL}/$(file)) +hdr-ok := $(shell grep '\#include "litmus/unistd' ${kernel-unistd-hdrs} ) +ifeq ($(strip $(hdr-ok)),) +$(error Your kernel headers do not seem to be LITMUS^RT headers) +endif + config-ok := $(shell test -f "${LITMUS_KERNEL}/${word 1,${unistd-headers}}" \ || echo fail ) ifneq ($(config-ok),) -- cgit v1.2.2