home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / MAKQL103.ZIP / MAKEQLBV.DOC next >
Text File  |  1990-08-12  |  12KB  |  153 lines

  1. '╔════╡ MAKEQLBV.BAS - .QLB maker utility (enhanced) for BASIC programs ╞════╗
  2. '║                                                                           ║
  3. '║    Enhancements by David A. Violette, 12 Michaud Ave, Lewiston ME 04240   ║
  4. '║    207+783-6171 (eves).   CompuServe 76456,1602               12 Aug 90   ║
  5. '║                                                                           ║
  6. '║ I have changed this program so that the file Objects.obj is named         ║
  7. '║ EXTERNAL.OBJ, and the file is retained instead of KILLed.  By including   ║
  8. '║ EXTERNAL.OBJ in the LINK response file, a separate .LIB is not needed,    ║
  9. '║ since the external objects are already referenced in EXTERNAL.OBJ, and    ║
  10. '║ the program can be compiled and linked from the command line using the    ║
  11. '║ response file.  This change allows easy and smallest .QLB but adds easy   ║
  12. '║ command line compilation/link using MAKE or NMAKE.  See SUB MakeObj as    ║
  13. '║ well as this main module.                                                 ║
  14. '║                                                                           ║
  15. '║ MAKEQLBV may be invoked from the command line in one of several options:  ║
  16. '║                                                                           ║
  17. '║ (1) MAKEQLBV prog.BAS,prog.QLB,prog.LST,PRO7 progUITB DTFMTER FINANCER,_  ║
  18. '║       QBXQLB;                                                             ║
  19. '║                                                                           ║
  20. '║ (2) MAKEQLBV prog.LST,prog.QLB,prog.LST,PRO7 progUITB DTFMTER FINANCER,_  ║
  21. '║       QBXQLB;                                                             ║
  22. '║                                                                           ║
  23. '║ (3) MAKEQLBV @response.ext                                                ║
  24. '║                                                                           ║
  25. '║    prog is the name of the program.  PRO7 is Crescent Software's QuickPak ║
  26. '║    Professional library for BC7; this is searched for routines I might    ║
  27. '║    use in prog.                                                           ║
  28. '║                                                                           ║
  29. '║    DTFTMTER and FINANCER are libraries supplied by Microsoft with BC7 -   ║
  30. '║    these are searched when I use routines from them.                      ║
  31. '║                                                                           ║
  32. '║    progUITB started as the UITBEFR library supplied by Microsoft with     ║
  33. '║    BC7, but I have modified several of the routines for use in prog and   ║
  34. '║    built this special library.                                            ║
  35. '║                                                                           ║
  36. '║    QBXQLB is the link library supplied by Microsoft with BC7.  Change     ║
  37. '║    this to match the compiler you are using (eg: BQLB45.LIB).             ║
  38. '║                                                                           ║
  39. '║ The first option will scan the source file given as the first parameter,  ║
  40. '║ plus any other module names listed in a prog.MAK file if present, to find ║
  41. '║ the required routines.                                                    ║
  42. '║                                                                           ║
  43. '║ The second option will get the names of the routines by reading a         ║
  44. '║ prog.LST file.  MAKEQLB (and MAKEQLBV) will create the prog.LST file when ║
  45. '║ the first option is used, but you may manually edit this file to add or   ║
  46. '║ delete names of routines directly.  Using prog.LST will greatly speed up  ║
  47. '║ processing the QLB since MAKEQLB (and MAKEQLBV) won't have to scan all    ║
  48. '║ the source files.                                                         ║
  49. '║                                                                           ║
  50. '║ The third option allows use of a response file to shorten the command     ║
  51. '║ line.  The response file name is given immediately after the "@", and the ║
  52. '║ response file contains the items required on the command line, given in   ║
  53. '║ the same way they would on a command line.  The five parameters are       ║
  54. '║ described in Crescent's intro below (copied from their MAKEQLB.BAS        ║
  55. '║ module).  I use two versions of the response file - one with prog.BAS as  ║
  56. '║ the source file name, and one with prog.LST as the source file name.  The ║
  57. '║ first will act as option (1), the second as (2).                          ║
  58. '║                                                                           ║
  59. '║ An example response file for option (1) operation might be as follows:    ║
  60. '║                                                                           ║
  61. '║    prog.BAS,prog.QLB,prog.LST,PRO7 progUITB DTFMTER FINANCER,+            ║
  62. '║    QBXQLB;                                                                ║
  63. '║                                                                           ║
  64. '║ An example response file for option (2) operation might be as follows:    ║
  65. '║                                                                           ║
  66. '║    prog.LST,prog.QLB,prog.LST,PRO7 progUITB DTFMTER FINANCER,QBXQLB;      ║
  67. '║                                                                           ║
  68. '║ The response file must have the parameters separated by commas and spaces ║
  69. '║ as shown.  If MAKEQLB (and MAKEQLBV) find a "+" it is replaced with a " " ║
  70. '║ and the next line is appended.  Essentially, the response file replaces   ║
  71. '║ command line parameters and allows longer lines to be edited using the +  ║
  72. '║ as a continuation symbol.                                                 ║
  73. '║                                                                           ║
  74. '║ A major advantage in using MAKEQLBV instead of MAKEQLB is that the file   ║
  75. '║ EXTERNAL.OBJ is saved for use in LINKing.  This avoids having to build a  ║
  76. '║ separate prog.LIB library as well as the prog.QLB, because EXTERNAL.OBJ   ║
  77. '║ can be used to identify the external routines to be pulled from other     ║
  78. '║ libraries.  This option is only available when you compile and link from  ║
  79. '║ the command line, however.                                                ║
  80. '║                                                                           ║
  81. '║ To use EXTERNAL.OBJ, simply include it in your list of object files to    ║
  82. '║ LINK.  I prefer to use a LINK response file, and I also use the MAKE      ║
  83. '║ utility with a companion description file.  The MAKE prog.DES file might  ║
  84. '║ look like this:                                                           ║
  85. '║                                                                           ║
  86. '║    prog.obj: prog.bas                                                     ║
  87. '║    bc prog /d/o/w/ah/fs;                                                  ║
  88. '║                                                                           ║
  89. '║    progmod1.obj: progmod1.bas                                             ║
  90. '║    bc progmod1 /d/o/w/ah/fs;                                              ║
  91. '║                                                                           ║
  92. '║    progmod2.obj: progmod2.bas                                             ║
  93. '║    bc progmod2 /d/o/w/ah/fs;                                              ║
  94. '║                                                                           ║
  95. '║    progmod3.obj: progmod3.bas                                             ║
  96. '║    bc progmod3 /d/o/w/ah/fs;                                              ║
  97. '║                                                                           ║
  98. '║    progmod4.obj: progmod4.bas                                             ║
  99. '║    bc progmod4 /d/o/w/ah/fs;                                              ║
  100. '║                                                                           ║
  101. '║    prog.exe: prog.obj progmod1.obj progmod2.obj progmod3.obj progmod4.obj ║
  102. '║    link @prog.rsp                                                         ║
  103. '║                                                                           ║
  104. '║ The link response file prog.rsp might look like this:                     ║
  105. '║                                                                           ║
  106. '║    prog progmod1 + progmod2 + (progmod3) + (progmod4) + EXTERNAL.OBJ      ║
  107. '║    prog                                                                   ║
  108. '║    prog                                                                   ║
  109. '║    PRO7.LIB + progUITB.LIB + DTFMTER.LIB + FINANCER.LIB                   ║
  110. '║                                                                           ║
  111. '║ I have also added a feature that writes the unreferenced items to a file  ║
  112. '║ for each module, where the filename is modulename.UNR.  This aids in      ║
  113. '║ cleaning up the modules.  See SUB ReadSource.                             ║
  114. '║                                                                           ║
  115. '║ I have added a variable LibDir$ which uses any LIB environment variable   ║
  116. '║ to find the necessary libraries.  See main module.                        ║
  117. '║                                                                           ║
  118. '╚═══════════════════════════════════════════════════════════════════════════╝
  119. '┌─────────┤ MAKEQLB.BAS - .QLB maker utility for BASIC programs ├───────────┐
  120. '│                                                                           │
  121. '│Copyright (c) 1988, 1989 Crescent Software                                 │
  122. '│by Don Malin and Chris May with user input enhancements by Ken White       │
  123. '│Notes:                                                                     │
  124. '│      Source files must be saved in Text format.                           │
  125. '│                                                                           │
  126. '│      Five parameters are required for this program -- one or more main    │
  127. '│      program names, the new .QLB file name, a list file name (NUL for no  │
  128. '│      list), one or more library names from which to extract the needed    │
  129. '│      routines, and the BQLB## support library.  As with LIB and LINK, a   │
  130. '│      semicolon (;) can be used to force MAKEQLB to use its defaults.      │
  131. '│                                                                           │
  132. '│      The program will check for routines that were declared but never     │
  133. '│      used or BASIC procedures that were defined but never used.           │
  134. '│      Declared unreferenced routines will not be added to the new Quick    │
  135. '│      Library.                                                             │
  136. '│                                                                           │
  137. '│      If a list file (.LST) is given in place of the source file name,     │
  138. '│      the program will make the quick library from the list instead of     │
  139. '│      searching the source files for external references.                  │
  140. '│                                                                           │
  141. '│MAKEQLB basicprogram1 [Basicprogram2], quicklib[.qlb], listfile[.lst],_    │
  142. '│        library[.lib] [library2[.lib], [bqlb##][;]                         │
  143. '│                                                                           │
  144. '│Compile and Link as follows:                                               │
  145. '│      BC makeqlb /ah /s [/fpa] /o;                                         │
  146. '│      LINK /e/noe makeqlb [nocom] [nolpt] [smallerr],,,pro;                │
  147. '│                                                                           │
  148. '│      [] = optional items. "/fpa" and "smallerr" are available with        │
  149. '│      BASCOM 6, "no" object files may be included with your compiler.      │
  150. '│                                                                           │
  151. '└───────────────────────────────────────────────────────────────────────────┘
  152.  
  153.