diff options
| -rw-r--r-- | Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
| @@ -15,10 +15,9 @@ NAME = Merciless Moray | |||
| 15 | PHONY := _all | 15 | PHONY := _all |
| 16 | _all: | 16 | _all: |
| 17 | 17 | ||
| 18 | # o Do not use make's built-in rules and variables | 18 | # Do not use make's built-in rules and variables |
| 19 | # (this increases performance and avoids hard-to-debug behaviour); | 19 | # (this increases performance and avoids hard-to-debug behaviour) |
| 20 | # o Look for make include files relative to root of kernel src | 20 | MAKEFLAGS += -rR |
| 21 | MAKEFLAGS += -rR --include-dir=$(CURDIR) | ||
| 22 | 21 | ||
| 23 | # Avoid funny character set dependencies | 22 | # Avoid funny character set dependencies |
| 24 | unexport LC_ALL | 23 | unexport LC_ALL |
| @@ -136,6 +135,13 @@ KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ | |||
| 136 | $(if $(KBUILD_OUTPUT),, \ | 135 | $(if $(KBUILD_OUTPUT),, \ |
| 137 | $(error failed to create output directory "$(saved-output)")) | 136 | $(error failed to create output directory "$(saved-output)")) |
| 138 | 137 | ||
| 138 | # Look for make include files relative to root of kernel src | ||
| 139 | # | ||
| 140 | # This does not become effective immediately because MAKEFLAGS is re-parsed | ||
| 141 | # once after the Makefile is read. It is OK since we are going to invoke | ||
| 142 | # 'sub-make' below. | ||
| 143 | MAKEFLAGS += --include-dir=$(CURDIR) | ||
| 144 | |||
| 139 | PHONY += $(MAKECMDGOALS) sub-make | 145 | PHONY += $(MAKECMDGOALS) sub-make |
| 140 | 146 | ||
| 141 | $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make | 147 | $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make |
