[PR #5864] [MERGED] build: disable all built-in implicit make rules #5699

Closed
opened 2026-05-05 10:43:16 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/5864
Author: @kmk3
Created: 6/20/2023
Status: Merged
Merged: 6/21/2023
Merged by: @kmk3

Base: masterHead: build-reduce-implicit


📝 Commits (3)

  • 6ece8ce build: standardize commands on top of makefiles
  • d4be8e5 build: disable most built-in implicit make rules
  • 9789c26 build: disable all built-in implicit make rules

📊 Changes

30 files changed (+99 additions, -6 deletions)

View changed files

📝 Makefile (+3 -0)
📝 src/bash_completion/Makefile (+5 -2)
📝 src/etc-cleanup/Makefile (+3 -0)
📝 src/fbuilder/Makefile (+3 -0)
📝 src/fcopy/Makefile (+3 -0)
📝 src/fids/Makefile (+3 -0)
📝 src/firecfg/Makefile (+3 -0)
📝 src/firejail/Makefile (+3 -0)
📝 src/firemon/Makefile (+3 -0)
📝 src/fldd/Makefile (+3 -0)
📝 src/fnet/Makefile (+3 -0)
📝 src/fnetfilter/Makefile (+3 -0)
📝 src/fnettrace-dns/Makefile (+3 -0)
📝 src/fnettrace-icmp/Makefile (+3 -0)
📝 src/fnettrace-sni/Makefile (+3 -0)
📝 src/fnettrace/Makefile (+3 -0)
📝 src/fsec-optimize/Makefile (+3 -0)
📝 src/fsec-print/Makefile (+3 -0)
📝 src/fseccomp/Makefile (+3 -0)
📝 src/ftee/Makefile (+3 -0)

...and 10 more files

📄 Description

To reduce unnecessary filesystem lookups.

Overall, this appears to reduce the amount of implicit rule searches by ~97.5%
for the default build and by ~99.3% 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
# (with the second 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
# (with the third 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."

See also commit f48886f25 ("build: mark most phony targets as such",
2023-02-01) / PR #5637.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/5864 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 6/20/2023 **Status:** ✅ Merged **Merged:** 6/21/2023 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `build-reduce-implicit` --- ### 📝 Commits (3) - [`6ece8ce`](https://github.com/netblue30/firejail/commit/6ece8cec3d1327872bd655899ccb34f92f911608) build: standardize commands on top of makefiles - [`d4be8e5`](https://github.com/netblue30/firejail/commit/d4be8e512d2c1e76cbc81158a171d208d9e6b7f8) build: disable most built-in implicit make rules - [`9789c26`](https://github.com/netblue30/firejail/commit/9789c263a2bfc28aa2685f24d452ace4be150aa6) build: disable all built-in implicit make rules ### 📊 Changes **30 files changed** (+99 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+3 -0) 📝 `src/bash_completion/Makefile` (+5 -2) 📝 `src/etc-cleanup/Makefile` (+3 -0) 📝 `src/fbuilder/Makefile` (+3 -0) 📝 `src/fcopy/Makefile` (+3 -0) 📝 `src/fids/Makefile` (+3 -0) 📝 `src/firecfg/Makefile` (+3 -0) 📝 `src/firejail/Makefile` (+3 -0) 📝 `src/firemon/Makefile` (+3 -0) 📝 `src/fldd/Makefile` (+3 -0) 📝 `src/fnet/Makefile` (+3 -0) 📝 `src/fnetfilter/Makefile` (+3 -0) 📝 `src/fnettrace-dns/Makefile` (+3 -0) 📝 `src/fnettrace-icmp/Makefile` (+3 -0) 📝 `src/fnettrace-sni/Makefile` (+3 -0) 📝 `src/fnettrace/Makefile` (+3 -0) 📝 `src/fsec-optimize/Makefile` (+3 -0) 📝 `src/fsec-print/Makefile` (+3 -0) 📝 `src/fseccomp/Makefile` (+3 -0) 📝 `src/ftee/Makefile` (+3 -0) _...and 10 more files_ </details> ### 📄 Description To reduce unnecessary filesystem lookups. Overall, this appears to reduce the amount of implicit rule searches by ~97.5% for the default build and by ~99.3% 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 # (with the second 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 # (with the third 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." See also commit f48886f25 ("build: mark most phony targets as such", 2023-02-01) / PR #5637. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:43:16 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#5699
No description provided.