Skip to content

  • 项目
  • 群组
  • 代码片段
  • 帮助
  • 当前项目
    • 正在载入...
  • 登录 / 注册
G
go-ipfs
  • 概览
    • 概览
    • 详情
    • 活动
    • 周期分析
  • 版本库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
    • 统计图
  • 问题 0
    • 议题 0
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 0
    • 合并请求 0
  • CI / CD
    • CI / CD
    • 流水线
    • 作业
    • 日程表
    • 图表
  • 维基
    • Wiki
  • 代码片段
    • 代码片段
  • 成员
    • 成员
  • 折叠边栏
  • 活动
  • 图像
  • 聊天
  • 创建新问题
  • 作业
  • 提交
  • 问题看板
  • jihao
  • go-ipfs
  • Repository

切换分支/标签
  • go-ipfs
  • cmd
  • ipfs
  • runmain_test.go
查找文件
BlameHistoryPermalink
  • Jakub Sztandera's avatar
    make: rework makefiles for non-recursive make and add sharness coverage · f6302225
    This commit introduces non-recursive Makefile infrastructure that replaces current Makefile infrastructure.
    It also generally cleanups the Makefiles, separates them into nicer sub-modules and centralizes common operations into single definitions.
    
    It allows to depend on any target that is defined in the makefile, this means that for example `gx install` is called once when `make build test_expensive_sharness` is called instead of 4 or 5 times.
    
    It also makes the dependencies much cleaner and allows for reuse of modules. For example sharness coverage collection (WIP) uses sharness target with amended PATH, previously it might have been possible but not without wiring in the coverage collection into sharness make runner code.
    
    Yes, it is more complex but not much more. There are few rules that have to be followed and few complexities added but IMHO it is worth it.
    
    How to NR-make:
    1. If make is to generate some file via a target, it MUST be defined in Rules.mk file in the directory of the target.
    2. `Rules.mk` file MUST have `include mk/header.mk` statement as the first line and `include mk/footer.mk` statement as the last line (apart from project root `Rules.mk`).
    3. It then MUST be included by the closest `Rules.mk` file up the directory tree.
    4. Inside a `Rules.mk` special variable accessed as `$(d)` is defined. Its value is current directory, use it so if the `Rules.mk` file is moved in the tree it still works without a problem. Caution: this variable is not available in the recipe part and MUST NOT be used. Use name of the target or prerequisite to extract it if you need it.
    5. Make has only one global scope, this means that name conflicts are a thing. Names SHOULD  follow `VAR_NAME_$(d)` convention. There are exceptions from this rule in form of well defined global variables. Examples: General lists `TGT_BIN`, `CLEAN`; General targets: `TEST`, `COVERAGE`; General variables: `GOFLAGS`, `DEPS_GO`.
    3. Any rules, definitions or variables that fit some family SHOULD be defined in `mk/$family.mk` file and included from project root `Rules.mk`
    
    License: MIT
    Signed-off-by: 's avatarJakub Sztandera <kubuxu@protonmail.ch>
    由 Jakub Sztandera 提交于 12月 16, 2016
    f6302225
runmain_test.go 643 Bytes
编辑Web IDE
×

Replace runmain_test.go

拖放文件到此处或者 点击上传


取消
将在派生(fork)项目中中创建一个新的分支, 并开启一个新的合并请求。