aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2016-10-13 20:13:27 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2016-10-13 20:13:27 +0200
commit70e16d8ca726ed9d894bd219018838ce4b0f22a0 (patch)
treeee5c9b79a55a2e9ce63f756ddf01ad20edbdec93 /GNUmakefile
parent6cfe5fbd827ca37f24134e8356e8144520ee1265 (diff)
chents for windows!
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 3051dfb..dfea847 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -2,13 +2,12 @@ PKGSRC := $(shell basename $(CURDIR))
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
TGZ := $(PKGNAME)_$(PKGVERS).tar.gz
+WINBIN := $(PKGNAME)_$(PKGVERS).zip
R_HOME ?= $(shell R RHOME)
DATE := $(shell date +%Y-%m-%d)
all: install
-.PHONEY: usage check clean roxygen sd
-
pkgfiles = DESCRIPTION \
README.html \
R/* \
@@ -19,7 +18,7 @@ pkgfiles = DESCRIPTION \
roxygen:
@echo "Roxygenizing package..."
- "$(R_HOME)/bin/Rscript" -e 'library(devtools); document(".")'
+ "$(R_HOME)/bin/Rscript" -e 'library(devtools); document()'
@echo "DONE."
sd: roxygen
@@ -30,7 +29,7 @@ sd: roxygen
$(TGZ): $(pkgfiles)
sed -i -e "s/Date:.*/Date: $(DATE)/" DESCRIPTION
@echo "Roxygenizing package..."
- "$(R_HOME)/bin/Rscript" -e 'library(devtools); document(".")'
+ "$(R_HOME)/bin/Rscript" -e 'library(devtools); document()'
@echo "Building package..."
git log --no-merges -M --date=iso > ChangeLog
"$(R_HOME)/bin/R" CMD build .
@@ -41,9 +40,16 @@ README.html: README.md
build: $(TGZ)
+$(WINBIN): build
+ @echo "Building windows binary package..."
+ "$(R_HOME)/bin/R" CMD INSTALL $(TGZ) --build
+ @echo "DONE."
+
+winbin: $(WINBIN)
+
test: build
@echo "Running testthat tests..."
- "$(R_HOME)/bin/Rscript" -e 'library(devtools); devtools::test(".")' 2>&1 | tee test.log
+ "$(R_HOME)/bin/Rscript" -e 'library(devtools); devtools::test()' 2>&1 | tee test.log
@echo "DONE."
quickcheck: build
@@ -64,6 +70,9 @@ install: build
drat: build
"$(R_HOME)/bin/Rscript" -e "drat::insertPackage('$(TGZ)', commit = TRUE)"
+dratwin: winbin
+ "$(R_HOME)/bin/Rscript" -e "drat::insertPackage('$(WINBIN)', 'e:/git/drat/', commit = TRUE)"
+
winbuilder: build
date
@echo "Uploading to R-release on win-builder"

Contact - Imprint