1

With GNU make one can say make -npf /dev/null (or on Windows NUL) in order to show the built-in rules. Where -n means --just-print, -p means --print-data-base and -f specifies the make file to use.

How can I achieve the same with nmake?

0xC0000022L
  • 20,597
  • 9
  • 86
  • 152

1 Answers1

1

The command nmake -p will give:

INFERENCE RULES:

.asm.obj::
        commands:       $(AS) $(AFLAGS) /c $<

.asm.exe:
        commands:       $(AS) $(AFLAGS) $<

.c.obj::
        commands:       $(CC) $(CFLAGS) /c $<

.c.exe:
        commands:       $(CC) $(CFLAGS) $<

.cc.obj::
        commands:       $(CC) $(CFLAGS) /c $<

.cc.exe:
        commands:       $(CC) $(CFLAGS) $<

.cpp.obj::
        commands:       $(CPP) $(CPPFLAGS) /c $<

.cpp.exe:
        commands:       $(CPP) $(CPPFLAGS) $<

.cxx.obj::
        commands:       $(CXX) $(CXXFLAGS) /c $<

.cxx.exe:
        commands:       $(CXX) $(CXXFLAGS) $<

.rc.res:
        commands:       $(RC) $(RFLAGS) /r $<

.SUFFIXES: .obj .asm .c .cc .cpp .cxx .f .f90 .for .rc

See nmake /? for other switches, such as -n. Also see my answer here for some useful references to the older nmake documentation.

0xC0000022L
  • 20,597
  • 9
  • 86
  • 152
Joseph Quinsey
  • 9,553
  • 10
  • 54
  • 77