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.

26 lines
813 B

  1. REM
  2. REM manifest_preprocess.bat
  3. REM
  4. REM Reclaim the cl.exe generality from preprocessor.exe.
  5. REM
  6. set command_line=%*
  7. set command_line=%command_line: -i = %
  8. set command_line=%command_line: -FI= -I%
  9. set command_line=%command_line: -o = ^> %
  10. %command_line%
  11. for /f %%i in ('dir /s/b *.man ^| findstr /i obj') do perl -x %0 %%i
  12. goto :eof
  13. #!perl
  14. #line 17
  15. $filename = $ARGV[0];
  16. open(filehandle, "< " . $filename) || die;
  17. $filecontents = join('', <filehandle>); # read all the lines into one string
  18. $filecontents =~ s/^#.+$//gm; # remove preprocessor directives
  19. $filecontents =~ s/\n+/\n/gms; # remove empty lines
  20. $filecontents =~ s/\A\n+//g; # remove newlines from very start of file
  21. open(filehandle, "> " . $filename) || die;
  22. print(filehandle $filecontents);