From c41788a8a2b6519f98c5f4e208e424d8a1bf7428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Thu, 3 Feb 2005 21:31:57 +0000 Subject: [PATCH] Always clean the .gch file, even if ROS_USE_PCH is not active. This prevents problems when switching between PCH and non-PCH builds. svn path=/trunk/; revision=13398 --- reactos/tools/helper.mk | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index c50a5e80892..ed2f158aa0c 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -905,23 +905,26 @@ endif # Precompiled header support # When using PCHs, use dependency tracking to keep the .gch files up-to-date. +# When TARGET_PCH is defined, we always want to clean the .gch file, even if +# ROS_USE_PCH is not active. This prevents problems when switching between +# PCH and non-PCH builds. -MK_PCHNAME = -ifeq ($(ROS_USE_PCH),yes) ifneq ($(TARGET_PCH),) +MK_PCHCLEAN = $(TARGET_PCH).gch +ifeq ($(ROS_USE_PCH),yes) MK_PCHNAME = $(TARGET_PCH).gch - ifeq ($(TARGET_CPPAPP),yes) PCH_CC := $(CXX) -else +else # TARGET_CPPAPP PCH_CC := $(CC) -endif - - -endif # TARGET_PCH -else # +endif # TARGET_CPPAPP +else # ROS_USE_PCH MK_PCHNAME = endif # ROS_USE_PCH +else # TARGET_PCH +MK_PCHCLEAN = +MK_PCHNAME = +endif # TARGET_PCH # Be carefull not to clean non-object files MK_CLEANFILES := $(filter %.o,$(MK_OBJECTS)) @@ -931,7 +934,7 @@ MK_CLEANDEPS := $(join $(dir $(MK_CLEANFILTERED)), $(addprefix ., $(notdir $(MK_ # FIXME: The $(MK_BASENAME).sym can be removed around 15 Feb 2005 clean: $(MK_REGTESTS_CLEAN) $(SUBDIRS:%=%_clean) $(HALFVERBOSEECHO) [CLEAN] - - $(RM) *.o $(MK_PCHNAME) $(MK_BASENAME).sym $(MK_BASENAME).a $(MK_RESOURCE) \ + - $(RM) *.o $(MK_PCHCLEAN) $(MK_BASENAME).sym $(MK_BASENAME).a $(MK_RESOURCE) \ $(MK_FULLNAME) $(MK_NOSTRIPNAME) $(MK_CLEANFILES) $(MK_CLEANDEPS) $(MK_BASENAME).map \ junk.tmp base.tmp temp.exp $(MK_RC_BINARIES) $(MK_SPECDEF) $(MK_STUBS_SRC) \ $(MK_GENERATED_MAKEFILE) $(TARGET_CLEAN)