Browse Source

Older versions of 'find' don't have the '-delete' option

Use find's '-print0' and 'xargs -0' as an equivalent alternative.
Wade Berrier 16 years ago
parent
commit
027aa1d2ec
1 changed files with 4 additions and 4 deletions
  1. 4 4
      Makefile

+ 4 - 4
Makefile

@@ -334,8 +334,8 @@ $(PROJECT_BUILD_DIR)/.root:
 		fi; \
 		fi; \
 		touch $(STAGING_DIR)/.fakeroot.00000; \
 		touch $(STAGING_DIR)/.fakeroot.00000; \
 	fi
 	fi
-	-find $(TARGET_DIR) -type d -name CVS -o -name .svn | xargs rm -rf
-	-find $(TARGET_DIR) -type f -name .empty | xargs rm -rf
+	-find $(TARGET_DIR) -type d -name CVS -o -name .svn -print0 | xargs -0 rm -rf
+	-find $(TARGET_DIR) -type f -name .empty -print0 | xargs -0 rm -rf
 	touch $@
 	touch $@
 
 
 $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root
 $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root
@@ -348,8 +348,8 @@ ifeq ($(BR2_HAVE_DEVFILES),y)
 	( scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
 	( scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
 else
 else
 	rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/pkgconfig
 	rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/pkgconfig
-	find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -delete
-	find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -delete
+	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
 endif
 ifneq ($(BR2_HAVE_MANPAGES),y)
 ifneq ($(BR2_HAVE_MANPAGES),y)
 	rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
 	rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man