]> code.ossystems Code Review - openembedded-core.git/commitdiff
autotools.bbclass: use relative path to run configure script
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 6 Oct 2015 06:42:24 +0000 (23:42 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 16 Jan 2016 10:34:25 +0000 (10:34 +0000)
The absolute path (/path/to/configure) caused VPATH in Makefile to be an
absolute path, and then it will be in elf files, use relative path to
run configure can fix the problem.

This will reduce a lot of buildpaths QA issues in a world buld.

[YOCTO #8894]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/classes/autotools.bbclass

index d546a5c0285dc88aa6908437abe4335dc8c299cb..44cb422584367b297e98b0a4b59460cda1946038 100644 (file)
@@ -83,7 +83,9 @@ CONFIGURE_SCRIPT ?= "${AUTOTOOLS_SCRIPT_PATH}/configure"
 AUTOTOOLS_AUXDIR ?= "${AUTOTOOLS_SCRIPT_PATH}"
 
 oe_runconf () {
-       cfgscript="${CONFIGURE_SCRIPT}"
+       # Use relative path to avoid buildpaths in files
+       cfgscript_name="`basename ${CONFIGURE_SCRIPT}`"
+       cfgscript=`python -c "import os; print os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.')"`/$cfgscript_name
        if [ -x "$cfgscript" ] ; then
                bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
                set +e