VSCode に Makefile のタスクを追加する
流れ
Configure 開く
Create tasks.json する
Others 選ぶ
tasks.json の雛形ができるのでこんな感じで書き換え
( ${relativeFile} みたいにすると「現在開いてるファイルの相対 path 」が取れる)
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "make: test current file", "type": "shell", "command": "make", "args": [ "test", "path=${relativeFile}" ], "presentation": { "panel": "dedicated", "clear": true, "focus": true } } ] }
Run Task 実行
tasks.json につかした label が表示されているのでそれを実行
こんな感じで下に表示される