From 10d7d89a0b73e4e68bf4142d559e4a63b43b25d5 Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Thu, 17 Sep 2009 22:47:54 -0400 Subject: [PATCH] removed unnecessary clean logic due to changes with dependencies --- Makefile | 6 ++---- Makefile.d/cleanrules.mk | 4 ---- lists.mk | 1 - rules.mk | 4 ++-- targets.mk | 4 ---- 5 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index aa90914..e8caeea 100644 --- a/Makefile +++ b/Makefile @@ -29,8 +29,6 @@ include physics/${G_DIRMK} include ${G_RULESMK} -# Do not include deps files when doing a clean operation -ifeq ($(filter ${L_CLEANCMDS},${MAKECMDGOALS}),) - -include ${L_DEPS} -endif +# Do not warn or error if not found, dependencies will get created with the object files +-include ${L_DEPS} diff --git a/Makefile.d/cleanrules.mk b/Makefile.d/cleanrules.mk index a609022..fb37bd4 100644 --- a/Makefile.d/cleanrules.mk +++ b/Makefile.d/cleanrules.mk @@ -3,28 +3,24 @@ # # Requires T to be set to the desired suffix -L_CLEANCMDS += cleanbin-$T cleanbin: cleanbin-$T .PHONY: cleanbin-$T cleanbin-$T: CLEANTARGET := ${BINDIR} cleanbin-$T: ${cmd-rmrec} -L_CLEANCMDS += cleanobjs-$T cleanobjs: cleanobjs-$T .PHONY: cleanobjs-$T cleanobjs-$T: CLEANTARGET := ${OBJSDIR} cleanobjs-$T: ${cmd-rmrec} -L_CLEANCMDS += cleandeps-$T cleandeps: cleandeps-$T .PHONY: cleandeps-$T cleandeps-$T: CLEANTARGET := ${DEPSDIR} cleandeps-$T: ${cmd-rmrec} -L_CLEANCMDS += clean-$T clean: clean-$T .PHONY: clean-$T clean-$T: cleanbin-$T cleanobjs-$T cleandeps-$T diff --git a/lists.mk b/lists.mk index 15bec12..9776102 100644 --- a/lists.mk +++ b/lists.mk @@ -1,5 +1,4 @@ -L_CLEANCMDS := # empty L_DEPS := # empty L_BLDDIRS := # empty diff --git a/rules.mk b/rules.mk index b33a037..0c18b80 100644 --- a/rules.mk +++ b/rules.mk @@ -30,8 +30,8 @@ endef define cmd-cpp_to_obj_and_dep ${Q1s}${PRNTLOG} "${CXX}" "$@" ${Q1e} ${Q2s}${PRNTFMT} "${CXX}" "$@" ${Q2e} - ${Q3s}${CXX} -c $< -o $@ -MF ${@:${OBJSDIR}%.o=${DEPSDIR}%.d} ${CXXFLAGS} ${INCFLAGS} -MMD -MQ $@ ${Q3e} - ${Q4s}${CXX} -c $< -o $@ -MF ${@:${OBJSDIR}%.o=${DEPSDIR}%.d} ${CXXFLAGS} ${INCFLAGS} -MMD -MQ $@ ${Q4e} + ${Q3s}${CXX} -c $< -o $@ -MMD -MF ${@:${OBJSDIR}%.o=${DEPSDIR}%.d} ${CXXFLAGS} ${INCFLAGS} ${Q3e} + ${Q4s}${CXX} -c $< -o $@ -MMD -MF ${@:${OBJSDIR}%.o=${DEPSDIR}%.d} ${CXXFLAGS} ${INCFLAGS} ${Q4e} endef diff --git a/targets.mk b/targets.mk index 4acf1b6..0246986 100644 --- a/targets.mk +++ b/targets.mk @@ -37,19 +37,15 @@ G_DEPS_PHYSICS := deps-${G_PHYSICS} .PHONY: ${G_DEPS_PHYSICS} -L_CLEANCMDS += cleanbin .PHONY: cleanbin cleanbin: -L_CLEANCMDS += cleanobjs .PHONY: cleanobjs cleanobjs: -L_CLEANCMDS += cleandeps .PHONY: cleandeps cleandeps: -L_CLEANCMDS += clean .PHONY: clean clean: cleanbin cleanobjs cleandeps -- 2.10.2