+ "'; please run Precompile first");
return false;
}
List<Permutation> permsList = new ArrayList<Permutation>();
ArtifactSet generatedArtifacts = new ArtifactSet();
JJSOptions precompileOptions = null;
for (PrecompilationFile precompilationFile : precomps) {
Precompilation precompilation;
try {
precompilation = precompilationFile.newInstance(logger);
} catch (UnableToCompleteException e) {
return false;
}
permsList.addAll(Arrays.asList(precompilation.getPermutations()));
generatedArtifacts.addAll(precompilation.getGeneratedArtifacts());
precompileOptions = precompilation.getUnifiedAst().getOptions();
}
Permutation[] perms = permsList.toArray(new Permutation[permsList.size()]);
List<FileBackedObject<PermutationResult>> resultFiles = new ArrayList<FileBackedObject<PermutationResult>>(
perms.length);
for (int i = 0; i < perms.length; ++i) {
File f = CompilePerms.makePermFilename(compilerWorkDir,
perms[i].getId());
if (!f.exists()) {
logger.log(TreeLogger.ERROR, "File not found '" + f.getAbsolutePath()
+ "'; please compile all permutations");
return false;
}
resultFiles.add(new FileBackedObject<PermutationResult>(
PermutationResult.class, f));
}
TreeLogger branch = logger.branch(TreeLogger.INFO, "Linking module "
+ module.getName());
StandardLinkerContext linkerContext = new StandardLinkerContext(branch,
module, precompileOptions);
ArtifactSet artifacts = doLink(branch, linkerContext, generatedArtifacts,
perms, resultFiles);
if (options.getOutDir() == null) {
doProduceOutput(branch, artifacts, linkerContext, module,
options.getWarDir(), options.getExtraDir());