diff options
author | Christopher Kenna <cjk@cs.unc.edu> | 2010-11-22 17:27:19 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-22 18:32:14 -0500 |
commit | 25559139cf5480ccfb1ac180e9038448d5d2410e (patch) | |
tree | b8a7024e75048fae99daeae47ba5861f493614fa /Makefile | |
parent | e9e4de6729a846c4c99754371c0d1738a0238381 (diff) |
Patch so Make will die if it detects non-LITMUS^RT kernel headers.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |
239 | endif | 239 | endif |
240 | 240 | ||
241 | kernel-unistd-hdrs := $(foreach file,${unistd-headers},${LITMUS_KERNEL}/$(file)) | ||
242 | hdr-ok := $(shell grep '\#include "litmus/unistd' ${kernel-unistd-hdrs} ) | ||
243 | ifeq ($(strip $(hdr-ok)),) | ||
244 | $(error Your kernel headers do not seem to be LITMUS^RT headers) | ||
245 | endif | ||
246 | |||
241 | config-ok := $(shell test -f "${LITMUS_KERNEL}/${word 1,${unistd-headers}}" \ | 247 | config-ok := $(shell test -f "${LITMUS_KERNEL}/${word 1,${unistd-headers}}" \ |
242 | || echo fail ) | 248 | || echo fail ) |
243 | ifneq ($(config-ok),) | 249 | ifneq ($(config-ok),) |