write_makefile: Write a 'Makelist' to File

View source: R/makefiles.R

write_makefileR Documentation

Write a Makelist to File

Description

The makelist is parsed before writing, so all R code which is not in a "code" item will be evaluated. So if any other item's string contains code allowing for a dynamic rule, for example with some "dependencies" reading "list.files(\"R\", full.names = TRUE)", the Makefile will have the evaluated code, a static list of files in the above case.

Usage

write_makefile(make_list, path, Rbin = "Rscript-devel")

Arguments

make_list

The list to write to file.

path

The path to the file.

Rbin

The R binary to use in the Makefile.

Value

See MakefileR::write_makefile.

Examples

make_file <- file.path(tempdir(), "my_Makefile")
write_makefile(provide_make_list(), path = make_file)
cat(readLines(make_file), sep = "\n")

fakemake documentation built on Aug. 16, 2023, 1:09 a.m.