Purge libglib2 dev files from target
authorMalte Starostik <m-starostik@versanet.de>
Sat, 24 Jul 2010 11:21:28 +0000 (13:21 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Fri, 30 Jul 2010 08:44:24 +0000 (10:44 +0200)
* Don't install libglib2 development binaries and to target unless
  BR2_HAVE_DEVFILES is set

Signed-off-by: Malte Starostik <m-starostik@versanet.de>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/libglib2/libglib2.mk

index 6ddb820ddf8fc936db80791ea2c80ebe6bd953bd..35b7ee8f944132b5f56df76d9c9224cbee9a14e5 100644 (file)
@@ -68,6 +68,17 @@ LIBGLIB2_CONF_OPT += --with-libiconv=gnu
 LIBGLIB2_DEPENDENCIES+=libiconv
 endif
 
+define LIBGLIB2_REMOVE_DEV_FILES
+       rm -rf $(TARGET_DIR)/usr/lib/glib-2.0
+       rm -rf $(TARGET_DIR)/usr/share/glib-2.0/gettext
+       rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/glib-2.0
+       rm -f $(addprefix $(TARGET_DIR)/usr/bin/,glib-genmarshal glib-gettextize glib-mkenums gobject-query gtester gtester-report)
+endef
+
+ifneq ($(BR2_HAVE_DEVFILES),y)
+LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES
+endif
+
 $(eval $(call AUTOTARGETS,package,libglib2))
 $(eval $(call AUTOTARGETS,package,libglib2,host))