Fix clang issue where generated .d are sometimes newer than .o

This commit is contained in:
Philippe Teuwen 2019-08-22 21:05:45 +02:00
commit 9825f521b4
3 changed files with 10 additions and 11 deletions

View file

@ -10,6 +10,8 @@ RM = rm -f
MV = mv
CP = cp -a
MKDIR = mkdir -p
TOUCH = touch
FALSE = false
CFLAGS ?= -Wall -Werror -O3
CFLAGS += $(MYDEFS) $(MYCFLAGS) $(MYINCLUDES)
@ -31,7 +33,7 @@ vpath %.c $(MYSRCPATHS)
# Flags to generate temporary dependency files
DEPFLAGS = -MT $@ -MMD -MP -MF $(OBJDIR)/$*.Td
# make temporary to final dependency files after successful compilation
POSTCOMPILE = $(MV) -f $(OBJDIR)/$*.Td $(OBJDIR)/$*.d
POSTCOMPILE = $(MV) -f $(OBJDIR)/$*.Td $(OBJDIR)/$*.d && $(TOUCH) $@
BINDIR := .
OBJDIR := obj