Hi,
On Sat, Mar 16, 2019 at 9:12 PM Astone <[email protected]> wrote:
>
> project directory:
>
> ./
>
> ├── Makefile
>
> └── main
>
> ├── Makefile
>
> └── main.go
>
> Makefile
>
> build:
>
> make -C main
>
> main/Makefile
>
> build:
>
> go build
>
> main/main.go
>
> package main
>
>
>
> func main() {
>
> i := 0
>
> }
>
> when i call :make in ./main/ I get the right quick fix.
>
> 1 main.go|4 col 7| i declared and not used
>
> but when i call :make in ./ I get the incorrect quick fix.
>
> 1 || make -C main
>
> 2 || go build
>
> 3 || # _/Users/marco/Astone/git/test/main
>
> 4 main.go|10 col 7| i declared and not used
>
> 5 || make[1]: *** [build] Error 2
>
> 6 || make: *** [build] Error 2
>
> when I press enter in line 4. It will create a new file
> _/Users/marco/Astone/git/test/main.go not open the right file
> _/Users/marco/Astone/git/test/main/main.go
>
> It's also happend in linux. and if u call cd .. in Makefile will cause the
> same problem.
>
Vim relies on the 'errorformat' option setting to parse the make
output. To correctly
parse entering and leaving directories, the 'errorformat' option setting must be
set to look for lines that print the directory names. You can refer to the
":help quickfix-directory-stack" help text for more information about this.
The default 'errorformat' option setting expects the text "Entering directory"
and "Leaving directory" in the make output to parse the change in directories.
In the above output, I don't see these lines. It looks like the directory
name is printed using the below format:
# _/Users/marco/Astone/git/test/main
Which 'make' are you using? What is 'makeprg' set to?
You may need to modify the 'errorformat' setting to parse the above line
using %D and %X.
- Yegappan
--
--
You received this message from the "vim_dev" 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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.