mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-19 12:10:19 +01:00
Merge bitcoin/bitcoin#33045: depends: disable variables, rules and suffixes.
52b1595850depends: disable builtin variables (fanquake)8b5a28fa78depends: disable builtin rules and suffixes. (Dmitry Goncharov) Pull request description: 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. 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`. ```bash Considering target file 'all'. File 'all' does not exist. Looking for an implicit rule for 'all'. Trying pattern rule with stem 'all'. Trying implicit prerequisite 'all.o'. Trying pattern rule with stem 'all'. Trying implicit prerequisite 'all.c'. Trying pattern rule with stem 'all'. Trying implicit prerequisite 'all.cc'. Trying pattern rule with stem 'all'. Trying implicit prerequisite 'all.C'. Trying pattern rule with stem 'all'. Trying implicit prerequisite 'all.cpp'. Trying pattern rule with stem 'all'. Trying implicit prerequisite 'all.p'. Trying pattern rule with stem 'all'. Trying implicit prerequisite 'all.f'. ... ``` 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. 1. Improves performance by eliminating redundant lookups. 2. 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. ACKs for top commit: hebasto: re-ACK52b1595850. Tree-SHA512: 8b5fab5f8b01096942801d34edc47511e794d7eaf628ea78f8d2e020b83c91ed430f397dfb2b735d5fe957cdf5f10b0942fde6396f031f3ed9a773e0e6a6fabc
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
.NOTPARALLEL :
|
||||
# Disable builtin variables, rules and suffixes.
|
||||
MAKEFLAGS += --no-builtin-rules --no-builtin-variables
|
||||
|
||||
# Pattern rule to print variables, e.g. make print-top_srcdir
|
||||
print-%: FORCE
|
||||
|
||||
Reference in New Issue
Block a user