[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tommi Rantala <tt.rantala@xxxxxxxxx> writes:

> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index b93fc3a..16fafe8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2,7 +2,7 @@ VERSION="1.8pre"
>  
>  INSTALL_PREFIX ?= $(DESTDIR)
>  INSTALL_PREFIX ?= $(HOME)
> -NR_CPUS := $(shell grep ^processor /proc/cpuinfo | /usr/bin/wc -l)
> +NR_CPUS := $(shell grep -c ^processor /proc/cpuinfo)

Or you could just use nproc(1) ?

It's in coreutils, but maybe that's not sufficiently portable?

cheers
--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux