From: Patrik Gornicz Date: Fri, 1 May 2009 22:28:23 +0000 (-0400) Subject: fixed up clean making deps files first X-Git-Tag: libbear-premerge~97 X-Git-Url: http://gitweb.pgornicz.com/?a=commitdiff_plain;h=cfe5b22f2c79d95936806e64bc2206e968c90179;p=libbear.git fixed up clean making deps files first --- 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}