Blame SOURCES/0017-Makefile-do-not-run-git-on-clean-if-there-s-no-.git-.patch

00e791
From 8544018093b8aa4311b1e970f8396140c22ede0b Mon Sep 17 00:00:00 2001
00e791
From: Luca Boccassi <bluca@debian.org>
00e791
Date: Mon, 14 Jan 2019 19:29:34 +0000
00e791
Subject: [PATCH 17/62] Makefile: do not run git on clean if there's no .git
00e791
 directory
00e791
00e791
When building in minimal chroot on build workers, like in Debian (where
00e791
make clean is called at the beginning of the build process), git will
00e791
not be available. Skip the git clean.
00e791
00e791
Signed-off-by: Luca Boccassi <bluca@debian.org>
00e791
Upstream-commit-id: be352762a01
00e791
---
00e791
 Makefile | 2 +-
00e791
 1 file changed, 1 insertion(+), 1 deletion(-)
00e791
00e791
diff --git a/Makefile b/Makefile
00e791
index 3f2105595a6..fd7e83dc764 100644
00e791
--- a/Makefile
00e791
+++ b/Makefile
00e791
@@ -225,7 +225,7 @@ clean-shim-objs:
00e791
 	@rm -rvf $(TARGET) *.o $(SHIM_OBJS) $(MOK_OBJS) $(FALLBACK_OBJS) $(KEYS) certdb $(BOOTCSVNAME)
00e791
 	@rm -vf *.debug *.so *.efi *.efi.* *.tar.* version.c buildid
00e791
 	@rm -vf Cryptlib/*.[oa] Cryptlib/*/*.[oa]
00e791
-	@git clean -f -d -e 'Cryptlib/OpenSSL/*'
00e791
+	@if [ -d .git ] ; then git clean -f -d -e 'Cryptlib/OpenSSL/*'; fi
00e791
 
00e791
 clean: clean-shim-objs
00e791
 	$(MAKE) -C Cryptlib -f $(TOPDIR)/Cryptlib/Makefile clean
00e791
-- 
00e791
2.26.2
00e791