aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-21 02:00:21 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-21 14:21:09 -0300
commit9789c263a2bfc28aa2685f24d452ace4be150aa6 (patch)
treee8208431ad13c779b428eeae14a82d0d28e9c80e /test
parentbuild: disable most built-in implicit make rules (diff)
downloadfirejail-9789c263a2bfc28aa2685f24d452ace4be150aa6.tar.gz
firejail-9789c263a2bfc28aa2685f24d452ace4be150aa6.tar.zst
firejail-9789c263a2bfc28aa2685f24d452ace4be150aa6.zip
build: disable all built-in implicit make rules
Use `make -r` to reduce unnecessary filesystem lookups. Overall, this appears to reduce the amount of implicit rule searches by ~93.3% (~97.5% compared to a8f01a383) for the default build and by ~83.3% (~99.3% compared to a8f01a383) for the "man" target (as an example): $ 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 # (in the previous commit) $ 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 # (with this commit applied) $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 170 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 7 Environment: GNU make 4.4.1-2 on Artix Linux. Note: According to make(1p) in POSIX.1-2017, "If .SUFFIXES does not have any prerequisites, the list of known suffixes shall be cleared.", while "The result of setting MAKEFLAGS in the Makefile is unspecified." Commands used to search and replace: $ git ls-files -z -- '*Makefile*' | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\$(sed -E \ 's/^(.SUFFIXES:)/\1\nMAKEFLAGS += -r\n/' '{}')\" >'{}'"
Diffstat (limited to 'test')
-rw-r--r--test/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
index 08462c09b..02a628928 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,4 +1,6 @@
1.SUFFIXES: 1.SUFFIXES:
2MAKEFLAGS += -r
3
2ROOT = .. 4ROOT = ..
3-include $(ROOT)/config.mk 5-include $(ROOT)/config.mk
4 6