[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help: How to set .RECIPEPRE variable to white spaces
From: |
amit mehta |
Subject: |
Re: Need help: How to set .RECIPEPRE variable to white spaces |
Date: |
Mon, 25 Jul 2011 17:54:52 +0530 |
Thank you for confirming. Sometime back I asked this query on
a different mailing list and one person suggested me to use vim features
as a workaround. Putting following entry in $HOME/.vimrc does the trick,
but I was just curious to be able to use make provided utility.
<<<snip from my $HOME/.vimrc>>>
"For indentation purpose
"-------- C -------------------------
function! LANG_C()
setlocal noexpandtab
setlocal shiftwidth=4
setlocal tabstop=4
setlocal softtabstop=4
setlocal formatoptions=tcroq
endfunction
autocmd FileType c call LANG_C()
"------- Makefile --------------
function! LANG_MAKEFILE()
setlocal noexpandtab " makefiles only work with tab-indents
setlocal shiftwidth=8
setlocal tabstop=8
setlocal softtabstop=8
endfunction
autocmd FileType make call LANG_MAKEFILE()
<<<snip from my $HOME/.vimrc>>>
-Amit
On Mon, Jul 25, 2011 at 5:43 PM, Paul Smith <address@hidden> wrote:
> On Sun, 2011-07-24 at 23:58 -0700, Kumar Mehta wrote:
>> How to set .RECIPEPREFIX variable to whitespace(say 4 whitespces) , so that
>> make uses this particular set of characters to identify the recipe for a
>> particular target.
>
> RECIPEPREFIX must be set to exactly one unique character. There's no
> way to set it to be "four spaces".
>
> Also note that this feature is only available in the latest version of
> GNU make and many systems do not include that version yet, so if you use
> this feature your makefiles will not be portable to older systems (you
> might not care about that).
>
> I'm not a vi/vim user but surely there's a way to set a different
> indentation environment for different types of files to avoid this
> issue? You should ask about how to configure vim properly on the
> appropriate vim mailing lists.
>
> --
> -------------------------------------------------------------------------------
> Paul D. Smith <address@hidden> Find some GNU make tips at:
> http://www.gnu.org http://make.mad-scientist.net
> "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
>
>
--
Life is elsewhere. Cross Frontiers. Fly away.
- Salman Rushdie