Mercurial > hg > graal-compiler
comparison mxtool/mx.py @ 12662:c6cc96cc6a1f
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 04 Nov 2013 12:20:17 +0100 |
parents | 0497d6702cff 1fbe3ca3d30d |
children | ec224fef3012 |
comparison
equal
deleted
inserted
replaced
12661:0497d6702cff | 12662:c6cc96cc6a1f |
---|---|
326 return self._annotationProcessors | 326 return self._annotationProcessors |
327 | 327 |
328 def update_current_annotation_processors_file(self): | 328 def update_current_annotation_processors_file(self): |
329 aps = self.annotation_processors() | 329 aps = self.annotation_processors() |
330 outOfDate = False | 330 outOfDate = False |
331 currentApsFile = join(self.dir, '.currentAnnotationProcessors') | 331 currentApsFile = join(self.suite.mxDir, 'currentAnnotationProcessors', self.name) |
332 if exists(currentApsFile): | 332 currentApsFileExists = exists(currentApsFile) |
333 if currentApsFileExists: | |
333 with open(currentApsFile) as fp: | 334 with open(currentApsFile) as fp: |
334 currentAps = [l.strip() for l in fp.readlines()] | 335 currentAps = [l.strip() for l in fp.readlines()] |
335 if currentAps != aps: | 336 if currentAps != aps: |
336 outOfDate = True | 337 outOfDate = True |
337 else: | 338 if outOfDate or not currentApsFileExists: |
338 outOfDate = True | 339 if not exists(dirname(currentApsFile)): |
339 if outOfDate: | 340 os.mkdir(dirname(currentApsFile)) |
340 with open(currentApsFile, 'w') as fp: | 341 with open(currentApsFile, 'w') as fp: |
341 for ap in aps: | 342 for ap in aps: |
342 print >> fp, ap | 343 print >> fp, ap |
343 return outOfDate | 344 return outOfDate |
344 | 345 |
784 | 785 |
785 if self.name is None: | 786 if self.name is None: |
786 abort('Missing "suite=<name>" in ' + projectsFile) | 787 abort('Missing "suite=<name>" in ' + projectsFile) |
787 | 788 |
788 def _commands_name(self): | 789 def _commands_name(self): |
789 return 'mx_' + self.name.replace('-','_') | 790 return 'mx_' + self.name.replace('-', '_') |
790 | 791 |
791 def _find_commands(self, name): | 792 def _find_commands(self, name): |
792 commandsPath = join(self.mxDir, name + '.py') | 793 commandsPath = join(self.mxDir, name + '.py') |
793 if exists(commandsPath): | 794 if exists(commandsPath): |
794 return name | 795 return name |
1986 if len(javafilelist) == 0: | 1987 if len(javafilelist) == 0: |
1987 logv('[no Java sources for {0} - skipping]'.format(p.name)) | 1988 logv('[no Java sources for {0} - skipping]'.format(p.name)) |
1988 continue | 1989 continue |
1989 | 1990 |
1990 # Ensure that the output directories are clean | 1991 # Ensure that the output directories are clean |
1991 #prepareOutputDirs(p, True) | 1992 # prepareOutputDirs(p, True) |
1992 | 1993 |
1993 built.add(p.name) | 1994 built.add(p.name) |
1994 | 1995 |
1995 argfileName = join(p.dir, 'javafilelist.txt') | 1996 argfileName = join(p.dir, 'javafilelist.txt') |
1996 argfile = open(argfileName, 'wb') | 1997 argfile = open(argfileName, 'wb') |