2
1
Эх сурвалжийг харах

target-finalize: remove extra /usr/libexec/{*.a,*.la} files

Some packages, sudo for instance, install .a and .la files in
$(TARGET_DIR)/usr/libexec. These files are not needed on target.

This patch refactors the existing "find" invocations in
target-finalize into a single one removing all .a and .la files from
lib, usr/lib and usr/libexec.

[Thomas: rework to use a single "find" invocation, and adjusted the
commit log accordingly.]

Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Herve Codina 10 жил өмнө
parent
commit
87f3edecc6
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      Makefile

+ 2 - 2
Makefile

@@ -563,8 +563,8 @@ target-finalize: $(PACKAGES)
 		$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
 		$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
 	find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
-	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
+	find $(TARGET_DIR)/lib $(TARGET_DIR)/usr/lib $(TARGET_DIR)/usr/libexec \
+		\( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
 ifneq ($(BR2_PACKAGE_GDB),y)
 	rm -rf $(TARGET_DIR)/usr/share/gdb
 endif