1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

build system: Fix parallel build with clean

It turns out that `make clean all -j 16` previously failed every second
time, as a dependency to a generated header (`preprocessor_succesor.h`
in this case) is checked and considered to be up to date before running
the `clean` target. However, after the `clean` target it is removed.

This fixes:

```
$ BOARD=nrf52840dk make -C examples/emcute_mqttsn clean all --jobs 16
make: Entering directory '/home/maribu/Repos/software/RIOT/examples/emcute_mqttsn'
make: Circular clean <- clean dependency dropped.
Building application "emcute_mqttsn" for "nrf52840dk" with MCU "nrf52".
[...]
cc1: error: /home/maribu/Repos/software/RIOT/examples/emcute_mqttsn/bin/nrf52840dk/preprocessor: No such file or directory [-Werror=missing-include-dirs]
[...]
```
This commit is contained in:
Marian Buschsieweke 2023-01-02 21:16:37 +01:00
parent 821acbe6fb
commit e620736573
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -708,6 +708,11 @@ BUILDDEPS += pkg-prepare
BUILDDEPS += $(APPDEPS)
BUILDDEPS += $(MODULE_LIST_DIR)
# Build dependencies depend on clean (if a make goal), as clean may wipe them.
# Without them depending on clean parallel builds occasionally fail due to
# clean removing dependencies that make previously considered as up to date.
$(BUILDDEPS): $(CLEAN)
# Save value to verify it is not modified later
_BASELIBS_VALUE_BEFORE_USAGE := $(BASELIBS)