Make: setting up build environment for multi-directory research workflows [closed]

杀马特。学长 韩版系。学妹 提交于 2019-12-04 07:01:35

问题


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.

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.

Your help is greatly appreciated!

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


回答1:


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.

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.)



来源:https://stackoverflow.com/questions/24573413/make-setting-up-build-environment-for-multi-directory-research-workflows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!