From 0f36f2409f4892ebded107b413494b4f8af5e6cc Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 24 May 2014 14:39:50 +0200 Subject: optimize and reduce code --- mk/image.mk | 51 ++++----------------------------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/mk/image.mk b/mk/image.mk index 7e47d8dc7..574ef75c6 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -61,56 +61,13 @@ ifneq (${ADK_PACKAGE_CONFIG_IN_ETC},) gzip -9c ${TOPDIR}/.config > $(TARGET_DIR)/etc/adkconfig.gz chmod 600 $(TARGET_DIR)/etc/adkconfig.gz endif -ifeq ($(ADK_LINUX_X86_64),y) -ifeq ($(ADK_TARGET_ABI_32),) - # fixup lib dirs +ifneq ($(ADK_LINUX_X86_64)$(ADK_LINUX_PPC64)$(ADK_LINUX_SPARC64)$(ADK_TARGET_ABI_N32)$(ADK_TARGET_ABI_N64),) test ! -d ${TARGET_DIR}/lib || mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH} test ! -d ${TARGET_DIR}/lib || rm -rf ${TARGET_DIR}/lib ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib - -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} - rm -rf ${TARGET_DIR}/usr/lib/ - (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) -endif -endif -ifeq ($(ADK_LINUX_PPC64),y) - # fixup lib dirs - test ! -d ${TARGET_DIR}/lib || mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH} - test ! -d ${TARGET_DIR}/lib || rm -rf ${TARGET_DIR}/lib - ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib - -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} - rm -rf ${TARGET_DIR}/usr/lib/ - (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) -endif -ifeq ($(ADK_LINUX_SPARC64),y) - # fixup lib dirs - test ! -d ${TARGET_DIR}/lib || mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH} - test ! -d ${TARGET_DIR}/lib || rm -rf ${TARGET_DIR}/lib - ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib - -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} - rm -rf ${TARGET_DIR}/usr/lib/ - (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) -endif -ifeq ($(ADK_TARGET_ABI_N32),y) - # fixup lib dirs - test ! -d ${TARGET_DIR}/lib || mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH} - test ! -d ${TARGET_DIR}/lib || rm -rf ${TARGET_DIR}/lib - ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib - -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} - rm -rf ${TARGET_DIR}/usr/lib/ - (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) -endif -ifeq ($(ADK_TARGET_ABI_N64),y) - # fixup lib dirs - test ! -d ${TARGET_DIR}/lib || mv ${TARGET_DIR}/lib/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH} - test ! -d ${TARGET_DIR}/lib || rm -rf ${TARGET_DIR}/lib - ln -sf /${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib - -mkdir ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null - -mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} - rm -rf ${TARGET_DIR}/usr/lib/ + mkdir -p ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} 2>/dev/null + test ! -d ${TARGET_DIR}/usr/lib || mv ${TARGET_DIR}/usr/lib/* ${TARGET_DIR}/usr/${ADK_TARGET_LIBC_PATH} + test ! -d ${TARGET_DIR}/usr/lib || rm -rf ${TARGET_DIR}/usr/lib/ (cd ${TARGET_DIR}/usr ; ln -sf ${ADK_TARGET_LIBC_PATH} lib) endif -- cgit v1.2.3