< prev index next >

make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java

Print this page
rev 52923 : 8226346: Build better binary builders
Reviewed-by: andrew

*** 55,69 **** * * @see build.tools.module.ModuleInfoExtraTest for basic testing */ public class GenModuleInfoSource { private final static String USAGE = ! "Usage: GenModuleInfoSource -o <output file> \n" + " --source-file <module-info-java>\n" + " --modules <module-name>[,<module-name>...]\n" + " <module-info.java.extra> ...\n"; static boolean verbose = false; public static void main(String... args) throws Exception { Path outfile = null; Path moduleInfoJava = null; Set<String> modules = Collections.emptySet(); --- 55,72 ---- * * @see build.tools.module.ModuleInfoExtraTest for basic testing */ public class GenModuleInfoSource { private final static String USAGE = ! "Usage: GenModuleInfoSource \n" + ! " [-d]\n" + ! " -o <output file>\n" + " --source-file <module-info-java>\n" + " --modules <module-name>[,<module-name>...]\n" + " <module-info.java.extra> ...\n"; + static boolean debug = false; static boolean verbose = false; public static void main(String... args) throws Exception { Path outfile = null; Path moduleInfoJava = null; Set<String> modules = Collections.emptySet();
*** 71,80 **** --- 74,86 ---- // validate input arguments for (int i = 0; i < args.length; i++){ String option = args[i]; String arg = i+1 < args.length ? args[i+1] : null; switch (option) { + case "-d": + debug = true; + break; case "-o": outfile = Paths.get(arg); i++; break; case "--source-file":
*** 144,158 **** PrintWriter writer = new PrintWriter(bw)) { // write the copyright header and lines up to module declaration for (String l : lines) { writer.println(l); if (l.trim().startsWith("module ")) { // print URI rather than file path to avoid escape writer.format(" // source file: %s%n", sourceFile.toUri()); ! for (Path file: extraFiles) { writer.format(" // %s%n", file.toUri()); } break; } } // requires --- 150,166 ---- PrintWriter writer = new PrintWriter(bw)) { // write the copyright header and lines up to module declaration for (String l : lines) { writer.println(l); if (l.trim().startsWith("module ")) { + if (debug) { // print URI rather than file path to avoid escape writer.format(" // source file: %s%n", sourceFile.toUri()); ! for (Path file : extraFiles) { writer.format(" // %s%n", file.toUri()); } + } break; } } // requires
< prev index next >