diff options
author | Bruce Richardson <bruce.richardson@intel.com> | 2017-01-23 12:11:28 +0000 |
---|---|---|
committer | Thomas Monjalon <thomas.monjalon@6wind.com> | 2017-01-29 22:36:23 +0100 |
commit | 7a514a0070e871f8383c6839b90d2714ecc90e18 (patch) | |
tree | db79a693a2702efdbf9dc840feae88fb12f71976 /buildtools | |
parent | 9759f4cc5a85e04c6bd1876c9f2bfadb7607a062 (diff) | |
download | dpdk-7a514a0070e871f8383c6839b90d2714ecc90e18.zip dpdk-7a514a0070e871f8383c6839b90d2714ecc90e18.tar.gz dpdk-7a514a0070e871f8383c6839b90d2714ecc90e18.tar.xz |
buildtools: allow symlinks within a source directory
When creating the symlinks for header files to the include folder, the
relpath script dereferenced all symlinks. This made it impossible to
have file A.h renamed to B.h and then symlinked back to its original
name. This is useful to be able to do when refactoring or reworking
a library. Change this so that we just use the dirname of the path from
readlink, we can use the basename as it was originally, even if it was a
symlink.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Diffstat (limited to 'buildtools')
-rwxr-xr-x | buildtools/relpath.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildtools/relpath.sh b/buildtools/relpath.sh index 4ff4671..139b781 100755 --- a/buildtools/relpath.sh +++ b/buildtools/relpath.sh @@ -44,7 +44,7 @@ if [ $# -ne 2 ]; then fi # get the real absolute path, derefencing symlinks -ABS1=$(readlink -f $1) +ABS1="$(dirname $(readlink -f $1))/$(basename $1)" ABS2=$(readlink -f $2) # remove leading slash |