From acaf3ca72eb6b6e5961432a19c119d73c3b7f155 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Sat, 22 Dec 2012 17:52:15 +0100
Subject: [PATCH] Fix building of Constants.hs w.r.t .pyc files

Unless this is run under run-in-tempdir, it will create as usual the
.pyc files.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 Makefile.am | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4d9696482..16f14f6c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1260,11 +1260,13 @@ htools/Ganeti/Version.hs: htools/Ganeti/Version.hs.in \
 
 htools/Ganeti/Constants.hs: htools/Ganeti/Constants.hs.in \
 	lib/constants.py lib/_autoconf.py lib/luxi.py lib/errors.py \
-	lib/jstore.py \
+	lib/jstore.py $(RUN_IN_TEMPDIR)\
 	$(CONVERT_CONSTANTS) $(built_base_sources) \
 	| lib/_vcsversion.py
 	set -e; \
-	{ cat $< ; PYTHONPATH=. $(CONVERT_CONSTANTS); } > $@
+	{ cat $< ; \
+	  PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CONVERT_CONSTANTS); \
+	} > $@
 
 htest/Test/Ganeti/TestImports.hs: htest/Test/Ganeti/TestImports.hs.in \
 	$(built_base_sources)
-- 
GitLab