build: set default goal to build_src, not the first target

The Makefile had `.DEFAULT: default` intending to make the `default` target
(which builds the project) the fallback when `make` is invoked with no
arguments. `.DEFAULT` is a different special target — it provides a fallback
*recipe* for targets with no rule, and has no effect on default goal
selection.

GNU make picks the first real target as the default goal unless
`.DEFAULT_GOAL` is set. The first real target in this Makefile is
`lint-generate-cdb` (line 19), so `make` with no arguments ran
`scripts/lint/generate-compile-commands.sh`, which does
`bear -- make -j\$(nproc)` — a full rebuild of the project under Bear's
compile-intercept wrappers. Each C++ compile under Bear spawned a wrapper
process, producing hundreds of bear processes per plain `make` invocation
and burying the intended default behaviour.

Replace `.DEFAULT: default` with `.DEFAULT_GOAL := default` so `make` with
no arguments runs `default: build_src` as originally intended.
v3.0-slim-dbdeployer-images
Rene Cannao 1 month ago
parent 4e39f3bdc4
commit 7a1d639a4b

@ -189,7 +189,7 @@ endif
### main targets
.DEFAULT: default
.DEFAULT_GOAL := default
.PHONY: default
default: build_src

Loading…
Cancel
Save