-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakevars
More file actions
48 lines (39 loc) · 1.78 KB
/
Makevars
File metadata and controls
48 lines (39 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
SHELL := /bin/bash
# =============================================================================
# Verify that GNU make is being used and minimum version 4.3. Grouped targets
# are used and thus make >= 4.3 is required.
# =============================================================================
ifeq ($(origin .RECIPEPREFIX), undefined) # quick GNU vs BSD probe
$(error Please use GNU make (gmake). On macOS: brew install make && use gmake)
endif
# Require GNU make with grouped-target support (added in 4.3)
ifeq (,$(filter grouped-target,$(.FEATURES)))
$(error Please use GNU Make >= 4.3 (no grouped-target support; found $(MAKE_VERSION)))
endif
# =============================================================================
# Make behavior
# =============================================================================
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
.SUFFIXES: # clear implicit suffix rules
.DELETE_ON_ERROR: # avoid half-written targets
.NOEXPORT: # don't export every var by default
# =============================================================================
# Tools (overridable)
# =============================================================================
R ?= R --vanilla
RSCRIPT ?= Rscript --vanilla
RCMDBATCH ?= R CMD BATCH --vanilla
PANDOC ?= pandoc
PANDOC_MIN_VERSION ?= 3.7
# CRAN mirror and repos (used in R calls)
CRAN ?= https://cran.rstudio.com
REPOS := "options(repos=c(CRAN='$(CRAN)'))"
# =============================================================================
# platform independent sed inplace option
# =============================================================================
ifeq ($(shell uname), Darwin)
SED_INPLACE = -i .bak
else
SED_INPLACE = -i.bak
endif