Thomas, On Mon, Mar 23, 2015 at 8:26 AM, <t.martitz@xxxxxx> wrote: > > Hello, > > I came across the following issue: > > We have one source directory, and part of that is built twice. Once for our > target platform (cross compile, in-tree build) and once for build host (to > make some tests, out-of-tree build). > > Now we would like to use the same configure script, just with different > arguments, for the two builds. However when I execute configure the second > time in the build directory for host build then configure exits with the > error message "source directory already configured; run "make distclean" > there first". I understand that this is because the first configure was run > in the actual source directory because we do in-tree builds there. > > However, to my understanding it should not be a problem to re-run configure > for an out-of-tree build because the outputs (config.status etc.) are > placed in the out-of-tree directory, so overwriting of files created by the > first configure run is not possible. Indeed, configure does not give an > error when the first build is out-of-tree too, which suggests there is no > conflict between two builds generated by same configure script. > > Can you suggest a solution for this, preferably one that does not imply > doing out-of-tree builds for the cross compiled built too. Can I make > configure simply skip that change somehow? we (from the HPC community) are facing a similar problem, we solved it in Score-P [1] by having a new top-level configure, which calls sub-configures for the actual builds twice, one for the cross-compile and one for the build host, each with different arguments (this is a very simplified scatch of our approach). Though it is not done with vanilla autotools features, but we try to keep this build framework generic and it is used by multiple (tightly coupled) packages already. If this sounds like a approach you are willing to pursuit, than don't hesitate to contact the ScoreP team. Regards, Bert [1] score-p.org > > Best regards and thank you in advance > Thomas Martitz > > > _______________________________________________ > Autoconf mailing list > Autoconf@xxxxxxx > https://lists.gnu.org/mailman/listinfo/autoconf _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf