构建软件的工具
我需要像 make ie dependency + 执行 shell 命令这样的东西,其中失败的命令会停止 make 执行。 但与 shell ie 更深入地集成,现在 make 每行都在单独的上下文中执行,因此在一行中设置变量并在下一行中使用它并不容易(我不希望在行尾使用转义字符,因为它不可读)。 我想要简单的语法(没有 XML)以及控制流和函数(make 中缺少的东西)。 它不必支持编译。我必须将使用自动工具构建的几个组件绑定在一起,打包它们,触发测试并发布结果。
我查看了:make、ant、maven、scons、waf、nant、rake、cons、cmake、jam,它们不符合我的需求。
I need something like make i.e. dependencies + executing shell commands where failing command stops make execution.
But more deeply integrated with shell i.e. now in make each line is executed in separate context so it is not easy to set variable in one line and use it in following line (I do not want escape char at end of line because it is not readable).
I want simple syntax (no XML) with control flow and functions (what is missing in make).
It does not have to have support for compilation. I have to just bind together several components built using autotools, package them, trigger test and publish results.
I looked at: make, ant, maven, scons, waf, nant, rake, cons, cmake, jam and they do not fit my needs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
看看 doit
take a look at doit
请查看fabricate。
如果这不能满足您的需求,或者您不想用 Python 编写构建脚本,您还可以结合使用 shell 脚本和 fabricate。像手动构建项目一样编写脚本,但在构建调用前面加上“fabricate.py”,以便自动管理构建依赖项。
简单的例子:
Have a look at fabricate.
If that does not fulfill your needs or if you would rather not write your build script in Python, you could also use a combination of shell scripting and fabricate. Write the script as you would to build your project manually, but prepend build calls with "fabricate.py" so build dependencies are managed automatically.
Simple example:
考虑到您想要控制流、函数、在同一环境中运行的所有内容并且没有 XML,听起来您想要使用可用的 shell 脚本语言 (sh/bash/ksh/zsh) 或 Perl(插入您自己喜欢的脚本语言)这里!)。
我注意到您没有看过aap。我对此并不熟悉,除了它是给我们带来 vim 的人的 make 系统之外。所以你可能想看一下。
Given that you want control flow, functions, everything operating in the same environment and no XML, it sounds like you want to use the available shell script languages (sh/bash/ksh/zsh), or Perl (insert your own favourite scripting language here!).
I note you've not looked at a-a-p. I'm not familiar with this, other than it's a make system from the people who brought us vim. So you may want to look over that.
混合使用 makefile 和脚本语言来选择一次运行哪个 makefile 可以做到这一点。
A mix of makefile and a scripting language to choose which makefile to run at a time could do it.
我也有同样的需求。我当前的解决方案是使用 makefile 来准确表示图形依赖关系(您必须阅读 “递归 make 被认为是有害的” )。这些 makefile 会触发将 makefile 变量作为参数的 bash 脚本。这样您就不必处理 shell 上下文的问题,并且可以清楚地分离依赖项和操作。
我目前正在考虑 waf,因为它看起来设计得很好并且足够快。
I have had the same needs. My current solution is to use makefiles to accurately represent the graph dependency (you have to read "Recursive make considered harmful"). Those makefiles trigger bash scripts that take makefiles variables as parameters. This way you have not to deal with the problem of shell context and you get a clear separation between the dependencies and the actions.
I'm currently considering waf as it seems well designed and fast enough.
您可能想查看 SCons;它是用 Python 编写的 Make-replacement。
You might want to look at SCons; it's a Make-replacement written in Python.