On Sun, Jul 04, 2004 at 12:27:06PM -0500, Daniel Díaz wrote:
[compilation failure that may or may not have been fixable with `make clean'. mental has suggested that another `cvs up' may have fixed it.]
Why don't you just add "make clean" and "autogen.sh" to your script to run each time.
Because it takes two hours to compile on a Celeron 300 MHz.
Possibilities:
- Try having CXX='ccache g++-3.3' (or whatever version). Off-hand, I'm not sure if ccache copes gracefully with upgrading g++ if one doesn't specify a version number. I think g++'s calling conventions etc. (i.e. inter-.o file compatibility requirements) are fairly stable now anyway though.
- Try
make || { make clean; ../autogen.sh && ./config.status --recheck && make; }
i.e. only make clean if the first compile fails.
Similarly one could try
make \ || { ../autogen.sh && ../configure blah blah && make; } \ || { make clean; make; } \ || { (cd .. && cvs -q up) \ && ../autogen.sh \ && ../configure blah blah \ && make }
or add some gymnastics like doing cvs -q up until no files change.
I haven't checked what return code `cvs' gives (it isn't immediately obvious in the man page); you may want to add something like `|| [ $? = 1 ]' or `|| true' to cvs commands.
(The above commands assume you're using a separate build directory as a subdirectory of the top-level source directory.)
You could replace `./config.status --recheck'
I'm not all that keen on people doing `make clean' as a matter of course: we should make some attempt for `make clean' to be unnecessary. However, for automated build scripts, it does seem reasonable to try `make clean'.
pjrm.