From cfe5b22f2c79d95936806e64bc2206e968c90179 Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Fri, 1 May 2009 18:28:23 -0400 Subject: [PATCH] fixed up clean making deps files first --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b062fc2..59420c8 100644 --- a/Makefile +++ b/Makefile @@ -111,6 +111,8 @@ ${DEPSDIR}%.d: ${SRCSDIR}%.cpp | $$(dir $$@) ${Q2}${CXX} -MM ${CXXFLAGS} $< ${INCFLAGS} | \ sed 's/\(^.*\):/$(subst /,\/,${OBJSDIR}\1 $@):/' > $@ +CLEANCMDS := cleanbin cleanobjs cleandeps clean cleanall + .PHONY: cleanbin cleanbin: ${Q1}${PRNTFMT} "rm" "${WORKINGDIR}" @@ -128,9 +130,14 @@ cleandeps: .PHONY: clean clean: cleanobjs + ${Q1}${PRNTFMT} "rm" "${TARGET}" + ${Q2}rm -rf ${TARGET} .PHONY: cleanall cleanall: clean cleanbin cleandeps +# Do not include deps files when doing a _single_ clean operation +ifeq ($(findstring ${MAKECMDGOALS},${CLEANCMDS}),) + -include ${DEPS} +endif --include ${DEPS} -- 2.10.2