criu/scripts/nmk
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
..
Documentation Documentation: Allow to use asciidoctor for formatting man pages 2019-04-20 20:25:26 -07:00
scripts tree-wide: Makefile: use -MP CFLAG to produce .d files 2026-07-19 19:04:14 +02:00
.gitignore build: nmk -- Initial import 2016-02-15 15:32:20 +03:00
Makefile nmk: Don't redefine MAKEFLAGS 2018-05-12 11:45:33 +03:00
README.md build: nmk -- Initial import 2016-02-15 15:32:20 +03:00

NMK

NMK stands for NetMaKe -- is a very simple framework for make build system. Most ideas are taken from the Linux kernel kbuild system.