Makefile
语法¶
targets: prerequisites
command
command
command
规则¶
目标¶
依赖¶
命令¶
条件¶
变量¶
Makefile 的变量只能是字符串,单引号或双引号没有意义。
# 使用时
shell = /bin/bash
# 定义时
TEX_ENGINE := tectonic
函数¶
# $(fn, args) 或者 ${fn, args}
特性¶
示例¶
SHELL = /bin/bash
TEX_ENGINE := tectonic -X
BUILD_CMD := $(TEX_ENGINE) build
BUILD_DIR := ./build
DOC_PATH := $(BUILD_DIR)/default/default.pdf
DOC_DEF_FILE := Tectonic.toml
preview: build open
build: $(DOC_DEF_FILE)
$(BUILD_CMD)
open:
open $(DOC_PATH)
.PHONY: clean
clean:
rm -r $(BUILD_DIR)
资源¶
最后更新: September 10, 2023