Changeset 743 for branches


Ignore:
Timestamp:
Mar 5, 2016, 8:32:29 PM (4 years ago)
Author:
amain
Message:

Make parallelization 15.05 backport

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/15.05/openwrt/openwrt.mk

    r733 r743  
    6565        touch $@
    6666
     67_PJOBS := $(shell grep -a \\-j /proc/$$PPID/cmdline | tr -d '\0' | sed 's/.*-j\([0-9]*\).*/\1/' )
     68ifneq ($(_PJOBS),)
     69PJOBS := -j$(_PJOBS)
     70else
     71PJOBS := -j1
     72endif
     73
    6774openwrt/build: openwrt/prepare
     75        @echo "OpenWrt make parallelization: $(subst -j,,$(PJOBS))"
    6876ifeq ("$(origin V)", "command line")
    69         $(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) $(CONFIG_OPENWRT_MAKE_OPTIONS) V=$(V)
    70 else
    71         $(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) $(CONFIG_OPENWRT_MAKE_OPTIONS)
     77        $(SCRIPT_CLEAN_EXEC) $(MAKE) $(PJOBS) -C $(OPENWRT_BUILD_DIR) $(CONFIG_OPENWRT_MAKE_OPTIONS) V=$(V)
     78else
     79        $(SCRIPT_CLEAN_EXEC) $(MAKE) $(PJOBS) -C $(OPENWRT_BUILD_DIR) $(CONFIG_OPENWRT_MAKE_OPTIONS)
    7280endif
    7381        touch $@
     
    7583openwrt/download:
    7684ifeq ("$(origin V)", "command line")
    77         $(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) download V=$(V)
    78 else
    79         $(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) download
     85        @echo "OpenWrt make parallelization: $(subst -j,,$(PJOBS))"
     86        $(SCRIPT_CLEAN_EXEC) $(MAKE) $(PJOBS) -C $(OPENWRT_BUILD_DIR) download V=$(V)
     87else
     88        $(SCRIPT_CLEAN_EXEC) $(MAKE) $(PJOBS) -C $(OPENWRT_BUILD_DIR) download
    8089endif
    8190        touch $@
Note: See TracChangeset for help on using the changeset viewer.