home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
OS2BUILD.ZIP
/
BUILD.DOC
next >
Wrap
Text File
|
1988-10-18
|
62KB
|
1,717 lines
Program Build Utility
Version 1.00
Usage Guidelines
Architectural Software Products(R)
Information in this document is subject to change without notice and
does not represent a commitment on the part of Architectural Software
Products(R).
Copyright (c) 1987, 1988 Architectural Software Products
Microsoft, CodeView, MS, MS-DOS, MS-OS/2 and MS-Windows are the
registered trademarks of Microsoft Corporation.
Architectural Software Products
100 Front Street East
Suite 300
Toronto, Ontario
M5A 1E1
(416) 363-2292
Version 1.00.14
Revised 1988-10-18
Table of Contents
──────────────────────────────────────────────────────────────────────
Introduction........................................... 5
1.0 Pull Down Menu..................................... 6
1.1 File........................................... 6
1.2 Erase.......................................... 7
1.3 Run............................................ 8
1.4 Directory...................................... 8
1.5 Build.......................................... 10
1.6 Utilities...................................... 13
1.7 CodeView....................................... 14
1.8 F2=Compile..................................... 14
2.0 Build Options...................................... 15
3.0 Mouse and Keyboard Usage........................... 22
4.0 Build Limits....................................... 24
5.0 Configuring the Program Build Utility.............. 24
5.1 Language Considerations........................ 24
5.2 Sample Environment............................. 25
6.0 Support Files...................................... 26
Usage Guidelines
────────────────
Introduction
The following guidelines are provided to allow you to use the Program
Build Utility in a useful and meaningful manner. The Program Build
Utility is a full functioning programming environment specifically
designed for a programmer's needs within the MS-OS/2(R) environment.
The utility has been designed for speed and ease of use. It supports
the full Microsoft(R) Professional Language Products by allowing you
to select required compile options and to compile or assemble various
files contained within a sub-directory or drive without having to
continually type in the command line switches for the file to be
compiled or assembled. It also allows you to easily change options
before the compile or assembling of a file making sure that the
correct invocation is used. The Program Build Utility significantly
speeds up the process of developing and building programs without you
having to build complex batch or MAKE files for each set of programs
you are developing.
The screen of the Program Build Utility when it is first presented to
you is divided into five areas: Pull Down Menu Bar, File/Directory
Display Window, Build Settings Display Window, Background Info Window
and Drive/Path Information Window.
The Pull Down Menu bar shows the titles of menus and commands that are
available for your use. You can access a menu by either using the
Mouse or by pressing the Alt key and the letter highlighted in the
Pull Down Menu. The F2=Compile command is used to start the process
of compiling or assembling a selected file.
The File/Directory window is used to display the current contents of
the directory selected. Depending on the selection from the Directory
menu, you can display the current files contained within the directory
or other sub-directories. You select files or sub-directories by
clicking the Mouse cursor on the file or by using the cursor direction
keys to move the selection bar from one file to another. To view
remaining entries not shown in the window, you can click the Mouse
cursor on the scroll bar above or below the elevator to select
alternate pages of the directory list. With the keyboard, you can use
the PgUp and PgDn keys.
The Build Settings on always displayed within the Build Settings
window. These settings describe the manner in which you wish to
assemble or compile a file or group of files. Through the Build
Options pull down menu, you can change the Build characteristics for
any or all of the source modules.
Next to the Build Settings window is the Background Info window. When
you allowed for Background Build Sessions, information concerning the
Background Build Session will be displayed within this window.
The final window is used to display the current selected drive and
path, number of files contained within the directory selected and the
room remaining on the selected drive.
5│
Program Build Utility
─────────────────────
The following will outline the general use of the Program Build
Utility and the functions that are available within and their usage.
1.0 Pull Down Menu
The Pull Down Menu provides 7 menus and the Compile command. Through
the pull down menu's, you can perform commands and view information.
The general functions provided are: File, Erase, Run, Directory,
Build, Utilities and CodeView.
1.1 File
The File Pull Down Menu is used in conjunction with file operations.
The File Edit function is used to invoke the Programmer's Editor to
edit the file selected from the file list. The Programmer's Editor is
an editor designed specifically for the programmer and to work hand-
in-hand with the Program Build Utility utility. When the Programmer's
Editor is invoked, it is told to start editing the file highlighted
within the file list as though it were invoked from the Operating
System command prompt only and selecting the file from within the
Programmer's Editor environment.
ProgEd will also be automatically invoked when re-building a file or
program and error trapping has been enabled through the Build Options
function when an error is detected by the compiler or assembler.
ProgEd will be automatically configured to Build Error Mode and will
display the errors encountered within the compiler or assembler in a
Build Error window at the bottom of the editing window. For more
information on the Programmer's Editor, consult the Programmer's
Editor Usage Guidelines.
An alternate method of selecting a file for editing is to double click
the left Mouse button on the file. This is equivalent to selecting
the file and selecting the File Edit function from the File Pull Down
Menu.
The File Statistics function is used to display the file size and last
time of update for the file highlighted within the file list. The
name of the file, its size and last modification date are displayed
within the Build Settings Window below the file list window.
The File Touch function is used to update the currently selected file
to the current date and time. This function is useful when using the
Microsoft Program Maintenance Utility (MAKE). The utility is faster
than editing and saving the file when only trying to update the date
or time. It is for this reason the function is called Touch, since it
essentially touches the file date and time.
The File Cut Time function is used to set the date and time of the
selected file to a value entered through the dialogue windows. This
is useful if you want all the files that you will be releasing for
distribution to have the same date and time. The time is entered at
│6
Usage Guidelines
────────────────
the prompt on a 24 hour clock basis and the date is entered as it
would with the Operating System in the format of mm/dd/yy.
The File XCopy function is similar to the OS/2 XCopy function where
through the dialogue window you describe the source and target
drive/paths. This is useful to copy large groups of files between
sub-directories or disks without have to use the Run pull down menu or
to start another OS/2 process.
The File Copy function is similar to the XCopy function except that it
will copy the selected file from the file list to the destination
drive/path entered through the dialogue window. You cannot use the
function to specify the source path/drive to copy a file into the
current directory.
The File Move function is similar to the Copy function except that it
will move the selected file from the file list to the destination
drive/path entered through the dialogue window. You cannot use the
function to specify the source path/drive to move a file into the
current directory.
The File Rename function allows you to rename the currently selected
file within the file list to another name. A dialogue window will ask
for the new name for the file. After the file has been renamed, the
file list will be redisplayed with the file renamed. The filename
will be displayed with the dialogue window to allow easier editing of
the name.
Finally, the File Exit function allows you to exit the program either
back to the OS/2 Program Selector or to the OS/2 command prompt.
1.2 Erase
The Erase Pull Down Menu is designed to provide file maintenance
similar to that of the Operating System without having to leave the
Program Build Utility programming environment. If individual files or
the backup (.BAK) files are no longer needed, they can be removed from
the active disk or sub-directory.
The Erase File function will delete the file highlighted in the
directory list. It must be remembered that when this is done, it is
the same as invoking the ERASE or DEL command from the Operating
System (OS/2). In both cases, the results are the same; access to the
file can no longer happen.
When it has been decided that the backup (.BAK) files of the files
edited are no longer needed, the Erase Backups function will remove
all the backup entries from the disk directory. This function is very
useful when the current disk is almost full and some of the files
contained on that disk are backup files as they can be removed thereby
allowing for an increase in disk space available.
7│
Program Build Utility
─────────────────────
1.3 Run
The Run Pull Down Menu provides three functions that allow you to run
a selected file, OS/2 command or shell to OS/2.
The Run File function is used to run a program that contains a .EXE or
.COM extension. All that is necessary is to select the file from the
file list and to select the function. A dialogue window is displayed
allowing you to enter additional parameters that are used by the
selected program. Like the File Edit function, if you double click on
the executable with the left Mouse button, the file will be executed.
The Run OS Command function is similar to the Operating System command
prompt where you can type in normal Operating System commands such as
DIR or ERASE, etc. A dialogue window is opened to allow you to enter
the OS/2 command which will be executed by OS/2.
The Run OS/2 Shell function allows you to temporarily exit the Program
Build Utility to the OS/2 command prompt. You can then perform normal
OS/2 commands from the command prompt. To return back to the Program
Build Utility, you only need to type EXIT at the OS/2 command prompt.
1.4 Directory
The Directory Pull Down Menu allows for disks in the current drive or
for sub-directories to be changed. It also allows for a new disk
drive or new directory path to be used instead of the current drive or
directory path. When this is done, the new drive/sub-directory
becomes the current drive/sub-directory with the input/output of files
taking place on the drive/sub-directory.
The Directory ChDir function is similar to the ChDir (CD) command
found in the Operating System. The major difference between the
Operating System command and the one found here is that you pick the
sub-directory you wish to move to from the directory list on the
screen. This is similar to that of picking a document or file to
edit.
With the Operating System command, you would either type in the path
to the previous directory or you would use the Operating System
shorthand of ".." to move back or up a sub-directory level. Within
this function, you would select the previous dir from the directory
list presented on the screen.
The PgUp, PgDn and cursor keys are used to select the sub-directory
you want after selecting the Directory Show Directory function and
this function is used to perform the actual selection to the sub-
directory chosen.
When the new sub-directory that you have chosen has been changed to, a
new sub-directory list will be read in and displayed allowing you to
make further selections. You can also select the sub-directory by
double clicking the left Mouse button on the desired sub-directory.
│8
Usage Guidelines
────────────────
This is equivalent to selecting the sub-directory and using the
Directory ChDir function from the Directory Pull Down Menu.
The Directory Drive function uses the same syntax as the Operating
System to change from one disk drive to another. When you have
selected this function you will be prompted for the drive you wish to
change to.
To change drives from one to another, you need to type in the drive
letter followed by a colon such as:
a:
As with the Operating System, this form must be used when changing
drive designations. If the target drive (the letter designation)
exists, that drive will be used in place of the previous. Any sub-
directories found within the root directory of the new drive will then
be displayed.
If the drive does not exist, an error message will be displayed.
You can exit from this prompt at any time by pressing the Esc key
which essentially aborts the initial request.
Alternately, if you are using a Mouse, you can click the Mouse cursor
a drive designation list at the bottom of the dialogue window.
The Directory RmDir function allows for the sub-directory highlighted
in directory list to be removed. The sub-directory must be totally
empty for the function to work with the exception of the previous dir
entry. You cannot remove a sub-directory that contains hidden files.
Before the Program Build Utility tries to remove the sub-directory, it
will prompt you to verify the removal of the sub-directory. The
dialogue window will display a N above the cursor, which is the
automatic response. If you wish to remove the sub-directory, you must
type in a y or Y.
The function will display an error message if you try to remove the
previous dir entry or a sub-directory that may not be empty.
You can exit from this dialogue window at any time by pressing the Esc
key which essentially aborts the initial request.
The Directory MkDir function allows you to create an additional sub-
directory from within the directory currently being used. As
mentioned at the beginning of the section, you can create additional
sub-directories that may have the same name as others but are in
different sub-directories.
9│
Program Build Utility
─────────────────────
The dialogue window of the function requests the name of the new
directory. The directory name follows the same rules as for the
naming of files. The form that the directory name can have is:
dirname.ext
where the dirname consists of one to eight characters. The value
entered for the dirname is checked for invalid characters by the
Operating System. The .ext denotes the directory name extension which
consists of a period followed by one to three characters.
Invalid dirname or .ext characters are:
" / \ [ ] : | < > + = ; ,
All other characters are valid.
The Directory Show Directory function is used to switch from the file
list to the directory list. You must first perform this function if
you wish to use the above functions except for the Directory Drive
function. To switch back to the file list from the directory list,
you use the Directory Show File Area function.
1.5 Build
This is the function used to provide Build support within the
programming environment. This function is designed around the
Microsoft language family and currently supports the following:
Language Product Versions
────────────────────────────────────────────────────
BASIC Compiler 6.0
C Optimizing Compiler 5.0 and 5.1
FORTRAN Optimizing Compiler 4.0 and 4.1
Macro Assembler 5.0 and 5.1
Pascal Compiler 4.0
Utility Versions
────────────────────────────────────────────────────
MAKE Utility 4.05 and above
Overlay Linker 3.60 and above
Segmented-Executable Linker 5.00 and above
Incremental Linker 1.00 and above
CodeView(R) Symbol Packing Utility 2.00 and above
The Build Group Function is used to toggle the Build Session into
Group Build Mode. When the Group is toggled on and the F2=Compile
function is selected, the Program Build Utility will try to assemble
or compile the files within the file list that contain valid language
extensions. They can only be valid language extensions such as .ASM,
.BAS, .C, .FOR or .PAS otherwise the Program Build Utility will issue
an error declaring an illegal language extension.
│10
Usage Guidelines
────────────────
The Build Group function can be useful when printing out a full source
listing of the program or for selected re-building. The file
highlighted in the file list is used as the starting point for the
Build Group function.
The Build Options function is used to configure Build characteristics
for when a language source file is assembled or compiled. From the
Build Options Menu you can select the memory model, CPU type,
Operating System, error trapping, data model along with final linking
characteristics. Section 2.0 Build Options describes the options
available and their corresponding Microsoft language support.
The Build Cancel Error function is used to cancel a Error Pending from
a Background Build Session such that the next time you use the File
Edit function, the Programmer's Editor is not configured in Build
Error Mode.
The Build Background function is used to allow the Build Session to be
performed in the background. When the F2=Compile function is invoked,
a flashing message, Background Active, will be displayed within the
Background Info window and the source or MAKE file being built will
also be displayed. When the Microsoft Linker or Incremental Linker
has been invoked in the session, the Background Info window will be
updated to signify the current stage within the process. If the
background Build Session was successful, a single beep will sound,
signifying that the Build Session has ended. If an error has occurred
within the Build Session, one of two things will happen. If the
Program Build Utility has determined a source module error, two beeps
and a buzzing sound will occur and a Error Pending message will be
displayed in the Background Info window. You can either edit the
error like in the foreground Build mode by using the File Edit
function or you can cancel the Error Pending message by using the
Build Cancel Error function. If the error encountered was a link
error, a Link Error message will be displayed in the Background Info
window.
When a background process is active, it is possible for you to kill
the process by using the Build Kill Background function. This will
cancel the build process active in the background and will clear the
Background Info window signifying that the background process is no
longer active.
The Build Error Trap function is used to tell the Program Build
Utility whether or not to trap source module build errors issued
through the assembler or compiler. When Build Error Trap is enabled
and foreground Build is being used, the Programmer's Editor will be
automatically invoked when a Build Error occurs. If Background Build
Session is enabled and a Build Error occurs, the next time you enter
the File Edit function, the Programmer's Editor will be automatically
configured for Build Error Mode unless you cancel the Error Pending
through the Build Cancel Error.
11│
Program Build Utility
─────────────────────
Op Sys Target Response
Switch Environment File Considerations
──────────────────────────────────────────────────────────────────────
DOS MS-DOS DOS.LNK
OS/2 MS-OS/2 OS2.LNK
OS/2 MT MS-OS/2 OS2MT.LNK Used with C Multi-
Threaded Libraries
Windows Windows WIN.LNK
The Build Switches function allows alternate assembler and compiler
switches to be defined such that when a file is re-built from the file
list, the switches defined through this function will be used along
with the options defined through the Build Options Menu. No alternate
switch values can be issued for the linker; switches defined through
this function will only work with the associated assembler or
compiler. The switch value entered will be displayed in the Message
Window above the current build options.
To erase the switch value defined, two methods can be used. You
invoke the Build Switches a second time and either press the Esc key
when the dialogue window is displayed or click the left Mouse button.
The Build Object Path function is used to describe the drive or sub-
directory where the object files produced by the compiler or assembler
are to be stored. If you have set the BUILD Environment Variable in
your Environment, this value will be displayed within the dialogue
window. You can override this setting by entering in a new drive/path
for where the object files are to be stored.
The Build Data function allows you to change the data threshold for
Far Data in C and FORTRAN program when using the large memory model.
The default setting for the -Gt switch is 1. It is through this
function that you can change this value to suit your own needs.
│12
Usage Guidelines
────────────────
1.6 Utilities
This is the function used to provide Utility support within the
programming environment. This function is designed around the
Microsoft language family and currently supports the following:
Utility Versions
────────────────────────────────────────────────────
Overlay Linker 3.60 and above
Segmented-Executable Linker 5.00 and above
Incremental Linker 1.00 and above
CodeView(R) Symbol Packing Utility 2.00 and above
Bind Utility 1.00 and above
Import Library Manager 1.00 and above
The Utilities CV Pack function is used to define the name of the file
that will be used with the Microsoft CodeView Packing (CVPack)
utility. The full path name for the file must be given including the
.EXE extension. The CVPack utility will only be used when the
CodeView switch has been set in the Build Options Menu. The Program
Build Utility will invoke the CVPack utility for files re-built with
the linking option selected from the Build Options Menu.
The Utilities ILink function is used to invoke the Microsoft
Incremental Linker. You should follow the rules for using the
Incremental Linker when using this function as described within the
Microsoft Language manuals provided with the compiler or assembler.
The Microsoft Linker can be invoked through the Build Link function.
The Program Build Utility will invoke the Linker according the link
options defined through the Build Options Menu and will expect to use
a response file called DOS.LNK, OS2.LNK, OS2MT.LNK or WIN.LNK
depending on the Operating System selected through the Build Options
Menu. The following shows the corresponding Build Options selections
and response files:
Op Sys Target Response
Switch Environment File Considerations
──────────────────────────────────────────────────────────────────────
DOS MS-DOS DOS.LNK
OS/2 MS-OS/2 OS2.LNK
OS/2 MT MS-OS/2 OS2MT.LNK Used with C Multi-
Threaded Libraries
Windows Windows WIN.LNK
The Utilities Bind .Exe function is used to bind OS/2 Family
Application Interface (FAPI) type programs for both OS/2 and DOS. To
use the function you must first create a file containing the proper
command tail as described for the Bind Utility. This file could take
the form of:
Install C:\OS2\LIB\DOSCALLS.LIB -mInstall
13│
Program Build Utility
─────────────────────
The resulting file could be called Install.Bnd and it would be this
file that you would highlight in the file list before invoking the
Utilities Bind .Exe function. Build will read in the file when
invoking the Bind Utility and will pass to the Bind Utility the
contents of Install.Bnd. There are no restrictions as to the naming
of the file containing the Bind Utility command tail instructions.
The Utilities ImpLib function is used to create an Import Library for
Dynamic Link Libraries (.DLL's). By creating the necessary
Definitions file (.DEF) and highlighting this file in the file, you
can use the Utilities ImpLib function to create the Import Library for
use by other OS/2 projects. Consult your language reference manuals
for using the definitions files to create import libraries.
1.7 CodeView
The CodeView Pull Down Menu allows you to describe the debugging
target drive/path and to invoke the CodeView debugger.
The CodeView File Path function is used to describe the drive/path of
the target debugging program. This allows for the selection of .EXE
files contained on other disks or within other sub-directories other
than the one that is currently selected. The function will prompt you
for the drive/path and allows you to enter CodeView and debugging
program switches. Using this function is a way of specifying the
target debugging file along with the targets command line switches if
that mode needs to be tested or is desirable. The prompt line could
appear as:
target switch1 switch2
The Microsoft CodeView debugger is invoked with through the CodeView
Start function. If the drive/path was entered through the CodeView
File Path function, that path will be used instead of the file
selected within the file list. If the file within the file list is
not a .EXE extension, CodeView will issue an error message.
1.8 F2=Compile
The F2=Compile command is used to invoke the appropriate assembler or
compiler depending on the language extension of the file currently
selected within the file unless either Group Build Mode has been
selected or the file selected within the file list has a .MAK
extension, in which case the Microsoft MAKE utility is invoked. The
Program Build Utility upon determining which language is being used
will invoke the assembler or compiler according to the values defined
through the Build Options Menu and shown within the Build Settings
Window. You can also click the Mouse cursor on the F2=Compile instead
of using the F2 function key to start the compile process.
│14
Usage Guidelines
────────────────
2.0 Build Options
The Build Options function is used to configure the Build
characteristics for when a language source file is assembled or
compiled. From the Build Options Menu you can select the memory
model, CPU type, Operating System, data model along with final linking
characteristics. The following describes the options available and
their corresponding Microsoft language support:
Model:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
Small ■ ■
Medium ■ ■ ■
Compact ■ ■
Large ■ ■ ■
Huge ■ ■ ■
Custom Model:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
Small Code ■
Large Code ■
Data Near ■
Data Far ■
Data Huge ■
SS == DS ■
DS Loaded ■
DS Fixed ■
Math Lib:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
Alt Calls ■ ■ ■ ■ ■
Emul Calls ■ ■ ■ ■
8087 Calls ■ ■ ■ ■
Inline Lib ■ ■ ■ ■
Inline ■ ■ ■ ■ ■
15│
Program Build Utility
─────────────────────
Basic:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
On Error ■
Emul Calls ■
8087 Calls ■
Inline Lib ■
Run-Time Lib ■
C ANSI:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
Enforce ■
Case:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
Preserve All ■
Convert Upper ■
Preserve Publics ■
CPU:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
8088 ■ ■ ■
80188 ■ ■ ■
80286 ■ ■ ■
80386 ■
Optimization:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
Alias ■
Disable ■ ■
Intrinsic ■
Loop ■
No Hoist ■
Float Pnt ■ ■
Size ■ ■
Speed ■ ■
Win Alias ■
Maximize ■ ■
│16
Usage Guidelines
────────────────
Stack Check:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
Remove ■ ■ ■
Op Sys:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
DOS ■ ■ ■ ■ ■
OS/2 ■ ■ ■ ■ ■
OS/2 MT ■ ■
Windows ■ ■ ■
Compile Type:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
CodeView ■ ■ ■ ■ ■
ExePack ■ ■ ■ ■ ■
Link ■ ■ ■ ■ ■
ILink ■ ■ ■ ■ ■
Listing ■ ■ ■ ■ ■
Release ■ ■
Prototype ■
Data:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
Far ■ ■
Impure Code:
Value BASIC MASM FORTRAN C Pascal
──────────────────────────────────────────────────────────────────────
Check ■
17│
Program Build Utility
─────────────────────
The default Build Options upon startup of the Program Build Utility
are:
Option Default
──────────────────────────────────────────────────────────────────────
Model Small
Custom Model None Defined
Math Lib None Defined (Uses Compiler Default)
C ANSI Disabled
Case Preserve Public
CPU 80286
Optimization Maximize
Stack Check Governed by Optimization
Op Sys OS/2
Compile Type None Defined
Data None Defined (Uses Compiler Default)
Impure Code Check
The following macro definitions are defined for MAKE file support when
these options have been selected. The macro definitions should be
defined within the MAKE file and used on the command line invocation
sequence:
asm_sw=
bas_sw=
c_sw=
for_sw=
pas_sw=
The Program Build Utility will use the definitions defined through the
Build Options Menu to correctly configure the .MAK file. It should be
noted that Program Build Utility expects the MAKE file to have .MAK
extension otherwise the illegal language extension error will be
displayed. A sample MAKE command line is:
ET CL $(c_sw) -Fo$* $*.C
You will notice that the line begins with the command ET. ET.EXE is a
utility used in conjunction with Program Build Utility to allow for
the trapping of errors from within the MAKE file. If the ET (Error
Trap) utility finds errors within its trap file, it will cause the
MAKE utility to return a non-zero return code which will be
interpreted by the Program Build Utility that a possible error has
occurred during the Build Session. If the Program Build Utility
determines that an error has occurred in the source file, ProgEd will
automatically be invoked and configured in Build Error Mode.
│18
Usage Guidelines
────────────────
The following is an example of a MAKE file that utilizes the
facilities provided through the Program Build Utility:
# MAKE file for Program Build Utility
# Revised: 1988-06-01
# Copyright (c) 1987, 1988 Architectural Software Products
asm_sw=
c_sw=
E:\BUILD.OBJ: BUILD.C
ET CL $(c_sw) -FoE:\$* $*.C
E:\BUILDERR.OBJ: BUILDERR.C
ET CL $(c_sw) -FoE:\$* $*.C
E:\BUILDOPT.OBJ: BUILDOPT.C
ET CL $(c_sw) -FoE:\$* $*.C
E:\CRT0.OBJ: CRT0.ASM
ET MASM $(asm_sw) $*,E:\$*;
E:\DATADEF.OBJ: DATADEF.C
ET CL $(c_sw) -FoE:\$* $*.C
E:\MENUCONT.OBJ: MENUCONT.C
ET CL $(c_sw) -FoE:\$* $*.C
E:\MENUDISP.OBJ: MENUDISP.C
ET CL $(c_sw) -FoE:\$* $*.C
E:\MOUSESUP.OBJ: MOUSESUP.C
ET CL $(c_sw) -FoE:\$* $*.C
E:\SCRFUNC.OBJ: SCRFUNC.C
ET CL $(c_sw) -FoE:\$* $*.C
E:\SYSFUNC.OBJ: SYSFUNC.C
ET CL $(c_sw) -FoE:\$* $*.C
The following rules are used within MAKE files when being used in
conjunction with Program Build Utility. The macro definitions differ
for each language supported. The table below illustrates which
language is supported for each macro definition:
19│
Program Build Utility
─────────────────────
Macro
Definition Assembler BASIC C FORTRAN Pascal
──────────────────────────────────────────────────────────────────────
asm_sw ■
bas_sw ■
c_sw ■
for_sw ■
pas_sw ■
Depending on the values defined through the Build Options Menu, the
macro definition will contain the appropriate switch values for the
language being used. Also, if you have defined additional switches,
they will be passed to the MAKE file and close attention should be
paid to MAKE files that contain mixed language command line
definitions. If a switch value belongs to a given language and it is
used on another, an error may result.
To be able to use the Microsoft Linker from within the Program Build
Utility, you must create a response file that can be used by the
linker otherwise an error will be issued by the linker that the
response file could not be found. Depending on the Operating System
selected through the Build Options Menu, one of the following
automatic response files will be used with the linker:
OpSys
Definition Response File Name
────────────────────────────────────────
DOS DOS.LNK
OS/2 OS2.LNK
OS/2 MT OS2MT.LNK
Windows WIN.LNK
This allows you to create various versions of the final program for
each type of operating System you will be supporting. Also, the
CodeView and ExePack switches are used to tell the Microsoft Linker
how to link the final executable image file.
The following shows an example of the response file defined for a DOS
program:
/NOE BUILD+BUILDERR+BUILDOPT+DATADEF+MENUCONT+
MENUDISP+MOUSESUP+SCRFUNC+SYSFUNC+CRT0
Build
Build
C:\Library\DOSLibS
│20
Usage Guidelines
────────────────
The following shows an example of the response file defined for an
OS/2 version of the same program:
/NOE BUILD+BUILDERR+BUILDOPT+DATADEF+MENUCONT+
MENUDISP+MOUSESUP+SCRFUNC+SYSFUNC
Build
Build
C:\Library\OS2LibS
Build
To be able to use the Microsoft Incremental Linker, you must first set
both the Link and ILink switches in the Build Options Menu. When the
final program is built, the linker will be instructed to build the
final image of the .EXE file suitable for the Incremental Linker and
to create the .SYM and .ILK support files. You can then clear the
Link switch in the Build Options Menu thereby allowing the usage of
the Incremental Linker on subsequent builds of the final program. If
you have previously performed this task and the .SYM and .ILK files
are present, you only need to set the ILink switch.
The Microsoft Segmented-Executable Linker is instructed to initially
link with Code Padding at 256 bytes and Data Padding at 128 bytes
unless you set an Environment Variable called ILINK to the desired
values (see 5.0 Configuring the Program Build Utility). If the
program changes significantly between one build and the next, ILink is
instructed to use the full linker to rebuild the program.
Of the switches set through the Build Options Menu, the Data switch
options should be understood before using them to any great extent.
Under normal compilation, the Microsoft C Optimizing Compiler and the
Microsoft FORTRAN Optimizing Compiler use the default definitions for
near and far data items when the memory model is compact, large or
huge. If the Far switch is selected, the -Gt1 switch will be issued
to the compiler effectively forcing all data items into a separate far
segment and out of the near data segment (DGROUP).
To allow for Windows development, you can select Windows under Op Sys.
When selected, the Program Build Utility will instruct the C and
Pascal compilers to compile the source module for the Windows
environment thereby ensuring that the proper prologue and epilogue
sequences are included for each function within the source module.
To allow for different include files for multi-threaded programs when
using the Microsoft C Optimizing Compiler, an Environment Variable can
be set to described the path of the header files that are to be used.
The Environment Variable is OS2MTINCLUDE and should contain the full
path for where the header files are located. When the OS/2 MT Op Sys
designation has been selected in the Build Options, the Program Build
Utility will include the following switch when C files are compiled:
-Imtincludepath
21│
Program Build Utility
─────────────────────
where mtincludepath is the path from the OS2MTINCLUDE Environment
Variable. If the OS2MTINCLUDE Environment variable is not included,
the switch will not be issued to the C compiler.
The Op Sys switches also are used to allow for selecting the proper
language libraries depending on the target operating system as
selected. The DOSLIB, OS2LIB, OS2MTLIB and WINLIB Build Environment
Variables can be used to define the paths where the language libraries
are stored. This effectively allows you to use the default library
names such as SLIBCE.LIB instead of SLIBCEP.LIB while storing the
libraries in two separate sub-directories. Each time a program is
linked, the Program Build Utility will set the LIB Environment
Variable according to the operating system defined through the Build
Options Menu and the corresponding Build Library Environment Variable.
If the Build Library Environment variables are not defined, you can
still use the LIB Environment variable in the normal way.
Another switch that is provided within the Build Options Menu,
Release, is used to imbed a release version string within the target
object module. The format that the final string will take is:
@@@@####%%%% Mon May 09 09:00:00 EDT 1988
where the current date and time will be derived from the current
Operating System date recorded within the computer at the moment that
the module is re-built. To effectively use this feature, you should
include the Operating System Environment variable TZ to denote the
local time zone in effect. The form that this variable takes is:
TZ=EST5EDT
If no TZ variable is found, then the default PST8PDT is used. This
option is only available for the Microsoft C Optimizing Compiler and
the Microsoft FORTRAN Optimizing Compiler.
To select an item within the Build Options Menu, two methods are
available. The first method is to use the cursor direction keys to
move the selection bar to the desired item and then to hit the <┘ key
to cause the actual selection. The second method is to use the Mouse
to select the item. All that is necessary when using the Mouse is to
click the Mouse cursor on the desired item.
To exit from the Build Options Menu, you can either press the Esc key
or click the Mouse cursor the Exit line within the menu. Once you
have exited from the Build Options Menu, the current Build Options
will be displayed within the Build Settings Window to allow you to
easily determine which options you have selected before using the
F2=Compile function.
3.0 Mouse and Keyboard Usage
The usage of a Mouse is fully supported within the Program Build
Utility. This is one of the unique characteristics of the Program
│22
Usage Guidelines
────────────────
Build Utility and can actually increase the speed of the development
process.
When using the Mouse with dialogue windows, the following conventions
are used. Pressing the left Mouse button is the equivalent of
pressing the Esc key and pressing the right Mouse button is the
equivalent of pressing the <┘ key.
When working with the directory file list, you can use the Mouse to
select a file within the file list simply by moving the Mouse cursor
to the file desired within the list and clicking either Mouse button.
This will cause the highlight bar to move to the file that was clicked
on. To view subsequent pages of the directory list, you can click the
Mouse cursor on the scroll bar either above or below the scroll bar
elevator. Clicking the Mouse cursor above the scroll bar elevator is
the equivalent of pressing the PgUp key and conversely, clicking the
cursor below the elevator is the same as pressing the PgDn key.
When in the file list view, if you double click the left Mouse button
on the desired file, the Programmer's Editor will be invoked as though
you had selected the file and used the File Edit Pull Down Menu
function. Alternately, if you in the directory list view, if you
double click the left Mouse button on the desired sub-directory, the
sub-directory will be selected. This is similar to selecting the sub-
directory and then selecting the Directory ChDir Pull Down Menu
function.
When entering text in a dialogue window, you have a multitude of
editing options which you can you use. The following editing options
are available for use:
Key Function
──────────────────────────────────────────────────────────────────────
Cursor Right Moves the cursor right one character.
Cursor Left Moves the cursor left one character.
Ctrl+Cursor Right Moves the cursor right to the beginning of the
next word.
Ctrl+Cursor Left Moves the cursor left to the beginning of the
previous word.
Ins Changes the text cursor to a full block to
indicate Insert Mode is on. Pressing the Ins key
a subsequent time will cancel Insert Mode and
returning the text cursor to normal size.
Del Will delete the character currently above the text
cursor.
Ctrl+End Will delete all text starting at the current
cursor position to the end of the line.
Backspace Will delete the character immediately to the left
of the text cursor.
23│
Program Build Utility
─────────────────────
4.0 Build Limits
The following describe the maximum limits of the Program Build
Utility:
Maximum Number of Files
within Directory List: 255
Maximum Number of Characters
at Dialogue Window Prompt: 68
5.0 Configuring the Program Build Utility
There are ways of configuring the Program Build Utility to best suit
you system. The following Environment Variables can be defined for
use by the Program Build Utility:
BUILD Path where object files are created
TMP Path where temporary files are created
CV CodeView options
TZ Time zone in effect
OS2MTINCLUDE Path where OS/2 Multi-Thread C Include files are
located
ILINK Padding Switches (/PADC:xxx /PADD:xxx see Language
Manuals for explanation of switch usage and values for
xxx)
DOSLIB Path for to search for DOS support library files
OS2LIB Path for to search for OS/2 support library files
OS2MTLIB Path for to search for OS/2 multi-threaded support
library files
WINLIB Path for to search for Windows support library files
If you are only going to use one particular operating system target
environment, you can ignore including the various library paths with
the corresponding Environment Variables. The library Environment
variables are useful if you a developing programs for various
operating system environments. The Program Build Utility will
automatically set the LIB Environment Variable each time you change
the Op Sys designation through the Build Options Menu.
5.1 Language Considerations
For the Program Build Utility Build Facilities to work properly, the
following Environment Variables need to be set for the following
languages:
CL Default input files and options for the CL driver
FL Default input files and options for the FL driver
PL Default input files and options for the PL driver
MASM Default Assembler Options
LINK Default options for the Link command
LIB Paths to search for library files
│24
Usage Guidelines
────────────────
For the Microsoft C Optimizing Compiler CL, Microsoft FORTRAN
Optimizing Compiler FL and Microsoft Pascal Version 4.0 PL drivers to
work correctly with the Program Build Utility, the /c switch needs to
be defined with the CL, FL and PL Environment Variables otherwise CL,
FL or PL will issue a command line error.
The remaining Environment Variables may be included within the
Operating System Environment to enable you to configure the
programming environment to your specific needs.
5.2 Sample Environment
The following OS/2 Set commands are examples of how to use the
Environment Variables in conjunction with the Program Build Utility
Programming Environment. The sample machine has a hard disk, and two
Virtual or RAM Disks, E: and F: respectively. The C and Macro
Assembler Include files are contained in the F: virtual disk and the
object files are stored in the E: virtual disk for speed. All source
files are contained on the hard disk, C:. Any temporary files created
are also stored on the F: virtual disk. Library files for DOS and
Windows are contained in a sub-directory called LIBRARY and library
files for OS/2 are contained in a sub-directory called OS2\LIB on the
hard disk.
The following Set commands would be included in the OS2INIT.CMD file
so that they are automatically included within the Operating System
Environment when each session is started:
Set Include=F:\
Set Tmp=F:\
Set OS2MTInclude=F:\MT
Set MASM=-V
Set CL=/c
Set FL=/c
Set PL=/c
Set CV=/50
Set DOSLib=C:\Library
Set OS2Lib=C:\OS2\Lib
Set OS2MTLib=C:\OS2\Lib
Set WinLib=C:\Library
Set ILink=/PadC:128 /PadD:64
Set Build=E:\
Set TZ=EST5EDT
25│
Program Build Utility
─────────────────────
6.0 Support Files
The following support files are provided with the Program Build
Utility:
BUILDBG.EXE Program Build Utility Background Build Support Utility
ET.EXE Error trapping utility for use with the Microsoft Make
utility
PROGED.EXE Programmer's EditorTM for file editing and
advanced error trapping support
These files should be included in a subdirectory that is included in
the OS/2 PATH command.
│26