views:

88

answers:

2

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.

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) 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) Check in foo.cc into the control script repository, and have the script control time stamps and give the error message.

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

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).

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

Edit: 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.

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

+1  A: 

Here is a similar SO question, but not a dupe. Might help!

Aiden Bell
Yes on the 1 vs. 2 decision, no on the how-to-do. ;-)
DevSolar
A: 
Braden
If you do a "make dist", and then distribute *that* to the targets and build the package from distribution. But that isn't done in this case, binaries are built directly from what's in the CVS...See edited question - it isn't a problem for me personally anymore.
DevSolar
Why distribute directly from your VCS? (I hope that 'CVS' is a typo--you're not really still using CVS are you?) Things really are easier if you only run the autotool chain on your development box and distribute the generated tarball. In particular, you don't need to have yacc or lex or autoconf or automake or libtool or m4 (etc) installed on your target box.
William Pursell
"`make dist`" is the way to create a distribution when using automake (or any package that follows the GNU conventions, for that matter). If you're not going to use what automake provides, automake can't do much to help you.
Braden
Yes, indeed we are using CVS here. DON'T ask why. (Next week will see us migrate to SVN, which is *definitely* a step ahead in my book.) Building is done by Gentoo-Ebuild-like scripts which are configured to pull the sources directly from the repo. "Make dist" hasn't been tested for ages, and none of the people here is particulary competent with automake. But I see now we should give this some thought... when budget allows. Which, as we all know, will probably mean "never".Sometimes I hate my job. ;-)
DevSolar