From: Bruce Richardson <bruce.richardson@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH] buildtools: allow symlinks within a source directory
Date: Mon, 23 Jan 2017 12:11:28 +0000 [thread overview]
Message-ID: <1485173488-346-1-git-send-email-bruce.richardson@intel.com> (raw)
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>
---
buildtools/relpath.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.9.3
next reply other threads:[~2017-01-23 12:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-23 12:11 Bruce Richardson [this message]
2017-01-29 21:22 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1485173488-346-1-git-send-email-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).