make: Create a Makefile

View source: R/make.R

makeR Documentation

Create a Makefile

Description

Creates a Makefile or a string to run make with the Makefile supplied by Pmisc

Usage

make(x, suffix,
  beamer = FALSE, run = FALSE, ...)
Makefile(x, suffix,
  beamer = FALSE, output='Makefile', cygwin=FALSE, fullpath=FALSE)

Arguments

x

a string specifying the target

suffix

string to replace file extension

beamer

use --to=beamer

run

run make with a system call

output

Name of file saved, or a function output is passed to.

cygwin

Makefile is to be run in cygwin

fullpath

add full path to executables

...

additional arguments passed to make

Details

The following can be used in an eclipse configuration

\bin\bash -c make $(
"R --vanilla --slave -e 
Pmisc::make\(\'${selected_resource_name}\',suffix=\'pdf\'
\))"

Examples


file.show(system.file(file.path('src','knitrMakefile'), package='Pmisc'))

Makefile(x='stuff.md', suffix='pdf', beamer=TRUE, output=cat)

make("stuff.html")

stuff = make("stuff.pdf", beamer=TRUE)

stuff

if(.Platform$OS.type == 'unix') {
	system(paste(
	"echo make $(R --vanilla --slave -e",
	"\"Pmisc::make('stuff.Rmd',suffix='pdf')\")")
	)
}


Pmisc documentation built on Feb. 14, 2024, 3 a.m.