Mercurial > hg > graal-compiler
comparison mxtool/mx.py @ 12524:2583afcd26ee
fixed bug in creation of CreateGRAALDist.launch files
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 23 Oct 2013 10:29:53 +0200 |
parents | 5ccee20550ea |
children | 9af82ca3f225 |
comparison
equal
deleted
inserted
replaced
12523:fe02f4113a69 | 12524:2583afcd26ee |
---|---|
2482 class TimeStampFile: | 2482 class TimeStampFile: |
2483 def __init__(self, path): | 2483 def __init__(self, path): |
2484 self.path = path | 2484 self.path = path |
2485 self.timestamp = os.path.getmtime(path) if exists(path) else None | 2485 self.timestamp = os.path.getmtime(path) if exists(path) else None |
2486 | 2486 |
2487 def outOfDate(self, arg): | 2487 def isOlderThan(self, arg): |
2488 if not self.timestamp: | 2488 if not self.timestamp: |
2489 return True | 2489 return True |
2490 if isinstance(arg, types.ListType): | 2490 if isinstance(arg, types.ListType): |
2491 files = arg | 2491 files = arg |
2492 else: | 2492 else: |
2542 continue | 2542 continue |
2543 | 2543 |
2544 timestamp = TimeStampFile(join(p.suite.mxDir, 'checkstyle-timestamps', sourceDir[len(p.suite.dir) + 1:].replace(os.sep, '_') + '.timestamp')) | 2544 timestamp = TimeStampFile(join(p.suite.mxDir, 'checkstyle-timestamps', sourceDir[len(p.suite.dir) + 1:].replace(os.sep, '_') + '.timestamp')) |
2545 mustCheck = False | 2545 mustCheck = False |
2546 if not args.force and timestamp.exists(): | 2546 if not args.force and timestamp.exists(): |
2547 mustCheck = timestamp.outOfDate(javafilelist) | 2547 mustCheck = timestamp.isOlderThan(javafilelist) |
2548 else: | 2548 else: |
2549 mustCheck = True | 2549 mustCheck = True |
2550 | 2550 |
2551 if not mustCheck: | 2551 if not mustCheck: |
2552 if _opts.verbose: | 2552 if _opts.verbose: |
2853 projectsFile = join(suite.mxDir, 'projects') | 2853 projectsFile = join(suite.mxDir, 'projects') |
2854 timestamp = TimeStampFile(join(suite.mxDir, 'eclipseinit.timestamp')) | 2854 timestamp = TimeStampFile(join(suite.mxDir, 'eclipseinit.timestamp')) |
2855 if refreshOnly and not timestamp.exists(): | 2855 if refreshOnly and not timestamp.exists(): |
2856 return | 2856 return |
2857 | 2857 |
2858 if not timestamp.outOfDate(projectsFile): | 2858 if not timestamp.isOlderThan(projectsFile) and not TimeStampFile(projectsFile).isOlderThan(__file__): |
2859 logv('[Eclipse configurations are up to date - skipping]') | 2859 logv('[Eclipse configurations are up to date - skipping]') |
2860 return | 2860 return |
2861 | 2861 |
2862 if buildProcessorJars: | 2862 if buildProcessorJars: |
2863 # todo suite specific | 2863 # todo suite specific |
3067 launchOut.element('stringAttribute', {'key' : 'org.eclipse.debug.core.ATTR_REFRESH_SCOPE', 'value': '${project}'}) | 3067 launchOut.element('stringAttribute', {'key' : 'org.eclipse.debug.core.ATTR_REFRESH_SCOPE', 'value': '${project}'}) |
3068 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON', 'value': consoleOn}) | 3068 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON', 'value': consoleOn}) |
3069 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND', 'value': 'true' if async else 'false'}) | 3069 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND', 'value': 'true' if async else 'false'}) |
3070 if logToFile: | 3070 if logToFile: |
3071 logFile = join(externalToolDir, name + '.log') | 3071 logFile = join(externalToolDir, name + '.log') |
3072 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE', 'value': logFile}) | 3072 launchOut.element('stringAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE', 'value': logFile}) |
3073 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_APPEND_TO_FILE', 'value': 'true' if appendToLogFile else 'false'}) | 3073 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_APPEND_TO_FILE', 'value': 'true' if appendToLogFile else 'false'}) |
3074 | 3074 |
3075 # expect to find the OS command to invoke mx in the same directory | 3075 # expect to find the OS command to invoke mx in the same directory |
3076 baseDir = dirname(os.path.abspath(__file__)) | 3076 baseDir = dirname(os.path.abspath(__file__)) |
3077 | 3077 |
3263 projectsFile = join(suite.mxDir, 'projects') | 3263 projectsFile = join(suite.mxDir, 'projects') |
3264 timestamp = TimeStampFile(join(suite.mxDir, 'netbeansinit.timestamp')) | 3264 timestamp = TimeStampFile(join(suite.mxDir, 'netbeansinit.timestamp')) |
3265 if refreshOnly and not timestamp.exists(): | 3265 if refreshOnly and not timestamp.exists(): |
3266 return | 3266 return |
3267 | 3267 |
3268 if not timestamp.outOfDate(projectsFile): | 3268 if not timestamp.isOlderThan(projectsFile) and not TimeStampFile(projectsFile).isOlderThan(__file__): |
3269 logv('[NetBeans configurations are up to date - skipping]') | 3269 logv('[NetBeans configurations are up to date - skipping]') |
3270 return | 3270 return |
3271 | 3271 |
3272 updated = False | 3272 updated = False |
3273 for p in suite.projects: | 3273 for p in suite.projects: |