@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@REM\r
+@echo off\r
+\r
+set _ARGS= \r
+:check_arg\r
+if ""%1""=="""" goto arg_end\r
+if ""%1""==""-q"" goto ant_arg\r
+if ""%1""==""-v"" goto ant_arg\r
+if ""%1""==""-d"" goto ant_arg\r
+if ""%1""==""-e"" goto ant_arg\r
+if ""%1""==""-emacs"" goto ant_arg\r
+\r
+goto ant_target\r
+\r
+:ant_arg \r
+ set _ARGS=%_ARGS% %1\r
+ shift\r
+ goto check_arg\r
+\r
+:ant_target\r
+ set _ARGS=%_ARGS% -DBUILD_TARGET=%1\r
+ shift\r
+ goto check_arg\r
+\r
+:arg_end\r
+ant -logger org.tianocore.build.global.GenBuildLogger -f %WORKSPACE%/build.xml %_ARGS%\r
+\r
+set _ARGS=\r
+@echo on\r
\r
-ant -logger org.tianocore.build.global.GenBuildLogger -f %WORKSPACE%/build.xml %*\r