Skip to contentSkip to conversation

package/dhcp: install shared libraries

PATCH New unixmania at gmail.com 3 participants 3 messages Aug 9, 2019 – Sep 2, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/dhcp: install shared libraries

From: Carlos Santos <[email protected]>

We don't use "make install" for target installation because we build all utilities (server, relay, client) but install only the selected ones.

The utilities, however, require the shared libraries to work, so use the "install-exec" make target to install them. This also installs static libraries but they are removed later by target-finalize.

With this change the omshell utility is installed if server is selected. We keep it, since it is small and may be useful at run-time.

Fixes:
https://bugs.busybox.net/show_bug.cgi?id=12086

---
 package/dhcp/dhcp.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/dhcp/dhcp.mk +10 -0
index 86f5c69a77..5f56c86414 100644
@@ -40,7 +40,15 @@ ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y)
 DHCP_CONF_OPTS += --enable-delayed-ack
 endif
 
+define DHCP_INSTALL_LIBS
+	$(MAKE) -C $(@D)/common install-exec DESTDIR=$(TARGET_DIR)
+	$(MAKE) -C $(@D)/omapip install-exec DESTDIR=$(TARGET_DIR)
+endef
+
 ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
+define DHCP_INSTALL_CTL_LIBS
+	$(MAKE) -C $(@D)/dhcpctl install-exec DESTDIR=$(TARGET_DIR)
+endef
 define DHCP_INSTALL_SERVER
 	mkdir -p $(TARGET_DIR)/var/lib
 	(cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
@@ -99,6 +107,8 @@ endef
 endif
 
 define DHCP_INSTALL_TARGET_CMDS
+	$(DHCP_INSTALL_LIBS)
+	$(DHCP_INSTALL_CTL_LIBS)
 	$(DHCP_INSTALL_RELAY)
 	$(DHCP_INSTALL_SERVER)
 	$(DHCP_INSTALL_CLIENT)
Signature · 1 line
2.18.1
#1 lore raw

PATCH 1/1 package/dhcp: install shared libraries

Quoted 12 lines · On Thu, 8 Aug 2019 23:27:59 -0300 unixmania at gmail.com wrote:

From: Carlos Santos <[email protected]>

We don't use "make install" for target installation because we build all utilities (server, relay, client) but install only the selected ones.

The utilities, however, require the shared libraries to work, so use the "install-exec" make target to install them. This also installs static libraries but they are removed later by target-finalize.

With this change the omshell utility is installed if server is selected. We keep it, since it is small and may be useful at run-time.

Quoted 7 lines

Fixes:
https://bugs.busybox.net/show_bug.cgi?id=12086

---
 package/dhcp/dhcp.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/dhcp: install shared libraries

In reply to unixmania at gmail.com
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"unixmania" == unixmania <[email protected]> writes:

From: Carlos Santos <[email protected]>
We don't use "make install" for target installation because we build all utilities (server, relay, client) but install only the selected ones.

The utilities, however, require the shared libraries to work, so use the "install-exec" make target to install them. This also installs static libraries but they are removed later by target-finalize.

Quoted 7 lines

With this change the omshell utility is installed if server is selected. We keep it, since it is small and may be useful at run-time.

Fixes:
https://bugs.busybox.net/show_bug.cgi?id=12086

Committed to 2019.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard