diff options
author | 2023-06-19 01:49:59 -0300 | |
---|---|---|
committer | 2023-06-21 12:22:34 -0300 | |
commit | d4be8e512d2c1e76cbc81158a171d208d9e6b7f8 (patch) | |
tree | 27903bd44e7ad268904e280483dc0dbd9e82514d /src/fcopy | |
parent | build: standardize commands on top of makefiles (diff) | |
download | firejail-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 'src/fcopy')
-rw-r--r-- | src/fcopy/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fcopy/Makefile b/src/fcopy/Makefile index 27054627c..e2956fdd1 100644 --- a/src/fcopy/Makefile +++ b/src/fcopy/Makefile | |||
@@ -1,3 +1,4 @@ | |||
1 | .SUFFIXES: | ||
1 | ROOT = ../.. | 2 | ROOT = ../.. |
2 | -include $(ROOT)/config.mk | 3 | -include $(ROOT)/config.mk |
3 | 4 | ||