package/libxmlrpc: add option to install xmlrpc tools
authorPeter Seiderer <ps.report@gmx.net>
Mon, 14 Jun 2021 20:47:49 +0000 (22:47 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 21 Jul 2021 20:59:00 +0000 (22:59 +0200)
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libxmlrpc/Config.in
package/libxmlrpc/libxmlrpc.mk

index d24a79163def81182d197d36f1503abde256e060..f8b8c411e1638e233523e7a6b80644a5855d3d83 100644 (file)
@@ -10,5 +10,14 @@ config BR2_PACKAGE_LIBXMLRPC
 
          http://xmlrpc-c.sourceforge.net/
 
+if BR2_PACKAGE_LIBXMLRPC
+
+config BR2_PACKAGE_LIBXMLRPC_TOOLS_XMLRPC
+       bool "install cli tool"
+       help
+         Command line tool xmlrpc.
+
+endif # BR2_PACKAGE_LIBXMLRPC
+
 comment "libxmlrpc needs a toolchain w/ threads"
        depends on !BR2_TOOLCHAIN_HAS_THREADS
index 833dca5065c78e117e8e975d3cfab87c475f6f69..c1b0eae8ee5b7dc0841623c95a6897cc60e9c7bb 100644 (file)
@@ -53,4 +53,16 @@ LIBXMLRPC_INSTALL_STAGING_OPTS = $(LIBXMLRPC_STATIC_OPTS) \
 LIBXMLRPC_INSTALL_TARGET_OPTS = $(LIBXMLRPC_STATIC_OPTS) \
        DESTDIR=$(TARGET_DIR) install
 
+ifeq ($(BR2_PACKAGE_LIBXMLRPC_TOOLS_XMLRPC),y)
+define LIBXMLRPC_TOOLS_XMLRPC_BUILD_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) $(LIBXMLRPC_MAKE_OPTS) -C $(@D)/tools/xmlrpc
+endef
+LIBXMLRPC_POST_BUILD_HOOKS += LIBXMLRPC_TOOLS_XMLRPC_BUILD_CMDS
+define LIBXMLRPC_TOOLS_XMLRPC_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) $(LIBXMLRPC_MAKE_OPTS) -C $(@D)/tools/xmlrpc \
+               DESTDIR=$(TARGET_DIR) install
+endef
+LIBXMLRPC_POST_INSTALL_TARGET_HOOKS += LIBXMLRPC_TOOLS_XMLRPC_INSTALL_TARGET_CMDS
+endif
+
 $(eval $(autotools-package))