summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnout Vandecappelle <arnout@mind.be>2017-07-05 16:54:18 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-05 18:10:46 +0200
commit9971e936be6eb2ee5f531953bc35259d016dc60f (patch)
tree4d1613c9e07a69108ddac29646ce97e8c0cc13af
parent23c0872442e025dd2fc6f143c1bbce6a5a7c0964 (diff)
downloadbuildroot-9971e936be6eb2ee5f531953bc35259d016dc60f.tar.gz
buildroot-9971e936be6eb2ee5f531953bc35259d016dc60f.zip
toolchain/helpers.mk: fix creation of DESTDIR in copy_toolchain_lib_root
In commit b3cc7e65ee, the definition of the DESTDIR variable was moved down into the loop that follows symlinks in the libraries that are copied to target. However, the corresponding mkdir was not moved down, so that no directories are ever created. In practice, this mkdir is normally redundant since the directories should already have been created as part of creating STAGING_DIR. Still, the current situation is clearly wrong, so fix it by moving the mkdir down to after the assignment to DESTDIR. While we're at it, also remove a redundant empty line. It's a leftover from when a lot of variables were declared above. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--toolchain/helpers.mk3
1 files changed, 1 insertions, 2 deletions
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 6136aef6b9..9942ce404f 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -10,13 +10,12 @@
#
copy_toolchain_lib_root = \
LIBPATTERN="$(strip $1)"; \
-\
LIBPATHS=`find $(STAGING_DIR)/ -name "$${LIBPATTERN}" 2>/dev/null` ; \
for LIBPATH in $${LIBPATHS} ; do \
- mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
while true ; do \
LIBNAME=`basename $${LIBPATH}`; \
DESTDIR=`echo $${LIBPATH} | sed "s,^$(STAGING_DIR)/,," | xargs dirname` ; \
+ mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
if test -h $${LIBPATH} ; then \
cp -d $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \
OpenPOWER on IntegriCloud