Patchwork [13/30] external-sourcery: use ${prefix} and ${libdir} instead of /usr and /usr/lib

login
register
mail settings
Submitter Javier Martinez Canillas
Date Aug. 5, 2012, 3:54 p.m.
Message ID <1344182057-15981-14-git-send-email-javier@dowhile0.org>
Download mbox | patch
Permalink /patch/33863/
State New
Headers show

Comments

Javier Martinez Canillas - Aug. 5, 2012, 3:54 p.m.
It is considered good practice to use the build system provided
variables instead of directly specify hardcoded paths.

Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
---
 .../meta/external-sourcery-toolchain.bb            |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-core/meta/external-sourcery-toolchain.bb b/meta/recipes-core/meta/external-sourcery-toolchain.bb
index 74c82ec..18c3105 100644
--- a/meta/recipes-core/meta/external-sourcery-toolchain.bb
+++ b/meta/recipes-core/meta/external-sourcery-toolchain.bb
@@ -38,10 +38,10 @@  do_install() {
 	cp -a $sysroot/etc/. ${D}${sysconfdir}
 	cp -a $sysroot/sbin/. ${D}${base_sbindir}
 
-	install -d ${D}/usr
+	install -d ${D}${prefix}
 	for usr_element in bin libexec sbin share ${base_libdir}; do
 		usr_path=$sysroot/usr/$usr_element
-		cp -a $usr_path ${D}/usr/
+		cp -a $usr_path ${D}${prefix}/
 	done
 	for datadir_element in man info; do
 		datadir_path=$sysroot/usr/$datadir_element
@@ -81,7 +81,7 @@  external_toolchain_sysroot_adjust() {
 
 	# If the usr/lib directory doesn't exist, the toolchain fails to even
 	# try to find crti.o in a completely different directory (usr/lib64)
-	install -d ${SYSROOT_DESTDIR}/usr/lib
+	install -d ${SYSROOT_DESTDIR}${libdir}
 }
 
 PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev linux-libc-headers linux-libc-headers-dev gdbserver gdbserver-dbg"