如何用nmake查看内置规则?

问题描述 投票:0回答:1

使用 GNU make,人们可以说

make -npf /dev/null
(或在 Windows 上
NUL
)以显示内置规则。其中
-n
表示
--just-print
-p
表示
--print-data-base
-f
指定要使用的 make 文件。

我怎样才能用

nmake
达到同样的效果?

nmake
1个回答
1
投票

当在没有 makefile 的文件夹中输入命令

nmake -p
时,将给出环境变量列表,后跟内置规则列表:

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

其他开关请参见

nmake /?
,例如
-n
。另请参阅我的答案,了解旧版
nmake
文档的一些有用参考。

© www.soinside.com 2019 - 2024. All rights reserved.