home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
tools
/
makeqlb
/
makeqlbv.doc
< prev
next >
Wrap
Text File
|
1990-08-12
|
12KB
|
153 lines
'╔════╡ MAKEQLBV.BAS - .QLB maker utility (enhanced) for BASIC programs ╞════╗
'║ ║
'║ Enhancements by David A. Violette, 12 Michaud Ave, Lewiston ME 04240 ║
'║ 207+783-6171 (eves). CompuServe 76456,1602 12 Aug 90 ║
'║ ║
'║ I have changed this program so that the file Objects.obj is named ║
'║ EXTERNAL.OBJ, and the file is retained instead of KILLed. By including ║
'║ EXTERNAL.OBJ in the LINK response file, a separate .LIB is not needed, ║
'║ since the external objects are already referenced in EXTERNAL.OBJ, and ║
'║ the program can be compiled and linked from the command line using the ║
'║ response file. This change allows easy and smallest .QLB but adds easy ║
'║ command line compilation/link using MAKE or NMAKE. See SUB MakeObj as ║
'║ well as this main module. ║
'║ ║
'║ MAKEQLBV may be invoked from the command line in one of several options: ║
'║ ║
'║ (1) MAKEQLBV prog.BAS,prog.QLB,prog.LST,PRO7 progUITB DTFMTER FINANCER,_ ║
'║ QBXQLB; ║
'║ ║
'║ (2) MAKEQLBV prog.LST,prog.QLB,prog.LST,PRO7 progUITB DTFMTER FINANCER,_ ║
'║ QBXQLB; ║
'║ ║
'║ (3) MAKEQLBV @response.ext ║
'║ ║
'║ prog is the name of the program. PRO7 is Crescent Software's QuickPak ║
'║ Professional library for BC7; this is searched for routines I might ║
'║ use in prog. ║
'║ ║
'║ DTFTMTER and FINANCER are libraries supplied by Microsoft with BC7 - ║
'║ these are searched when I use routines from them. ║
'║ ║
'║ progUITB started as the UITBEFR library supplied by Microsoft with ║
'║ BC7, but I have modified several of the routines for use in prog and ║
'║ built this special library. ║
'║ ║
'║ QBXQLB is the link library supplied by Microsoft with BC7. Change ║
'║ this to match the compiler you are using (eg: BQLB45.LIB). ║
'║ ║
'║ The first option will scan the source file given as the first parameter, ║
'║ plus any other module names listed in a prog.MAK file if present, to find ║
'║ the required routines. ║
'║ ║
'║ The second option will get the names of the routines by reading a ║
'║ prog.LST file. MAKEQLB (and MAKEQLBV) will create the prog.LST file when ║
'║ the first option is used, but you may manually edit this file to add or ║
'║ delete names of routines directly. Using prog.LST will greatly speed up ║
'║ processing the QLB since MAKEQLB (and MAKEQLBV) won't have to scan all ║
'║ the source files. ║
'║ ║
'║ The third option allows use of a response file to shorten the command ║
'║ line. The response file name is given immediately after the "@", and the ║
'║ response file contains the items required on the command line, given in ║
'║ the same way they would on a command line. The five parameters are ║
'║ described in Crescent's intro below (copied from their MAKEQLB.BAS ║
'║ module). I use two versions of the response file - one with prog.BAS as ║
'║ the source file name, and one with prog.LST as the source file name. The ║
'║ first will act as option (1), the second as (2). ║
'║ ║
'║ An example response file for option (1) operation might be as follows: ║
'║ ║
'║ prog.BAS,prog.QLB,prog.LST,PRO7 progUITB DTFMTER FINANCER,+ ║
'║ QBXQLB; ║
'║ ║
'║ An example response file for option (2) operation might be as follows: ║
'║ ║
'║ prog.LST,prog.QLB,prog.LST,PRO7 progUITB DTFMTER FINANCER,QBXQLB; ║
'║ ║
'║ The response file must have the parameters separated by commas and spaces ║
'║ as shown. If MAKEQLB (and MAKEQLBV) find a "+" it is replaced with a " " ║
'║ and the next line is appended. Essentially, the response file replaces ║
'║ command line parameters and allows longer lines to be edited using the + ║
'║ as a continuation symbol. ║
'║ ║
'║ A major advantage in using MAKEQLBV instead of MAKEQLB is that the file ║
'║ EXTERNAL.OBJ is saved for use in LINKing. This avoids having to build a ║
'║ separate prog.LIB library as well as the prog.QLB, because EXTERNAL.OBJ ║
'║ can be used to identify the external routines to be pulled from other ║
'║ libraries. This option is only available when you compile and link from ║
'║ the command line, however. ║
'║ ║
'║ To use EXTERNAL.OBJ, simply include it in your list of object files to ║
'║ LINK. I prefer to use a LINK response file, and I also use the MAKE ║
'║ utility with a companion description file. The MAKE prog.DES file might ║
'║ look like this: ║
'║ ║
'║ prog.obj: prog.bas ║
'║ bc prog /d/o/w/ah/fs; ║
'║ ║
'║ progmod1.obj: progmod1.bas ║
'║ bc progmod1 /d/o/w/ah/fs; ║
'║ ║
'║ progmod2.obj: progmod2.bas ║
'║ bc progmod2 /d/o/w/ah/fs; ║
'║ ║
'║ progmod3.obj: progmod3.bas ║
'║ bc progmod3 /d/o/w/ah/fs; ║
'║ ║
'║ progmod4.obj: progmod4.bas ║
'║ bc progmod4 /d/o/w/ah/fs; ║
'║ ║
'║ prog.exe: prog.obj progmod1.obj progmod2.obj progmod3.obj progmod4.obj ║
'║ link @prog.rsp ║
'║ ║
'║ The link response file prog.rsp might look like this: ║
'║ ║
'║ prog progmod1 + progmod2 + (progmod3) + (progmod4) + EXTERNAL.OBJ ║
'║ prog ║
'║ prog ║
'║ PRO7.LIB + progUITB.LIB + DTFMTER.LIB + FINANCER.LIB ║
'║ ║
'║ I have also added a feature that writes the unreferenced items to a file ║
'║ for each module, where the filename is modulename.UNR. This aids in ║
'║ cleaning up the modules. See SUB ReadSource. ║
'║ ║
'║ I have added a variable LibDir$ which uses any LIB environment variable ║
'║ to find the necessary libraries. See main module. ║
'║ ║
'╚═══════════════════════════════════════════════════════════════════════════╝
'┌─────────┤ MAKEQLB.BAS - .QLB maker utility for BASIC programs ├───────────┐
'│ │
'│Copyright (c) 1988, 1989 Crescent Software │
'│by Don Malin and Chris May with user input enhancements by Ken White │
'│Notes: │
'│ Source files must be saved in Text format. │
'│ │
'│ Five parameters are required for this program -- one or more main │
'│ program names, the new .QLB file name, a list file name (NUL for no │
'│ list), one or more library names from which to extract the needed │
'│ routines, and the BQLB## support library. As with LIB and LINK, a │
'│ semicolon (;) can be used to force MAKEQLB to use its defaults. │
'│ │
'│ The program will check for routines that were declared but never │
'│ used or BASIC procedures that were defined but never used. │
'│ Declared unreferenced routines will not be added to the new Quick │
'│ Library. │
'│ │
'│ If a list file (.LST) is given in place of the source file name, │
'│ the program will make the quick library from the list instead of │
'│ searching the source files for external references. │
'│ │
'│MAKEQLB basicprogram1 [Basicprogram2], quicklib[.qlb], listfile[.lst],_ │
'│ library[.lib] [library2[.lib], [bqlb##][;] │
'│ │
'│Compile and Link as follows: │
'│ BC makeqlb /ah /s [/fpa] /o; │
'│ LINK /e/noe makeqlb [nocom] [nolpt] [smallerr],,,pro; │
'│ │
'│ [] = optional items. "/fpa" and "smallerr" are available with │
'│ BASCOM 6, "no" object files may be included with your compiler. │
'│ │
'└───────────────────────────────────────────────────────────────────────────┘