From c368ffe5c38bf183902594ed46c39185624ea424 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Wed, 13 Jul 2011 23:42:49 +0200 Subject: Build system: generic macros: add macros to know if a package is already decompressed/patched/configured/installed Signed-off-by: Abdoulaye Walsimou Gaye --- mk/macros.mk | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mk/macros.mk b/mk/macros.mk index 2f3d2fb..417487a 100644 --- a/mk/macros.mk +++ b/mk/macros.mk @@ -198,6 +198,30 @@ PKGV=$(strip $(shell echo $(1) | tr a-z A-Z)) # embtk_get_pkgversion = $(subst ",,$(strip $(CONFIG_EMBTK_$(PKGV)_VERSION_STRING))) +# +# A macro to test if a package is already decompressed. +# It returns y if decompressed and nothing if not. +# +__embtk_pkg_decompressed-y = $(shell test -e $($(PKGV)_SRC_DIR)/.decompressed && echo y) + +# +# A macro to test if a package is already patched. +# It returns y if patched and nothing if not. +# +__embtk_pkg_patched-y = $(shell test -e $($(PKGV)_SRC_DIR)/.patched && echo y) + +# +# A macro to test if a package is already configured using autotools configure +# script. It returns y if configured and nothing if not. +# +__embtk_pkg_configured-y = $(shell test -e $($(PKGV)_BUILD_DIR)/.configured && echo y) + +# +# A macro to test if a package is already installed. +# It returns y if installed and nothing if not. +# +__embtk_pkg_installed-y = $(shell test -e $($(PKGV)_BUILD_DIR)/.installed && echo y) + # # A macro which runs configure script (conpatible with autotools configure) # for a package and sets environment variables correctly. -- cgit v1.2.3