aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-19 01:49:59 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-21 12:22:34 -0300
commitd4be8e512d2c1e76cbc81158a171d208d9e6b7f8 (patch)
tree27903bd44e7ad268904e280483dc0dbd9e82514d /test
parentbuild: standardize commands on top of makefiles (diff)
downloadfirejail-d4be8e512d2c1e76cbc81158a171d208d9e6b7f8.tar.gz
firejail-d4be8e512d2c1e76cbc81158a171d208d9e6b7f8.tar.zst
firejail-d4be8e512d2c1e76cbc81158a171d208d9e6b7f8.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
index 2f023b8b1..08462c09b 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,3 +1,4 @@
1.SUFFIXES:
1ROOT = .. 2ROOT = ..
2-include $(ROOT)/config.mk 3-include $(ROOT)/config.mk
3 4