Visual Studio Code build targets

OP #7198875
Lesenswert?
• ▲
▼
Hallo,

ich versuche gerade die build targets in VSC zu konfigurieren aber 
scheitere kläglich.

Weiß einer wie man tasks.json ausfüllen muss damit

sich ctrl + shift + b genauso verhält wie wenn man

C:/workspace/project/target/application> make -f makefile all

in die shell eingibt?

Meine Projekt Struktur sieht dementsprechend so aus:

inc
src
target >> application >> makefile

Idealerweise erscheint mit ctrl + shift + b erst noch eine Auswahl mit 
allen Targets die konfiguriert sind i.e clean und flash
OP #7199313
Lesenswert?
• ▲
▼
habs jetzt unter dem Kompromiss zum laufen bekommen, dass ich mein 
makefile in das gleiche Verzeichnis verschiebe in dem auch .vscode 
liegt. aber dann laufen alle make tasks mit ctrl + shift + b mit 
Auswahlmenü... ich poste mein .vscode/tasks.json hier mal.

Zu erwähnen ist das mein makefile app.mk heißt


{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "all",
            "type": "shell",
            "command": "make",
            "args": [
                "-f",
                "./app.mk",
                "all"
            ],
            "group": "build",
            "presentation": {
                // Reveal the output only if unrecognized errors occur.
                "reveal": "silent"
            },
            // Use the standard MS compiler pattern to detect errors, 
warnings and infos
            "problemMatcher": "$msCompile"
        },

        {
            "label": "app",
            "type": "shell",
            "command": "make",
            "args": [
                "-f",
                "./app.mk",
                "app"
            ],
            "group": "build",
            "presentation": {
                // Reveal the output only if unrecognized errors occur.
                "reveal": "silent"
            },
            // Use the standard MS compiler pattern to detect errors, 
warnings and infos
            "problemMatcher": "$msCompile"
        },

        {
            "label": "flash",
            "type": "shell",
            "command": "make",
            "args": [
                "-f",
                "./app.mk",
                "flash"
            ],
            "group": "build",
            "presentation": {
                // Reveal the output only if unrecognized errors occur.
                "reveal": "silent"
            },
            // Use the standard MS compiler pattern to detect errors, 
warnings and infos
            "problemMatcher": "$msCompile"
        }
    ]
}

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren