Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems aren't getting proper file path links from nested makefiles with relative paths #48681

Closed
bobbrow opened this issue Apr 25, 2018 · 1 comment
Assignees
Labels
tasks Task system issues

Comments

@bobbrow
Copy link
Member

bobbrow commented Apr 25, 2018

Copied from microsoft/vscode-cpptools#1871
@tehKaiN

This is gonna be a bit tricky to fix, but it's kinda doable. ;) It's a bit of general vscode problem but it's tightly connected to any makefile-based building. Since makefiles are mostly used with C/C++ I'm posting it here.

I have a folder containing subprojects and a common folder containing shared code. Each subproject has it's own makefile. I have build tasks for each of subprojects and they are configured in manner as follows:

{
	"label": "make packer",
	"type": "shell",
	"command": "make",
	"group": "build",
	"problemMatcher":"$gcc",
	"args": [
		"-C", "${workspaceFolder}/subproj1",
	]
},

During building I get GCC error:

make: Entering directory `D:/prg/myfolder/subproj1'
# Some irrelevant lines here
Building file: ../common/test.c
../common/test.c: In function 'testfn': # warning content irrelevant

Which translates to problem in file located at D:/prg/common/test.c which is wrong because it should be
D:/prg/myfolder/common/test.c

The reason for such behavior is as simple as relative path being applied to workspace folder and not makefile parent directory. I'll probably change my makefile so that it would use absolute path (if I figure out how to enforce it), but I guess it's worth reporting anyway. The entering directory message is constant across makefile versions and there is a leaving directory message accompanying it, so this could be used to auto detect current directory.

@vscodebot vscodebot bot added the tasks Task system issues label Apr 25, 2018
@dbaeumer
Copy link
Member

Dups #11663.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tasks Task system issues
Projects
None yet
Development

No branches or pull requests

2 participants