diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-05-24 14:39:50 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-05-24 14:39:50 +0200 |
commit | 0f36f2409f4892ebded107b413494b4f8af5e6cc (patch) | |
tree | 8c898c05d4bea82270864aabdbd8cc02d1a99768 | |
parent | 8b25d634226c59b189868fe2fc1c6e8a47266795 (diff) |
optimize and reduce code
-rw-r--r-- | mk/image.mk | 51 |
1 files 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 |