Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

250 lines
5.5 KiB

  1. @if "%_echo%" == "" echo off
  2. @rem
  3. @rem Batch file to build under NT environment.
  4. @rem
  5. @rem Runs iebuild.cmd after setting environment variables.
  6. @rem
  7. @rem Syntax: DAbuild [switches]
  8. @rem valid switches:
  9. @rem d -- debug CRT build
  10. @rem s -- retail ship
  11. @rem i -- retail icecap
  12. @rem p -- retail performance reporting
  13. @rem x -- developer build
  14. @rem
  15. setlocal
  16. if "%1" == "?" goto do_syntax
  17. if "%1" == "/?" goto do_syntax
  18. if "%1" == "-?" goto do_syntax
  19. if "%1" == "help" goto do_syntax
  20. if (%_NTBINDIR%) == () goto norazzle
  21. @rem The variables starting with '_L_' are internal to this
  22. @rem batch file and are not related to makefile.def.
  23. @rem Set these to determine what to name your retail and
  24. @rem debug directories. Remember this is appended to the
  25. @rem word "obj".
  26. set _L_SHIPDIR=
  27. set _L_DEBUGDIR=d
  28. set _L_ICECAPDIR=p
  29. set _L_PERFDIR=dap
  30. @rem internal defaults for cmdline options
  31. set _L_DEBUG=1
  32. set _L_SHIPRETAIL=
  33. set _L_ICAPRETAIL=
  34. set _L_PERFRETAIL=
  35. set _L_DEVELOPER=
  36. set _L_IEBLD_OPTS=
  37. set BROWSER_INFO=
  38. set COD=
  39. if not "%browse%" == "1" goto browse_endif
  40. set BROWSER_INFO=1
  41. :browse_endif
  42. @rem Chug thru all the parameters.
  43. @rem If recognize it, call the routine to set our flags.
  44. @rem If we dont recognize it, pass thru to build via _L_BLD_OPTS
  45. :LOOP
  46. for %%x in (cod COD) do if "%%x" == "%1" goto SETCOD
  47. for %%x in (d dbg debug D DBG DEBUG) do if "%%x" == "%1" goto SETDEBUG
  48. for %%x in (b browse B BROWSE) do if "%%x" == "%1" goto SETBROWSE
  49. for %%x in (s ship r ret retail S SHIP R RET RETAIL) do if "%%x" == "%1" goto SETSHIP
  50. for %%x in (p perf performance P PERF PERFORMANCE) do if "%%x" == "%1" goto SETPERF
  51. for %%x in (i icap icecap I ICAP ICECAP) do if "%%x" == "%1" goto SETICECAP
  52. for %%x in (x dev X DEV) do if "%%x" == "%1" goto SETDEVELOPER
  53. @rem didnt use this param, pass thru to build
  54. set _L_IEBLD_OPTS=%_L_IEBLD_OPTS% %1
  55. :CONTINUELOOP
  56. shift
  57. if "%1" == "" goto do_debug
  58. goto LOOP
  59. :SETCOD
  60. set COD=1
  61. goto CONTINUELOOP
  62. :SETDEBUG
  63. set _L_DEBUG=1
  64. set _L_SHIPRETAIL=
  65. set _L_ICAPRETAIL=
  66. set _L_PERFRETAIL=
  67. set _L_DEVELOPER=
  68. goto CONTINUELOOP
  69. :SETBROWSE
  70. set BROWSER_INFO=1
  71. goto CONTINUELOOP
  72. :SETSHIP
  73. set _L_DEBUG=
  74. set _L_SHIPRETAIL=1
  75. set _L_ICAPRETAIL=
  76. set _L_PERFRETAIL=
  77. set _L_DEVELOPER=
  78. goto CONTINUELOOP
  79. :SETPERF
  80. set _L_DEBUG=
  81. set _L_SHIPRETAIL=
  82. set _L_ICAPRETAIL=
  83. set _L_PERFRETAIL=1
  84. set _L_DEVELOPER=
  85. goto CONTINUELOOP
  86. :SETICECAP
  87. set _L_DEBUG=
  88. set _L_SHIPRETAIL=
  89. set _L_ICAPRETAIL=1
  90. set _L_PERFRETAIL=
  91. set _L_DEVELOPER=
  92. goto CONTINUELOOP
  93. :SETDEVELOPER
  94. set _L_DEBUG=
  95. set _L_SHIPRETAIL=
  96. set _L_ICAPRETAIL=
  97. set _L_PERFRETAIL=
  98. set _L_DEVELOPER=1
  99. goto CONTINUELOOP
  100. @rem
  101. @rem Start the build...
  102. @rem
  103. @rem
  104. @rem *************** Build debug ***************
  105. @rem
  106. :do_debug
  107. if "%_l_debug%" == "" goto do_ship
  108. set _L_IEBLD_PARM= pdb
  109. set SHIP_BUILD=
  110. set PERF_BUILD=1
  111. set DEBUGMEM_BUILD=1
  112. set DEVELOPER_BUILD=
  113. set _L_BUILD_ALT_DIR=%_L_DEBUGDIR%
  114. goto doit
  115. @rem
  116. @rem *************** Build ship ***************
  117. @rem
  118. :do_ship
  119. if "%_l_shipretail%" == "" goto do_icecap
  120. set _L_IEBLD_PARM= pdb retail
  121. set _L_BUILD_ALT_DIR=%_L_SHIPDIR%
  122. set SHIP_BUILD=1
  123. set PERF_BUILD=
  124. set DEBUGMEM_BUILD=
  125. set DEVELOPER_BUILD=
  126. goto doit
  127. @rem
  128. @rem *************** Build icecap ***************
  129. @rem
  130. :do_icecap
  131. if "%_l_icapretail%" == "" goto do_perf
  132. set _L_IEBLD_PARM= pdb retail icap
  133. set _L_BUILD_ALT_DIR=%_L_ICECAPDIR%
  134. set SHIP_BUILD=
  135. set PERF_BUILD=
  136. set DEBUGMEM_BUILD=
  137. set DEVELOPER_BUILD=
  138. goto doit
  139. @rem
  140. @rem *************** Build perf ***************
  141. @rem
  142. :do_perf
  143. if "%_l_perfretail%" == "" goto do_developer
  144. set _L_IEBLD_PARM= pdb retail
  145. set _L_BUILD_ALT_DIR=%_L_PERFDIR%
  146. set SHIP_BUILD=
  147. set PERF_BUILD=1
  148. set DEBUGMEM_BUILD=
  149. set DEVELOPER_BUILD=
  150. goto doit
  151. @rem
  152. @rem *************** Build developer ***************
  153. @rem
  154. :do_developer
  155. if "%_l_developer%" == "" goto doit
  156. set _L_SHIPDIR=dev
  157. set _L_IEBLD_PARM= pdb retail
  158. set _L_BUILD_ALT_DIR=%_L_SHIPDIR%
  159. set SHIP_BUILD=1
  160. set PERF_BUILD=
  161. set DEBUGMEM_BUILD=
  162. set DEVELOPER_BUILD=1
  163. goto doit
  164. @rem
  165. @rem *************** Call Build ****************
  166. @rem
  167. :doit
  168. set BUILD_ALT_DIR=%_L_BUILD_ALT_DIR%
  169. echo.
  170. if (%_l_debug%) == (1) echo DABUILD: Making debug CRT build.
  171. if (%_l_shipretail%) == (1) echo DABUILD: Making ship build.
  172. if (%_l_icapretail%) == (1) echo DABUILD: Making icecap build.
  173. if (%_L_perfretail%) == (1) echo DABUILD: Making performance-reporting build.
  174. if (%_L_developer%) == (1) echo DABUILD: Making developer build.
  175. if (%BROWSER_INFO%) == (1) echo DABUILD: Generating browse information.
  176. if (%COD%) == (1) echo DABUILD: Generating COD file.
  177. echo.
  178. echo.
  179. echo calling IEBUILD.CMD %_L_IEBLD_OPTS% %_L_IEBLD_PARM% ...
  180. call iebuild %_L_IEBLD_OPTS% %_L_IEBLD_PARM%
  181. if "%done-beep%" == "1" echo 
  182. goto exit
  183. :norazzle
  184. echo.
  185. echo You must be running in a Razzle window to run this.
  186. echo.
  187. goto exit
  188. :do_syntax
  189. echo.
  190. echo Syntax:
  191. echo dabuild [ parameters ]
  192. echo.
  193. echo where the parameters are:
  194. echo b, browse - Generate browse information
  195. echo cod - Generate COD file
  196. echo d, debug - Debug version
  197. echo s, ship - Retail (ship) version
  198. echo p, perf, performance - Retail performance reporting
  199. echo i, icecap - Retail icecap version
  200. echo x, dev - Developer version
  201. echo - Any other iebuild.cmd parameters
  202. echo.
  203. goto exit
  204. :exit
  205. endlocal