📄 wmake.gml
字号:
.* .mono .THINGME gives Script a hard time so use back quote instead
:set symbol='sysper' value='~.'
:set symbol="prod16" value="16-bit &product".
.if '&lang' eq 'C' or '&lang' eq 'C/C++' .do begin
:set symbol='libdir' value='&libdir32.'
:set symbol='compcmd' value='wcc386'
:set symbol='ocompcmd' value='wcc'
:set symbol='compopt' value='/mf /d1'
:set symbol='compprdopt' value='/mf'
:set symbol='warnopt' value='/w3'
:set symbol='optnam' value='compile_options'
:set symbol='optcont' value='compile_options_$(version)'
:set symbol='optprod' value='compile_options_production'
:set symbol='optdeb' value='compile_options_debugging'
:set symbol='wlinkdebug' value='debug all'
.do end
.if '&lang' eq 'FORTRAN 77' .do begin
:set symbol='libdir' value='&libdir32.'
:set symbol='compcmd' value='wfc386'
:set symbol='ocompcmd' value='wfc'
:set symbol='compopt' value='/mf /d1'
:set symbol='compprdopt' value='/mf'
:set symbol='warnopt' value='/warn'
:set symbol='optnam' value='compile_options'
:set symbol='optcont' value='compile_options_$(version)'
:set symbol='optprod' value='compile_options_production'
:set symbol='optdeb' value='compile_options_debugging'
:set symbol='wlinkdebug' value='debug all'
.do end
.*
.chap The &makname Utility
.*
.if &e'&dohelp eq 0 .do begin
.section Introduction
.do end
.*
.np
.ix '&makname' '&makcmdup'
.ix 'make' '&makcmdup'
.ix 'program maintenance'
.ix 'maintenance'
The &makname utility is useful in the development of programs
and text processing but is general enough to be used in many different
applications.
.ix '&makcmdup' 'time-stamp'
.ix 'time-stamp'
Make uses the fact that each file has a time-stamp associated with it
that indicates the last time the file was updated.
Make uses this time-stamp to decide which files are out of date with
respect to each other.
For instance, if we have an input data file and an output report file
we would like the output report file to accurately reflect the
contents of the input data file.
In terms of time-stamps, we would like the output report to have a
more recent time-stamp than the input data file (we will say that the
output report file should be "younger" than the input data file).
If the input file had been modified then we would know from the
younger time-stamp (in comparison to the report file) that the report
file was out of date and should be updated.
Make may be used in this and many other situations to ensure that
files are kept up to date.
.np
Some readers will be quite familiar with the concepts of the Make file
maintenance tool.
&makname is patterned after the Make utility found on UNIX systems.
The next major section is simply intended to summarize, for reference
purposes only, the syntax and options of Make's command line and
special macros.
Subsequent sections go into the philosophy and capabilities of
&makname..
If you are not familiar with the capabilities of the Make utility, we
recommend that you skip to the next major section entitled "Dependency
Declarations" and read on.
.*
.section &makname Reference
.*
.np
.ix 'make' 'reference'
.ix '&makcmdup' 'reference'
The following sub-sections serve as a reference guide to the &makname
utility.
.*
.beglevel
.*
.section &makname Command Line Format
.*
.np
.ix '&makcmdup command line' 'format'
The formal &makname command line syntax is shown below.
.ix '&makcmdup command line' 'invoking &makcmdup'
.ix 'command line format' '&makcmdup'
.mbigbox
&makcmdup [options] [macro_defs] [targets]
.embigbox
.pc
As indicated by the square brackets [ ], all items are optional.
.begnote
.note options
is a list of valid &makname options, each preceded by a slash ("/")
or a dash ("&minus.").
Options may be specified in any order.
.note macro_defs
is a list of valid &makname macro definitions.
.ix '&makcmdup command line' 'defining macros'
Macro definitions are of the form:
.millust begin
A=B
.millust end
.pc
and are readily identified by the presence of the "=" (the "#"
character may be used instead of the "=" character if necessary).
Surround the definition with quotes (") if it contains blanks (e.g.,
"debug_opt=&wlinkdebug").
The macro definitions specified on the command line supersede any
macro definitions defined in makefiles.
Macro names are case-insensitive unless the "ms" option is used to
select Microsoft NMAKE mode.
.ix '&makcmdup command line' 'targets'
.note targets
is one or more targets described in the makefile.
.endnote
.*
.section &makname Options Summary
.*
.np
.ix '&makcmdup command line' 'options'
In this section, we present a terse summary of the &makname
options.
.ix '&makcmdup command line' 'help'
.ix '&makcmdup command line' 'summary'
This summary is displayed on the screen by simply entering "&makcmdup
?" on the command line.
.exam begin
C>&makcmd ?
.exam end
.begnote $compact
.note &sw.a
make all targets by ignoring time-stamps
.note &sw.b
block/ignore all implicit rules
.note &sw.c
do not verify the existence of files made
.note &sw.d
debug mode - echo all work as it progresses
.note &sw.e
always erase target after error/interrupt (disables prompting)
.note &sw.f
the next parameter is a name of dependency description file
.note &sw.h
do not print out &maksname identification lines (no header)
.note &sw.i
ignore return status of all commands executed
.note &sw.k
on error/interrupt: continue on next target
.note &sw.l
the next parameter is the name of a output log file
.note &sw.m
do not search for MAKEINIT file
.note &sw.ms
.ix 'NMAKE'
Microsoft NMAKE mode
.note &sw.n
no execute mode - print commands without executing
.note &sw.o
use circular implicit rule path
.note &sw.p
print the dependency tree as understood from the file
.note &sw.q
query mode - check targets without updating them
.note &sw.r
do not use default definitions
.note &sw.s
silent mode - do not print commands before execution
.note &sw.sn
noisy mode - always print commands before execution
.note &sw.t
touch files instead of executing commands
.note &sw.u
UNIX compatibility mode
.note &sw.v
verbose listing of inline files
.note &sw.y
show why a target will be updated
.note &sw.z
do not erase target after error/interrupt (disables prompting)
.endnote
.*
.section *refid=clo Command Line Options
.*
.np
Command line options, available with &makname, allow you to control
the processing of the makefile.
:OPTLIST.
:OPT name='a'
.ix '&makcmdup options' 'a'
.ix 'global recompile'
.ix 'recompile'
make all targets by ignoring time-stamps
.np
The "a" option is a safe way to update every target.
.ix '&makcmdup' 'touch'
.ix 'touch'
.ix '&tchcmdup'
For program maintenance, it is the preferred method over deleting
object files or touching source files.
:OPT name='b'
.ix '&makcmdup options' 'b'
block/ignore all implicit rules
.np
The "b" option will indicate to &maksname that you do not want any
implicit rule checking done.
The "b" option is useful in makefiles containing double colon "::"
explicit rules because an implicit rule search is conducted after a
double colon "::" target is updated.
.ix '&makcmdup directives' '.BLOCK'
.ix 'BLOCK' '&makcmdup directive'
Including the directive
.id &sysper.BLOCK
in a makefile also will disable implicit rule checking.
:OPT name='c'
.ix '&makcmdup options' 'c'
do not verify the existence of files made
.np
&maksname will check to ensure that a target exists after the
associated command list is executed.
The target existence checking may be disabled with the "c" option.
The "c" option is useful in processing makefiles that were developed
with other Make utilities.
.ix '&makcmdup directives' '.NOCHECK'
.ix 'NOCHECK' '&makcmdup directive'
The
.id &sysper.NOCHECK
directive is used to disable target existence checks in a makefile.
:OPT name='d'
.ix '&makcmdup' 'debugging makefiles'
.ix 'debugging makefiles'
.ix '&makcmdup options' 'd'
debug mode - echo all work as it progresses
.np
The "d" option will print out information about the time-stamp of
files and indicate how the makefile processing is proceeding.
:OPT name='e'
.ix '&makcmdup options' 'e'
.ix '&makcmdup' 'target deletion prompt'
.ix 'target deletion prompt'
always erase target after error/interrupt (disables prompting)
.np
The "e" option will indicate to &maksname that, if an error or
interrupt occurs during makefile processing, the current target being
made may be deleted without prompting.
.ix '&makcmdup directives' '.ERASE'
.ix 'ERASE' '&makcmdup directive'
The
.id &sysper.ERASE
directive may be used as an equivalent option in a makefile.
:OPT name='f'
.ix '&makcmdup options' 'f'
the next parameter is a name of dependency description file
.np
The "f" option specifies that the next parameter on the command line
is the name of a makefile which must be processed.
If the "f" option is specified then the search for the default
makefile named "MAKEFILE" is not done.
.ix '&makcmdup' 'MAKEFILE'
.ix 'MAKEFILE'
Any number of makefiles may be processed with the "f" option.
.exam begin
&makcmd /f myfile
&makcmd /f myfile1 /f myfile2
.exam end
:OPT name='h'
.ix '&makcmdup options' 'h'
do not print out &maksname identification lines (no header)
.np
The "h" option is useful for less verbose output.
Combined with the "q" option, this allows a batch file to silently
query if an application is up to date.
Combined with the "n" option, a batch file could be produced
containing the commands necessary to update the application.
:OPT name='i'
.ix '&makcmdup options' 'i'
ignore return status of all commands executed
.np
.ix '&makcmdup directives' '.IGNORE'
.ix 'IGNORE' '&makcmdup directive'
The "i" option is equivalent to the
.id &sysper.IGNORE
directive.
:OPT name='k'
.ix '&makcmdup options' 'k'
on error/interrupt: continue on next target
.np
&maksname will stop updating targets when a non-zero status is returned
by a command.
The "k" option will continue processing targets that do not depend on
the target that caused the error.
.ix '&makcmdup directives' '.CONTINUE'
.ix 'CONTINUE' '&makcmdup directive'
The
.id &sysper.CONTINUE
directive in a makefile will enable this error handling capability.
:OPT name='l'
.ix '&makcmdup options' 'l'
the next parameter is the name of a output log file
.np
&maksname will output an error message when a non-zero status is
returned by a command.
The "l" option specifies a file that will record all error messages
output by &maksname during the processing of the makefile.
:OPT name='m'
.ix '&makcmdup options' 'm'
do not search for the MAKEINIT file
.np
The default action for &maksname is to search for an initialization
file called "MAKEINIT" or "TOOLS.INI" if the "ms" option is set.
The "m" option will indicate to &maksname that processing of the
MAKEINIT file is not desired.
:OPT name='ms'
.ix 'NMAKE'
.ix '&makcmdup options' 'ms'
Microsoft NMAKE mode
.np
The default action for &maksname is to process makefiles using
&company syntax rules.
.ix 'Microsoft compatibility' 'NMAKE'
The "ms" option will indicate to &maksname that it should process
makefiles using Microsoft syntax rules.
For example, the line continuation in NMAKE is a backslash ("\") at
the end of the line.
:OPT name='n'
.ix '&makcmdup options' 'n'
no execute mode - print commands without executing
.np
The "n" option will print out what commands should be executed to
update the application without actually executing them.
Combined with the "h" option, a batch file could be produced which
would contain the commands necessary to update the application.
.exam begin
&makcmd /h /n >update.bat
update
.exam end
.pc
This is useful for applications which require all available resources
(memory and devices) for executing the updating commands.
:OPT name='o'
.ix '&makcmdup options' 'o'
use circular implicit rule path
.np
.ix '&makcmdup directives' '.OPTIMIZE'
.ix 'OPTIMIZE' '&makcmdup directive'
When this option is specified, &maksname will use a circular path
specification search which may save on disk activity for large
makefiles.
The "o" option is equivalent to the
.id &sysper.OPTIMIZE
directive.
:OPT name='p'
.ix '&makcmdup options' 'p'
print out makefile information
.np
The "p" option will cause &maksname to print out information about all
the explicit rules, implicit rules, and macro definitions.
:OPT name='q'
.ix '&makcmdup options' 'q'
query mode - check targets without updating them
.np
The "q" option will cause &maksname to return a status of 1 if the
application requires updating; it will return a status of 0 otherwise.
Here is a example batch file using the "q" option:
.exam begin
&makcmd /q
if errorstatus 0 goto noupdate
&makcmd /q /h /n >\tmp\update.bat
call \tmp\update.bat
:noupdate
.exam end
:OPT name='r'
.ix '&makcmdup options' 'r'
do not use default definitions
.np
The default definitions are:
.millust begin
__MAKEOPTS__ = <options passed to &makcmdup>
__MAKEFILES__ = <list of makefiles>
__VERSION__ = <version number>
__LOADDLL__= defined if DLL loading supported
__MSDOS__ = defined if MS/DOS version
__NT__ = defined if Windows NT version
__NT386__ = defined if x86 Windows NT version
.*__NTAXP__ = defined if Alpha AXP Windows NT version
__OS2__ = defined if OS/2 version
__QNX__ = defined if QNX version
__LINUX__ = defined if Linux version
__LINUX386__ = defined if x86 Linux version
.*__LINUXPPC__ = defined if PowerPC Linux version
.*__LINUXMIPS__ = defined if MIPS Linux version
__UNIX__ = defined if QNX or Linux version
MAKE = <name of file containing &makcmdup>
#endif
# clear &sysper.EXTENSIONS list
&sysper.EXTENSIONS:
# In general,
# set &sysper.EXTENSIONS list as follows
&sysper.EXTENSIONS: .exe .nlm .dsk .lan .exp &
.lib .obj &
.i &
.asm .c .cpp .cxx .cc .for .pas .cob &
.h .hpp .hxx .hh .fi .mif .inc
.millust end
.np
For Microsoft NMAKE compatibility (when you use the "ms" option), the
following default definitions are established.
.millust begin
# For Microsoft NMAKE compatibility switch,
# set &sysper.EXTENSIONS list as follows
&sysper.EXTENSIONS: .exe .obj .asm .c .cpp .cxx &
.bas .cbl .for .f .f90 .pas .res .rc
%MAKEFLAGS=$(%MAKEFLAGS) $(__MAKEOPTS__)
MAKE=<name of file containing &makcmdup>
AS=ml
BC=bc
CC=cl
COBOL=cobol
CPP=cl
CXX=cl
FOR=fl
PASCAL=pl
RC=rc
&sysper.asm.exe:
$(AS) $(AFLAGS) $*&sysper.asm
&sysper.asm.obj:
$(AS) $(AFLAGS) /c $*&sysper.asm
&sysper.c.exe:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -