home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 2.ddi / CLIB2.ZIP / CLIBRLIB.BAT < prev    next >
Encoding:
DOS Batch File  |  1990-06-07  |  2.4 KB  |  100 lines

  1. echo off
  2. if /%1==/ goto HELP
  3.  
  4. if %1==ALL      goto DOsm
  5. if %1==all      goto DOsm
  6. if %1==SMALL    goto DOsm
  7. if %1==small    goto DOsm
  8. if %1==MEDIUM   goto DOmd
  9. if %1==medium   goto DOmd
  10. if %1==COMPACT  goto DOcp
  11. if %1==compact  goto DOcp
  12. if %1==LARGE    goto DOlg
  13. if %1==large    goto DOlg
  14. if %1==HUGE     goto DOhg
  15. if %1==huge     goto DOhg
  16.  
  17. :HELP
  18. echo 
  19. echo This batch file rebuilds the specified CLIB library file from
  20. echo the object files contained in the SMALL, COMPACT, MEDIUM,
  21. echo LARGE, or HUGE subdirectories.
  22. echo 
  23. echo The "model" parameter specifies which memory model library file
  24. echo should be rebuilt. When ALL is specified, all five library files
  25. echo will be rebuilt.
  26. echo 
  27. echo Usage:     clibrlib   model
  28. echo 
  29. echo Examples:  clibrlib   ALL
  30. echo            clibrlib   LARGE
  31. echo 
  32. goto DONE
  33.  
  34. :DOsm
  35. echo *** Building SMALL & TINY memory model libraries
  36. if exist cs.lib del cs.lib
  37. if exist oldstrms.lib del oldstrms.lib
  38. cd small
  39. tlib /0 ..\cs @..\clib.rsp
  40. tlib /0 ..\oldstrms @..\oldstrm.rsp
  41. cd ..
  42. if errorlevel 1 goto ERROR
  43. if %1==SMALL    goto DONE
  44. if %1==small    goto DONE
  45.  
  46. :DOmd
  47. echo *** Building MEDIUM memory model library
  48. if exist cm.lib del cm.lib
  49. if exist oldstrmm.lib del oldstrmm.lib
  50. cd medium
  51. tlib /0 ..\cm @..\clib.rsp
  52. tlib /0 ..\oldstrmm @..\oldstrm.rsp
  53. cd ..
  54. if errorlevel 1 goto ERROR
  55. if %1==MEDIUM   goto DONE
  56. if %1==medium   goto DONE
  57.  
  58. :DOcp 
  59. echo *** Building COMPACT memory model library
  60. if exist cc.lib del cc.lib
  61. if exist oldstrmc.lib del oldstrmc.lib
  62. cd compact
  63. tlib /0 ..\cc @..\clib.rsp
  64. tlib /0 ..\oldstrmc @..\oldstrm.rsp
  65. cd ..
  66. if errorlevel 1 goto ERROR
  67. if %1==COMPACT  goto DONE
  68. if %1==compact  goto DONE
  69.  
  70. :DOlg
  71. echo *** Building LARGE memory model library
  72. if exist cl.lib del cl.lib
  73. if exist oldstrml.lib del oldstrml.lib
  74. cd large
  75. tlib /0 ..\cl @..\clib.rsp
  76. tlib /0 ..\oldstrml @..\oldstrm.rsp
  77. cd ..
  78. if errorlevel 1 goto ERROR
  79. if %1==LARGE    goto DONE
  80. if %1==large    goto DONE
  81.  
  82. :DOhg
  83. echo *** Building HUGE memory model library
  84. if exist ch.lib del ch.lib
  85. if exist oldstrmh.lib del oldstrmh.lib
  86. cd huge
  87. tlib /0 ..\ch @..\clib.rsp
  88. tlib /0 ..\oldstrmh @..\oldstrm.rsp
  89. cd ..
  90. if errorlevel 1 goto ERROR
  91. goto DONE
  92.  
  93. :ERROR
  94. cd ..
  95. echo ********************************************************************
  96. echo Librarian errors !!
  97. echo ********************************************************************
  98.  
  99. :DONE
  100.