Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

problem of makefile #6

Open
isharrrry opened this issue Feb 11, 2020 · 4 comments
Open

problem of makefile #6

isharrrry opened this issue Feb 11, 2020 · 4 comments

Comments

@isharrrry
Copy link

makefile文件好像没有起到作用,win下“运行生成任务”,运行的是tasks.json相关配置,而没有使用makefile的内容。
另外缺少publish的批处理文件。

@haozewu
Copy link
Owner

haozewu commented Feb 11, 2020

  1. makefile 文件是有用的,task 中实际上是运行了
{
            "label": "compile",
            "type": "shell",
            "command": "mingw32-make",
            "args": [
                "target=${fileBasenameNoExtension}"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
 }

也就是运行了 makefile 中的步骤。
2. publish 批处理文件已经被删除了,自从在 rm 这些 linux 指令可以在 Windows 中使用的时候。请直接使用 【运行任务】中的【clean】来删除临时文件。如果你的 Windows 系统不能使用 rm 等指令,可以在应用商店安装 WSL 。

@isharrrry
Copy link
Author

  1. makefile 文件是有用的,task 中实际上是运行了
{
            "label": "compile",
            "type": "shell",
            "command": "mingw32-make",
            "args": [
                "target=${fileBasenameNoExtension}"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
 }

也就是运行了 makefile 中的步骤。
2. publish 批处理文件已经被删除了,自从在 rm 这些 linux 指令可以在 Windows 中使用的时候。请直接使用 【运行任务】中的【clean】来删除临时文件。如果你的 Windows 系统不能使用 rm 等指令,可以在应用商店安装 WSL 。

image

根据官方文档,编译不含main函数的c可以得到rel文件,然后可以最终实现多文件生成ihx文件,是否考虑加入这个功能实现不仅仅是单文件编译呢?
另外我尝试在task.json实现脱离makefile编译是可行的,是否可以考虑只用task.json来取代minggw的make程序的功能,让编译流程更简单?

            "label": "Build 编译",
            "type": "shell",
            "command": "sdcc",
            "args": [
                "-c",
                "${relativeFile}",
                "-o",
                "${fileDirname}\\..\\tmp\\"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": []

@isharrrry
Copy link
Author

image

@haozewu
Copy link
Owner

haozewu commented Feb 13, 2020

只写task作为单文件编译是可以的。我当时是想要做多文件编译所以写makefile,后来发现我没有这个实际需求,你如果需要编译多文件,可以改改makefile。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants