On Tue, Feb 6, 2018 at 6:28 PM, Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com> wrote: > > > On 2018-02-06 15:53, Volker Simonis wrote: >> >> Hi, >> >> as Matthias wrote, we're usually running configure from a newly >> created build directory which is outside the source tree. Also, the >> build user who calls configure may differ from the user owning the >> source tree. I'd therefor like to propose the following small change >> which checks from where 'configure' was called. If configure was >> called from within the source tree, nothing changes, otherwise we will >> create the '.build' helper directory which contains >> 'generated-configure.sh' right in the current build directory: >> >> diff -r fd40b0b3d849 make/autoconf/configure >> --- a/make/autoconf/configure Tue Feb 06 23:49:10 2018 +0530 >> +++ b/make/autoconf/configure Tue Feb 06 15:46:48 2018 +0100 >> @@ -52,7 +52,16 @@ >> fi >> build_support_dir="$CUSTOM_ROOT/.build" >> else >> - build_support_dir="$TOPDIR/.build" >> + # Test from where we are running configure, in or outside of src root. >> + if test "x$TOPDIR" = `pwd`; then >> + # We are running configure from the src root. >> + # Create 'build_support_dir' under $TOPDIR >> + build_support_dir="$TOPDIR/.build" >> + else >> + # We are running configure from outside of the src dir. >> + # Create 'build_support_dir' in the current directory. >> + build_support_dir=".build" >> + fi >> fi >> >> conf_script_dir="$TOPDIR/make/autoconf" >> >> Would you be OK with this change? If nobody complains, I will open a >> JBS issue and submit a webrev for formal review. > > Hi Volker and Matthias, > > I'm sorry I missed this usecase. :-(
No problem - we're here to fix it :) > > I think the patch is OK. I'm just thinking about the "make reconfigure" > case. I guess it works as long as you call "make reconfigure" from the same > directory, but then again, that's probably the likely way to work in this > case. It will *not* work in the case that you do e.g.: > mkdir -p build/mybuild && cd build/mybuild > bash ../../configure > cd ../.. > make CONF=mybuild > > but then again, mixing "methods" like that is perhaps not so common, and the > only penalty is that we get two .build directories. > > Maybe we should even use "configure-support" instead of ".build" as > build_support_dir for the "outside of src dir" case? It would certainly fit > in better with already existing structure in the build output directory. > This was my first idea as well. Unfortunately, "$OUTPUTDIR/configure-support" is only created from generated-configure.sh (from basics.m4) so we have a chicken/egg problem here. Do you propose to already create "$OUTPUTDIR/configure-support" in the configure script before creating generated-configure.sh ? > /Magnus > > > >> >> Regards, >> Volker >> >> >> On Tue, Feb 6, 2018 at 2:27 PM, Baesken, Matthias >> <matthias.baes...@sap.com> wrote: >>> >>> Hello I noticed that after replacing generated-configure.sh and >>> using autoconf , the build process writes into the sources . >>> Error looks like this : >>> >>> Runnable configure script is not present >>> Generating runnable configure script >>> mkdir: cannot create directory `/openjdk/linuxppc64/jdk/.build': >>> Permission denied >>> >>> >>> ( I run configure from a separate generation directory ) >>> >>> Is there a way around this currently (e.g. placing the .build folder >>> where configure is started and not into the sources ?) ? >>> >>> >>> Thanks ,Matthias > >