diff options
author | 2023-06-21 02:00:21 -0300 | |
---|---|---|
committer | 2023-06-21 14:21:09 -0300 | |
commit | 9789c263a2bfc28aa2685f24d452ace4be150aa6 (patch) | |
tree | e8208431ad13c779b428eeae14a82d0d28e9c80e /src | |
parent | build: disable most built-in implicit make rules (diff) | |
download | firejail-9789c263a.tar.gz firejail-9789c263a.tar.zst firejail-9789c263a.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 'src')
-rw-r--r-- | src/bash_completion/Makefile | 2 | ||||
-rw-r--r-- | src/etc-cleanup/Makefile | 2 | ||||
-rw-r--r-- | src/fbuilder/Makefile | 2 | ||||
-rw-r--r-- | src/fcopy/Makefile | 2 | ||||
-rw-r--r-- | src/fids/Makefile | 2 | ||||
-rw-r--r-- | src/firecfg/Makefile | 2 | ||||
-rw-r--r-- | src/firejail/Makefile | 2 | ||||
-rw-r--r-- | src/firemon/Makefile | 2 | ||||
-rw-r--r-- | src/fldd/Makefile | 2 | ||||
-rw-r--r-- | src/fnet/Makefile | 2 | ||||
-rw-r--r-- | src/fnetfilter/Makefile | 2 | ||||
-rw-r--r-- | src/fnettrace-dns/Makefile | 2 | ||||
-rw-r--r-- | src/fnettrace-icmp/Makefile | 2 | ||||
-rw-r--r-- | src/fnettrace-sni/Makefile | 2 | ||||
-rw-r--r-- | src/fnettrace/Makefile | 2 | ||||
-rw-r--r-- | src/fsec-optimize/Makefile | 2 | ||||
-rw-r--r-- | src/fsec-print/Makefile | 2 | ||||
-rw-r--r-- | src/fseccomp/Makefile | 2 | ||||
-rw-r--r-- | src/ftee/Makefile | 2 | ||||
-rw-r--r-- | src/fzenity/Makefile | 2 | ||||
-rw-r--r-- | src/jailcheck/Makefile | 2 | ||||
-rw-r--r-- | src/lib/Makefile | 2 | ||||
-rw-r--r-- | src/libpostexecseccomp/Makefile | 2 | ||||
-rw-r--r-- | src/libtrace/Makefile | 2 | ||||
-rw-r--r-- | src/libtracelog/Makefile | 2 | ||||
-rw-r--r-- | src/man/Makefile | 2 | ||||
-rw-r--r-- | src/profstats/Makefile | 2 | ||||
-rw-r--r-- | src/zsh_completion/Makefile | 2 |
28 files changed, 56 insertions, 0 deletions
diff --git a/src/bash_completion/Makefile b/src/bash_completion/Makefile index 516805886..6d5c45532 100644 --- a/src/bash_completion/Makefile +++ b/src/bash_completion/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/etc-cleanup/Makefile b/src/etc-cleanup/Makefile index c8a12476e..7c542c4a9 100644 --- a/src/etc-cleanup/Makefile +++ b/src/etc-cleanup/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fbuilder/Makefile b/src/fbuilder/Makefile index 7595f0775..803ea18a3 100644 --- a/src/fbuilder/Makefile +++ b/src/fbuilder/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fcopy/Makefile b/src/fcopy/Makefile index e2956fdd1..29ea719a3 100644 --- a/src/fcopy/Makefile +++ b/src/fcopy/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fids/Makefile b/src/fids/Makefile index 901cbb470..1aaac5c75 100644 --- a/src/fids/Makefile +++ b/src/fids/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/firecfg/Makefile b/src/firecfg/Makefile index 59b713f1b..c9489e3a4 100644 --- a/src/firecfg/Makefile +++ b/src/firecfg/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/firejail/Makefile b/src/firejail/Makefile index 53bccf843..064373588 100644 --- a/src/firejail/Makefile +++ b/src/firejail/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/firemon/Makefile b/src/firemon/Makefile index e0059aee5..514eb98eb 100644 --- a/src/firemon/Makefile +++ b/src/firemon/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fldd/Makefile b/src/fldd/Makefile index 86693a76c..35ce019a7 100644 --- a/src/fldd/Makefile +++ b/src/fldd/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fnet/Makefile b/src/fnet/Makefile index 8efc6d26b..a40d69b11 100644 --- a/src/fnet/Makefile +++ b/src/fnet/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fnetfilter/Makefile b/src/fnetfilter/Makefile index 2be8311ae..fbae2e027 100644 --- a/src/fnetfilter/Makefile +++ b/src/fnetfilter/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fnettrace-dns/Makefile b/src/fnettrace-dns/Makefile index bbd4772e2..3c825467c 100644 --- a/src/fnettrace-dns/Makefile +++ b/src/fnettrace-dns/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fnettrace-icmp/Makefile b/src/fnettrace-icmp/Makefile index 0d26dc2fc..9e94fa144 100644 --- a/src/fnettrace-icmp/Makefile +++ b/src/fnettrace-icmp/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fnettrace-sni/Makefile b/src/fnettrace-sni/Makefile index 554741fc8..21dfde3d3 100644 --- a/src/fnettrace-sni/Makefile +++ b/src/fnettrace-sni/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fnettrace/Makefile b/src/fnettrace/Makefile index 94381d299..a952a84a4 100644 --- a/src/fnettrace/Makefile +++ b/src/fnettrace/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fsec-optimize/Makefile b/src/fsec-optimize/Makefile index 4941f13b1..40511bdaa 100644 --- a/src/fsec-optimize/Makefile +++ b/src/fsec-optimize/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fsec-print/Makefile b/src/fsec-print/Makefile index 78e87a93f..6f09e9161 100644 --- a/src/fsec-print/Makefile +++ b/src/fsec-print/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fseccomp/Makefile b/src/fseccomp/Makefile index 461179f4d..bd5c92113 100644 --- a/src/fseccomp/Makefile +++ b/src/fseccomp/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/ftee/Makefile b/src/ftee/Makefile index 0c27b4cbc..8b4e7fdf4 100644 --- a/src/ftee/Makefile +++ b/src/ftee/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/fzenity/Makefile b/src/fzenity/Makefile index a17a9252f..6b93886f5 100644 --- a/src/fzenity/Makefile +++ b/src/fzenity/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/jailcheck/Makefile b/src/jailcheck/Makefile index 23cd9c1a9..029fd422b 100644 --- a/src/jailcheck/Makefile +++ b/src/jailcheck/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/lib/Makefile b/src/lib/Makefile index a7b093048..e359bba08 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/libpostexecseccomp/Makefile b/src/libpostexecseccomp/Makefile index dfd8eb318..874de098e 100644 --- a/src/libpostexecseccomp/Makefile +++ b/src/libpostexecseccomp/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/libtrace/Makefile b/src/libtrace/Makefile index 8b14a4335..d261828ea 100644 --- a/src/libtrace/Makefile +++ b/src/libtrace/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/libtracelog/Makefile b/src/libtracelog/Makefile index ac48264df..5e14a5dbe 100644 --- a/src/libtracelog/Makefile +++ b/src/libtracelog/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/man/Makefile b/src/man/Makefile index 197f76192..ce55ffd34 100644 --- a/src/man/Makefile +++ b/src/man/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/profstats/Makefile b/src/profstats/Makefile index b4cb1a6f7..936b575e1 100644 --- a/src/profstats/Makefile +++ b/src/profstats/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||
diff --git a/src/zsh_completion/Makefile b/src/zsh_completion/Makefile index cc811ae99..fab53ca0a 100644 --- a/src/zsh_completion/Makefile +++ b/src/zsh_completion/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | .SUFFIXES: | 1 | .SUFFIXES: |
2 | MAKEFLAGS += -r | ||
3 | |||
2 | ROOT = ../.. | 4 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 5 | -include $(ROOT)/config.mk |
4 | 6 | ||