From dacd7f5804aac47c117525a1091a253f9f1ff111 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 23 Mar 2018 10:59:56 +0000 Subject: Fixed a problem in the new clean rule. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11837 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/common/startup/SIMIA32/compilers/GCC/rules.mk | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'os/common/startup/SIMIA32') diff --git a/os/common/startup/SIMIA32/compilers/GCC/rules.mk b/os/common/startup/SIMIA32/compilers/GCC/rules.mk index 1dfea462e..06494762c 100644 --- a/os/common/startup/SIMIA32/compilers/GCC/rules.mk +++ b/os/common/startup/SIMIA32/compilers/GCC/rules.mk @@ -99,7 +99,7 @@ PRE_MAKE_ALL_RULE_HOOK: POST_MAKE_ALL_RULE_HOOK: -$(OBJS): | $(BUILDDIR) $(OBJDIR) $(LSTDIR) +$(OBJS): | $(BUILDDIR) $(OBJDIR) $(LSTDIR) $(DEPDIR) $(BUILDDIR): ifneq ($(USE_VERBOSE_COMPILE),yes) @@ -115,6 +115,9 @@ $(OBJDIR): $(LSTDIR): @mkdir -p $(LSTDIR) +$(DEPDIR): + @mkdir -p $(DEPDIR) + $(CPPOBJS) : $(OBJDIR)/%.o : %.cpp $(MAKEFILE_LIST) ifeq ($(USE_VERBOSE_COMPILE),yes) @echo @@ -169,8 +172,11 @@ $(BUILDDIR)/lib$(PROJECT).a: $(OBJS) clean: CLEAN_RULE_HOOK @echo Cleaning - -rm -fR $(DEPDIR)/* $(BUILDDIR)/* 2>/dev/null - -rmdir -p --ignore-fail-on-non-empty $(subst ./,,$(DEPDIR)) $(subst ./,,$(BUILDDIR)) 2>/dev/null + @echo - $(DEPDIR) + @-rm -fR $(DEPDIR)/* $(BUILDDIR)/* 2>/dev/null + @-if [ -d "$(DEPDIR)" ]; then rmdir -p --ignore-fail-on-non-empty $(subst ./,,$(DEPDIR)) 2>/dev/null; fi + @echo - $(BUILDDIR) + @-if [ -d "$(BUILDDIR)" ]; then rmdir -p --ignore-fail-on-non-empty $(subst ./,,$(BUILDDIR)) 2>/dev/null; fi @echo @echo Done @@ -183,6 +189,6 @@ gcov: # # Include the dependency files, should be the last of the makefile # --include $(shell mkdir -p $(DEPDIR) 2>/dev/null) $(wildcard $(DEPDIR)/*) +-include $(wildcard $(DEPDIR)/*) # *** EOF *** -- cgit v1.2.3