Leaked source code of windows server 2003
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.

110 lines
4.1 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM winfuse_combinelogs.cmd - sxscore
  4. @REM Combines logs produced during the build and consumed in postbuild.
  5. @REM They need to be combined to account for distributed builds.
  6. @REM
  7. @REM Copyright (c) Microsoft Corporation. All rights reserved.
  8. @REM
  9. @REM -----------------------------------------------------------------
  10. @if defined _CPCMAGIC goto CPCBegin
  11. @perl -x "%~f0" %*
  12. @goto :EOF
  13. #!perl
  14. use strict;
  15. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  16. use lib $ENV{RAZZLETOOLPATH};
  17. use PbuildEnv;
  18. use ParseArgs;
  19. sub Usage { print<<USAGE; exit(1) }
  20. winfuse_combinelogs
  21. Combines logs produced during the build and consumed in postbuild.
  22. They need to be combined to account for distributed builds.
  23. -? this message
  24. USAGE
  25. parseargs('?' => \&Usage );
  26. # *** TEMPLATE CODE ***
  27. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  28. __END__
  29. @:CPCBegin
  30. @set _CPCMAGIC=
  31. @setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  32. @if not defined DEBUG echo off
  33. @REM *** CMD SCRIPT BELOW ***
  34. if /i not "%lang%"=="usa" (goto End)
  35. set SXS_BINPLACE_LOG=%_NtPostBld%\build_logs\binplace*.log-sxs
  36. set SXS_BINPLACE_FINAL_LOG=%_NtPostBld%\build_logs\sxs-binplaced-assemblies.log
  37. del %SXS_BINPLACE_FINAL_LOG%
  38. REM
  39. REM Combine the files from each chunk of the distributed build into one file.
  40. REM and sort.exe|unique.exe them, and put the header on that the prs signing tools DEPEND on,
  41. REM and pretty print the content as readable columns.
  42. REM
  43. set in=%_ntpostbld%\build_logs\fusionlist*.txt
  44. set out1=%_ntpostbld%\build_logs\combined_fusionlist_temp1.txt
  45. set out2=%_ntpostbld%\build_logs\combined_fusionlist_temp2.txt
  46. set out3=%_ntpostbld%\build_logs\combined_fusionlist_temp3.txt
  47. set out4=%_ntpostbld%\build_logs\combined_fusionlist_temp4.txt
  48. set out5=%_ntpostbld%\build_logs\combined_fusionlist_temp5.txt
  49. set out=%_ntpostbld%\build_logs\combined_fusionlist.txt
  50. del %out% %out1% %out2% %out3% %out4% %out5%
  51. echo>>%out% ;"%in% produced by SXS_LOG in makefile.def"
  52. echo>>%out% ;"then %in% processed by findstr.exe | columns.exe | sort.exe | unique.exe | uniquizefusioncatalognames in %0 to produce %out%"
  53. echo>>%out% ;Filename ValidLangs Exceptions ValidArchs ValidDebug AltName
  54. echo>>%out% ;==================================================================================================================
  55. call logmsg.cmd "start findstr.exe | columns.exe | sort.exe | unique.exe"
  56. echo on
  57. for %%i in (%in%) do findstr.exe /b /v /c:; < %%i >> %out1%
  58. REM lowercase it all
  59. REM change runs of spaces to a single space
  60. REM remove spaces at ends of lines
  61. perl.exe -p -e "lc; s/ +/ /g; s/ +$//g; tr/A-Z/a-z/;" < %out1% > %out2%
  62. columns.exe < %out2% > %out3%
  63. sort.exe < %out3% > %out4%
  64. unique.exe < %out4% > %out5%
  65. uniquizefusioncatalognames.exe %out5% >> %out%
  66. call logmsg.cmd "end findstr.exe | columns.exe | sort.exe | unique.exe"
  67. set d1=%_NtPostBld%\build_logs
  68. set d2=%_NtPostBld%\symbolcd\cablists
  69. mkdir %d2%
  70. set in=%d1%\symbolcd_cablists_asms_*.lst
  71. set out=%d2%\asms.lst
  72. set out1=%d1%\symbolcd_cablists_asms_temp1.txt
  73. set out2=%d1%\symbolcd_cablists_asms_temp2.txt
  74. set out3=%d1%\symbolcd_cablists_asms_temp3.txt
  75. del %out% %out1% %out2% %out3%
  76. copy %in% %out1%
  77. REM lowercase it all; change runs of spaces to a single space; remove spaces at ends of lines
  78. perl.exe -p -e "lc; s/ +/ /g; s/ +$//g; tr/A-Z/a-z/;" < %out1% > %out2%
  79. sort.exe < %out2% > %out3%
  80. unique.exe < %out3% > %out%
  81. REM -------
  82. REM Generate the overall log of all the legal sxs assemblies that were
  83. REM either built or copied from the buildlab into
  84. REM %_NtPostBld%\build_logs\sxs-binplaced-assemblies.log
  85. REM
  86. REM We'll use this file as the one that we run the buildtool over, and
  87. REM it'll act as the master list of assemblies that should be on the
  88. REM release share after the buildtool step.
  89. REM -------
  90. REM The nice thing about this is that copy is smart about appending stuff into
  91. REM one big file.
  92. REM -------
  93. copy %SXS_BINPLACE_LOG% %SXS_BINPLACE_FINAL_LOG%
  94. goto :Eof