将生成的文件添加到分发中的最佳方法? [英] Best way to add generated files to distribution?

查看:107
本文介绍了将生成的文件添加到分发中的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用autoconf/automake的相当复杂的(C ++)项目,其中包括一些生成的"文件(foo.yy-> foo.cc).实际的构建是在各种平台上使用控制脚本"(熟悉该概念的人为Gentoo .ebuild)完成的.

I have a quite complex (C++) project using autoconf / automake, which includes some "generated" files (foo.yy -> foo.cc). Actual builds are done using a "control script" (Gentoo .ebuild for those familiar with the concept), on various platforms.

现在,目标平台之一不正确地支持foo.yy-> foo.cc步骤,并且必须使用在Linux机器上生成的foo.cc文件.

Now, one of the target platforms does not properly support the foo.yy -> foo.cc step, and has to use the foo.cc file generated on a Linux box.

现在我有两种方法可以解决这个问题:

Now I have two ways to go about this:

1)将foo.cc检入到项目存储库中,并以某种方式对configure.in(或其他方式)进行修补,以包括对foo.yy/foo.cc的时间戳检查,如果在有问题的目标上运行,则会产生可理解的错误消息带有过时的foo.cc;

1) Check in foo.cc into the project repository and somehow patch configure.in (or whatever) to include a timestamp check on foo.yy / foo.cc, generating a comprehensible error message if run on the target in question with an outdated foo.cc;

2)将foo.cc检入控制脚本存储库,并获取脚本控制时间戳并给出错误消息.

2) Check in foo.cc into the control script repository, and have the script control time stamps and give the error message.

我可以这样做2)没问题,但是我认为放置foo.cc的位置不正确.

I could do 2) no problem, but I don't think it's the right place to put foo.cc.

另一方面,我对autoconf/automake并不了解,也不知道如何在configure.in(或任何地方)中实现时间戳检查/错误消息.

On the other hand, I don't know much about autoconf / automake, and wouldn't know how to implement a timestamp check / error message in configure.in (or whereever).

您有什么建议,在座的任何人都知道如何执行解决方案1)吗?

What are your suggestions, and would anyone here know how to go about solution 1)?

使用解决方案3)解决,调整有问题的目标框,直到它能够执行foo.yy-> foo.cc步骤本身为止. 我的问题解决了.

Solved using solution 3), tweaking the problematic target box until it is able to do the foo.yy -> foo.cc step itself. My problem is solved.

但是我将问题悬而未决-如何使用autoconf/automake进行时间戳检查/可理解的错误消息?

But I'll leave the question open - how to do timestamp checks / comprehensible error messages with autoconf / automake?

推荐答案

从Automake手册中的8.8开始:

From 8.8 in the Automake manual:

"yacc"生成的中间文件; (或< lex’)将是 包括在所进行的任何发行中.这样用户不会 需要拥有"yacc"或< lex’.

The intermediate files generated by ‘yacc’ (or ‘lex’) will be included in any distribution that is made. That way the user doesn't need to have ‘yacc’ or ‘lex’.

这听起来好像您所描述的问题不应该存在.

That makes it sound as if the problem you're describing should not exist.

这篇关于将生成的文件添加到分发中的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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