When you maintain a project under DOS or in a DOS session under OS/2, you will probably need to use the NMK utility. NMK uses only 5K of memory, leaving room for the programs called during the build. You run NMK the same way you run NMAKE, using the same command-line syntax and the same description-file syntax. NMK calls NMAKE to read the description file and perform the build.
The behavior of NMK is slightly different from that of NMAKE. The fundamental difference is that NMAKE rechecks the update status of all files after each build step, whereas NMK checks file status only once, at the start of the build process. If your description file simply compiles a series of files and then links them, this difference never causes a problem. But consider the following example, which uses a pseudotarget to clean up old files during the build:
all : clean example.exe
example.exe : example.asm
ML example
clean :
del example.obj
del example.exe
This description file erases EXAMPLE.OBJ and EXAMPLE.EXE, then recompiles. Under NMAKE, it works as intended; that is, it
1.Erases files
2.Checks the status of EXAMPLE.EXE
3.Rebuilds EXAMPLE.EXE because EXAMPLE.EXE is no longer present
However, NMK checks the status of the environment only at the beginning of the build. Since EXAMPLE.EXE exists when the build starts, the preceding description file
1.Erases files
2.Stops execution, because EXAMPLE.EXE was present and up-to-date at the beginning of the process
PWB never generates a description file that requires dynamic status checking to run correctly, so you can use PWB-created description files with either NMAKE or NMK.