aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2010-11-22 17:27:19 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-11-22 18:32:14 -0500
commit25559139cf5480ccfb1ac180e9038448d5d2410e (patch)
treeb8a7024e75048fae99daeae47ba5861f493614fa /Makefile
parente9e4de6729a846c4c99754371c0d1738a0238381 (diff)
Patch so Make will die if it detects non-LITMUS^RT kernel headers.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
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.)
238$(error Cannot build without access to the LITMUS^RT kernel source) 238$(error Cannot build without access to the LITMUS^RT kernel source)
239endif 239endif
240 240
241kernel-unistd-hdrs := $(foreach file,${unistd-headers},${LITMUS_KERNEL}/$(file))
242hdr-ok := $(shell grep '\#include "litmus/unistd' ${kernel-unistd-hdrs} )
243ifeq ($(strip $(hdr-ok)),)
244$(error Your kernel headers do not seem to be LITMUS^RT headers)
245endif
246
241config-ok := $(shell test -f "${LITMUS_KERNEL}/${word 1,${unistd-headers}}" \ 247config-ok := $(shell test -f "${LITMUS_KERNEL}/${word 1,${unistd-headers}}" \
242 || echo fail ) 248 || echo fail )
243ifneq ($(config-ok),) 249ifneq ($(config-ok),)