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.

84 lines
2.3 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM indexsym.cmd - BarbKess
  4. @REM Begin symbol indexing for the current build
  5. @REM
  6. @REM Copyright (c) Microsoft Corporation. All rights reserved.
  7. @REM
  8. @REM -----------------------------------------------------------------
  9. @perl -x "%~f0" %*
  10. @goto :EOF
  11. #!perl
  12. use strict;
  13. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  14. use lib $ENV{RAZZLETOOLPATH};
  15. use PbuildEnv;
  16. use ParseArgs;
  17. use Logmsg;
  18. use BuildName;
  19. use symindex;
  20. sub Usage { print<<USAGE; exit(1) }
  21. indexsym [-l <language>]
  22. Begins symbol indexing of symbols found under the binaries tree.
  23. USAGE
  24. parseargs('?' => \&Usage);
  25. if ($ENV{LANG} !~ /usa/i || $ENV{LANG} !~ /cov/i) {
  26. #logmsg( "Symbol indexing is not currently implemented for localized builds.");
  27. #return;
  28. }
  29. # the next two checks are redundant because of the $lang !~ /usa/i check above
  30. # but if that check is ever taken out, we still want to skip symbol indexing
  31. # for pseudo and mirror
  32. # Don't index symbols for pseudoloc builds
  33. if ($ENV{LANG} =~ /psu/i) {
  34. logmsg("Don't index pseudoloc builds - exiting");
  35. exit;
  36. }
  37. # Don't index symbols for mirrored builds
  38. if ($ENV{LANG} =~ /mir/i) {
  39. logmsg("Don't index mirrored builds - exiting");
  40. exit;
  41. }
  42. # Don't index symbols for pseudoloc builds
  43. if ($ENV{LANG} =~ /FE/i) {
  44. logmsg("Don't index Pseudo FE builds - exiting");
  45. exit;
  46. }
  47. # Don't index symbols for KOR MUI builds - ia64
  48. if ($ENV{LANG} =~ /KOR/i && $ENV{_BuildArch} =~ /ia64/i) {
  49. logmsg("Don't index KOR MUI builds - exiting");
  50. exit;
  51. }
  52. # Don't index symbols for ARA and HEB MUI builds
  53. if ($ENV{LANG} =~ /ARA/i || $ENV{LANG} =~ /HEB/i) {
  54. logmsg("Don't index MUI builds[ARA HEB] - exiting");
  55. exit;
  56. }
  57. # check if there is a binaries tree to work with
  58. if (!-e $ENV{_NTPOSTBLD}) {
  59. errmsg("Binaries tree $ENV{_NTPOSTBLD} does not exist");
  60. exit;
  61. }
  62. # get BuildName:
  63. my $BuildName = build_name();
  64. logmsg( "Symbols will be indexed for $BuildName.");
  65. # this variable does not appear to be used anywhere, I'm setting it to a
  66. # resonable value for now until I can clean up symindex --JeremyD
  67. my $LogFileName = "$ENV{TEMP}\\indexsym.log";
  68. &symindex::IndexSymbols($ENV{LANG}, $BuildName, $LogFileName);