From 0d47875498a39568a9e7b4260b2a38e082646bbc Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 14 Jan 2010 15:09:39 +0100
Subject: [PATCH] Makefile: Switch from subshell to $(MAKE) -C

It seems that set -e does not affect subshell (only simple commands),
and thus we don't actually get failures from make check being run in a
subshell. Rather than trying to handle this better, we remove the
subshell and invoke make with the required subdirectory.
---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f50150ac6..044bd5fee 100644
--- a/Makefile
+++ b/Makefile
@@ -73,7 +73,9 @@ dist: regen-version Ganeti/HTools/Version.hs doc
 	gzip -v9 $$ANAME ; \
 	TMPDIR=$$(mktemp -d) ; \
 	tar xzf $$ANAME.gz -C $$TMPDIR; \
-	(cd $$TMPDIR/$$PFX; make; make clean; make check); \
+	$(MAKE) -C $$TMPDIR/$$PFX; \
+	$(MAKE) -C $$TMPDIR/$$PFX clean; \
+	$(MAKE) -C $$TMPDIR/$$PFX check; \
 	rm -rf $$TMPDIR ; \
 	tar tzvf $$ANAME.gz ; \
 	sha1sum $$ANAME.gz ; \
-- 
GitLab