Skip to contentSkip to conversation

Makefile: delete default rules

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 2 messages Nov 5, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: delete default rules

We don't use the default implicit rules that are added by make, so they just slow down the Makefile processing. The default implicit rules can be removed by defining an empty .SUFFIXES: target.

This speeds up the start of the build on my machine from 5.6s to 4.9s.

---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)
Makefile +3 -0
index 4ea64b3..6cf5f1c 100644
@@ -24,6 +24,9 @@
 # You shouldn't need to mess with anything beyond this point...
 #--------------------------------------------------------------
 
+# Delete default rules. We don't use them. This saves a bit of time.
+.SUFFIXES:
+
 # we want bash as shell
 SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 	 else if [ -x /bin/bash ]; then echo /bin/bash; \
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/1 Makefile: delete default rules

Hello,

Quoted 11 lines · Arnout Vandecappelle (Essensium/Mind)

We don't use the default implicit rules that are added by make, so they just slow down the Makefile processing. The default implicit rules can be removed by defining an empty .SUFFIXES: target.

This speeds up the start of the build on my machine from 5.6s to 4.9s.

---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com