From: Joseph Roback <openwrt-devel@roback.cc>
authorMichael Büsch <mb@bu3sch.de>
Tue, 7 Sep 2010 10:04:42 +0000 (10:04 +0000)
committerMichael Büsch <mb@bu3sch.de>
Tue, 7 Sep 2010 10:04:42 +0000 (10:04 +0000)
26 Makefile patches for enabling parallel builds. Tested on Linux (8-core) and Darwin (12-core), individually and from clean build_root. The first set is from trunk, the second is from feeds/packages.

Signed-off-by: Joe Roback <joe@roback.cc>
SVN-Revision: 22967

20 files changed:
libs/avahi/Makefile
libs/curl/Makefile
libs/db47/Makefile
libs/expat/Makefile
libs/gd/Makefile
libs/gdbm/Makefile
libs/jpeg/Makefile
libs/libevent/Makefile
libs/libgcrypt/Makefile
libs/libpng/Makefile
libs/libxml2/Makefile
libs/popt/Makefile
net/iperf/Makefile
net/netatalk/Makefile
net/rsync/Makefile
net/transmission/Makefile
net/vnstat/Makefile
net/wol/Makefile
utils/nano/Makefile
utils/procps/Makefile

index 3ca330d..5b79866 100644 (file)
@@ -19,6 +19,7 @@ PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -195,4 +196,3 @@ $(eval $(call BuildPackage,libavahi))
 $(eval $(call BuildPackage,avahi-autoipd))
 $(eval $(call BuildPackage,avahi-daemon))
 $(eval $(call BuildPackage,avahi-dnsconfd))
-
index 411ee05..b424c05 100644 (file)
@@ -21,7 +21,8 @@ PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
        http://curl.mirrors.cyberservers.net/download/
 PKG_MD5SUM:=8402c1f654c51ad7287aad57c3aa79be
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -86,7 +87,7 @@ define Build/Configure
 endef
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                CC="$(TARGET_CC)" \
                install
index 6fe56a3..7e62dca 100644 (file)
@@ -18,6 +18,7 @@ PKG_MD5SUM:=073ab7f20d24b3872a51ca762f5090e7
 
 PKG_FIXUP:=libtool
 PKG_LIBTOOL_PATHS:=. build_unix
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -76,6 +77,8 @@ endef
 TARGET_CFLAGS += $(FPIC)
 
 define Build/Compile
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/build_unix \
+               DESTDIR="$(PKG_INSTALL_DIR)" all
        $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
                DESTDIR="$(PKG_INSTALL_DIR)" install
 endef
index 80b0d26..c00dce3 100644 (file)
@@ -15,7 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MD5SUM:=ee8b492592568805593f81f8cdf2a04c
 PKG_SOURCE_URL:=@SF/expat
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -39,7 +40,7 @@ CONFIGURE_ARGS += \
        --enable-static
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
 endef
 
 define Host/Install
index 6d1a944..ffe31eb 100644 (file)
@@ -17,6 +17,7 @@ PKG_MD5SUM:=6c6c3dbb7bf079e0bb5fbbfd3bb8a71c
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 751f22a..9d9c58c 100644 (file)
@@ -15,7 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/gdbm
 PKG_MD5SUM:=1d1b1d5c0245b1c00aff92da751e9aa1
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,7 +34,7 @@ CONFIGURE_ARGS += \
        --enable-static \
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                BINOWN=`id -u` \
                BINGRP=`id -g` \
                INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
index 4328651..a1522c0 100644 (file)
@@ -16,7 +16,8 @@ PKG_SOURCE_URL:=http://www.ijg.org/files/ \
         ftp://ftp.uu.net/graphics/jpeg/
 PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -63,7 +64,7 @@ endef
 
 define Build/Compile
        $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                LIBTOOL="./libtool --tag=CC" \
                prefix="$(PKG_INSTALL_DIR)/usr" \
                exec_prefix="$(PKG_INSTALL_DIR)/usr" \
index ea06654..de7f327 100644 (file)
@@ -18,6 +18,7 @@ PKG_MD5SUM:=0b3ea18c634072d12b3c1ee734263664
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index f796c59..20ee807 100644 (file)
@@ -17,6 +17,7 @@ PKG_MD5SUM:=cc2017ad09b4543f8b3b5e9a53cfd89d
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 786ac2e..44db676 100644 (file)
@@ -17,6 +17,7 @@ PKG_MD5SUM:=e3ac7879d62ad166a6f0c7441390d12b
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
index 586a756..d4cfa23 100644 (file)
@@ -18,6 +18,7 @@ PKG_MD5SUM:=9abc9959823ca9ff904f1fbcf21df066
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 3a5b754..0358944 100644 (file)
@@ -17,6 +17,7 @@ PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index bf7027b..cddb357 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_MD5SUM:=44b5536b67719f4250faed632a3cd016
 
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/iperf/Default
@@ -57,7 +59,7 @@ define Build/Template
 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
        -$(MAKE) -C $(PKG_BUILD_DIR) clean
        $(call Build/Configure/Default,$(3))
-       $(MAKE) -C $(PKG_BUILD_DIR)
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
        ( cd $(PKG_BUILD_DIR)/src; mv -f iperf iperf-$(2) )
        touch $$@
 
index c3b459e..05a8078 100644 (file)
@@ -13,6 +13,7 @@ PKG_RELEASE:=4
 PKG_SOURCE:=netatalk-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/netatalk/
 PKG_MD5SUM:=f35cd7a4ce26c780de380cd2bcae5ce6
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index e657534..74e9db0 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=http://rsync.samba.org/ftp/rsync/src
 PKG_MD5SUM:=b53525900817cf1ba7ad3a516ab5bfe9
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 9319980..bdb9900 100644 (file)
@@ -17,6 +17,7 @@ PKG_MD5SUM:=84fe15eb7e000fdc369def513299358b
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index c155b42..e0f364c 100644 (file)
@@ -17,7 +17,8 @@ PKG_MD5SUM:=95421d968689130590348ceb80ff74a8
 
 PKG_INSTALL:=1
 
-PKG_BUILD_DEPENDS:= libgd
+PKG_BUILD_DEPENDS:=libgd
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -59,13 +60,13 @@ define Package/vnstat/conffiles
 endef
 
 define Build/Compile/vnstat
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS)"
 endef
 
 define Build/Compile/vnstati
-       $(MAKE) -C $(PKG_BUILD_DIR) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
                LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib" \
index 5ba8f4f..afbfa55 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE_URL:=@SF/ahh
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MD5SUM:=c2fa9d7e771134ac8c89d56b8197d4ca
 
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/wol
index 2673b0a..3df856e 100644 (file)
@@ -16,6 +16,7 @@ PKG_SOURCE_URL:=http://www.nano-editor.org/dist/v2.2
 PKG_MD5SUM:=77a10a49589f975ce98350a4527a2ebf
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index 7a0ed3b..8e16706 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://procps.sourceforge.net
 PKG_MD5SUM:=9532714b6846013ca9898984ba4cd7e0
 
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/procps