我正在为一个网站编写一个makefile。
我有一个名为src/
andbuild/
基本上,我想获取这样的文件:
src/index.html
src/blog/title1/index.html
src/blog/title2/index.html
并将它们复制到这样的build/
目录中:
build/index.html
build/blog/title1/index.html
build/blog/title2/index.html
我尝试编写规则,但我不确定如何调试:
src_html := src/**/*.html
build_html := $(shell find src -name '*.html' | sed 's/src/build/')
$(src_html): $(build_html)
@cp $< $@