This picks up #22126. Previously, this was more complicated to do, as depends packages (upnp, natpmp) used the rules being disabled. Those packages have since been removed, and we should be able to use the flag directly.
When there is no rule to build a target in the makefile, make looks for a builtin rule. When -r
is specified make no longer performs this lookup.
E.g. the following in an excerpt from make -d
output. Here, make looks for a rule to build all
.
0Considering target file 'all'.
1 File 'all' does not exist.
2 Looking for an implicit rule for 'all'.
3 Trying pattern rule with stem 'all'.
4 Trying implicit prerequisite 'all.o'.
5 Trying pattern rule with stem 'all'.
6 Trying implicit prerequisite 'all.c'.
7 Trying pattern rule with stem 'all'.
8 Trying implicit prerequisite 'all.cc'.
9 Trying pattern rule with stem 'all'.
10 Trying implicit prerequisite 'all.C'.
11 Trying pattern rule with stem 'all'.
12 Trying implicit prerequisite 'all.cpp'.
13 Trying pattern rule with stem 'all'.
14 Trying implicit prerequisite 'all.p'.
15 Trying pattern rule with stem 'all'.
16 Trying implicit prerequisite 'all.f'.
17...
Many more lines like this are omitted.
Because this build system does not use make builtin rules or suffixes, there is no benefit in having builtin rules enabled.
There are 2 benefits in having builtin rules disabled.
- Improves performance by eliminating redundant lookups.
- Simplifies troubleshooting by reducing the output of make
-d
or make-p
.
Also see: https://www.gnu.org/software/make/manual/make.html#index-_002d_002dno_002dbuiltin_002drules.