xenomai: add support to keep or remove RT-CAN utilities
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 17 Sep 2011 20:22:54 +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 26c6b510f0f29ff0a28c4b45f35a4ddd6a321f5b..6ba9f8b69ec9d02af577dce45ddcddb990f05aea 100644 (file)
@@ -108,4 +108,9 @@ config BR2_PACKAGE_XENOMAI_TESTSUITE
        help
          This option allows to install the Xenomai test programs.
 
+config BR2_PACKAGE_XENOMAI_RTCAN
+       bool "RTCan utilities"
+       help
+         This option allows to install the Xenomai RT-CAN utilities.
+
 endif
index cb73740ea4ee2bf3fe21578bec5ee79688038282..36e2e44e3995429609036c9aeb3866d40af5cc7c 100644 (file)
@@ -79,6 +79,17 @@ endef
 XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_TESTSUITE
 endif
 
+ifeq ($(BR2_PACKAGE_XENOMAI_RTCAN),)
+define XENOMAI_REMOVE_RTCAN_PROGS
+       for i in rtcanrecv rtcansend ; do \
+               rm -f $(TARGET_DIR)/usr/xenomai/bin/$$i ; \
+       done
+       rm -f $(TARGET_DIR)/usr/xenomai/sbin/rtcanconfig
+endef
+
+XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_RTCAN_PROGS
+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 || \