home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1995 December / SOFM_Dec1995.bin / pc / os2 / vpascal / bin / bldrtl.cmd next >
OS/2 REXX Batch file  |  1995-10-31  |  2KB  |  55 lines

  1. @ECHO OFF
  2. REM ***************************
  3. REM * Builds run-time library *
  4. REM ***************************
  5.  
  6. IF "%1" == "/?" GOTO HELP
  7. IF "%1" == "-?" GOTO HELP
  8.  
  9. IF EXIST "\VP\SOURCE\RTL\BLDRTL.PAS" GOTO BUILD
  10. ECHO **Error**  Change to the drive where VP is installed and run BLDRTL again.
  11. GOTO EXIT
  12.  
  13. :BUILD
  14. ECHO  Creating OS/2 import library ...
  15. CD \VP\LIB\OS2LIB
  16. CALL OS2LIB
  17.  
  18. ECHO  Building run-time library ...
  19. CD \VP\SOURCE\RTL
  20. \VP\BIN\VPC BLDRTL /Q /B /O\VP\UNITS /$Speed+ /$SmartLink- /$D+ %1 %2 %3 %4 %5 %6 %7 %8 %9
  21. DEL \VP\UNITS\BLDRTL.VPI
  22.  
  23. ECHO  Building DLL version of the run-time library ...
  24. CD \VP\SOURCE\RTL
  25. \VP\BIN\VPC VPRTL1B3 /Q /U\VP\UNITS /O\VP\OUT
  26. IF ERRORLEVEL 1 GOTO ERROR
  27. SET LIB=\VP\LIB
  28. REM *** if you have LINK386 2.02.001+ you may use
  29. REM *** /NOSECTORALIGN to shrink DLL in size
  30. SET LINK386=/BAT /NOL /PM:NOVIO /A:4 /EXEPACK
  31. IF ERRORLEVEL 1 GOTO ERROR
  32. LINK386 @\VP\OUT\VPRTL1B3.LNK;
  33. IF ERRORLEVEL 1 GOTO EXIT
  34. \VP\BIN\IMPLIB \VP\LIB\VPRTL.LIB \VP\SOURCE\RTL\VPRTL1B3.DEF
  35. IF ERRORLEVEL 1 GOTO ERROR
  36. COPY \VP\OUT\VPRTL1B3.DLL \VP\BIN > NUL
  37. DEL  \VP\OUT\VPRTL1B3.*
  38. CD \VP
  39. GOTO EXIT
  40.  
  41. :ERROR
  42. ECHO !!! ERROR !!!
  43. GOTO EXIT
  44.  
  45. :HELP
  46. ECHO Builds Virtual Pascal run-time library. Generates OS/2 import library.
  47. ECHO Usage: BLDRTL [VPC Options]
  48. ECHO Where:
  49. ECHO   VPC Options is the options to the command line compiler
  50. ECHO By default, BLDRTL compiles all units to object files ($SmartLink-).
  51. ECHO It enables source level debugging for RTL units. To enable smart
  52. ECHO linking, specify /$SmartLink+ as a parameter to BLDRTL.
  53.  
  54. :EXIT
  55.