-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path00_README-developer
69 lines (49 loc) · 2.48 KB
/
00_README-developer
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
1. Introduction
The (hidden) directory .R in the dplR source repository contains
suggested R initialization files to use when building, checking and
installing (compiling) the dplR package. The initialization files
should generally be placed in HOME/.R/ where HOME is the user's home
directory. Some customization may be required depending on the
platform. Check if the files already exist and combine the suggested
"dplR settings" with your previous settings if appropriate.
2. List of files included, and the settings explained
* Makevars
This file is used when R CMD INSTALL compiles the C source code
included in dplR. The compiler flags in the Makevars file should work
with the GCC compiler. Other compilers may require different flags.
The following variables are set:
CFLAGS=-Wall -pedantic -Wextra
The purpose of the flags is to enable more thorough warnings than
those used by default [1, Customizing package compilation]. The
warnings are useful in the development phase when making changes to
the C code. Because all issues should be solved before releasing
the package on CRAN, there is no need to distribute a Makevars file
with dplR (as long as Makevars serves no other purpose than to add
more compile time checks). Spurious warnings may occur when using
an old compiler. A list of known cases:
- warning about imaginary constants being a GNU extension by
Apple's gcc 4.2, OS X 10.7
Note that a matching platform-specific Makevars file
(Makevars-R_PLATFORM, Makevars.win or Makevars.win64), if available,
takes precedence over a generic Makevars file. If you already have a
platform-specific Makevars file, consider adding these definitions
there.
* build.Renviron
This is used with R CMD build [2, Checking and building packages].
The following environment variables are set:
LC_ALL=en_US.UTF-8
The locale is set to use the UTF-8 character set and US English.
UTF-8 is used because dplR specifies UTF-8 as its Encoding in the
DESCRIPTION file. The language setting may not matter, but one must
be chosen, and the en_US.UTF-8 locale is probably available on most
systems.
* check.Renviron
Settings for R CMD check [2, Checking and building packages]: locale
as in build.Renviron.
References
[1] R Installation and Administration (R-devel).
http://cran.r-project.org/doc/manuals/r-devel/R-admin.html
(Accessed 2022-05-26)
[2] Writing R Extensions (R-devel).
http://cran.r-project.org/doc/manuals/r-devel/R-exts.html
(Accessed 2022-05-26)