From dbfc9fdc6085a528fc8178ff5ce9960ad8f6a5cd Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Sun, 22 Aug 2010 20:05:12 +0200 Subject: Embtk: drastically improve packages rebuild duration Signed-off-by: Abdoulaye Walsimou Gaye --- packages/misc/libelf/libelf.mk | 52 +++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 28 deletions(-) (limited to 'packages/misc/libelf') diff --git a/packages/misc/libelf/libelf.mk b/packages/misc/libelf/libelf.mk index 276e470..2cf5952 100644 --- a/packages/misc/libelf/libelf.mk +++ b/packages/misc/libelf/libelf.mk @@ -1,24 +1,25 @@ ################################################################################ # Embtoolkit -# Copyright(C) 2010 GAYE Abdoulaye Walsimou. All rights reserved. +# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved. # -# This program is free software; you can distribute it and/or modify it -# under the terms of the GNU General Public License -# (Version 2 or later) published by the Free Software Foundation. +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . # -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. ################################################################################ # # \file libelf.mk # \brief libelf.mk of Embtoolkit -# \author GAYE Abdoulaye Walsimou, +# \author Abdoulaye Walsimou GAYE # \date January 2010 ################################################################################ @@ -34,15 +35,13 @@ LIBELF_INCLUDES = libelf gelf.h libelf.h nlist.h LIBELF_LIBS = libelf.a LIBELF_PKGCONFIGS = libelf.pc -ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) -PKG_CONFIG_PATH=$(SYSROOT)/usr/lib32/pkgconfig -else -PKG_CONFIG_PATH=$(SYSROOT)/usr/lib/pkgconfig -endif +LIBELF_DEPS := gettext_install -libelf_install: $(LIBELF_BUILD_DIR)/.installed +libelf_install: + @test -e $(LIBELF_BUILD_DIR)/.installed || \ + $(MAKE) $(LIBELF_BUILD_DIR)/.installed -$(LIBELF_BUILD_DIR)/.installed: gettext_install download_libelf \ +$(LIBELF_BUILD_DIR)/.installed: $(LIBELF_DEPS) download_libelf \ $(LIBELF_BUILD_DIR)/.decompressed $(LIBELF_BUILD_DIR)/.configured $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ libelf-$(LIBELF_VERSION) in your root filesystem...") @@ -58,7 +57,7 @@ download_libelf: wget -O $(DOWNLOAD_DIR)/$(LIBELF_PACKAGE) \ $(LIBELF_SITE)/$(LIBELF_PACKAGE) ifeq ($(CONFIG_EMBTK_LIBELF_NEED_PATCH),y) - $(Q)test -e $(DOWNLOAD_DIR)/libelf-$(LIBELF_VERSION).patch || \ + @test -e $(DOWNLOAD_DIR)/libelf-$(LIBELF_VERSION).patch || \ wget -O $(DOWNLOAD_DIR)/libelf-$(LIBELF_VERSION).patch \ $(LIBELF_PATCH_SITE)/libelf-$(LIBELF_VERSION)-*.patch endif @@ -67,7 +66,7 @@ $(LIBELF_BUILD_DIR)/.decompressed: $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(LIBELF_PACKAGE) ...") @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(LIBELF_PACKAGE) ifeq ($(CONFIG_EMBTK_LIBELF_NEED_PATCH),y) - cd $(PACKAGES_BUILD)/libelf-$(LIBELF_VERSION); \ + cd $(LIBELF_BUILD_DIR); \ patch -p1 < $(DOWNLOAD_DIR)/libelf-$(LIBELF_VERSION).patch endif @touch $@ @@ -97,14 +96,11 @@ $(LIBELF_BUILD_DIR)/.configured: @touch $@ libelf_clean: - $(call EMBTK_GENERIC_MESSAGE,"cleanup libelf-$(LIBELF_VERSION)...") + $(call EMBTK_GENERIC_MESSAGE,"cleanup libelf...") $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(LIBELF_BINS) $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(LIBELF_SBINS) $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(LIBELF_INCLUDES) - $(Q)-cd $(SYSROOT)/usr/lib; rm -rf $(LIBELF_LIBS) - $(Q)-cd $(SYSROOT)/usr/lib/pkgconfig; rm -rf $(LIBELF_PKGCONFIGS) -ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) - $(Q)-cd $(SYSROOT)/usr/lib32; rm -rf $(LIBELF_LIBS) - $(Q)-cd $(SYSROOT)/usr/lib32/pkgconfig; rm -rf $(LIBELF_PKGCONFIGS) -endif + $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(LIBELF_LIBS) + $(Q)-cd $(SYSROOT)/usr/$(LIBDIR)/pkgconfig; rm -rf $(LIBELF_PKGCONFIGS) + $(Q)-rm -rf $(LIBELF_BUILD_DIR) -- cgit v1.2.3