# HG changeset patch # User Doug Simon # Date 1434063996 -7200 # Node ID 11f241f26c61ab7a4955498fd30641dd9c9f7f61 # Parent f37da0c82e780c77fd25bf1f8103befd6cbdf8fc mx: add check to gate the jvmci.make and suite.py are in sync diff -r f37da0c82e78 -r 11f241f26c61 mx/mx_graal.py --- a/mx/mx_graal.py Fri Jun 12 01:02:57 2015 +0200 +++ b/mx/mx_graal.py Fri Jun 12 01:06:36 2015 +0200 @@ -1734,6 +1734,12 @@ with Task('Pylint', tasks) as t: if t: mx.pylint([]) + with Task('Check jvmci.make in sync with suite.py', tasks) as t: + if t: + jvmciMake = join(_graal_home, 'make', 'jvmci.make') + if mx_graal_makefile.build_makefile(['-o', jvmciMake]) != 0: + t.abort('Rerun "mx makefile -o ' + jvmciMake + ' and check-in the modified ' + jvmciMake) + def _clean(name='Clean'): with Task(name, tasks) as t: if t: @@ -1761,7 +1767,7 @@ if t: mx.log(time.strftime('%d %b %Y %H:%M:%S - Ensuring mx/projects files are canonicalized...')) if mx.canonicalizeprojects([]) != 0: - t.abort('Rerun "mx canonicalizeprojects" and check-in the modified mx/projects files.') + t.abort('Rerun "mx canonicalizeprojects" and check-in the modified mx/suite*.py files.') if mx.get_env('JDT'): with Task('BuildJavaWithEcj', tasks): diff -r f37da0c82e78 -r 11f241f26c61 mx/mx_graal_makefile.py --- a/mx/mx_graal_makefile.py Fri Jun 12 01:02:57 2015 +0200 +++ b/mx/mx_graal_makefile.py Fri Jun 12 01:06:36 2015 +0200 @@ -44,7 +44,9 @@ def build_makefile(args): - """Creates a Makefile which is able to build distributions without mx""" + """Creates a Makefile which is able to build distributions without mx + + The return value indicates how many files were modified""" parser = ArgumentParser(prog='mx makefile') parser.add_argument('-o', action='store', dest='output', help='Write contents to this file.') parser.add_argument('selectedDists', help="Selected distribution names which are going to be built with make.", nargs=REMAINDER) @@ -59,9 +61,9 @@ if opts.output == None: print contents else: - with open(opts.output, "w") as f: - f.write(contents) - + if mx.update_file(opts.output, contents): + return 1 + return 0 def filter_projects(deps, t): def typeFilter(project): # filters @@ -166,7 +168,6 @@ JAVAC=$(ABS_BOOTDIR)/bin/javac -g -target """ + str(java.javaCompliance) + """ JAR=$(ABS_BOOTDIR)/bin/jar -EXPORTED_FILES_ADDITIONAL=$(TARGET)/options $(TARGET)/services HS_COMMON_SRC=. # Directories, where the generated property-files reside within the JAR files