makefile:递归查找并删除辅助文件(makefile : find recursively and delete auxiliary files)
假设我有一个已知的文件列表:
EXT=*ext1 *ext2 *ext3我想在我的makefile中使用类似的东西
clean:$(EXT) find . -name @< -delete但我不能使它工作,因为我需要使用每个扩展名的查找命令EXT不仅在第一个或同时所有的...
显然,目标是能够快速添加和删除列表中的扩展名。
Assume I have a list of file known by their extention:
EXT=*ext1 *ext2 *ext3I want to use in my makefile something like
clean:$(EXT) find . -name @< -deleteBut I can't make it work because I need to use the find command for each extension is EXT not only on the first one or for all of the at the same time...
The goal is obviously to be able to quickly add and remove extension from the list.
最满意答案
使用for循环:
clean: for i in $(EXT); do find . -name "$$i" -delete; doneUse a for loop:
clean: for i in $(EXT); do find . -name "$$i" -delete; done更多推荐
发布评论