浏览代码

revert find | xargs => find | exec changes - this is completely unnecessary and introduces additional dependencies that we do not need

SVN-Revision: 6942
Felix Fietkau 18 年之前
父节点
当前提交
3e91dd1bd5
共有 7 个文件被更改,包括 12 次插入20 次删除
  1. 1 1
      Makefile
  2. 3 3
      include/image.mk
  3. 3 3
      include/package-ipkg.mk
  4. 0 8
      include/prereq-build.mk
  5. 1 1
      scripts/feeds.sh
  6. 2 2
      target/imagebuilder/Makefile
  7. 2 2
      target/sdk/Makefile

+ 1 - 1
Makefile

@@ -155,7 +155,7 @@ docclean:
 	$(MAKE) -C docs/ clean
 
 symlinkclean:
-	find package -type l -exec rm -f {} +
+	find package -type l | xargs -r rm -f
 
 .SILENT: clean dirclean distclean symlinkclean config-clean download world help tmp/.packageinfo tmp/.targetinfo tmpinfo-clean tmp/.config-package.in tmp/.config-target.in .config scripts/config/mconf scripts/config/conf menuconfig tmp/.prereq-build tmp/.prereq-package tmp/.prereq-target
 FORCE: ;

+ 3 - 3
include/image.mk

@@ -79,9 +79,9 @@ endif
 
 
 define Image/mkfs/prepare/default
-	find $(BUILD_DIR)/root -type f -not -perm +0100 -not -name 'ssh_host*' -exec chmod 0644 {} \;
-	find $(BUILD_DIR)/root -type f -perm +0100 -exec chmod 0755 {} \;
-	find $(BUILD_DIR)/root -type d -exec chmod 0755 {} \;
+	find $(BUILD_DIR)/root -type f -not -perm +0100 -not -name 'ssh_host*' | xargs -r chmod 0644
+	find $(BUILD_DIR)/root -type f -perm +0100 | xargs -r chmod 0755
+	find $(BUILD_DIR)/root -type d | xargs -r chmod 0755
 	mkdir -p $(BUILD_DIR)/root/tmp
 	chmod 0777 $(BUILD_DIR)/root/tmp
 endef

+ 3 - 3
include/package-ipkg.mk

@@ -71,9 +71,9 @@ ifeq ($(DUMP),)
     $$(IPKG_$(1)): $(PKG_BUILD_DIR)/.built $$(IDIR_$(1))/CONTROL/control
 	$(call Package/$(1)/install,$$(IDIR_$(1)))
 	mkdir -p $(PACKAGE_DIR)
-	-find $$(IDIR_$(1)) -name CVS   -exec rm -rf {} +
-	-find $$(IDIR_$(1)) -name .svn  -exec rm -rf {} +
-	-find $$(IDIR_$(1)) -name '.#*' -exec rm -f  {} +
+	-find $$(IDIR_$(1)) -name CVS   | xargs -r rm -rf
+	-find $$(IDIR_$(1)) -name .svn  | xargs -r rm -rf
+	-find $$(IDIR_$(1)) -name '.#*' | xargs -r rm -f
 	$(RSTRIP) $$(IDIR_$(1))
 	$(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
 	@[ -f $$(IPKG_$(1)) ] || false 

+ 0 - 8
include/prereq-build.mk

@@ -121,11 +121,3 @@ $(eval $(call Require,gnutar, \
 $(eval $(call RequireCommand,autoconf, \
 	Please install GNU autoconf. \
 ))
-
-define Require/find
-	find . -maxdepth 1 -exec ls {} + > /dev/null 2>&1
-endef
-
-$(eval $(call Require,find, \
-	Please install GNU find 4.2.12 or better. \
-))

+ 1 - 1
scripts/feeds.sh

@@ -22,7 +22,7 @@ cd $TOPDIR
 
 # Some functions we might call several times a run
 delete_symlinks() {
-	find $1 -type l -exec rm -f {} +
+	find $1 -type l | xargs -r rm -f
 }
 
 setup_symlinks() {

+ 2 - 2
target/imagebuilder/Makefile

@@ -33,8 +33,8 @@ $(BIN_DIR)/$(IB_NAME).tar.bz2: clean
 	$(CP) $(TOPDIR)/target/linux/* $(IB_BUILD_DIR)/target/linux
 	rm -rf $(IB_BUILD_DIR)/target/linux/*/patches
 	-cp $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/* $(IB_BUILD_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) # don't copy subdirectories here
-	find $(IB_BUILD_DIR) -name .svn -exec rm -rf {} +
-	find $(IB_BUILD_DIR) -name CVS -exec rm -rf  {} +
+	find $(IB_BUILD_DIR) -name .svn | xargs rm -rf
+	find $(IB_BUILD_DIR) -name CVS | xargs rm -rf
 	(cd $(BUILD_DIR); \
 		tar cfj $@ $(IB_NAME); \
 	)

+ 2 - 2
target/sdk/Makefile

@@ -35,8 +35,8 @@ $(BIN_DIR)/$(SDK_NAME).tar.bz2: clean
 	$(CP) ./files/package/rules.mk $(SDK_BUILD_DIR)/package/
 	echo OPENWRTVERSION:=$(OPENWRTVERSION) > $(SDK_BUILD_DIR)/.version.mk
 	rm -rf $(SDK_BUILD_DIR)/staging_dir*/ccache
-	find $(SDK_BUILD_DIR) -name .svn -exec rm -rf {} + 
-	find $(SDK_BUILD_DIR) -name CVS -exec rm -rf  {} +
+	find $(SDK_BUILD_DIR) -name .svn | xargs -r rm -rf
+	find $(SDK_BUILD_DIR) -name CVS | xargs -r rm -rf
 	(cd $(BUILD_DIR); \
 		tar cfj $@ $(SDK_NAME); \
 	)