From e8338bb0922e8445a590f01c841496186868e8d9 Mon Sep 17 00:00:00 2001 From: Nithin Saripalli Date: Tue, 16 Feb 2021 19:50:59 -0500 Subject: [PATCH 1/7] Make the build file slightly easier for compiling with an alternate R interpreter --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 2c4b3b4..fbd3ef8 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,14 @@ +R := R + .PHONY: all build check document test all: document build check build: document - R CMD build . + $(R) CMD build . check: build - R CMD check injectr*tar.gz + $(R) CMD check injectr*tar.gz clean: -rm -f injectr*tar.gz @@ -14,11 +16,11 @@ clean: -rm -fr src/*.{o,so} document: clean - Rscript -e 'devtools::document()' - Rscript -e 'rmarkdown::render("README.Rmd")' + $(R) --no-echo -e 'devtools::document()' + $(R) --no-echo -e 'rmarkdown::render("README.Rmd")' test: - Rscript -e 'devtools::test()' + $(R) --no-echo -e 'devtools::test()' install: clean - R CMD INSTALL . + $(R) CMD INSTALL . From b64c838785c3884199df46a2d85dd6ac40a851b9 Mon Sep 17 00:00:00 2001 From: Nithin Saripalli Date: Tue, 16 Feb 2021 20:16:43 -0500 Subject: [PATCH 2/7] adding install devtools and rmarkdown commands --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fbd3ef8..d7d966d 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ clean: -rm -fr injectr.Rcheck -rm -fr src/*.{o,so} -document: clean +document: clean install-devtools install-rmarkdown $(R) --no-echo -e 'devtools::document()' $(R) --no-echo -e 'rmarkdown::render("README.Rmd")' @@ -24,3 +24,9 @@ test: install: clean $(R) CMD INSTALL . + +install-devtools: + $(R) --no-echo -e "if (!require('devtools')) install.packages('devtools')" + +install-rmarkdown: + $(R) --no-echo -e "if (!require('rmarkdown')) install.packages('rmarkdown')" From 34361fa0d2881921171a0954e029fafa1414ce4f Mon Sep 17 00:00:00 2001 From: Nithin Saripalli Date: Tue, 16 Feb 2021 20:32:15 -0500 Subject: [PATCH 3/7] update to -s --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d7d966d..04f503f 100644 --- a/Makefile +++ b/Makefile @@ -16,17 +16,17 @@ clean: -rm -fr src/*.{o,so} document: clean install-devtools install-rmarkdown - $(R) --no-echo -e 'devtools::document()' - $(R) --no-echo -e 'rmarkdown::render("README.Rmd")' + $(R) -s -e 'devtools::document()' + $(R) -s -e 'rmarkdown::render("README.Rmd")' test: - $(R) --no-echo -e 'devtools::test()' + $(R) -s -e 'devtools::test()' install: clean $(R) CMD INSTALL . install-devtools: - $(R) --no-echo -e "if (!require('devtools')) install.packages('devtools')" + $(R) -s -e "if (!require('devtools')) install.packages('devtools')" install-rmarkdown: - $(R) --no-echo -e "if (!require('rmarkdown')) install.packages('rmarkdown')" + $(R) -s -e "if (!require('rmarkdown')) install.packages('rmarkdown')" From 6aeb9df6fd86e06756a28e3392ec334735d04ab7 Mon Sep 17 00:00:00 2001 From: Nithin Saripalli Date: Tue, 16 Feb 2021 20:37:15 -0500 Subject: [PATCH 4/7] repo cran --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 04f503f..6761d42 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ install: clean $(R) CMD INSTALL . install-devtools: - $(R) -s -e "if (!require('devtools')) install.packages('devtools')" + $(R) -s -e "if (!require('devtools')) install.packages('devtools', repos = 'http://cran.rstudio.com/')" install-rmarkdown: - $(R) -s -e "if (!require('rmarkdown')) install.packages('rmarkdown')" + $(R) -s -e "if (!require('rmarkdown')) install.packages('rmarkdown', repos = 'http://cran.rstudio.com/')" From 560284523efe1c454265a6a9048a3c8374369f68 Mon Sep 17 00:00:00 2001 From: Nithin Saripalli Date: Tue, 16 Feb 2021 21:03:40 -0500 Subject: [PATCH 5/7] Update Makefile removing document step on build, since it seems like it requires a gui --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6761d42..a8b0e4d 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ R := R all: document build check -build: document +build: $(R) CMD build . check: build From 18580862b2402e9ca7b5da1261eaa0e0bc7586db Mon Sep 17 00:00:00 2001 From: Nithin Saripalli Date: Tue, 16 Feb 2021 21:17:21 -0500 Subject: [PATCH 6/7] test requires devtools --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a8b0e4d..a08ba46 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ document: clean install-devtools install-rmarkdown $(R) -s -e 'devtools::document()' $(R) -s -e 'rmarkdown::render("README.Rmd")' -test: +test: install-devtools $(R) -s -e 'devtools::test()' install: clean From fc060347292f7ef6001fac9dd31974da205fff7e Mon Sep 17 00:00:00 2001 From: Nithin Saripalli Date: Wed, 17 Feb 2021 21:51:29 -0500 Subject: [PATCH 7/7] add back in document --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a08ba46..9649965 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ R := R all: document build check -build: +build: document $(R) CMD build . check: build