offlineRule {rmake} | R Documentation |
Rule for requesting manual user action
Description
Instead of building the target, this rule simply issues the given error message.
This rule is useful for cases, where the target target
depends on depends
, but
has to be updated by some manual process. So if target
is older than any of its
dependencies, make
will throw an error until the user manually updates the target.
Usage
offlineRule(target, message, depends = NULL, task = "all")
Arguments
target |
A character vector of target file names of the manual (offline) build command |
message |
An error message to be issued if targets are older than dependencies
from |
depends |
A character vector of file names the targets depend on |
task |
A character vector of parent task names. The mechanism of tasks allows to
group rules. Anything different from |
Value
Instance of S3 class rmake.rule
Author(s)
Michal Burda
See Also
Examples
r <- offlineRule(target='offlinedata.csv',
message='Please re-generate manually offlinedata.csv',
depends=c('source1.csv', 'source2.csv'))
# generate the content of a makefile (as character vector)
makefile(list(r))
# generate to file
tmp <- tempdir()
makefile(list(r), file.path(tmp, "Makefile"))