[CRIU] [PATCH] make: fix navigation in vim

Kinsbursky Stanislav skinsbursky at openvz.org
Mon Dec 3 05:29:05 EST 2012


03.12.2012 14:08, Pavel Emelyanov пишет:
> On 12/03/2012 02:02 PM, Andrey Vagin wrote:
>> If you have an error in parasite.c and execute make from vim,
>> without this patch vim opens a new file parasite.c in a root directory.
>>
>> With this patch vim opens pie/parasite.c.
> Kernel "make" doesn't print directory either.
> Can we make it look like in kernel instead?

Short answer is "yes".
The long one is that it's not that simple.
All kernel objects are build in root directory.
I.e. you can build any target like this:

# make fs/nfsd/nfs4idmap.o
<snip>
CC [M] fs/nfsd/nfs4idmap.o

But you can't do it like this:

# cd fs/nfsd/
# make nfs4idmap.o
<a lot of errors>

Note, that in fist example we see the full path to the object. In such case "--no-print-directory" can be dropped: vim will works just fine.
And this is "step 2 of make improvements" , which we discussed already a couple of weeks ago.

>
>> Signed-off-by: Andrey Vagin <avagin at openvz.org>
>> ---
>>   Makefile | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 07c3bd5..18db408 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -67,7 +67,6 @@ else
>>   endif
>>   
>>   CFLAGS		+= $(WARNINGS) $(DEFINES)
>> -MAKEFLAGS	:= --no-print-directory
>>   SYSCALL-LIB	= $(SRC_DIR)/arch/$(ARCH)/syscalls.o
>>   PROTOBUF-LIB	= $(SRC_DIR)/protobuf/protobuf-lib.o
>>   
>>
>


-- 
Best regards,
Stanislav Kinsbursky




More information about the CRIU mailing list