Makefile的长命令行 [英] Long command lines for makefiles

查看:124
本文介绍了Makefile的长命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们有一个生成文件来生成我们的产品.不幸的是,build命令的长度变得太大了,我们现在得到命令行太长".错误.

有人知道如何解决这个问题吗?


Hi,

We have a makefile that builds our product. Unfortunately the length of the build command has grown too large and we now get "The command line is too long." error.

Any one know how to get around this one?


Thanks.

推荐答案

或..
大多数"Makes"还允许您在单独的文件中指定命令行参数,并将其作为make的参数传递.

这同样适用于大多数编译器/链接器和其他工具.而不是在该工具的命令行上指定所有标志并包括路径,而是将它们放置在文件中.
or..
Most ''Makes'' also allow you to specify your command line arguments in a separate file and pass it as an argument to make.

The same applies to most compilers/linkers and other tools. Instead of specifying all the flags and include paths on the commandline of the said tool, put them in a file.


我不想指出明显的问题,但错误消息告诉您您需要做.找到一种将您的构建拆分为较小的子项目并独立构建的方法.
I hate to point out the obvious but the error message is telling you what you need to do. Find a way to split your build into smaller sub-projects and build them independently.


这篇关于Makefile的长命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆