Tuesday, April 17, 2012

Re: Setting 'make -jN' in makeprg

On Sunday, April 15, 2012 5:28:23 AM UTC-6, MarcWeber wrote:
> Excerpts from John Beckett's message of Sun Apr 15 13:17:28 +0200 2012:
> > a friend build the Linux kernel using -j16, although I think he
> > gave that up because of the confusing error messages)
> My solution is to build with -j16, then build again with -j1 and watch
> one error message. With that solution in mind you understand soon that
> setting -j option in .vimrc is broken because you need *two* commands:
> 1) compile till hitting any error
> 2) compile with -j1 to find that one error without confusing error
> messages
>
> Its not perfect but fastest in many cases.
>
> If you have a look at vim-addon-actions you can bind make commands to
> keys multiple times easily - and while doing so add -jX options.
>
> Using vim-addon-local-vimrc for each project is another easy solution:
> define those two mappings once and continue working
>
> Marc Weber

On Sunday, April 15, 2012 5:28:23 AM UTC-6, MarcWeber wrote:
> Excerpts from John Beckett's message of Sun Apr 15 13:17:28 +0200 2012:
> > a friend build the Linux kernel using -j16, although I think he
> > gave that up because of the confusing error messages)
> My solution is to build with -j16, then build again with -j1 and watch
> one error message. With that solution in mind you understand soon that
> setting -j option in .vimrc is broken because you need *two* commands:
> 1) compile till hitting any error
> 2) compile with -j1 to find that one error without confusing error
> messages
>
> Its not perfect but fastest in many cases.
>
> If you have a look at vim-addon-actions you can bind make commands to
> keys multiple times easily - and while doing so add -jX options.
>
> Using vim-addon-local-vimrc for each project is another easy solution:
> define those two mappings once and continue working
>
> Marc Weber

You could just deal with this in make by creating targets that re-run make with the arguments you want. Then you don't have to change Vim settings to alter the way make runs. It's probably not an important distinction but doing it in the Makefile lets other developers benefit from the change as well.

Example:
# Makefile
parallel:
make -jX all

serial:
make -j1 all

# The original make target
all:
...

Quincy

--
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: