From e5c63c7cd802220d8293f52c89c855c442d9c9fc Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 22 Nov 2016 16:30:19 -0500 Subject: [PATCH] gdb build script: Make the script work with non-absolute base paths There are two problems when passing a non-absolute path to the -b flag: 1. It ends up being used in "./configure --prefix=${base_dir}". configure fails, because the prefix must be absolute. 2. It ends up being used to set up symlinks, leading to broken links. Making the install path absolute fixes those. Change-Id: I7c1d22754c1a788f02cd912f2114cc091951b303 Signed-off-by: Simon Marchi --- .../scripts/download-build-gdb.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/scripts/download-build-gdb.sh b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/scripts/download-build-gdb.sh index 7062855e787..ff52a4ce09e 100755 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/scripts/download-build-gdb.sh +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/scripts/download-build-gdb.sh @@ -282,6 +282,8 @@ while true; do esac done +abs_base_dir=$(readlink -f "${base_dir}") + # Where we download the tarballs download_dir="${base_dir}/download" @@ -289,7 +291,7 @@ download_dir="${base_dir}/download" build_dir="${base_dir}/build" # Where we make install to -install_dir="${base_dir}/install" +install_dir="${abs_base_dir}/install" # Where we will create symlinks to all gdb versions (in the form gdb.x.y) # (Hint: this is so you can add this directory to your PATH and have all