Sunday, April 15, 2012

Re: Setting 'make -jN' in makeprg

Hi John!

On So, 15 Apr 2012, John Beckett wrote:

> A new tip suggests a vimrc command to set makeprg so it will
> automatically detect the number of processors and adjust the
> '-j' make option. This is out of my league (although I have seen
> a friend build the Linux kernel using -j16, although I think he
> gave that up because of the confusing error messages), but I
> suggested the following replacement:
>
> let &makeprg = 'make -j'.system('echo -n "$(echo $(grep -c ^processor /proc/cpuinfo)+1 | bc)"')

Your command looks strange, why are you adding 1 there? I think, better
is something like:

let &makeprg = 'make -j'.system('grep -c ^processor /proc/cpuinfo')

regards,
Christian
--
Eine Ostküste ist eine Küste die westlich des Wassers liegt
- daher der Name..., Folge 185
Ein Ostufer ist ein Ufer das östlich des Wassers liegt.
- daher der Name..., Folge 213

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: