-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
99 lines (84 loc) · 3.26 KB
/
Makefile
File metadata and controls
99 lines (84 loc) · 3.26 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
SHELL := /bin/bash
PACKAGE := $(shell perl -aF: -ne 'print, exit if s/^Package:\s+//' DESCRIPTION)
VERSION := $(shell perl -aF: -ne 'print, exit if s/^Version:\s+//' DESCRIPTION)
BUILD := $(PACKAGE)_$(VERSION).tar.gz
RHUB_ALL_PLATFORMS := c( \
"linux", "m1-san", "macos", "macos-arm64", "windows", \
"atlas", "c23", "clang-asan", "clang-ubsan", "clang16", \
"clang17", "clang18", "clang19", "clang20", "donttest", \
"gcc-asan", "gcc13", "gcc14", "gcc15", "intel", \
"mkl", "nold", "noremap", "nosuggests", "rchk", \
"ubuntu-clang","ubuntu-gcc12","ubuntu-next", "ubuntu-release","valgrind" \
)
.PHONY: doc build install test bench vignette $(BUILD)
check: $(BUILD)
R CMD check --as-cran $<
check-no-vignette: $(BUILD)
R CMD check --as-cran --no-build-vignettes $<
check-rhub: $(BUILD)
Rscript -e 'rhub::rhub_check(platform = $(RHUB_ALL_PLATFORMS))'
compile:
find src/ -type f -exec chmod 644 {} \;
Rscript -e "library(Rcpp); compileAttributes('.');"
# Rscript -e "devtools::load_all(); roxygen2::roxygenise('.');"
find . -iname "*.a" -exec rm {} \;
find . -iname "*.o" -exec rm {} \;
find . -iname "*.so" -exec rm {} \;
reconf:
autoreconf -fi
build:
autoconf
chmod 755 cleanup
chmod 755 configure
find src/ -type f -exec chmod 644 {} \;
chmod 644 ChangeLog DESCRIPTION Makefile NAMESPACE README.md
./configure
./cleanup
Rscript -e "library(Rcpp); compileAttributes('.');"
Rscript -e "devtools::load_all(); roxygen2::roxygenise('.');"
# rm -f R/RcppExports.R
find . -iname "*.a" -exec rm {} \;
find . -iname "*.o" -exec rm {} \;
find . -iname "*.so" -exec rm {} \;
R CMD build .
install:
autoconf
chmod 755 cleanup
chmod 755 configure
find src/ -type f -exec chmod 644 {} \;
chmod 644 ChangeLog DESCRIPTION Makefile NAMESPACE README.md
./configure
./cleanup
Rscript -e "library(Rcpp); compileAttributes('.');"
Rscript -e "devtools::load_all(); roxygen2::roxygenise('.');"
# rm -f R/RcppExports.R
find . -iname "*.a" -exec rm {} \;
find . -iname "*.o" -exec rm {} \;
find . -iname "*.so" -exec rm {} \;
R CMD build . # --no-build-vignettes
R CMD INSTALL $(BUILD) --configure-args="--with-simd=AVX2" # --with-pcre2-force-compile"
install-arm:
autoconf
chmod 755 cleanup
chmod 755 configure
find src/ -type f -exec chmod 644 {} \;
chmod 644 ChangeLog DESCRIPTION Makefile NAMESPACE README.md
./configure
./cleanup
Rscript -e "library(Rcpp); compileAttributes('.');"
Rscript -e "devtools::load_all(); roxygen2::roxygenise('.');"
# rm -f R/RcppExports.R
find . -iname "*.a" -exec rm {} \;
find . -iname "*.o" -exec rm {} \;
find . -iname "*.so" -exec rm {} \;
R CMD build . # --no-build-vignettes
R CMD INSTALL $(BUILD)
vignette:
Rscript -e "rmarkdown::render(input='vignettes/vignette.rmd', output_format='html_vignette')"
IS_GITHUB=Yes Rscript -e "rmarkdown::render(input='vignettes/vignette.rmd', output_file='../README.md', output_format=rmarkdown::github_document(html_preview=FALSE))"; unset IS_GITHUB
test:
tmp_lib=$$(mktemp -d /tmp/stringfish-lib-XXXXXX); \
R CMD INSTALL -l $$tmp_lib .; \
Rscript -e '.libPaths(c(commandArgs(TRUE)[1], .libPaths())); source("tests/tests.R"); source("tests/regressions.R")' $$tmp_lib
bench:
Rscript inst/extra/benchmark.R 5