criu/scripts/nmk/scripts
Alexander Mikhalitsyn b34e0b2e68
tree-wide: Makefile: use -MP CFLAG to produce .d files
Let's use -MP gcc flag when generating dependency (.d) files.
According to the manual:

       -MP This option instructs CPP to add a phony target for each
           dependency other than the main file, causing each to depend on
           nothing.  These dummy rules work around errors make gives if
           you remove header files without updating the Makefile to
           match.

This fixes incremental rebuild failures like:
make[2]: 'compel/compel-host-bin' is up to date.
  DEP      criu/arch/x86/crtools.d
  CC       criu/arch/x86/crtools.o
  LINK     criu/arch/x86/crtools.built-in.o
make[3]: Nothing to be done for 'all'.
make[3]: *** No rule to make target 'criu/include/linux/rseq.h', needed by 'criu/pie/parasite.o'.  Stop.
make[2]: *** [criu/Makefile:59: pie] Error 2

Usually, after header files renames or source directory tree reorganization.

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
2026-07-19 19:04:14 +02:00
..
build.mk tree-wide: Makefile: use -MP CFLAG to produce .d files 2026-07-19 19:04:14 +02:00
include.mk compel: add riscv64 support 2025-03-21 12:40:31 -07:00
macro.mk Fix some codespell warnings 2022-04-28 17:53:52 -07:00
main.mk ci: fix codespell errors 2023-11-27 16:47:16 -08:00
msg.mk Fix some codespell warnings 2022-04-28 17:53:52 -07:00
tools.mk Use command -v instead of which 2025-11-05 15:41:34 -08:00
utils.mk build: respect $PKG_CONFIG settings 2021-09-03 10:31:00 -07:00