dongshanxiao7328 2014-08-26 00:15
浏览 55
已采纳

如何理解这个Go makefile?

COVERPROFILE=cover.out

default: test

cover:
    go test -coverprofile=$(COVERPROFILE) .
    go tool cover -html=$(COVERPROFILE)
    rm $(COVERPROFILE)

dependencies:
    go get -d .

test:
    go test -i ./...
    go test -v ./...

.PHONY: coverage dependencies test

I don't understand this golang makefile. Is there any tutorial for golang makefiles? I searched Google and didn't find any complete one. For example, I don't see any explanation for what is "cover," etc.

  • 写回答

2条回答 默认 最新

  • doushijia5684 2014-08-26 00:22
    关注

    That is just a plain make file and not even well written.

    1. running just make will execute the commands under test
    2. make dependencies will download all the dependencies of the current packages
    3. make cover will do coverage testing and output an html file
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题