+If you want build a platform, ACTIVE_PLATFORM must be set to your desired\r
+platform dsc file, go to directory which must be not a module's directory, and\r
+run "build" command.\r
+\r
+Instead of changing Target.txt, you can specify platform, module and/or\r
+architecture on command line.\r
+For example, if you want to build NT32 platform, you can just type \r
+\r
+ c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32\r
+\r
+and if you want to build HelloWorld module, you can just type\r
+\r
+ c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf\r
+\r
+Other helpful command line options of build tool include "-v" and "-d".\r
+The "-v" option is used to turn on the verbose build, which provide more\r
+information during the build. "-d <debug level 0-9>" option is used to\r
+turn on the debug information which is helpful debugging build tools.\r
+\r
+For more information on build options, please try "build -h" on command line.\r
+\r
+Note:\r
+ The Windows style help option "/?" is not a valid option for the build\r
+ command.\r
+\r
+\r
+-------------------------------------------------------------------------------\r
+Supported build targets\r
+-----------------------\r
+\r
+all - Build whole platform or module. It can be ignored.\r
+genc - Generate AutoGen.c, AutoGen.h and <ModuleName>.depex files only.\r
+genmake - Generate makefiles in addition to files generated by "genc" target.\r
+clean - Clean intermediate files\r
+cleanall - Clean all generated files and directories during build, except the\r
+ generated Makefile files (top level and module makefiles)\r
+cleanlib - Clean all generated files and directories during library build\r
+run - Launch NT32 shell (only valid for NT32 platform)\r
+\r
+-------------------------------------------------------------------------------\r
+Tools in Python\r
+---------------\r
+\r
+* Run buld tool written in Python from source\r
+ The build tool written in Python can be executed from its source directly as\r
+ long as you have the Python interpreter (version 2.5) installed. The source\r
+ of Python code is locating at:\r
+\r
+ http://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/trunk/BaseTools\r
+\r
+ where:\r
+\r
+ build/build.py - The entry tool of build tools\r
+\r
+ "build.py" steps:\r
+ 1. Run "edksetup.bat"\r
+ 2. set PYTHONPATH to the local directory of above source\r
+ (BaseTools/Source/Python)\r
+ 3. Set ACTIVE_PLATFORM in WORKSPACE\Conf\r
+ 4. Go to platform or module directory\r
+ 5. Run "<python_interpreter.exe> <python_source_dir>/build/build.py" or\r
+ "<python_source_dir>/build/build.py" directly.\r
+\r
+* Convert Python source to exe file\r
+ The tools written in Python can be coverted into executable program which can\r
+ be executed without Python interpreter. One of the conversion tools is called\r
+ cx_Freeze, available at: \r
+\r
+ http://sourceforge.net/projects/cx-freeze/\r
+\r
+ If you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use the following\r
+ command lines to convert MyBuild.py to a Windows executable.\r
+\r
+ set PYTHONPATH=<buildtools>\BaseTools\Source\Python\r
+ c:\cx_Freeze-3.0.3\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8 --install-dir=.\mybuild MyBuild.py\r
+\r
+ The generated .exe files are put in "mybuild" subdirectory.\r