[Buildroot] [git commit branch/2022.02.x] package/xxhash: optimize XXHASH_{TARGETS, INSTALL_TARGETS}

Peter Korsgaard peter at korsgaard.com
Mon Jan 2 16:56:14 UTC 2023


commit: https://git.buildroot.net/buildroot/commit/?id=bc60f1b24e4b80ea6a71628011ea40c178942230
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.02.x

Optimize XXHASH_{TARGETS,INSTALL_TARGETS} as suggested by Thomas
Petazzoni in
https://patchwork.ozlabs.org/project/buildroot/patch/20221228221522.280696-1-fontaine.fabrice@gmail.com/

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit 3de4ae012141803bdf8abda12e27d10e55f6953f)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/xxhash/xxhash.mk | 34 +++++++++++++---------------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/package/xxhash/xxhash.mk b/package/xxhash/xxhash.mk
index 6932113f14..04bc98690f 100644
--- a/package/xxhash/xxhash.mk
+++ b/package/xxhash/xxhash.mk
@@ -10,28 +10,20 @@ XXHASH_LICENSE = BSD-2-Clause (library), GPL-2.0+ (xxhsum)
 XXHASH_LICENSE_FILES = LICENSE cli/COPYING
 XXHASH_INSTALL_STAGING = YES
 
-XXHASH_TARGETS = xxhsum
-XXHASH_INSTALL_TARGETS = install_xxhsum
-
-ifeq ($(BR2_STATIC_LIBS),y)
-XXHASH_TARGETS += libxxhash.a libxxhash.pc
-XXHASH_INSTALL_TARGETS += \
-	install_libxxhash.a \
-	install_libxxhash.includes \
-	install_libxxhash.pc
-else ifeq ($(BR2_SHARED_LIBS),y)
-XXHASH_TARGETS += libxxhash libxxhash.pc
-XXHASH_INSTALL_TARGETS += \
-	install_libxxhash \
-	install_libxxhash.includes \
-	install_libxxhash.pc
-else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
-XXHASH_TARGETS += libxxhash.a libxxhash libxxhash.pc
-XXHASH_INSTALL_TARGETS += \
-	install_libxxhash.a \
-	install_libxxhash \
+XXHASH_TARGETS = xxhsum libxxhash.pc
+XXHASH_INSTALL_TARGETS = \
 	install_libxxhash.includes \
-	install_libxxhash.pc
+	install_libxxhash.pc \
+	install_xxhsum
+
+ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+XXHASH_TARGETS += libxxhash.a
+XXHASH_INSTALL_TARGETS += install_libxxhash.a
+endif
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+XXHASH_TARGETS += libxxhash
+XXHASH_INSTALL_TARGETS += install_libxxhash
 endif
 
 define XXHASH_BUILD_CMDS



More information about the buildroot mailing list