Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement multiple rules per target #56

Open
sjackman opened this issue Jan 18, 2018 · 0 comments
Open

Implement multiple rules per target #56

sjackman opened this issue Jan 18, 2018 · 0 comments

Comments

@sjackman
Copy link
Contributor

sjackman commented Jan 18, 2018

See https://www.gnu.org/software/make/manual/html_node/Multiple-Rules.html

In the following example, biomake does not create the file data.tsv.

all: report.html

report.rmd:
	printf '```{r}\nlibrary(ggplot2)\nlibrary(readr)\nggplot(read_tsv("data.tsv"), aes(x=x, y=y)) + geom_point()\n```\n' >$@

data.tsv:
	printf "x\ty\n1\t1\n2\t4\n3\t9\n" >$@

%.html: %.rmd
	Rscript -e 'rmarkdown::render("$<", "html_document", "$@")'

report.html: data.tsv
❯❯❯ make -n
printf '```{r}\nlibrary(ggplot2)\nlibrary(readr)\nggplot(read_tsv("data.tsv"), aes(x=x, y=y)) + geom_point()\n```\n' >report.rmd
printf "x\ty\n1\t1\n2\t4\n3\t9\n" >data.tsv
Rscript -e 'rmarkdown::render("report.rmd", "html_document", "report.html")'
❯❯❯ biomake -n
  printf '```{r}\nlibrary(ggplot2)\nlibrary(readr)\nggplot(read_tsv("data.tsv"), aes(x=x, y=y)) + geom_point()\n```\n' >report.rmd
 Rscript -e 'rmarkdown::render("report.rmd", "html_document", "report.html")'
Target all not materialized - build required
❯❯❯ biomake
…
Error: 'data.tsv' does not exist in current working directory

Execution halted
While building report.html: Error 1 executing Rscript -e 'rmarkdown::render("report.rmd", "html_document", "report.html")'
@ihh ihh changed the title Implement multiple rules per target [feature request] Implement multiple rules per target Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants