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

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