From: Sylvain Gault <sylvain.gault@gmail.com>

Date: Fri, 21 Feb 2014 06:03:00 +0100
Subject: [PATCH] Makefile: Don't clean what doesn't already exists

Trying to recurse into subdirectories of object files may lead to an
error if the directory doesn't exist. Even when cleaning.

Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
This commit is contained in:
Nigel Croxon 2014-03-14 13:49:41 -04:00
parent 06744d6927
commit 3cbe61fa41
1 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,11 @@ $(SUBDIRS):
clean:
rm -f *~
@for d in $(SUBDIRS); do $(MAKE) -C $$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d clean; done
@for d in $(SUBDIRS); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d clean; \
fi; \
done
install:
@for d in $(SUBDIRS); do \