summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--include/host.mk6
-rw-r--r--include/image.mk7
-rw-r--r--include/package-ipkg.mk6
-rw-r--r--package/Makefile6
-rw-r--r--package/udev/patches/003-portability.patch50
-rw-r--r--target/imagebuilder/Makefile4
-rw-r--r--target/sdk/Makefile4
-rw-r--r--target/sdk/files/Makefile2
9 files changed, 72 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 6b30ef92fa..d2be7bb61f 100644
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,7 @@ docclean:
$(MAKE) -C docs/ clean
symlinkclean:
- find package -type l | xargs -r rm -f
+ -find package -type l | xargs 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: ;
diff --git a/include/host.mk b/include/host.mk
index 423ca16610..8b4ce3d24b 100644
--- a/include/host.mk
+++ b/include/host.mk
@@ -35,3 +35,9 @@ $(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk
)
endif
+
+ifeq ($(HOST_OS),Linux)
+ XARGS:=xargs -r
+else
+ XARGS:=xargs
+endif
diff --git a/include/image.mk b/include/image.mk
index 0e6a7cdbea..f814f61d77 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -7,6 +7,7 @@
include $(INCLUDE_DIR)/prereq.mk
include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/host.mk
KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
ifneq ($(CONFIG_BIG_ENDIAN),y)
@@ -79,9 +80,9 @@ endif
define Image/mkfs/prepare/default
- 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
+ find $(BUILD_DIR)/root -type f -not -perm +0100 -not -name 'ssh_host*' | $(XARGS) chmod 0644
+ find $(BUILD_DIR)/root -type f -perm +0100 | $(XARGS) chmod 0755
+ find $(BUILD_DIR)/root -type d | $(XARGS) chmod 0755
mkdir -p $(BUILD_DIR)/root/tmp
chmod 0777 $(BUILD_DIR)/root/tmp
endef
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index ac6912844b..20d1326133 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -63,9 +63,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 | xargs -r rm -rf
- -find $$(IDIR_$(1)) -name .svn | xargs -r rm -rf
- -find $$(IDIR_$(1)) -name '.#*' | xargs -r rm -f
+ -find $$(IDIR_$(1)) -name CVS | $(XARGS) rm -rf
+ -find $$(IDIR_$(1)) -name .svn | $(XARGS) rm -rf
+ -find $$(IDIR_$(1)) -name '.#*' | $(XARGS) rm -f
$(RSTRIP) $$(IDIR_$(1))
$(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
@[ -f $$(IPKG_$(1)) ] || false
diff --git a/package/Makefile b/package/Makefile
index 04b2912dc7..c3fc01c7df 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -58,9 +58,9 @@ install:
IPKG_INSTROOT=$(BUILD_DIR)/root $(which bash) ./etc/rc.common $$script enable; \
done || true \
)
- @-find $(BUILD_DIR)/root -name CVS | xargs -r rm -rf
- @-find $(BUILD_DIR)/root -name .svn | xargs -r rm -rf
- @-find $(BUILD_DIR)/root -name '.#*' | xargs -r rm -f
+ @-find $(BUILD_DIR)/root -name CVS | $(XARGS) rm -rf
+ @-find $(BUILD_DIR)/root -name .svn | $(XARGS) rm -rf
+ @-find $(BUILD_DIR)/root -name '.#*' | $(XARGS) rm -f
index: $(PACKAGE_DIR)/Packages
diff --git a/package/udev/patches/003-portability.patch b/package/udev/patches/003-portability.patch
new file mode 100644
index 0000000000..0744f5c259
--- /dev/null
+++ b/package/udev/patches/003-portability.patch
@@ -0,0 +1,50 @@
+diff -ur udev.old/Makefile udev.dev/Makefile
+--- udev.old/Makefile 2007-04-29 03:20:27.056490320 +0200
++++ udev.dev/Makefile 2007-04-29 03:26:32.693904984 +0200
+@@ -246,13 +246,15 @@
+ .PHONY: install-config
+
+ install-man:
+- $(INSTALL_DATA) -D udev.7 $(DESTDIR)$(mandir)/man7/udev.7
+- $(INSTALL_DATA) -D udevinfo.8 $(DESTDIR)$(mandir)/man8/udevinfo.8
+- $(INSTALL_DATA) -D udevtest.8 $(DESTDIR)$(mandir)/man8/udevtest.8
+- $(INSTALL_DATA) -D udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8
+- $(INSTALL_DATA) -D udevtrigger.8 $(DESTDIR)$(mandir)/man8/udevtrigger.8
+- $(INSTALL_DATA) -D udevsettle.8 $(DESTDIR)$(mandir)/man8/udevsettle.8
+- $(INSTALL_DATA) -D udevmonitor.8 $(DESTDIR)$(mandir)/man8/udevmonitor.8
++ $(INSTALL) -d $(DESTDIR)$(mandir)/man7
++ $(INSTALL) -d $(DESTDIR)$(mandir)/man8
++ $(INSTALL_DATA) udev.7 $(DESTDIR)$(mandir)/man7/udev.7
++ $(INSTALL_DATA) udevinfo.8 $(DESTDIR)$(mandir)/man8/udevinfo.8
++ $(INSTALL_DATA) udevtest.8 $(DESTDIR)$(mandir)/man8/udevtest.8
++ $(INSTALL_DATA) udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8
++ $(INSTALL_DATA) udevtrigger.8 $(DESTDIR)$(mandir)/man8/udevtrigger.8
++ $(INSTALL_DATA) udevsettle.8 $(DESTDIR)$(mandir)/man8/udevsettle.8
++ $(INSTALL_DATA) udevmonitor.8 $(DESTDIR)$(mandir)/man8/udevmonitor.8
+ - ln -f -s udevd.8 $(DESTDIR)$(mandir)/man8/udevcontrol.8
+ @extras="$(EXTRAS)"; for target in $$extras; do \
+ $(MAKE) -C $$target $@ || exit 1; \
+@@ -275,13 +277,16 @@
+
+ install-bin:
+ $(INSTALL) -d $(DESTDIR)$(udevdir)
+- $(INSTALL_PROGRAM) -D udevd $(DESTDIR)$(sbindir)/udevd
+- $(INSTALL_PROGRAM) -D udevtrigger $(DESTDIR)$(sbindir)/udevtrigger
+- $(INSTALL_PROGRAM) -D udevsettle $(DESTDIR)$(sbindir)/udevsettle
+- $(INSTALL_PROGRAM) -D udevcontrol $(DESTDIR)$(sbindir)/udevcontrol
+- $(INSTALL_PROGRAM) -D udevmonitor $(DESTDIR)$(usrsbindir)/udevmonitor
+- $(INSTALL_PROGRAM) -D udevinfo $(DESTDIR)$(usrbindir)/udevinfo
+- $(INSTALL_PROGRAM) -D udevtest $(DESTDIR)$(usrbindir)/udevtest
++ $(INSTALL) -d $(DESTDIR)$(sbindir)
++ $(INSTALL) -d $(DESTDIR)$(usrbindir)
++ $(INSTALL) -d $(DESTDIR)$(usrsbindir)
++ $(INSTALL_PROGRAM) udevd $(DESTDIR)$(sbindir)/udevd
++ $(INSTALL_PROGRAM) udevtrigger $(DESTDIR)$(sbindir)/udevtrigger
++ $(INSTALL_PROGRAM) udevsettle $(DESTDIR)$(sbindir)/udevsettle
++ $(INSTALL_PROGRAM) udevcontrol $(DESTDIR)$(sbindir)/udevcontrol
++ $(INSTALL_PROGRAM) udevmonitor $(DESTDIR)$(usrsbindir)/udevmonitor
++ $(INSTALL_PROGRAM) udevinfo $(DESTDIR)$(usrbindir)/udevinfo
++ $(INSTALL_PROGRAM) udevtest $(DESTDIR)$(usrbindir)/udevtest
+ @extras="$(EXTRAS)"; for target in $$extras; do \
+ $(MAKE) -C $$target $@ || exit 1; \
+ done;
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index 5d0a87b28b..9b3700ece3 100644
--- a/target/imagebuilder/Makefile
+++ b/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 | xargs rm -rf
- find $(IB_BUILD_DIR) -name CVS | xargs 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); \
)
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index 9f12631863..cea334b25e 100644
--- a/target/sdk/Makefile
+++ b/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 | xargs -r rm -rf
- find $(SDK_BUILD_DIR) -name CVS | xargs -r rm -rf
+ find $(SDK_BUILD_DIR) -name .svn | $(XARGS) rm -rf
+ find $(SDK_BUILD_DIR) -name CVS | $(XARGS) rm -rf
(cd $(BUILD_DIR); \
tar cfj $@ $(SDK_NAME); \
)
diff --git a/target/sdk/files/Makefile b/target/sdk/files/Makefile
index 2f8451bf78..31758c1248 100644
--- a/target/sdk/files/Makefile
+++ b/target/sdk/files/Makefile
@@ -76,7 +76,7 @@ world: FORCE
cd package; \
find . -maxdepth 2 -name Config.in | \
sed -e 's,/Config.in,,g' | \
- xargs -r -n1 make compile -C; \
+ xargs -n1 make compile -C; \
)
clean: FORCE