home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 4.ddi / BATSRC.ZIP / BUILD.BAT < prev    next >
Encoding:
DOS Batch File  |  1992-06-10  |  1.8 KB  |  89 lines

  1. @echo off
  2.  
  3. rem     BUILD.BAT
  4. rem
  5. rem     builds RTL for windows or DOS
  6. rem
  7. rem     parameters:
  8. rem
  9. rem     %1 name of library to be built 
  10. rem     all  clib  winlib  windll  startup  math
  11.  
  12. :checkparm
  13.  
  14. if %1.==. goto error
  15. if %1 == winlib goto ok
  16. if %1 == windll goto ok
  17. if %1 == clib goto ok
  18. if %1 == math goto ok
  19. if %1 == startup goto ok
  20. if %1 == all goto ok
  21. goto error
  22.  
  23. :ok
  24.  
  25. echo test >clib\s\test
  26. if not exist clib\s\test goto makedirs
  27. del clib\s\test
  28. goto okdirs
  29. :makedirs
  30. echo Creating object directories...
  31. call makedirs all
  32.  
  33. :okdirs
  34.  
  35. if not "%MODEL%"=="" goto checklog
  36. if %1 == windll goto largemodel
  37. echo MODEL environment variable not set.  Setting it to all models.
  38. if %1 == winlib goto winmodel
  39. set MODEL=s c m l h
  40. goto checklog
  41. :largemodel
  42. set MODEL=l
  43. goto checklog
  44. :winmodel
  45. set MODEL=s c m l
  46.  
  47. :checklog
  48.  
  49. call vars
  50.  
  51. :build
  52.  
  53. if %1 == startup goto startup
  54.  
  55. for %%x in (%MODEL%) do make -DMODEL=%%x %1
  56. goto exit
  57.  
  58. :startup
  59.  
  60. if not exist startup\startup.mak goto exit
  61. make -DMODEL=x startup
  62. goto exit
  63.  
  64. :makedirs
  65.  
  66. echo You must run MAKEDIRS
  67. :error
  68.  
  69. echo BUILD.BAT
  70. echo Usage: build libtype
  71. echo   where libtype is one of 
  72. echo   all  clib  winlib  windll startup  math
  73. echo 
  74. echo Example: build clib
  75. echo 
  76. echo This batch file rebuilds one or more libraries.  It compiles or assembles
  77. echo all source files, and rebuilds the library (or libraries).
  78. echo 
  79. echo The MODEL environment variable specifies the memory model (or models)
  80. echo to rebuild. If MODEL isn't set, all appropriate models are rebuilt.
  81. echo 
  82. echo The LOGFILE environment variable specifies the name of the error log file.
  83. echo If LOGFILE isn't set, it is set to ..\log\crtl.log.  Set LOGFILE to CON 
  84. echo to send the error log to the screen.
  85.  
  86. goto exit
  87.  
  88. :exit
  89.