制作:为多目录研究工作流设置构建环境 [英] Make: setting up build environment for multi-directory research workflows

查看:156
本文介绍了制作:为多目录研究工作流设置构建环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题来自于我以前使用的 make 基于构建环境的问题(和对此的讨论) code> R 基于科学研究软件项目(针对我的博士论文):总是重建Makefile目标

This question grew out of my earlier question (and discussion in comments to it) on my use of make-based build environment for R-based scientific research software project (for my Ph.D. dissertation): make always rebuilds Makefile targets.

根据@MadScentist的建议,我创建了这个问题澄清我的构建环境的以下方面。由于我在项目的几乎所有子目录中使用 Makefile 文件,因此我的研究遇到了正确规范的问题工作流依赖关系。虽然工作流本身是非常标准的(数据收集 => 数据准备(transform,cleanup,merge,sample)=> 数据分析 => 结果表示),IMHO的问题源自于需要指定位于不同目录(和不同类型,即单个中间文件依赖于一组)的工件之间的构建依赖的数据文件等)。我没有找到任何文件或清楚解释这个问题的解决方案。

Following recommendation of @MadScentist, I created this question to clarify the following aspect of the my build environment. Since I use Makefile files in almost all sub-directories of my project, I've experienced the problem of correct specification for my research workflow dependencies. While the workflow itself is pretty standard (data collection => data preparation (transform, cleanup, merge, sample) => data analysis => results presentation), the issue IMHO stems from the need to specify build dependencies between artifacts, located in different directories (and of different types, i.e. single intermediate file depends on a set of data files, etc.). I haven't found anywhere any documentation or clear explanation of a solution to this problem.

您的帮助非常感谢!

更新:重新说明问题的标题以澄清问题。

UPDATE: Re-phrased the title of the question to clarify the problem.

推荐答案

没有解决方案对于这个问题,据我所知。这就是为什么递归考虑有害的原因是写在第一个。

There isn't a solution to this problem as far as I'm aware. This is why the reason the 'Recursive Make Considered Harmful' paper was written in the first place.

如果您需要对象级别上的目录间依赖关系,那么您不能以这种方式使用每个目录的Makefile:s。使用每个目录的makefile:您只能手动同步make命令的运行顺序。 (您可能会通过在每个makefile中使用每个目录的每个目录和转发规则的邮票文件来至少伪造一些数量的建筑物,但是可能会很快地变得丑陋和笨拙,并且可能无法使用多个目录给定级别。)

If you need inter-directory dependency relationships on an object level then you can't use per-directory Makefile:s this way. With per-directory makefile:s you only have manually synchronized ordering of running of make commands. (You could probably fake at least some amount of as-needed building by using stamp files per-target per-directory and forwarding rules in each makefile but it will likely get ugly and unwieldy rather quickly, and might not work with multiple directories at any given level.)

这篇关于制作:为多目录研究工作流设置构建环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆