summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-01-09 22:41:44 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-01-09 22:41:44 +0100
commit79e97a6757fe46c9ceaeacb6d29b8db9b2cbe8f3 (patch)
tree90e73c6dfd8aefb78ea9200040f929f8f17790fd /mk
parentab3926fddbc685175fded7a28f0472b9d47d571f (diff)
downloadembtoolkit-79e97a6757fe46c9ceaeacb6d29b8db9b2cbe8f3.tar.gz
embtoolkit-79e97a6757fe46c9ceaeacb6d29b8db9b2cbe8f3.tar.bz2
embtoolkit-79e97a6757fe46c9ceaeacb6d29b8db9b2cbe8f3.tar.xz
Packages: optimize use of embtk_postinstallx_{pkgname}
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk')
-rw-r--r--mk/ccache.mk2
-rw-r--r--mk/gcc.mk13
-rw-r--r--mk/gmake.mk6
-rw-r--r--mk/libc++/libc++/libcxx.mk6
-rw-r--r--mk/llvm/compiler-rt/compiler-rt.mk2
-rw-r--r--mk/llvm/llvm.mk2
-rw-r--r--mk/macros.packages.mk8
-rw-r--r--mk/pkgconf.mk5
8 files changed, 17 insertions, 27 deletions
diff --git a/mk/ccache.mk b/mk/ccache.mk
index 2fe2d67..47bcb4d 100644
--- a/mk/ccache.mk
+++ b/mk/ccache.mk
@@ -71,6 +71,6 @@ define embtk_install_ccache
$(call __embtk_install_hostpkg,ccache)
endef
-define embtk_postinstall_ccache
+define embtk_postinstallonce_ccache
CCACHE_DIR=$(CCACHE_DIR) $(CCACHE_BIN) --max-size=2GB
endef
diff --git a/mk/gcc.mk b/mk/gcc.mk
index 625010b..3118b36 100644
--- a/mk/gcc.mk
+++ b/mk/gcc.mk
@@ -159,12 +159,9 @@ GCC2_CONFIGURE_OPTS := --with-sysroot=$(embtk_sysroot) \
CONFIG_EMBTK_GCC2_VERSION_GIT := $(CONFIG_EMBTK_GCC_VERSION_GIT)
CONFIG_EMBTK_GCC2_REFSPEC := $(CONFIG_EMBTK_GCC_REFSPEC)
-define embtk_postinstall_gcc2
+define embtk_postinstallonce_gcc2
$(if $(CONFIG_EMBTK_LLVM_ONLY_TOOLCHAIN), \
- [ -e $(GCC2_BUILD_DIR)/.gcc.embtk.postinstall ] || \
- $(__embtk_postinstall_gcc2_gcc3) && \
- touch $(GCC2_BUILD_DIR)/.gcc.embtk.postinstall, \
- true)
+ $(__embtk_postinstall_gcc2_gcc3))
endef
#
@@ -197,10 +194,8 @@ GCC3_CONFIGURE_OPTS := --with-sysroot=$(embtk_sysroot) \
CONFIG_EMBTK_GCC3_VERSION_GIT := $(CONFIG_EMBTK_GCC_VERSION_GIT)
CONFIG_EMBTK_GCC3_REFSPEC := $(CONFIG_EMBTK_GCC_REFSPEC)
-define embtk_postinstall_gcc3
- [ -e $(GCC3_BUILD_DIR)/.gcc3_post_install ] || \
- $(__embtk_postinstall_gcc2_gcc3) && \
- touch $(GCC3_BUILD_DIR)/.gcc3_post_install
+define embtk_postinstallonce_gcc3
+ $(__embtk_postinstall_gcc2_gcc3)
endef
#
diff --git a/mk/gmake.mk b/mk/gmake.mk
index c899fe5..2451638 100644
--- a/mk/gmake.mk
+++ b/mk/gmake.mk
@@ -34,8 +34,6 @@ define embtk_install_gmake
$(call __embtk_install_hostpkg,gmake)
endef
-define embtk_postinstall_gmake
- if [ ! -e $(embtk_htools)/usr/bin/gmake ]; then \
- cd $(embtk_htools)/usr/bin; mv make gmake; \
- fi
+define embtk_postinstallonce_gmake
+ mv $(embtk_htools)/usr/bin/make $(embtk_htools)/usr/bin/gmake
endef
diff --git a/mk/libc++/libc++/libcxx.mk b/mk/libc++/libc++/libcxx.mk
index 4c3d21f..c3e14af 100644
--- a/mk/libc++/libc++/libcxx.mk
+++ b/mk/libc++/libc++/libcxx.mk
@@ -59,10 +59,8 @@ define __embtk_postinstall_staticlibcxx
> $(__embtk_staticlibcxx))
endef
-define embtk_postinstall_libcxx
- [ -e $(LIBCXX_BUILD_DIR)/.libcxx.embtk.postinstall ] || \
- $(__embtk_postinstall_staticlibcxx) && \
- touch $(LIBCXX_BUILD_DIR)/.libcxx.embtk.postinstall
+define embtk_postinstallonce_libcxx
+ $(__embtk_postinstall_staticlibcxx)
endef
define embtk_cleanup_libcxx
diff --git a/mk/llvm/compiler-rt/compiler-rt.mk b/mk/llvm/compiler-rt/compiler-rt.mk
index 640705c..cb3b82e 100644
--- a/mk/llvm/compiler-rt/compiler-rt.mk
+++ b/mk/llvm/compiler-rt/compiler-rt.mk
@@ -60,7 +60,7 @@ endef
__embtk_libasan := libclang_rt.asan-$(__embtk_clang_arch).a
__embtk_libubsan := libclang_rt.ubsan-$(__embtk_clang_arch).a
-define embtk_postinstall_compiler-rt
+define embtk_postinstallonce_compiler-rt
echo "GROUP(libasan.a libsanitizer_common.a)" \
> $(__embtk_clang_libdir)/$(__embtk_libasan)
echo "GROUP(libubsan.a libsanitizer_common.a)" \
diff --git a/mk/llvm/llvm.mk b/mk/llvm/llvm.mk
index f06d693..33b57a9 100644
--- a/mk/llvm/llvm.mk
+++ b/mk/llvm/llvm.mk
@@ -74,7 +74,7 @@ define embtk_beforeinstall_llvm
$(embtk_tools)/bin/clang-scan-view
endef
-define embtk_postinstall_llvm
+define embtk_postinstallonce_llvm
mkdir -p $(embtk_tools)/lib/bfd-plugins
cd $(embtk_tools)/lib/bfd-plugins; \
ln -sf ../libLTO.so libLTO.so; \
diff --git a/mk/macros.packages.mk b/mk/macros.packages.mk
index 5a4351e..4dc2b2f 100644
--- a/mk/macros.packages.mk
+++ b/mk/macros.packages.mk
@@ -552,7 +552,7 @@ __embtk_xinstall_xpkg_allvarset-y = $(and $(__embtk_pkg_name), \
# $(call embtk_install_pkg,package)
#
define __embtk_install_pkg
- $(if $(__embtk_pkg_installed-y),true,
+ $(if $(__embtk_pkg_installed-y),,
$(Q)mkdir -p $(__embtk_pkg_builddir)
$(Q)$(call __embtk_install_pkg_make,$(1),autotools)
$(embtk_postinstallonce_$(pkgv))
@@ -575,7 +575,7 @@ endef
#
define embtk_makeinstall_pkg
$(if $(__embtk_xinstall_xpkg_allvarset-y),
- $(if $(__embtk_pkg_installed-y),true,
+ $(if $(__embtk_pkg_installed-y),,
$(Q)mkdir -p $(__embtk_pkg_builddir)
$(Q)$(call __embtk_install_pkg_make,$(1))
$(embtk_postinstallonce_$(pkgv))
@@ -592,7 +592,7 @@ endef
#
define __embtk_install_hostpkg
- $(if $(__embtk_pkg_installed-y),true,
+ $(if $(__embtk_pkg_installed-y),,
$(Q)mkdir -p $(__embtk_pkg_builddir)
$(Q)$(call __embtk_install_hostpkg_make,$(1),autotools)
$(embtk_postinstallonce_$(pkgv))
@@ -613,7 +613,7 @@ endef
#
define embtk_makeinstall_hostpkg
$(if $(__embtk_xinstall_xpkg_allvarset-y),
- $(if $(__embtk_pkg_installed-y),true,
+ $(if $(__embtk_pkg_installed-y),,
$(Q)mkdir -p $(__embtk_pkg_builddir)
$(Q)$(call __embtk_install_hostpkg_make,$(1))
$(embtk_postinstallonce_$(pkgv))
diff --git a/mk/pkgconf.mk b/mk/pkgconf.mk
index 4b4e317..d4182ab 100644
--- a/mk/pkgconf.mk
+++ b/mk/pkgconf.mk
@@ -64,7 +64,6 @@ define embtk_install_pkgconf
$(call __embtk_install_hostpkg,pkgconf)
endef
-define embtk_postinstall_pkgconf
- [ -e $(call __embtk_pkg_dotinstalled_f,pkgcong) ] || \
- cd $(embtk_htools)/usr/bin/; ln -sf pkgconf pkg-config
+define embtk_postinstallonce_pkgconf
+ cd $(embtk_htools)/usr/bin/; ln -sf pkgconf pkg-config
endef