computer_knowledge_notes/Software/编译工具/ninja.md

17 lines
429 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

一个构建工具它的作用和make命令是一样的。
#### ninja文件介绍
```
# 规则(rule)
rule <rule_name>
command = gcc ...
description =
# build语句
build <target_name> : <rule_name> <inputs>
# subninja和include都是用来引入其它的ninja文件。不同点是subninja引入的子模块可以使用父模块的变量include引入的子模块不可以使用交模块中的变量。
```