From 2f96bdd1b9358bb1b14e6c6c7399756dbbb9f222 Mon Sep 17 00:00:00 2001 From: jwang36 Date: Mon, 5 Feb 2007 02:02:15 +0000 Subject: [PATCH 1/1] Output more descriptive information when there's no TARGET, TARGET_ARCH, etc defined in target.txt git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2351 6f19259b-4bc3-4df7-8a09-765794883524 --- .../org/tianocore/context/ParseParameter.java | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java b/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java index 24adfb70f1..4d9c6de3a0 100644 --- a/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java +++ b/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java @@ -78,7 +78,11 @@ public class ParseParameter { // argstr is "-p ", display current setting // if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curpstr); + if (curpstr != null) { + System.out.printf("%s\n", curpstr); + } else { + System.out.printf("No ACTIVE_PLATFORM defined \n"); + } return 1; } // @@ -106,7 +110,11 @@ public class ParseParameter { npflag = true; } else if (argstr.charAt(1) == 't') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curtstr); + if (curtstr != null) { + System.out.printf("%s\n", curtstr); + } else { + System.out.printf("No TARGET defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){ @@ -122,7 +130,11 @@ public class ParseParameter { ntflag = true; } else if (argstr.charAt(1) == 'a') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curastr); + if (curastr != null) { + System.out.printf("%s\n", curastr); + } else { + System.out.printf("No TARGET_ARCH defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){ @@ -138,7 +150,11 @@ public class ParseParameter { naflag = true; } else if (argstr.charAt(1) == 'c') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curcstr); + if (curcstr != null) { + System.out.printf("%s\n", curcstr); + } else { + System.out.printf("No TOOL_CHAIN_CONF defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){ @@ -160,7 +176,11 @@ public class ParseParameter { ncflag = true; } else if (argstr.charAt(1) == 'n') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curnstr); + if (curnstr != null) { + System.out.printf("%s\n", curnstr); + } else { + System.out.printf("No TOOL_CHAIN_TAG defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){ @@ -176,7 +196,11 @@ public class ParseParameter { nnflag = true; } else if (argstr.charAt(1) == 'm') { if(argstr.length() < 4 && argstr.charAt(2) == ' '){ - System.out.printf("%s\n", curmstr); + if (curmstr != null) { + System.out.printf("%s\n", curmstr); + } else { + System.out.printf("No MAX_CONCURRENT_THREAD_NUMBER defined\n"); + } return 1; } if(argstr.length() < 6 && argstr.charAt(3) == '?'){ -- 2.39.2