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

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