diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-06-23 07:35:19 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-06-30 05:32:07 -0300 |
commit | e21637ca82199d9b659f34d71674090e45fc89db (patch) | |
tree | 2a0629d8202ee179124ff7466165aa65cd937e22 /src/fids/db_exclude.c | |
parent | makefiles: stop failing when config.mk does not exist (diff) | |
download | firejail-e21637ca82199d9b659f34d71674090e45fc89db.tar.gz firejail-e21637ca82199d9b659f34d71674090e45fc89db.tar.zst firejail-e21637ca82199d9b659f34d71674090e45fc89db.zip |
makefiles: add generated files as dependencies
With the previous commit ("makefiles: stop failing when config.mk does
not exist", 2022-06-23), make will not immediately fail when trying to
build a target without having the proper compile-time flags (which are
defined on common.mk).
For example, when running the command below:
make distclean && make
It will throw an error only after (mis-)compiling multiple objects.
So add a dependency on config.mk on every target that uses output
variables (such as @NAME@ / $(NAME)) on its recipe. And add a
dependency on config.sh on targets that call shell scripts that use
output variables (such as @NAME@ / $NAME). Also, add a recipe for
config.mk / config.sh telling to run ./configure, to make it a bit more
obvious just in case.
With this commit, make will abort earlier, by detecting that the
config.mk / config.sh dependency does not exist. This happens before
trying to execute the recipe.
This also makes the dependencies more accurate, since if config.mk
(which defines some CFLAGS) is changed, the CFLAGS may also have
changed, so a target that uses CFLAGS should probably be considered out
of date in this case anyway.
Relates to #5140.
Diffstat (limited to 'src/fids/db_exclude.c')
0 files changed, 0 insertions, 0 deletions