Skip to content

Commit 2d88f98

Browse files
committed
r/src/Makevars: Use MOOCORE_DEBUG isntead of DEBUG.
1 parent baab656 commit 2d88f98

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/R.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,11 @@ jobs:
162162
env:
163163
NOT_CRAN: false
164164
run: |
165-
options(covr.flags=c(DEBUG="1"))
166-
coverage <- covr::package_coverage(type="all", quiet=FALSE, clean = FALSE,
165+
coverage <- withr::with_makevars(c(MOOCORE_DEBUG="1"),
166+
covr::package_coverage(type="all", quiet=FALSE, clean = FALSE,
167167
commentDonttest = FALSE, commentDontrun = FALSE, flags="R",
168168
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package"))
169+
)
169170
print(coverage)
170171
covr::to_cobertura(coverage)
171172
list.files("../", pattern="*.xml", recursive=TRUE)

r/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ check: build
8989
ifdef TEST
9090
_R_CHECK_FORCE_SUGGESTS_=false NOT_CRAN=true $(Reval) 'devtools::test(filter="$(TEST)")'
9191
else
92-
cd $(BINDIR) && (_R_CHECK_FORCE_SUGGESTS_=false NOT_CRAN=true DEBUG=1 R CMD check --run-donttest --run-dontrun --timings $(PACKAGE)_$(PACKAGEVERSION).tar.gz; cat $(PACKAGE).Rcheck/$(PACKAGE)-Ex.timings)
92+
cd $(BINDIR) && (_R_CHECK_FORCE_SUGGESTS_=false NOT_CRAN=true MOOCORE_DEBUG=1 R CMD check --run-donttest --run-dontrun --timings $(PACKAGE)_$(PACKAGEVERSION).tar.gz; cat $(PACKAGE).Rcheck/$(PACKAGE)-Ex.timings)
9393
endif
9494

9595
show:

r/src/Makevars

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# In particular, add the following to ~/.R/Makevars:
55
# LTO_OPT=-flto
66
LTO=$(LTO_OPT)
7-
DEBUG=0
8-
PKG_CPPFLAGS=-DR_PACKAGE -DDEBUG=$(DEBUG) -I./libmoocore/
7+
MOOCORE_DEBUG?=0
8+
PKG_CPPFLAGS=-DR_PACKAGE -DDEBUG=$(MOOCORE_DEBUG) -I./libmoocore/
99

1010
MOOCORE_SRC_FILES = hv3dplus.c hv4d.c hv_contrib.c hv.c hvapprox.c hvc3d.c pareto.c whv.c whv_hype.c avl.c eaf3d.c eaf.c io.c rng.c mt19937/mt19937.c
1111
SOURCES = $(MOOCORE_SRC_FILES:%=libmoocore/%) init.c Rmoocore.c
@@ -19,7 +19,7 @@ all: exes $(SHLIB)
1919
$(SHLIB): $(OBJECTS)
2020

2121
exes: $(SHLIB)
22-
$(MAKE) -C libmoocore all march=none CC="$(CC)" CFLAGS="$(CFLAGS)" WARN_CFLAGS="" OPT_CFLAGS="" DEBUG=$(DEBUG) EXE=$(EXEEXT) BINDIR=$(PWD)
22+
$(MAKE) -C libmoocore all march=none CC="$(CC)" CFLAGS="$(CFLAGS)" WARN_CFLAGS="" OPT_CFLAGS="" DEBUG=$(MOOCORE_DEBUG) EXE=$(EXEEXT) BINDIR=$(PWD)
2323
@-$(RM) libmoocore/*.o
2424

2525
clean:

0 commit comments

Comments
 (0)