Skip to content

files as dependency #867

Description

@alperyilmaz

Hi,
I'm glad to discover just since make is painful to write. However, I still like some dependencies to be actual files. The recipe should run if file exists or has been updated. "File exists" is easy to find a workaround and there are some workarounds for "if file changed" cases such as watchexec or tricks mentioned in #424. But I was still wondering if it's possible to use a file as dependency so that dependees run if file has changed or file is missing?

Just a hypothetical example:

process-data: input.csv
    #!/usr/bin/env Rscript
    library(tidyverse)
    input <- read_csv("input.csv")
    #some analysis
    write_csv("output.csv")

Is it possible that just process-data does not run if input.csv has not changed?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions