diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-06 19:02:41 -0400 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-09 16:35:33 -0500 |
| commit | 39db6fe3e50ac2dc9a3699cdc6d984e825852469 (patch) | |
| tree | 192b8d74373cc21f93ac14c95b0647c15640e20a | |
| parent | 310881b43bcf20d0a74e94cfcd0090716e90e8ea (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-- | Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
| @@ -201,6 +201,31 @@ MAKECMDGOALS += all | |||
| 201 | endif | 201 | endif |
| 202 | 202 | ||
| 203 | ifneq ($(filter-out dump-config clean,$(MAKECMDGOALS)),) | 203 | ifneq ($(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. | ||
| 209 | config-ok := $(shell test -d "${LITMUS_KERNEL}" || echo invalid path. ) | ||
| 210 | config-ok += $(shell test -f "${LITMUS_KERNEL}/${word 1,${litmus-headers}}" \ | ||
| 211 | || echo cannot find header. ) | ||
| 212 | ifneq ($(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) | ||
| 218 | endif | ||
| 219 | |||
| 220 | config-ok := $(shell test -f "${LITMUS_KERNEL}/${word 1,${unistd-headers}}" \ | ||
| 221 | || echo fail ) | ||
| 222 | ifneq ($(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) | ||
| 228 | endif | ||
| 229 | |||
| 205 | endif | 230 | endif |
| 206 | 231 | ||
