Skip to contentSkip to conversation

build: disable default built-in rules and variables

PATCH In review Doug Goldstein 2 participants 2 messages Dec 1, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: disable default built-in rules and variables

Disable the built-in rules and variables from GNU make to improve build performance and avoid awkward corner cases with the built-in rules. Currently none of the implicit rules are used but this is helpful to do when developing changes to the build system.

---
 xen/Makefile | 3 +++
 1 file changed, 3 insertions(+)
xen/Makefile +3 -0
index fa9cf0a..3a1de99 100644
@@ -15,6 +15,9 @@ export XEN_BUILD_HOST	?= $(shell hostname)
 export BASEDIR := $(CURDIR)
 export XEN_ROOT := $(BASEDIR)/..
 
+# Do not use make's built-in rules and variables
+MAKEFLAGS += -rR
+
 EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi
 
 .PHONY: default
Signature · 1 line
2.4.10
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Doug Goldstein

Disable the built-in rules and variables from GNU make to improve build performance and avoid awkward corner cases with the built-in rules. Currently none of the implicit rules are used but this is helpful to do when developing changes to the build system.

Trying this out, it reliably drops Xen's build time from ~58s to ~52s on the dev box I have to hand.

~Andrew