gnu-make - Make:动态子目录的静态配方
问题描述
给定(简化)表格的层次结构
A
source
target
B
source
target
...
target
每个子目录中都有一个专门从其中的子目录构建的子目录source
。我想通过make来实现这一点。
当然,一个makefile如
%target: %source
...
可以完成这项工作,但这也可以匹配A/wrong_target
. 但是,删除%
's 不起作用;似乎target
then 只匹配.
但不匹配子目录。
有什么好的方法来实现这一点吗?
解决方案
When you say "a hierarchy" do you mean a directory hierarchy?
Why don't you just enforce the directory by including the "/", like this:
%/target: %/source
....
推荐阅读
- java - 将 Appengine 应用程序从旧 Google 插件迁移到 Google 工具时如何修复错误。?
- android - 想要通过 Retrofit 1 向用户显示上传进度
- php - 在php中按大小转换多张照片
- android - 在Postexec 上提交片段
- flutter - 如何在文本字段的onclick上显示日期选择器而不是在颤动中的键盘?
- c# - 无法使用 c# 从 python 脚本中获取多个字符串输出
- salt-stack - SaltStack:如何在 achive.extracted 之后避免写保护的文件/目录?
- swift - Swift呈现到另一个页面不清除缓存
- javascript - 从数组中的链接下载文件
- java - DISTINCT 不适用于我该如何解决这个问题