Mercurial > hg > graal-jvmci-8
comparison mxtool/mx.py @ 12641:851aa5341214
moved persistent annotation processor dependency files into mx/currentAnnotationProcessors directory
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 30 Oct 2013 15:29:42 +0100 |
parents | 6860d5528902 |
children | 1fbe3ca3d30d |
comparison
equal
deleted
inserted
replaced
12640:6860d5528902 | 12641:851aa5341214 |
---|---|
327 return self._annotationProcessors | 327 return self._annotationProcessors |
328 | 328 |
329 def update_current_annotation_processors_file(self): | 329 def update_current_annotation_processors_file(self): |
330 aps = self.annotation_processors() | 330 aps = self.annotation_processors() |
331 outOfDate = False | 331 outOfDate = False |
332 currentApsFile = join(self.dir, '.currentAnnotationProcessors') | 332 currentApsFile = join(self.suite.mxDir, 'currentAnnotationProcessors', self.name) |
333 if exists(currentApsFile): | 333 if exists(currentApsFile): |
334 with open(currentApsFile) as fp: | 334 with open(currentApsFile) as fp: |
335 currentAps = [l.strip() for l in fp.readlines()] | 335 currentAps = [l.strip() for l in fp.readlines()] |
336 if currentAps != aps: | 336 if currentAps != aps: |
337 outOfDate = True | 337 outOfDate = True |
338 else: | 338 else: |
339 outOfDate = True | 339 outOfDate = True |
340 if outOfDate: | 340 if outOfDate: |
341 if not exists(dirname(currentApsFile)): | |
342 os.mkdir(dirname(currentApsFile)) | |
341 with open(currentApsFile, 'w') as fp: | 343 with open(currentApsFile, 'w') as fp: |
342 for ap in aps: | 344 for ap in aps: |
343 print >> fp, ap | 345 print >> fp, ap |
344 return outOfDate | 346 return outOfDate |
345 | 347 |
785 | 787 |
786 if self.name is None: | 788 if self.name is None: |
787 abort('Missing "suite=<name>" in ' + projectsFile) | 789 abort('Missing "suite=<name>" in ' + projectsFile) |
788 | 790 |
789 def _commands_name(self): | 791 def _commands_name(self): |
790 return 'mx_' + self.name.replace('-','_') | 792 return 'mx_' + self.name.replace('-', '_') |
791 | 793 |
792 def _find_commands(self, name): | 794 def _find_commands(self, name): |
793 commandsPath = join(self.mxDir, name + '.py') | 795 commandsPath = join(self.mxDir, name + '.py') |
794 if exists(commandsPath): | 796 if exists(commandsPath): |
795 return name | 797 return name |
1987 if len(javafilelist) == 0: | 1989 if len(javafilelist) == 0: |
1988 logv('[no Java sources for {0} - skipping]'.format(p.name)) | 1990 logv('[no Java sources for {0} - skipping]'.format(p.name)) |
1989 continue | 1991 continue |
1990 | 1992 |
1991 # Ensure that the output directories are clean | 1993 # Ensure that the output directories are clean |
1992 #prepareOutputDirs(p, True) | 1994 # prepareOutputDirs(p, True) |
1993 | 1995 |
1994 built.add(p.name) | 1996 built.add(p.name) |
1995 | 1997 |
1996 argfileName = join(p.dir, 'javafilelist.txt') | 1998 argfileName = join(p.dir, 'javafilelist.txt') |
1997 argfile = open(argfileName, 'wb') | 1999 argfile = open(argfileName, 'wb') |