We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
类似这样的工具有很多。 Cookiecutter 是用 Python 编写的,它具有适用于多种语言和框架的项目模板。
There are many tools like this. Cookiecutter is written in Python, and it has project templates for many languages and frameworks.
我怀疑大多数现代集成开发环境都会支持某些东西像这样。
I would suspect that most modern Integrated Development Environments would support something like this.
为什么不使用某种脚本语言编写自己的工具呢?
我通过定制 GNU makefile 来尝试将大部分逻辑推到项目之外来做到这一点。然后有一个小脚本,用于生成目录并编写简单的 makefile,设置几个变量,然后包含预先生成的 makefile。
您可能需要考虑为其他中间系统(如 CMake 或 SCONS)生成文件,而不是直接生成 makefile,因为它们能够抽象出一个系统到另一个系统的差异。
Why don't you write your own tool with some scripting language?
I have done it by tailoring GNU makefiles trying to push most of the logic outside of the project. Then have a small script that generates directories and writes simple makefiles that set a couple of variables and then includes the pre-generated makefiles.
You might want to consider instead of producing makefiles directly, generating files for other intermediate system like CMake or SCONS, as those will be able to abstract the differences from one system to another.