From patchwork Thu Apr 30 09:52:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1280105 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49CW0b0wY7z9sPF for ; Thu, 30 Apr 2020 19:53:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7D93A88692; Thu, 30 Apr 2020 09:53:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GAdz3ptVUSK2; Thu, 30 Apr 2020 09:53:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C6AD688688; Thu, 30 Apr 2020 09:53:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 4405F1BF9B4 for ; Thu, 30 Apr 2020 09:53:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 39F2B204E4 for ; Thu, 30 Apr 2020 09:53:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f6lmFqOigEF6 for ; Thu, 30 Apr 2020 09:53:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by silver.osuosl.org (Postfix) with ESMTPS id BED01204F1 for ; Thu, 30 Apr 2020 09:53:05 +0000 (UTC) Received: from localhost (lfbn-tou-1-915-109.w86-210.abo.wanadoo.fr [86.210.146.109]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id E208E20000B; Thu, 30 Apr 2020 09:53:03 +0000 (UTC) From: Thomas Petazzoni To: Buildroot List Date: Thu, 30 Apr 2020 11:52:44 +0200 Message-Id: <20200430095249.782597-8-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430095249.782597-1-thomas.petazzoni@bootlin.com> References: <20200430095249.782597-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 07/11] package/pkg-generic.mk: move pkg_size_{before, after} and check_bin_arch functions X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Korsgaard , "Yann E. MORIN" , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" These functions are no longer using the GLOBAL_INSTRUMENTATION_HOOKS mechanism, so it doesn't make much sense for them to be in the section of pkg-generic.mk related to those hooks. Move them to the "Helper functions" section. Signed-off-by: Thomas Petazzoni --- package/pkg-generic.mk | 66 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 2ae269bb3d..6e06d735ad 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -55,39 +55,6 @@ define step_time endef GLOBAL_INSTRUMENTATION_HOOKS += step_time -# Hooks to collect statistics about installed files - -# $(1): base directory to search in -# $(2): suffix of file (optional) -define pkg_size_before - cd $(1); \ - LC_ALL=C find . -not -path './$(STAGING_SUBDIR)/*' \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \ - | LC_ALL=C sort > $($(PKG)_DIR)/.files-list$(2).before -endef - -# $(1): base directory to search in -# $(2): suffix of file (optional) -define pkg_size_after - cd $(1); \ - LC_ALL=C find . -not -path './$(STAGING_SUBDIR)/*' \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \ - | LC_ALL=C sort > $($(PKG)_DIR)/.files-list$(2).after - LC_ALL=C comm -13 \ - $($(PKG)_DIR)/.files-list$(2).before \ - $($(PKG)_DIR)/.files-list$(2).after \ - | sed -r -e 's/^[^,]+/$($(PKG)_NAME)/' \ - > $($(PKG)_DIR)/.files-list$(2).txt - rm -f $($(PKG)_DIR)/.files-list$(2).before - rm -f $($(PKG)_DIR)/.files-list$(2).after -endef - -define check_bin_arch - support/scripts/check-bin-arch -p $($(PKG)_NAME) \ - -l $($(PKG)_DIR)/.files-list.txt \ - $(foreach i,$($(PKG)_BIN_ARCH_EXCLUDE),-i "$(i)") \ - -r $(TARGET_READELF) \ - -a $(BR2_READELF_ARCH_NAME) -endef - # This hook checks that host packages that need libraries that we build # have a proper DT_RPATH or DT_RUNPATH tag define check_host_rpath @@ -135,6 +102,39 @@ define fixup-libtool-files endef endif +# Functions to collect statistics about installed files + +# $(1): base directory to search in +# $(2): suffix of file (optional) +define pkg_size_before + cd $(1); \ + LC_ALL=C find . -not -path './$(STAGING_SUBDIR)/*' \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \ + | LC_ALL=C sort > $($(PKG)_DIR)/.files-list$(2).before +endef + +# $(1): base directory to search in +# $(2): suffix of file (optional) +define pkg_size_after + cd $(1); \ + LC_ALL=C find . -not -path './$(STAGING_SUBDIR)/*' \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \ + | LC_ALL=C sort > $($(PKG)_DIR)/.files-list$(2).after + LC_ALL=C comm -13 \ + $($(PKG)_DIR)/.files-list$(2).before \ + $($(PKG)_DIR)/.files-list$(2).after \ + | sed -r -e 's/^[^,]+/$($(PKG)_NAME)/' \ + > $($(PKG)_DIR)/.files-list$(2).txt + rm -f $($(PKG)_DIR)/.files-list$(2).before + rm -f $($(PKG)_DIR)/.files-list$(2).after +endef + +define check_bin_arch + support/scripts/check-bin-arch -p $($(PKG)_NAME) \ + -l $($(PKG)_DIR)/.files-list.txt \ + $(foreach i,$($(PKG)_BIN_ARCH_EXCLUDE),-i "$(i)") \ + -r $(TARGET_READELF) \ + -a $(BR2_READELF_ARCH_NAME) +endef + ################################################################################ # Implicit targets -- produce a stamp file for each step of a package build ################################################################################