</if>\r
</target>\r
\r
+ <target name="reconfig">\r
+ <!-- backup all config files -->\r
+ <if>\r
+ <available file="Conf/target.txt"/>\r
+ <then>\r
+ <echo message="Backup Conf/target.txt to Conf/target.txt.bak" />\r
+ <copy file="Conf/target.txt" tofile="Conf/target.txt.bak" overwrite="true" />\r
+ </then>\r
+ </if>\r
+ <if>\r
+ <available file="Conf/tools_def.txt"/>\r
+ <then>\r
+ <echo message="Backup Conf/tools_def.txt to Conf/tools_def.txt.bak" />\r
+ <copy file="Conf/tools_def.txt" tofile="Conf/tools_def.txt.bak" overwrite="true" />\r
+ </then>\r
+ </if>\r
+ <if>\r
+ <available file="Conf/FrameworkDatabase.db"/>\r
+ <then>\r
+ <echo message="Backup Conf/FrameworkDatabase.db to Conf/FrameworkDatabase.db.bak" />\r
+ <copy file="Conf/FrameworkDatabase.db" tofile="Conf/FrameworkDatabase.db.bak" overwrite="true" />\r
+ </then>\r
+ </if>\r
+ \r
+ <if>\r
+ <available file="Conf/tools_def.template"/>\r
+ <then>\r
+ <echo message="Copy file from Conf/tools_def.template to Conf/tools_def.txt" />\r
+ <copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt" overwrite="true" />\r
+ </then>\r
+ </if>\r
+\r
+ <if>\r
+ <available file="Conf/target.template"/>\r
+ <then>\r
+ <echo message="Copy file from Conf/target.template to Conf/target.txt" />\r
+ <copy file="Conf/target.template" tofile="Conf/target.txt" overwrite="true" />\r
+ </then>\r
+ </if>\r
+\r
+ <if>\r
+ <available file="Conf/FrameworkDatabase.template"/>\r
+ <then>\r
+ <echo message="Copy file from Conf/FrameworkDatabase.template to Conf/FrameworkDatabase.db" />\r
+ <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db" overwrite="true" />\r
+ </then>\r
+ </if>\r
+ </target>\r
+\r
<target name="clean">\r
<subant target="clean" inheritall="false">\r
<filelist dir="."\r
@REM set XMLBEANS_HOME=C:\xmlbeans\r
@REM set CYGWIN_HOME=C:\cygwin\r
\r
-@REM usage: edksetup.bat [Rebuild] [ForceRebuild]\r
+@REM usage: edksetup.bat [Rebuild] [ForceRebuild] [Reconfig]\r
@REM if the argument, skip is present, only the paths and the\r
@REM test and set of environment settings are performed. \r
\r
@if "%1"=="/h" goto Usage\r
@if "%1"=="/?" goto Usage\r
@if "%1"=="/help" goto Usage\r
+@if "%1"=="ForceRebuild" goto ForceBuild\r
+@if "%1"=="Reconfig" goto Reconfig\r
\r
@IF NOT EXIST "Tools\Jars\Common.jar" goto NormalBuild\r
@IF NOT EXIST "Tools\Jars\PcdTools.jar" goto NormalBuild\r
@IF NOT EXIST "Tools\bin\dlg.exe" goto NormalBuild\r
\r
@if "%1"=="Rebuild" goto NormalBuild\r
-@if "%1"=="ForceRebuild" goto ForceBuild\r
@if NOT "%1"=="" goto Usage\r
\r
goto skipbuild\r
echo CLASSPATH: %CLASSPATH%\r
goto end\r
\r
+:Reconfig\r
+@REM\r
+@REM Reinstall all config files\r
+@REM\r
+call ant -f %WORKSPACE%\Tools\build.xml reconfig\r
+goto end\r
+\r
:Usage\r
echo.\r
-echo Usage: %0 [Rebuild] [ForceRebuild]\r
+echo Usage: %0 [Rebuild] [ForceRebuild] [Reconfig]\r
+echo Rebuild: Incremental build, only build those updated tools; \r
+echo ForceRebuild: Rebuild all tools neither updated or not; \r
+echo Reconfig: Reinstall target.txt, tools_def.txt, FrameworkDatabase.db. \r
+echo.\r
+echo Note that target.template, tools_def.template, FrameworkDatabase.template will be\r
+echo only copied to target.txt, tools_def.txt, FrameworkDatabase.db respectively if they\r
+echo are not existed. Using option [Reconfig] to do the force copy. \r
echo.\r
\r
:end\r