Mercurial > hg > graal-jvmci-8
comparison mxtool/mx.py @ 13682:c4ff08d2aa0d
fixed problem in netbeansinit that generated invalid annotation processor paths for projects
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 17 Jan 2014 17:26:47 +0100 |
parents | fa56f5a49270 |
children | 10e6f192631f |
comparison
equal
deleted
inserted
replaced
13681:927349daa531 | 13682:c4ff08d2aa0d |
---|---|
2864 for s in suites(True): | 2864 for s in suites(True): |
2865 _eclipseinit_suite(args, s, buildProcessorJars, refreshOnly) | 2865 _eclipseinit_suite(args, s, buildProcessorJars, refreshOnly) |
2866 | 2866 |
2867 generate_eclipse_workingsets() | 2867 generate_eclipse_workingsets() |
2868 | 2868 |
2869 def _check_ide_timestamp(suite, timestamp): | 2869 def _check_ide_timestamp(suite, configZip, ide): |
2870 """return True if and only if the projects file, imports file, eclipse-settings files, and mx itself are all older than timestamp""" | 2870 """return True if and only if the projects file, imports file, eclipse-settings files, and mx itself are all older than configZip""" |
2871 projectsFile = join(suite.mxDir, 'projects') | 2871 projectsFile = join(suite.mxDir, 'projects') |
2872 if timestamp.isOlderThan(projectsFile): | 2872 if configZip.isOlderThan(projectsFile): |
2873 return False | 2873 return False |
2874 if timestamp.isOlderThan(suite.import_timestamp()): | 2874 if configZip.isOlderThan(suite.import_timestamp()): |
2875 return False | 2875 return False |
2876 # Assume that any mx change might imply changes to the generated IDE files | 2876 # Assume that any mx change might imply changes to the generated IDE files |
2877 if timestamp.isOlderThan(__file__): | 2877 if configZip.isOlderThan(__file__): |
2878 return False | 2878 return False |
2879 | 2879 |
2880 eclipseSettingsDir = join(suite.mxDir, 'eclipse-settings') | 2880 if ide == 'eclipse': |
2881 if exists(eclipseSettingsDir): | 2881 eclipseSettingsDir = join(suite.mxDir, 'eclipse-settings') |
2882 for name in os.listdir(eclipseSettingsDir): | 2882 if exists(eclipseSettingsDir): |
2883 path = join(eclipseSettingsDir, name) | 2883 for name in os.listdir(eclipseSettingsDir): |
2884 if timestamp.isOlderThan(path): | 2884 path = join(eclipseSettingsDir, name) |
2885 return False | 2885 if configZip.isOlderThan(path): |
2886 return False | |
2886 return True | 2887 return True |
2887 | 2888 |
2888 def _eclipseinit_suite(args, suite, buildProcessorJars=True, refreshOnly=False): | 2889 def _eclipseinit_suite(args, suite, buildProcessorJars=True, refreshOnly=False): |
2889 configZip = TimeStampFile(join(suite.mxDir, 'eclipse-config.zip')) | 2890 configZip = TimeStampFile(join(suite.mxDir, 'eclipse-config.zip')) |
2890 configLibsZip = join(suite.mxDir, 'eclipse-config-libs.zip') | 2891 configLibsZip = join(suite.mxDir, 'eclipse-config-libs.zip') |
2891 if refreshOnly and not configZip.exists(): | 2892 if refreshOnly and not configZip.exists(): |
2892 return | 2893 return |
2893 | 2894 |
2894 if _check_ide_timestamp(suite, configZip): | 2895 if _check_ide_timestamp(suite, configZip, 'eclipse'): |
2895 logv('[Eclipse configurations are up to date - skipping]') | 2896 logv('[Eclipse configurations are up to date - skipping]') |
2896 return | 2897 return |
2897 | 2898 |
2898 files = [] | 2899 files = [] |
2899 libFiles = [] | 2900 libFiles = [] |
3349 configZip = TimeStampFile(join(suite.mxDir, 'netbeans-config.zip')) | 3350 configZip = TimeStampFile(join(suite.mxDir, 'netbeans-config.zip')) |
3350 configLibsZip = join(suite.mxDir, 'eclipse-config-libs.zip') | 3351 configLibsZip = join(suite.mxDir, 'eclipse-config-libs.zip') |
3351 if refreshOnly and not configZip.exists(): | 3352 if refreshOnly and not configZip.exists(): |
3352 return | 3353 return |
3353 | 3354 |
3354 if _check_ide_timestamp(suite, configZip): | 3355 if _check_ide_timestamp(suite, configZip, 'netbeans'): |
3355 logv('[NetBeans configurations are up to date - skipping]') | 3356 logv('[NetBeans configurations are up to date - skipping]') |
3356 return | 3357 return |
3357 | 3358 |
3358 updated = False | 3359 updated = False |
3359 files = [] | 3360 files = [] |
3559 | 3560 |
3560 if not dep in annotationProcessorOnlyDeps: | 3561 if not dep in annotationProcessorOnlyDeps: |
3561 javacClasspath.append('${' + ref + '}') | 3562 javacClasspath.append('${' + ref + '}') |
3562 else: | 3563 else: |
3563 annotationProcessorReferences.append('${' + ref + '}') | 3564 annotationProcessorReferences.append('${' + ref + '}') |
3564 annotationProcessorReferences += ":\\\n ${" + ref + "}" | |
3565 | 3565 |
3566 print >> out, 'javac.classpath=\\\n ' + (os.pathsep + '\\\n ').join(javacClasspath) | 3566 print >> out, 'javac.classpath=\\\n ' + (os.pathsep + '\\\n ').join(javacClasspath) |
3567 print >> out, 'javac.test.processorpath=${javac.test.classpath}\\\n ' + (os.pathsep + '\\\n ').join(annotationProcessorReferences) | 3567 print >> out, 'javac.processorpath=' + (os.pathsep + '\\\n ').join(['${javac.classpath}'] + annotationProcessorReferences) |
3568 print >> out, 'javac.processorpath=${javac.classpath}\\\n ' + (os.pathsep + '\\\n ').join(annotationProcessorReferences) | 3568 print >> out, 'javac.test.processorpath=' + (os.pathsep + '\\\n ').join(['${javac.test.classpath}'] + annotationProcessorReferences) |
3569 | 3569 |
3570 updated = update_file(join(p.dir, 'nbproject', 'project.properties'), out.getvalue()) or updated | 3570 updated = update_file(join(p.dir, 'nbproject', 'project.properties'), out.getvalue()) or updated |
3571 out.close() | 3571 out.close() |
3572 files.append(join(p.dir, 'nbproject', 'project.properties')) | 3572 files.append(join(p.dir, 'nbproject', 'project.properties')) |
3573 | 3573 |