aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--package/libglib2/libglib2.mk9
2 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f130325a4a..291badf618 100644
--- a/Makefile
+++ b/Makefile
@@ -388,6 +388,9 @@ else
find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
endif
+ifneq ($(BR2_PACKAGE_GDB),y)
+ rm -rf $(TARGET_DIR)/usr/share/gdb
+endif
ifneq ($(BR2_HAVE_DOCUMENTATION),y)
rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 35b7ee8f94..8dc1fcb835 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -79,6 +79,15 @@ ifneq ($(BR2_HAVE_DEVFILES),y)
LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES
endif
+define LIBGLIB2_REMOVE_GDB_FILES
+ rm -rf $(TARGET_DIR)/usr/share/glib-2.0/gdb
+ rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/glib-2.0
+endef
+
+ifneq ($(BR2_PACKAGE_GDB),y)
+LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_GDB_FILES
+endif
+
$(eval $(call AUTOTARGETS,package,libglib2))
$(eval $(call AUTOTARGETS,package,libglib2,host))