[FeatureRequest] Allow building in non-HG repositories.
Stefan Marr
java at stefan-marr.de
Fri Mar 21 16:21:25 UTC 2014
Hi:
For a while, I have the work-around below in my copy of the Graal repository to enable building in a git-based environment.
Would it be possible to integrate something along those lines?
I guess, currently it is also not possible to build graal without errors from a simple source tarball.
For me, upstreaming this would make it easier to test against the latest version of Graal.
Thanks
Stefan
diff --git a/mx/mx_graal.py b/mx/mx_graal.py
index fb258fc..73cccfd 100644
--- a/mx/mx_graal.py
+++ b/mx/mx_graal.py
@@ -647,7 +647,11 @@ def build(args, vm=None):
env.setdefault('ALT_BOOTDIR', mx.java().jdk)
# extract latest release tag for graal
- tags = [x.split(' ')[0] for x in subprocess.check_output(['hg', 'tags']).split('\n') if x.startswith("graal-")]
+ try:
+ tags = [x.split(' ')[0] for x in subprocess.check_output(['hg', 'tags']).split('\n') if x.startswith("graal-")]
+ except (subprocess.CalledProcessError, OSError):
+ with open('.hgtags') as f:
+ tags = [x.split(' ')[0] for x in f.readlines() if x.startswith("graal-")]
if tags:
# extract the most recent tag
tag = sorted(tags, key=lambda e: [int(x) for x in e[len(“graal-"):].split('.')], reverse=True)[0]
--
Stefan Marr
INRIA Lille - Nord Europe
http://stefan-marr.de/research/
More information about the graal-dev
mailing list