aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-10-05 23:42:24 -0700
committerRobert Yang <liezhi.yang@windriver.com>2016-01-11 18:02:07 -0800
commit96a7593b9e978f217a1349bf9b6dd598108e7ad8 (patch)
tree551512e81885a846fd417c95b07d19488cda0378
parent097b013f99f3b90dbb0f7038163ec4b4b316b510 (diff)
downloadopenembedded-core-contrib-rbt/relative.tar.gz
autotools.bbclass: use relative path to run configure scriptrbt/relative
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>
-rw-r--r--meta/classes/autotools.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index d546a5c028..44cb422584 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -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