|
Tools BCC CHMOD CL COFF2OMF COFFIMPLIB DMC DIFF DIFFDIR DUMP DUMPOBJ DUMPEXE EXE2BIN FLPYIMG GREP HC IMPLIB LIB LIBUNRES MAKE MAKEDEP ME OBJ2ASM PATCHOBJ RC RCC SC SHELL SMAKE TOUCH UNMANGLE WHEREIS Compiling Compiling Code C Implementation C++ Implementation Language Extensions Mixing Languages Assembly Language Inline Assembler Optimizing Code Numerics Programming Regular Expressions Acrtused Pragmas Precompiled Headers Predefined Macros Warning Messages Error Messages Runtime Messages Linking Optlink Switches Module Definition Files Operation and Design Error Messages Win32 Programming Win32 Programming DOS and Win16 Programming Memory Models 16 Bit Pointer Types and Type Modifiers Handle Pointers DOS DOS 32 (DOSX) Win16 Win16 DLLs Win16 Prolog/Epilog Virtual Memory For 640Kb DOS C/C++ Extensions Contract Programming __debug statement __debug declaration Dynamic Profiling Embedding C in HTML Porting to DMC++ Switching to DMC++ from Microsoft from Borland Porting Guide |
MAKE: Orchestrate buildDocumentation for make.exe for Win32Command line syntax
make {target} {macro=text} {switch}
Environment Variablesmake looks for the environment variable MAKEFLAGS upon startup. The string for MAKEFLAGS, if any, is parsed as if it was typed on the command line for the actual command line is parsed. For example:SET MAKEFLAGS=CFLAGS=-D make targetis equivalent to: make CFLAGS=-D target The MakefileA makefile is a text file containing a sequence of:
Comment linesComment lines are lines in which the first non-blank character is a #. Comment lines are ignored. Comment lines are removed before \ line splicing is done.Blank linesBlank lines contain zero or more tabs or spaces. Blank lines are ignored.Macro definition linesMacros are defined with lines of the form:MACRO = textSpaces and tabs around the = are stripped. They are used: $(MACRO)Single character macro names do not need () when expanded. Definitions for macros are searched for in the following order:
Explicit Definition linestarget [target ...] : [dependency ...] [; rule] [# ... ] Implicit Definition lines.targ_ext.dep_ext : [; rule] [# ... ] Rule linestab [rule flag] rule [# ...] Predefined macros
Rule flagsRules can be preceeded by one of the following characters:
Win32 internal commandsThe following commands are internal to Win32, that is, when make executes one it does so by executing CMD.EXE and passing the line to be executed to it. The internal commands are:break,cd,chdir,cls,copy,ctty, date,del,dir,echo,erase,exit, if,md,mkdir,pause, rd,rem,rmdir,ren,rename, time,type,ver,verify,vol Long command linesWindows and DOS have limits on the length of a command line. Under DOS, this limit is 127. Under Win32, it varies from version to version and can depend on end user configuration. make assumes a command line limit of 996. If this limit is exceeded, and the rule is known to or flagged as accepting long command lines via the environment, the long command line is passed via the environment variable _CMDLINE. The actual command line the rule sees is @_CMDLINE. If writing programs to make use of this, use the response_expand() function in the program. To flag a rule as accepting this form, use the * rule flag. If running under a version of Windows that cannot handle 996 character command lines, use the ~ rule flag to tell make to pass the command line via _CMDLINE.Special targets
Default makefileThe default makefile (if the -f flag is not given) is "makefile".LoggingFor long and verbose makes, the output of make along with all messages can be redirected to a log file for later perusal.make >logNote that only stdout output of programs run by make are redirected. sc.exe, etc. all redirect fine. masm 4.0 and earlier versions won't. Error messages
OtherWhen a rule is executed and it returns a non-zero exit status, the message:--- errorlevel exitstatusis printed and make terminates (unless make was instructed to ignore the exit status).
A # indicates a comment. The rest of the line is ignored.
|