diff mbox series

lz4: install programs as well as libraries

Message ID 20180110224052.6830-1-thomas.petazzoni@free-electrons.com
State Accepted
Commit 6f1c11f79a64387c1f1749550804f8aae0cfa7a7
Headers show
Series lz4: install programs as well as libraries | expand

Commit Message

Thomas Petazzoni Jan. 10, 2018, 10:40 p.m. UTC
Prior to commit 8ad38a4fc2007df4bee9a941aed46c8771b6a84c
("package/lz4: bump version to r131"), the lz4 package was installing
both libraries and programs, but this commit changed the behavior to
only install libraries.

The contributor might have been confused by the fact that the build
command was "$(MAKE) ... -C $(@D) liblz4", suggesting that only the
library was built. But since the install command was "$(MAKE) ... -C
$(@D) install", the programs were effectively built as part of the
install step, and installed as well.

Since it makes sense for lz4 to also installs its programs, this
commit adjusts the package accordingly.

It is worth mentioning that using the "all" target during the build
step is important. Indeed, otherwise the programs/Makefile has a
"default" target that doesn't build everything (especially the lz4c
program) and it end up being built as part of the install step, due to
how the makefile dependencies are handled in the lz4 project. To make
sure that everything gets built during the build step, we explicitly
use the "all" target.

Fixes bug #9996

Reported-by: Jamin Collins <jamin.collins@gmail.com>
Initial-analysis-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lz4/lz4.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Peter Korsgaard Jan. 12, 2018, 6:56 p.m. UTC | #1
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Prior to commit 8ad38a4fc2007df4bee9a941aed46c8771b6a84c
 > ("package/lz4: bump version to r131"), the lz4 package was installing
 > both libraries and programs, but this commit changed the behavior to
 > only install libraries.

 > The contributor might have been confused by the fact that the build
 > command was "$(MAKE) ... -C $(@D) liblz4", suggesting that only the
 > library was built. But since the install command was "$(MAKE) ... -C
 > $(@D) install", the programs were effectively built as part of the
 > install step, and installed as well.

 > Since it makes sense for lz4 to also installs its programs, this
 > commit adjusts the package accordingly.

 > It is worth mentioning that using the "all" target during the build
 > step is important. Indeed, otherwise the programs/Makefile has a
 > "default" target that doesn't build everything (especially the lz4c
 > program) and it end up being built as part of the install step, due to
 > how the makefile dependencies are handled in the lz4 project. To make
 > sure that everything gets built during the build step, we explicitly
 > use the "all" target.

 > Fixes bug #9996

 > Reported-by: Jamin Collins <jamin.collins@gmail.com>
 > Initial-analysis-by: Arnout Vandecappelle <arnout@mind.be>
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.
Peter Korsgaard Jan. 16, 2018, 7:39 p.m. UTC | #2
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Prior to commit 8ad38a4fc2007df4bee9a941aed46c8771b6a84c
 > ("package/lz4: bump version to r131"), the lz4 package was installing
 > both libraries and programs, but this commit changed the behavior to
 > only install libraries.

 > The contributor might have been confused by the fact that the build
 > command was "$(MAKE) ... -C $(@D) liblz4", suggesting that only the
 > library was built. But since the install command was "$(MAKE) ... -C
 > $(@D) install", the programs were effectively built as part of the
 > install step, and installed as well.

 > Since it makes sense for lz4 to also installs its programs, this
 > commit adjusts the package accordingly.

 > It is worth mentioning that using the "all" target during the build
 > step is important. Indeed, otherwise the programs/Makefile has a
 > "default" target that doesn't build everything (especially the lz4c
 > program) and it end up being built as part of the install step, due to
 > how the makefile dependencies are handled in the lz4 project. To make
 > sure that everything gets built during the build step, we explicitly
 > use the "all" target.

 > Fixes bug #9996

 > Reported-by: Jamin Collins <jamin.collins@gmail.com>
 > Initial-analysis-by: Arnout Vandecappelle <arnout@mind.be>
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed to 2017.11.x, thanks.
Peter Korsgaard Jan. 30, 2018, 10:50 p.m. UTC | #3
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Prior to commit 8ad38a4fc2007df4bee9a941aed46c8771b6a84c
 > ("package/lz4: bump version to r131"), the lz4 package was installing
 > both libraries and programs, but this commit changed the behavior to
 > only install libraries.

 > The contributor might have been confused by the fact that the build
 > command was "$(MAKE) ... -C $(@D) liblz4", suggesting that only the
 > library was built. But since the install command was "$(MAKE) ... -C
 > $(@D) install", the programs were effectively built as part of the
 > install step, and installed as well.

 > Since it makes sense for lz4 to also installs its programs, this
 > commit adjusts the package accordingly.

 > It is worth mentioning that using the "all" target during the build
 > step is important. Indeed, otherwise the programs/Makefile has a
 > "default" target that doesn't build everything (especially the lz4c
 > program) and it end up being built as part of the install step, due to
 > how the makefile dependencies are handled in the lz4 project. To make
 > sure that everything gets built during the build step, we explicitly
 > use the "all" target.

 > Fixes bug #9996

 > Reported-by: Jamin Collins <jamin.collins@gmail.com>
 > Initial-analysis-by: Arnout Vandecappelle <arnout@mind.be>
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed to 2017.02.x, thanks.
diff mbox series

Patch

diff --git a/package/lz4/lz4.mk b/package/lz4/lz4.mk
index 91ff43b052..de8c311a31 100644
--- a/package/lz4/lz4.mk
+++ b/package/lz4/lz4.mk
@@ -18,7 +18,7 @@  LZ4_POST_PATCH_HOOKS += LZ4_DISABLE_SHARED
 endif
 
 define HOST_LZ4_BUILD_CMDS
-	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)
+	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) all
 endef
 
 define HOST_LZ4_INSTALL_CMDS
@@ -27,7 +27,7 @@  define HOST_LZ4_INSTALL_CMDS
 endef
 
 define LZ4_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all
 endef
 
 define LZ4_INSTALL_STAGING_CMDS
@@ -37,7 +37,7 @@  endef
 
 define LZ4_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) DESTDIR=$(TARGET_DIR) \
-		PREFIX=/usr install -C $(@D)/lib
+		PREFIX=/usr install -C $(@D)
 endef
 
 $(eval $(generic-package))