xenomai: add support to keep or remove Analogy utilities and libs
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 17 Sep 2011 20:22:55 +0000 (22:22 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 18 Sep 2011 21:00:07 +0000 (23:00 +0200)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/xenomai/Config.in
package/xenomai/xenomai.mk

index 6ba9f8b69ec9d02af577dce45ddcddb990f05aea..3749a60487f1f9fc0f82a7e7ddc2699b402e13bc 100644 (file)
@@ -113,4 +113,10 @@ config BR2_PACKAGE_XENOMAI_RTCAN
        help
          This option allows to install the Xenomai RT-CAN utilities.
 
+config BR2_PACKAGE_XENOMAI_ANALOGY
+       bool "Analogy libs and utils"
+       help
+         This option allows to install the Xenomai Analogy utilities
+         and libraries
+
 endif
index 36e2e44e3995429609036c9aeb3866d40af5cc7c..fff2c5dec982ab2129e1282137a9838a27ba3c88 100644 (file)
@@ -90,6 +90,19 @@ endef
 XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_RTCAN_PROGS
 endif
 
+ifeq ($(BR2_PACKAGE_XENOMAI_ANALOGY),)
+define XENOMAI_REMOVE_ANALOGY
+       for i in cmd_bits cmd_read cmd_write insn_write \
+               insn_bits insn_read ; do \
+               rm -f $(TARGET_DIR)/usr/xenomai/bin/$$i ; \
+       done
+       rm -f $(TARGET_DIR)/usr/xenomai/sbin/analogy_config
+       rm -f $(TARGET_DIR)/usr/xenomai/lib/libanalogy.*
+endef
+
+XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_ANALOGY
+endif
+
 define XENOMAI_ADD_LD_SO_CONF
        # Add /usr/xenomai/lib in the library search path
        grep -q "^/usr/xenomai/lib" $(TARGET_DIR)/etc/ld.so.conf || \