nmake 有构建任务吗?
使用 Ant 我可以在继续构建本身之前解压存档...是这样吗可以使用nmake吗? 我可以调用外部应用程序吗? 或者甚至是批处理脚本?
Using Ant I could unzip an archive before proceeding with the build per-se ... Is this possible using nmake? Could I call an external application? Or even a batch script?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以从 nmake Makefile 调用外部应用程序,就像从任何其他 Makefile 调用一样。
然而,该怎么称呼呢? 您需要安装 WinZip 命令行工具或其他工具,对吗?
我建议您查看SCons。 它是一个出色的构建引擎,完全支持 Windows 和 MSVC++,并且内置解压缩功能。
You can call an external application from nmake Makefiles, just as from any other Makefile.
However, what to call? You'll need to have WinZip command line tools or something installed, right?
I'd recommend looking at SCons. It is a wonderful build engine, fully supports Windows and MSVC++, and has unzipping built in.
make 的任何变体都能够执行可以从命令行完成的任何任务。 事实上,任何 makefile 的大部分构建功能都将依赖于外部进程的调用,例如编译器、链接器、库管理器等。 make 的唯一缺点是语法有很多变体(nmake、borland make 、GNU make 等),这使得编写单个跨平台 makefile 实际上是不可能的。
在回答您的特定问题时,请考虑以下内容:
这基本上表明 main.cpp 依赖于 archive.zip 并表明可以通过调用“unzip”命令来满足此依赖性。
Any variant on make has the ability to perform any task that can be done from the command line. Indeed, most of the build functionality of any makefile is going to depend upon the onvocation of external processes such as the compiler, linker, librarian, etc. The only downside to make is that there are so many variations of syntax (nmake, borland make, GNU make, etc.) that make it practically impossible to write a single cross-platform makefile.
In answer to your particular question consider the following:
This basically states that main.cpp depends upon archive.zip and states that this dependency can be satisfied by invoking the "unzip" command.