Makefile.rbuild

# prepare the package for release
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC  := $(shell basename `pwd`)


all: check

# called by check
build-cran:
    cd ..;\
    R CMD build $(PKGSRC)

# called by install
build:
    cd ..;\
    R --no-site-file --no-environ --no-save --no-restore --quiet  \
    CMD build --no-manual $(PKGSRC) --no-resave-data --no-manual


install: build
    cd ..;\
    R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz


check: build-cran
    cd ..;\
    R --no-site-file --no-environ --no-save --no-restore --quiet  \
    CMD check $(PKGNAME)_$(PKGVERS).tar.gz --as-cran --timings --no-manual


clean:
    cd ..;\
    $(RM) -r $(PKGNAME).Rcheck/


README.md : README.Rmd
    R --slave -e 'rmarkdown::render("$<")'

Change project nature

We don't want to create a package nor we want the package context menu under the Build tab.

Change from Package to Makefile

Change type of README

Change from this:

---
output: github_document
---

to this:

---
output:
  md_document:
    variant: markdown_github
---

Fix of the markdown_github

http://pandoc.org/MANUAL.html#markdown-variants

Use this instead:

---
output:
  md_document:
    variant: gfm
---

This will prevent the creatyion of an html file.

Change Makefile

To build the README.Rmd, we change these two lines:

all: README.md mds
README.md : README.Rmd
    R --slave -e 'rmarkdown::render("$<")'


f0nzie/petroleum.ml documentation built on May 12, 2019, 6:22 p.m.