【发布时间】:2014-04-07 08:48:26
【问题描述】:
例如,给定当前目录中的文件列表,如何将文件复制到另一个目录。
dest_dir := /usr/bin/test
.PHONY: install
install: $(dest_dir)
#there files are in current directory
xpi_built := install.rdf \
chrome.manifest \
$(wildcard content/*.js) \
$(wildcard content/*.xul) \
$(wildcard content/*.xml) \
$(wildcard content/*.css) \
$(wildcard skin/*.css) \
$(wildcard skin/*.png) \
$(wildcard locale/*/*.dtd) \
$(wildcard locale/*/*.properties)
#how to copy there files to another directory
$(dest_dir)/% : $(xpi_built)
@mkdir -p $(dest_dir)
@cp $< $@
如何将文件列表复制到目标目录中?
【问题讨论】:
标签: makefile