Hey Ralf, Ralf Wildenhues <Ralf.Wildenhues@xxxxxx> writes: > Hello Sebastian, > > * Sebastian Freundt wrote on Mon, Jul 23, 2007 at 11:31:07PM CEST: > [...] >> my build directory (distinct from $srcdir): >> /home/src/=build/ >> >> There's an AC_CONFIG_LINKS([src/s:src/s]) in my configure.ac. >> configure or config.status, respectively, now do the following: >> >> 1. in a clean build directory: create the src subdirectory, create the >> symlink from $srcdir/src/s to $builddir/src/s >> 2. in a configured build directory: delete $builddir/src/s and create a >> link from $builddir/src/s(!) to $builddir/src/s >> 3. in such a screwed build directory, another invocation of config.status >> yields the correct link again ($builddir/src/s -> $srcdir/src/s) > > Interesting setup. For it to work with Autoconf 2.59 required that the > source tree and the build tree be different. (I assume that that is the > version you originally got this to work with.) If both trees coincide, > you would get an error if config.status is executed more than once, and > you already have a broken file after the first configure run. > > My first gut reaction to this setup was of the sort "doctor it hurts > when I do this -- so don't do it". And there is a somewhat > non-intuitive reason for this, too: files that exist under identical > names in the source and the build trees are confusing. Confusing to > the developer, and a hassle with the 'make' program. That is due to > all the tiny differences in how different 'make' implementations do > VPATH handling. Finally, on systems where 'ls -s' does not work right, > the file is copied, so you may still have to take care of > synchronization issues if you rely on those, such as having the wrong > header file included or so. > > Nonetheless, I see that there may be valid uses of this setup, so here's > a patch against CVS Autoconf to try (once quoted, with 'diff -b', for > readability, as most of the status.m4 changes are due to reindentation). > Note that, as exercised in the test, you can use > test "$srcdir" != '.' && AC_CONFIG_LINKS([src/t:src/t]) > > to avoid the warning at config.status time; incidentally, writing it > that way will make your code compatible with Autoconf 2.59 as well. ;-) > > WDYT? Is the warning too much (and should rather be AC_MSG_NOTICE)? If you asked me I'd vote for AC_MSG_WARN since, admittedly, this setup is peculiar and could have been the yield of sloppy coding in 9 of 10 cases. > OK to apply? Fine by me :) Works like a charm! > Cheers, and thanks for the nice report, No, I thank _you_ for the quick fix. :) [snip] So long, Sebastian _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf