aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2010-11-06 19:02:41 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-11-09 16:35:33 -0500
commit39db6fe3e50ac2dc9a3699cdc6d984e825852469 (patch)
tree192b8d74373cc21f93ac14c95b0647c15640e20a
parent310881b43bcf20d0a74e94cfcd0090716e90e8ea (diff)
generate error message if build config seems fishy
Failing loudly is a lot better than just producing a cryptic error message about some dependency file.
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2540bba..54f4b57 100644
--- a/Makefile
+++ b/Makefile
@@ -201,6 +201,31 @@ MAKECMDGOALS += all
201endif 201endif
202 202
203ifneq ($(filter-out dump-config clean,$(MAKECMDGOALS)),) 203ifneq ($(filter-out dump-config clean,$(MAKECMDGOALS)),)
204
205# Pull in dependencies.
204-include ${obj-all:.o=.d} 206-include ${obj-all:.o=.d}
207
208# Let's make sure the kernel header path is ok.
209config-ok := $(shell test -d "${LITMUS_KERNEL}" || echo invalid path. )
210config-ok += $(shell test -f "${LITMUS_KERNEL}/${word 1,${litmus-headers}}" \
211 || echo cannot find header. )
212ifneq ($(strip $(config-ok)),)
213$(info (!!) Could not find a LITMUS^RT kernel at ${LITMUS_KERNEL}: ${config-ok})
214$(info (!!) Are you sure the path is correct?)
215$(info (!!) Run 'make dump-config' to see the build configuration.)
216$(info (!!) Edit the file .config to override the default configuration.)
217$(error Cannot build without access to the LITMUS^RT kernel source)
218endif
219
220config-ok := $(shell test -f "${LITMUS_KERNEL}/${word 1,${unistd-headers}}" \
221 || echo fail )
222ifneq ($(config-ok),)
223$(info (!!) Could not find the architecture-specifc Linux headers.)
224$(info (!!) Are you sure ARCH=${ARCH} is correct?)
225$(info (!!) Run 'make dump-config' to see the build configuration.)
226$(info (!!) Edit the file '.config' to override the default configuration.)
227$(error Cannot build without access to the architecture-specific files)
228endif
229
205endif 230endif
206 231