From d4be8e512d2c1e76cbc81158a171d208d9e6b7f8 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Mon, 19 Jun 2023 01:49:59 -0300 Subject: build: disable most built-in implicit make rules Clear `.SUFFIXES:` to reduce unnecessary filesystem lookups. Overall, this appears to reduce the amount of implicit rule searches by ~62% for the default build and by ~96% for the "man" target (as an example): $ git checkout master >/dev/null 2>&1 $ git show --pretty='%h %ai %s' -s a8f01a383 2023-06-20 05:26:23 +0000 Merge pull request #5859 from kmk3/build-remove-retpoline $ ./configure >/dev/null $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 6798 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 1085 # (with this commit applied) $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 2535 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 42 Environment: GNU make 4.4.1-2 on Artix Linux. Commands used to search and replace: $ git ls-files -z -- '*Makefile*' | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\$(sed '1s/^/.SUFFIXES:\n/' '{}')\" >'{}'" See also commit f48886f25 ("build: mark most phony targets as such", 2023-02-01) / PR #5637. --- src/fnettrace-sni/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'src/fnettrace-sni') diff --git a/src/fnettrace-sni/Makefile b/src/fnettrace-sni/Makefile index 8d9a437d5..554741fc8 100644 --- a/src/fnettrace-sni/Makefile +++ b/src/fnettrace-sni/Makefile @@ -1,3 +1,4 @@ +.SUFFIXES: ROOT = ../.. -include $(ROOT)/config.mk -- cgit v1.2.3-54-g00ecf