home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
CPE601.ZIP
/
3PMAKE.DOC
next >
Wrap
Text File
|
1990-04-09
|
6KB
|
173 lines
3PMAKE v1.00
Program Maintenance Utility
Copyright(c) 1990 - 3P Software, Inc. All Rights Reserved.
3PMAKE is a cross between the Unix MAKE and Microsoft's NMAKE utilities. While
it is not as powerful as NMAKE it does support the format of NMAKE files and
some of the NMAKE command set.
3PMAKE has some advantages over other MAKE utilities in the structure of the
makefile that it will use. Unlike most other MAKE utilities which require that
dependencies be listed in a bottom up manner, 3PMAKE will accept dependencies
anywhere in the makefile.
3PMAKE supports a DOS environment variable called '3PMAKE' of course. This
environment variable can be used to set your preferred default command line
switches for 3PMAKE. For example the command 'SET 3PMAKE=-d' will cause 3PMAKE
to always operate in debug mode. Any command line option, or options, may be
entered into the environment variable as defaults.
The folowing special macros are pre-defined in 3PMAKE:
$* = base filename of current target file
$@ = full filename & path of current target file
$< = full name of first dependent file.
$** = list of all dependent files.
The following commands are supported:
.SILENT = do not echo comands as they are processed.
.IGNORE = ignore errorlevels of executing programs and continue.
User defined macros are supported for example:
CC = clipper
CLFLAGS= -l -m
.prg.obj:
$(CC) $< $(CLFLAGS)
Command line parameters:
-d - Debug mode, shows dates & times of files as it works
-n - No-Execute, shows steps without actual execution.
-i - Ignore program return codes. Same as '.IGNORE'
-f - next argument is make file name, '-' means use stdin.
-s - silent mode, same as '.SILENT'
any other command will display a help screen
3PMAKE also allows variables to be defined on the command line, for example:
3PMAKE CC=Clipper would define a macro $(CC) = to 'Clipper'
If you're unfamiliar with Make utilities, the job of this program is to
maintain multi-module programs. You specify (in a 'makefile' - an ordinary
text file) a target file (say, PROG.EXE), its components (e.g. PROG.OBJ,
FUNCS.OBJ), THEIR components (PROG.C, FUNCS.C, PROG.H), and the actions
required to construct a target from its components (called dependents). For
instance, if PROG.OBJ depends on PROG.C and PROG.H, you could include the
lines:
prog.obj: prog.c prog.h
cc -c $<
Then, if Make finds either prog.c or prog.h to be newer than prog.obj, the
specified action is performed. The '$<' is a macro which is replaced by the
name of the first dependent, in this case prog.c. You can define your own
macros, like this:
MNAME = text
where 'MNAME' is the name you wish to use for this macro, and 'text' is the
text to replace the macro. You reference a macro my preceding it with a '$'
and enclosing it in parentheses. e.g.:
CC = clipper
CLFLAGS = -l
fil.obj: fil.clp
$(CC) @$< $(CLFLAGS)
When invoking 3PMAKE, either specify a target name, or by default the target
will be the 'topmost' in the dependency tree.
Following is a sample makefile:
# sample makefile for 3PMAKE
#
# define macros
CC = clipper
CF = -l -m
CP = -l
# Inference rules
.prg.obj:
$(CC) $< $(CF)
.clp.obj:
$(CC) @$@ $(CP)
# program make defines
prog.exe: main.obj cust.obj addr.obj errorsys.obj \
rprt.obj scan.obj
blinker @$*.lnk
# dependencies
main.obj: main.clp
main.clp: main1.prg main2.prg main3.prg
cust.obj: cust.prg
addr.obj: addr.prg
errorsys.obj: errorsys.prg
rprt.obj: rprt.prg
scan.obj: scan.prg
# EOF: makefile
Note that 3PMAKE prefers a downward dependency list with the topmost
dependencies having priority and the first being the primary condition of the
make.
3PMAKE is now provided with the 3PX library for Clipper and CPE v5.00. 3PMAKE
will be undergoing constant enhancement and improvement. If you are using
3PMAKE and do not own 3PX or CPE, then you should register your copy of 3PMAKE
with 3P Software, Inc. by filling out the registration form and sending it with
your registration fee to:
3P Software, Inc
1827 Kendrick Street
Philadelphia, PA 19152-1829
--------------------------------------------------------------------------------
REGISTRATION FORM FOR 3PMAKE v1.00
Name: ____________________________________________________________
Address: ____________________________________________________________
____________________________________________________________
____________________________________________________________
Phone: ________________________________________ optional
Where did you receive 3PMAKE?
______________________________________________________________________________
Comments:
______________________________________________________________________________
______________________________________________________________________________
Registration Fee: $10.00 Amount Enclosed: _______________
Checks or money orders should be payable to: 3P SOFTWARE, INC.