fixes for a few build errors on osx without fink
authorFelix Fietkau <nbd@openwrt.org>
Sun, 29 Apr 2007 01:30:48 +0000 (01:30 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 29 Apr 2007 01:30:48 +0000 (01:30 +0000)
SVN-Revision: 7065

Makefile
include/host.mk
include/image.mk
include/package-ipkg.mk
package/Makefile
package/udev/patches/003-portability.patch [new file with mode: 0644]
target/imagebuilder/Makefile
target/sdk/Makefile
target/sdk/files/Makefile

index 6b30ef92fa31f460d2b8862b1777cda40efc0bce..d2be7bb61f1cb9747552c1481528d4e1887da373 100644 (file)
--- 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: ;
index 423ca1661082b53cfd6ce8daf0dd56640a4d884d..8b4ce3d24b9101ebe1ab1603da33a75decd56273 100644 (file)
@@ -35,3 +35,9 @@ $(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk
        )
 
 endif
+
+ifeq ($(HOST_OS),Linux)
+  XARGS:=xargs -r
+else
+  XARGS:=xargs
+endif
index 0e6a7cdbeab280b9615b210d0c4313f042e802ed..f814f61d77912dcf9d30b2e46b27aec41c9c28d9 100644 (file)
@@ -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
index ac6912844b029300318035a6523fef094ef1dd4a..20d1326133cfd686cfe6ea5e7abff50f6301061a 100644 (file)
@@ -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 
index 04b2912dc7478699417cf8ac5e6298e392867f78..c3fc01c7dfed8f053d9f71b202ea35c1ff5ac71a 100644 (file)
@@ -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 (file)
index 0000000..0744f5c
--- /dev/null
@@ -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;
index 5d0a87b28b27deec2331155cf04198fe705e7c79..9b3700ece3065b48effbf8776c3bc40ab65aedcb 100644 (file)
@@ -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); \
        )
index 9f12631863c583ee1444dd1be349973f8f87c7ed..cea334b25e749b13a4349aa81ec4beda0aafda66 100644 (file)
@@ -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); \
        )
index 2f8451bf78b47dbd7b3556fbe97d81e01cf1e5dd..31758c124845226141e58738f30bccf2805d93bd 100644 (file)
@@ -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