From dea96d0d86590d66f7dca6f8a6f006d202f9ab75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Wed, 7 Feb 2024 23:36:06 -0500 Subject: [PATCH] Add -MP with -MMD This creates a .PHONY target for each file so that if a header is renamed, the impact will be the files that include it being rebuilt instead of the previous behaviour where the build would simply fail and complain that the file doesn't exist. --- src/build/Common.gmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/Common.gmake b/src/build/Common.gmake index 999fdd1d9a..815cc8cd4f 100644 --- a/src/build/Common.gmake +++ b/src/build/Common.gmake @@ -173,7 +173,7 @@ ifdef WALL endif # Compiler-specific options -CFLAGS += -MMD +CFLAGS += -MMD -MP CC ?= gcc CCPRE ?= ${shell if [ `echo __clang__ | $(CC) -E - | grep -v '^\#'` != __clang__ ] ; then echo clang ; elif [ `echo __INTEL_COMPILER | $(CC) -E - | grep -v '^\#'` != __INTEL_COMPILER ] ; then echo icc ; else echo gcc ; fi} ifeq ($(CCPRE),clang) -- GitLab