用户工具

站点工具


语法:makefile

这是本文档旧的修订版!


makefile

1. for

NAME := a b c
run:
	@for tmp in $(NAME); do \
		echo $$tmp; \
	done

根据文件内容循环执行

> cat gen.txt 
items = a b c
run:
	@line=$$(head -n1 gen.txt); \
	tile_list=$$(echo "$$line" | awk '{for(i=3;i<=NF;i++) printf " %s", $$i}'); \
	for tile in $$tile_list; do \
		echo "process tile: $$tile"; \
	done
> make
process tile: a
process tile: b
process tile: c
语法/makefile.1787982405.txt.gz · 最后更改: 2026/08/29 13:46 由 user01

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki