diff mx/mx_graal_makefile.py @ 21936:11f241f26c61

mx: add check to gate the jvmci.make and suite.py are in sync
author Doug Simon <doug.simon@oracle.com>
date Fri, 12 Jun 2015 01:06:36 +0200
parents 62da3906ab7f
children 3a292e8b9e51
line wrap: on
line diff
--- 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