瀏覽代碼

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>

Nigel Croxon 11 年之前
父節點
當前提交
3cbe61fa41
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      gnu-efi-3.0/Makefile

+ 5 - 1
gnu-efi-3.0/Makefile

@@ -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 \