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

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