]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Java/Source/ContextTool/org/tianocore/context/TargetFile.java
Change IPF_PE32_PEIM IPF layout to contain ${PLATFORM_DIR}/Blank.pad for XIP IPF...
[mirror_edk2.git] / Tools / Java / Source / ContextTool / org / tianocore / context / TargetFile.java
CommitLineData
987912ad 1/** @file\r
2 File is TargetFile class which is used to generate the new target.txt. \r
3 \r
4Copyright (c) 2006, Intel Corporation\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12**/\r
c74c7a43 13package org.tianocore.context;\r
14\r
15import java.io.BufferedReader;\r
16import java.io.BufferedWriter;\r
17import java.io.File;\r
18import java.io.FileNotFoundException;\r
19import java.io.FileOutputStream;\r
20import java.io.FileReader;\r
21import java.io.FileWriter;\r
22import java.io.IOException;\r
23import java.nio.ByteBuffer;\r
24import java.nio.channels.FileChannel;\r
25\r
26public class TargetFile {\r
27\r
28 /** \r
29 * check the validity of path and file\r
30 * @param String filename : the name of target file\r
31 * @return true or false\r
32 **/\r
f337986f 33 public static boolean setFile(String filename) {\r
c74c7a43 34\r
35 String workspacePath = System.getenv("WORKSPACE");\r
36 \r
37 Fd = new File(workspacePath + File.separator + "Tools" + File.separator + "Conf" + File.separator + filename);\r
38\r
39 if (Fd.exists() == true) {\r
40 if (createTempFile(filename + "tmp") == false) {\r
41 return false;\r
42 }\r
43 if (readwriteFile() == false) {\r
44 return false;\r
45 }\r
46 return true;\r
47 } else {\r
48 try {\r
49 Fd.createNewFile();\r
50 } catch (IOException e) {\r
51 System.out.printf("%n%s", "Create the file:target.txt failed!");\r
52 return false;\r
53 }\r
54 }\r
55 TargetFile.writeFile(Fd);\r
56 return true;\r
57 }\r
f337986f 58 \r
59 \r
60 /** \r
61 * validate the filename\r
62 * @param String filename : the name of target file\r
63 * \r
64 * @return true or false\r
65 **/\r
66 public static boolean validateFilename(String filename) {\r
67 \r
68 String workspacePath = System.getenv("WORKSPACE");\r
69 \r
70 Fd = new File(workspacePath + File.separator + "Tools" + File.separator + "Conf" + File.separator + filename);\r
71 \r
72 if (Fd.exists() == true && Fd.canRead() == true)\r
73 return true;\r
74 else\r
75 return false;\r
76 }\r
77 \r
c74c7a43 78\r
79 /**\r
80 * create a empty temp file, which is located at the same directory with target file\r
81 * @param String filename : the name of target temp file\r
82 * @return true or false\r
83 **/\r
f337986f 84 public static boolean createTempFile(String filename) {\r
c74c7a43 85\r
86 String workspacePath = System.getenv("WORKSPACE");\r
87 \r
f337986f 88 TempFd = new File(workspacePath + File.separator + "Tools" + File.separator + "Conf" + File.separator + filename + "tmp");\r
c74c7a43 89\r
90 if (TempFd.exists() == true) {\r
91 if (TempFd.delete() == false) {\r
92 System.out.println("\n# delete file failed !");\r
93 return false;\r
94 }\r
95 }\r
96 try {\r
97 TempFd.createNewFile();\r
98 } catch (IOException e) {\r
99 System.out.printf("%n%s",\r
100 "Create the temp file:target.txttmp failed!");\r
101 return false;\r
102 }\r
103\r
104 return true;\r
105 }\r
106\r
107 /**\r
108 * read from target.txt and write to target.txttmp, del target.txt, rename\r
109 * @param no paremeter\r
110 * @return true or false\r
111 **/\r
f337986f 112 public static boolean readwriteFile() {\r
c74c7a43 113\r
114 if (Fd.canRead() != true)\r
115 return false;\r
116\r
117 BufferedReader br = null;\r
118 BufferedWriter bw = null;\r
119 String textLine = null;\r
120\r
121 try {\r
122 br = new BufferedReader(new FileReader(Fd));\r
123 } catch (FileNotFoundException e) {\r
124 System.out\r
125 .println("\n# create the BufferedReader failed, because can't find the file:target.txt!");\r
126 return false;\r
127 }\r
128 try {\r
129 bw = new BufferedWriter(new FileWriter(TempFd));\r
130 } catch (IOException e) {\r
131 System.out.println("\n# create the BufferedWriter failed!");\r
132 return false;\r
133 }\r
134 \r
135 //\r
136 //TARGET_ARCH must be in front of TARGET!!! according to the target.txt\r
137 //\r
138 try {\r
139 while ((textLine = br.readLine()) != null) {\r
2c71f6e5 140 //\r
141 // the line is composed of Space\r
142 //\r
c74c7a43 143 if (textLine.trim().compareToIgnoreCase("") == 0) {\r
144 bw.write(textLine);\r
145 bw.newLine();\r
2c71f6e5 146 } \r
147 //\r
148 // the line starts with "#", and no "="\r
149 //\r
150 else if ((textLine.trim().charAt(0) == '#') && (textLine.indexOf("=") == -1)){\r
c74c7a43 151 bw.write(textLine);\r
152 bw.newLine();\r
153 } else {\r
2c71f6e5 154 //\r
d3f45848 155 //modify at the first time, and there should be "*ACTIVE_PLATFORM*=*" in the line\r
2c71f6e5 156 //\r
c74c7a43 157 if (textLine.indexOf("ACTIVE_PLATFORM") != -1) {\r
2c71f6e5 158 if(pflag == true){\r
159 if(textLine.trim().charAt(0) == '#'){\r
f15e1359 160 if(ParseParameter.npflag == true) {\r
f337986f 161 bw.write(ParseParameter.curpstr);\r
f15e1359 162 }else{\r
163 bw.write(textLine);\r
2c71f6e5 164 }\r
f15e1359 165 bw.newLine();\r
166 pflag = false;\r
2c71f6e5 167 continue;\r
168 }\r
f15e1359 169 if(ParseParameter.npflag == true) {\r
f337986f 170 bw.write(ParseParameter.curpstr);\r
2c71f6e5 171 } else {\r
172 bw.write(textLine);\r
173 }\r
174 bw.newLine();\r
175 pflag = false;\r
c74c7a43 176 }\r
c74c7a43 177 } else if (textLine.indexOf("TARGET_ARCH") != -1) {\r
2c71f6e5 178 if(aflag == true){\r
179 if(textLine.trim().charAt(0) == '#'){\r
f15e1359 180 if(ParseParameter.naflag == true) {\r
f337986f 181 bw.write(ParseParameter.curastr);\r
f15e1359 182 }else{\r
183 bw.write(textLine);\r
2c71f6e5 184 }\r
f15e1359 185 bw.newLine();\r
186 aflag = false;\r
2c71f6e5 187 continue;\r
188 }\r
f15e1359 189 if(ParseParameter.naflag == true) {\r
f337986f 190 bw.write(ParseParameter.curastr);\r
2c71f6e5 191 } else {\r
192 bw.write(textLine);\r
193 }\r
194 bw.newLine();\r
195 aflag = false;\r
c74c7a43 196 }\r
c74c7a43 197 } else if (textLine.indexOf("TARGET") != -1) {\r
2c71f6e5 198 if(tflag == true){\r
199 if(textLine.trim().charAt(0) == '#'){\r
f15e1359 200 if(ParseParameter.ntflag == true) {\r
f337986f 201 bw.write(ParseParameter.curtstr);\r
f15e1359 202 }else{\r
203 bw.write(textLine);\r
2c71f6e5 204 }\r
f15e1359 205 bw.newLine();\r
206 tflag = false;\r
2c71f6e5 207 continue;\r
208 }\r
f15e1359 209 if(ParseParameter.ntflag == true) {\r
f337986f 210 bw.write(ParseParameter.curtstr);\r
2c71f6e5 211 } else {\r
212 bw.write(textLine);\r
213 }\r
214 bw.newLine();\r
215 tflag = false;\r
c74c7a43 216 }\r
c74c7a43 217 } else if (textLine.indexOf("TOOL_CHAIN_CONF") != -1) {\r
2c71f6e5 218 if(cflag == true){\r
219 if(textLine.trim().charAt(0) == '#'){\r
f15e1359 220 if(ParseParameter.ncflag == true) {\r
f337986f 221 bw.write(ParseParameter.curcstr);\r
f15e1359 222 }else{\r
223 bw.write(textLine);\r
2c71f6e5 224 }\r
f15e1359 225 bw.newLine();\r
226 cflag = false;\r
2c71f6e5 227 continue;\r
228 }\r
f15e1359 229 if(ParseParameter.ncflag == true) {\r
f337986f 230 bw.write(ParseParameter.curcstr);\r
2c71f6e5 231 } else {\r
232 bw.write(textLine);\r
233 }\r
234 bw.newLine();\r
235 cflag = false;\r
c74c7a43 236 }\r
c74c7a43 237 } else if (textLine.indexOf("TOOL_CHAIN_TAG") != -1) {\r
2c71f6e5 238 if(nflag == true){\r
239 if(textLine.trim().charAt(0) == '#'){\r
f15e1359 240 if(ParseParameter.nnflag == true) {\r
f337986f 241 bw.write(ParseParameter.curnstr);\r
f15e1359 242 }else{\r
243 bw.write(textLine);\r
2c71f6e5 244 }\r
f15e1359 245 bw.newLine();\r
246 nflag = false;\r
2c71f6e5 247 continue;\r
248 }\r
f15e1359 249 if(ParseParameter.nnflag == true) {\r
f337986f 250 bw.write(ParseParameter.curnstr);\r
2c71f6e5 251 } else {\r
252 bw.write(textLine);\r
253 }\r
254 bw.newLine();\r
255 nflag = false;\r
256 }\r
257 } else if (textLine.indexOf("MAX_CONCURRENT_THREAD_NUMBER") != -1) {\r
258 if(mflag == true){\r
259 if(textLine.trim().charAt(0) == '#'){\r
f15e1359 260 if(ParseParameter.nmflag == true) {\r
f337986f 261 bw.write(ParseParameter.curmstr);\r
f15e1359 262 }else{\r
263 bw.write(textLine);\r
2c71f6e5 264 }\r
f15e1359 265 bw.newLine();\r
266 mflag = false;\r
2c71f6e5 267 continue;\r
268 }\r
f15e1359 269 if(ParseParameter.nmflag == true) {\r
f337986f 270 bw.write(ParseParameter.curmstr);\r
2c71f6e5 271 } else {\r
272 bw.write(textLine);\r
273 }\r
274 bw.newLine();\r
275 mflag = false;\r
276 }\r
277 }else if (textLine.indexOf("MULTIPLE_THREAD") != -1) {\r
278 if(meflag == true){\r
279 if(textLine.trim().charAt(0) == '#'){\r
f15e1359 280 if(ParseParameter.nmeflag == true) {\r
f337986f 281 bw.write(ParseParameter.curmestr);\r
f15e1359 282 }else{\r
283 bw.write(textLine);\r
2c71f6e5 284 }\r
f15e1359 285 bw.newLine();\r
286 meflag = false;\r
2c71f6e5 287 continue;\r
288 }\r
f15e1359 289 if(ParseParameter.nmeflag == true) {\r
f337986f 290 bw.write(ParseParameter.curmestr);\r
2c71f6e5 291 } else {\r
292 bw.write(textLine);\r
293 }\r
294 bw.newLine();\r
295 meflag = false;\r
c74c7a43 296 }\r
c74c7a43 297 }\r
298 }\r
299 }\r
2c71f6e5 300 //\r
301 //user maybe delete the line *ACTIVE_PLATFORM*=*\r
302 //\r
f15e1359 303 if( (pflag == true) && (ParseParameter.npflag == true) ){\r
f337986f 304 bw.write(ParseParameter.curpstr);\r
2c71f6e5 305 bw.newLine();\r
f15e1359 306 } else if ( (tflag == true) && (ParseParameter.ntflag == true) ){\r
f337986f 307 bw.write(ParseParameter.curtstr);\r
2c71f6e5 308 bw.newLine();\r
f15e1359 309 } else if ( (aflag == true) && (ParseParameter.naflag == true) ){\r
f337986f 310 bw.write(ParseParameter.curastr);\r
2c71f6e5 311 bw.newLine();\r
f15e1359 312 } else if ( (cflag == true) && (ParseParameter.ncflag == true) ){\r
f337986f 313 bw.write(ParseParameter.curcstr);\r
2c71f6e5 314 bw.newLine();\r
f15e1359 315 } else if ( (nflag == true) && (ParseParameter.nnflag == true) ){\r
f337986f 316 bw.write(ParseParameter.curnstr);\r
2c71f6e5 317 bw.newLine();\r
f15e1359 318 } else if ( (meflag == true) && (ParseParameter.nmeflag == true) ){\r
f337986f 319 bw.write(ParseParameter.curmestr);\r
2c71f6e5 320 bw.newLine();\r
f15e1359 321 } else if ( (mflag == true) && (ParseParameter.nmflag == true) ){\r
f337986f 322 bw.write(ParseParameter.curmstr);\r
2c71f6e5 323 bw.newLine();\r
324 }\r
c74c7a43 325 } catch (IOException e) {\r
326 System.out.println("\n# read or write file error!");\r
327 return false;\r
328 }\r
329\r
330 try {\r
331 br.close();\r
332 bw.close();\r
333 } catch (IOException e) {\r
334 System.out\r
335 .println("\n# close BufferedReader&BufferedWriter error");\r
336 return false;\r
337 }\r
338\r
339 if (Fd.delete() == false) {\r
340 System.out.println("\n# delete file failed !");\r
341 return false;\r
342 }\r
343 if (TempFd.renameTo(Fd) == false) {\r
344 System.out.println("\n# rename file failed !");\r
345 return false;\r
346 }\r
347\r
348 return true;\r
349 }\r
f337986f 350 \r
351 /**\r
352 * read the file and output the lines which include setting\r
353 * @param File fd : the File of the target file\r
354 * @return String: the current setting\r
355 **/\r
356 public static boolean readFile() {\r
357 \r
358 BufferedReader br = null;\r
359 String textLine = null;\r
360\r
361 try {\r
362 br = new BufferedReader(new FileReader(Fd));\r
363 } catch (FileNotFoundException e) {\r
364 System.out\r
365 .println("\n# create the BufferedReader failed, because can't find the file:target.txt!");\r
366 return false;\r
367 }\r
368 try {\r
369 while ((textLine = br.readLine()) != null) {\r
370 //\r
371 // the line is composed of Space\r
372 //\r
373 if (textLine.trim().compareToIgnoreCase("") == 0) {\r
374 continue;\r
375 } \r
376 //\r
377 // the line starts with "#"\r
378 //\r
379 else if ((textLine.trim().charAt(0) == '#')){\r
380 continue;\r
381 } else {\r
382 if (textLine.indexOf("ACTIVE_PLATFORM") != -1) {\r
383 ParseParameter.curpstr = textLine;\r
384 ParseParameter.plength = textLine.indexOf('=');\r
385 } else if (textLine.indexOf("TARGET_ARCH") != -1) {\r
386 ParseParameter.curastr = textLine;\r
387 ParseParameter.alength = textLine.indexOf('=');\r
388 } else if (textLine.indexOf("TARGET") != -1) {\r
389 ParseParameter.curtstr = textLine;\r
390 ParseParameter.tlength = textLine.indexOf('=');\r
391 } else if (textLine.indexOf("TOOL_CHAIN_CONF") != -1) {\r
392 ParseParameter.curcstr = textLine;\r
393 ParseParameter.clength = textLine.indexOf('=');\r
394 } else if (textLine.indexOf("TOOL_CHAIN_TAG") != -1) {\r
395 ParseParameter.curnstr = textLine;\r
396 ParseParameter.nlength = textLine.indexOf('=');\r
397 } else if (textLine.indexOf("MAX_CONCURRENT_THREAD_NUMBER") != -1) {\r
398 ParseParameter.curmstr = textLine;\r
399 ParseParameter.mlength = textLine.indexOf('=');\r
400 } else if (textLine.indexOf("MULTIPLE_THREAD") != -1) {\r
401 ParseParameter.curmestr = textLine;\r
402 ParseParameter.melength = textLine.indexOf('=');\r
403 }\r
404 }\r
405 }\r
406 } catch (IOException e) {\r
407 System.out.println("\n# read file error!");\r
408 return false;\r
409 }\r
410\r
411 try {\r
412 br.close();\r
413 } catch (IOException e) {\r
414 System.out\r
415 .println("\n# close BufferedReader error");\r
416 return false;\r
417 }\r
418 return true;\r
419 }\r
420 \r
c74c7a43 421\r
422 /**\r
423 * according to user's input args, write the file directly\r
424 * @param File fd : the File of the target file\r
425 * @return true or false\r
426 **/\r
427 private static boolean writeFile(File fd) {\r
428\r
429 if (fd.canWrite() != true)\r
430 return false;\r
431\r
432 FileOutputStream outputFile = null;\r
433 try {\r
434 outputFile = new FileOutputStream(fd);\r
435 } catch (FileNotFoundException e) {\r
436 System.out\r
437 .println("\n# can't find the file when open the output stream !");\r
438 return false;\r
439 }\r
440 FileChannel outputChannel = outputFile.getChannel();\r
441\r
2c71f6e5 442 ByteBuffer[] buffers = new ByteBuffer[7];\r
c74c7a43 443 buffers[0] = ByteBuffer.allocate(ParseParameter.pstr.toString().length());\r
444 buffers[1] = ByteBuffer.allocate(ParseParameter.tstr.toString().length());\r
445 buffers[2] = ByteBuffer.allocate(ParseParameter.astr.toString().length());\r
446 buffers[3] = ByteBuffer.allocate(ParseParameter.cstr.toString().length());\r
447 buffers[4] = ByteBuffer.allocate(ParseParameter.nstr.toString().length());\r
2c71f6e5 448 buffers[5] = ByteBuffer.allocate(ParseParameter.mestr.toString().length());\r
449 buffers[6] = ByteBuffer.allocate(ParseParameter.mstr.toString().length());\r
c74c7a43 450\r
451 buffers[0].put(ParseParameter.pstr.toString().getBytes()).flip();\r
452 buffers[1].put(ParseParameter.tstr.toString().getBytes()).flip();\r
453 buffers[2].put(ParseParameter.astr.toString().getBytes()).flip();\r
454 buffers[3].put(ParseParameter.cstr.toString().getBytes()).flip();\r
455 buffers[4].put(ParseParameter.nstr.toString().getBytes()).flip();\r
2c71f6e5 456 buffers[5].put(ParseParameter.mestr.toString().getBytes()).flip();\r
457 buffers[6].put(ParseParameter.mstr.toString().getBytes()).flip();\r
c74c7a43 458\r
459 try {\r
460 ByteBuffer bufofCP = ByteBuffer.allocate(Copyright.length());\r
461 bufofCP.put(Copyright.getBytes()).flip();\r
462 outputChannel.write(bufofCP);\r
463 \r
464 ByteBuffer bufofFI = ByteBuffer.allocate(Fileinfo.length());\r
465 bufofFI.put(Fileinfo.getBytes()).flip();\r
466 outputChannel.write(bufofFI);\r
467 \r
468 ByteBuffer buffer0 = ByteBuffer.allocate(pusage.length());\r
469 buffer0.put(pusage.getBytes()).flip();\r
470 outputChannel.write(buffer0);\r
471 outputChannel.write(buffers[0]);\r
472 \r
473 ByteBuffer buffer1 = ByteBuffer.allocate(tusage.length());\r
474 buffer1.put(tusage.getBytes()).flip();\r
475 outputChannel.write(buffer1);\r
476 outputChannel.write(buffers[1]);\r
477 \r
478 ByteBuffer buffer2 = ByteBuffer.allocate(ausage.length());\r
479 buffer2.put(ausage.getBytes()).flip();\r
480 outputChannel.write(buffer2);\r
481 outputChannel.write(buffers[2]);\r
482 \r
483 ByteBuffer buffer3 = ByteBuffer.allocate(cusage.length());\r
484 buffer3.put(cusage.getBytes()).flip();\r
485 outputChannel.write(buffer3);\r
486 outputChannel.write(buffers[3]);\r
487 \r
488 ByteBuffer buffer4 = ByteBuffer.allocate(nusage.length());\r
489 buffer4.put(nusage.getBytes()).flip();\r
490 outputChannel.write(buffer4);\r
491 outputChannel.write(buffers[4]);\r
492 \r
2c71f6e5 493 ByteBuffer buffer5 = ByteBuffer.allocate(meusage.length());\r
494 buffer4.put(meusage.getBytes()).flip();\r
495 outputChannel.write(buffer5);\r
496 outputChannel.write(buffers[5]);\r
497 \r
498 ByteBuffer buffer6 = ByteBuffer.allocate(musage.length());\r
499 buffer4.put(musage.getBytes()).flip();\r
500 outputChannel.write(buffer6);\r
501 outputChannel.write(buffers[6]);\r
502 \r
c74c7a43 503 outputFile.close();\r
504 } catch (IOException e) {\r
505 System.out.println("\n# The operations of file failed !");\r
506 return false;\r
507 }\r
508 return true;\r
509 }\r
510\r
511 ///\r
512 /// point to target.txttmp, a temp file, which is created and deleted during the tool's runtime.\r
513 ///\r
514 private static File TempFd;\r
515 \r
516 ///\r
517 /// point to target.txt.\r
518 ///\r
519 private static File Fd;\r
2c71f6e5 520 \r
521 ///\r
522 /// when the flag is true, the corresponding str should be add at the end of file.\r
523 ///\r
524 private static boolean pflag = true;\r
525 private static boolean tflag = true;\r
526 private static boolean aflag = true;\r
527 private static boolean cflag = true;\r
528 private static boolean nflag = true;\r
529 private static boolean mflag = true;\r
530 private static boolean meflag = true;\r
c74c7a43 531\r
532 private static final String Copyright = "#\n"\r
533 + "# Copyright (c) 2006, Intel Corporation\n"\r
534 + "#\n"\r
535 + "# All rights reserved. This program and the accompanying materials\n"\r
536 + "# are licensed and made available under the terms and conditions of the BSD License\n"\r
537 + "# which accompanies this distribution. The full text of the license may be found at\n"\r
538 + "# http://opensource.org/licenses/bsd-license.php\n"\r
539 + "\n"\r
540 + "# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN \"AS IS\" BASIS,\n"\r
541 + "# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\n";\r
542\r
543 private static final String Fileinfo = "#\n"\r
544 + "# Filename: target.template\n"\r
545 + "#\n"\r
546 + "# ALL Paths are Relative to WORKSPACE\n"\r
547 + "\n"\r
548 + "# Separate multiple LIST entries with a SINGLE SPACE character, do not use comma characters.\n"\r
549 + "# Un-set an option by either commenting out the line, or not setting a value.\n";\r
550\r
551 private static final String pusage = "#\n"\r
552 + "# PROPERTY Type Use Description\n"\r
553 + "# ---------------- -------- -------- -----------------------------------------------------------\n"\r
554 + "# ACTIVE_PLATFORM Filename Recommended Specify the WORKSPACE relative Path and Filename\n"\r
555 + "# of the platform FPD file that will be used for the build\n"\r
556 + "# This line is required if and only if the current working\n"\r
557 + "# directory does not contain one or more FPD files.\n";\r
558\r
559 private static final String tusage = "\n\n"\r
560 + "# TARGET List Optional Zero or more of the following: DEBUG, RELEASE, \n"\r
561 + "# UserDefined; separated by a space character. \n"\r
562 + "# If the line is missing or no value is specified, all\n"\r
563 + "# valid targets specified in the FPD file will attempt \n"\r
564 + "# to be built. The following line will build all platform\n"\r
565 + "# targets.\n";\r
566\r
567 private static final String ausage = "\n\n"\r
568 + "# TARGET_ARCH List Optional What kind of architecture is the binary being target for.\n"\r
569 + "# One, or more, of the following, IA32, IA64, X64, EBC or ARM.\n"\r
570 + "# Multiple values can be specified on a single line, using \n"\r
571 + "# space charaters to separate the values. These are used \n"\r
572 + "# during the parsing of an FPD file, restricting the build\n"\r
573 + "# output target(s.)\n"\r
574 + "# The Build Target ARCH is determined by a logical AND of:\n"\r
575 + "# FPD BuildOptions: <SupportedArchitectures> tag\n"\r
576 + "# If not specified, then all valid architectures specified \n"\r
577 + "# in the FPD file, for which tools are available, will be \n"\r
578 + "# built.\n";\r
579\r
580 private static final String cusage = "\n\n"\r
581 + "# TOOL_DEFINITION_FILE Filename Optional Specify the name of the filename to use for specifying \n"\r
582 + "# the tools to use for the build. If not specified, \n"\r
583 + "# tools_def.txt will be used for the build. This file \n"\r
584 + "# MUST be located in the WORKSPACE/Tools/Conf directory.\n";\r
585\r
586 private static final String nusage = "\n\n"\r
587 + "# TAGNAME List Optional Specify the name(s) of the tools_def.txt TagName to use.\n"\r
588 + "# If not specified, all applicable TagName tools will be \n"\r
589 + "# used for the build. The list uses space character separation.\n";\r
2c71f6e5 590 \r
591 private static final String musage = "\n\n"\r
592 + "# MULTIPLE_THREAD FLAG Optional Flag to enable multi-thread build. If not specified, default\n"\r
593 + "# is \"Disable\". If your computer is multi-core or multiple CPUs,\n" \r
594 + "# enabling this feature will bring much benefit. For multi-thread\n" \r
595 + "# built, the log will write to ${BUILD_DIR}/build.log.\n" \r
596 + "# This feature is only for PLATFORM build, and clean, cleanall or\n"\r
597 + "# stand-alone module build is still using the normal way.\n";\r
598 private static final String meusage = "\n\n"\r
599 + "# MAX_CONCURRENT_THREAD_NUMBER NUMBER Optional The number of concurrent threads. Default is 2. Recommend to\n" \r
600 + "# set this value to one more than the number of your compurter\n"\r
601 + "# cores or CPUs.\n";\r
c74c7a43 602}\r