Skip to content

Commit

Permalink
more GNU make gotchas
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@85833 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Jan 28, 2024
1 parent 2944114 commit 11111d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 3 additions & 5 deletions doc/manual/R-admin.texi
Original file line number Diff line number Diff line change
Expand Up @@ -1093,15 +1093,13 @@ Clang 13 and @code{-std=c++23} from Clang 17. Apple Clang supports
`Standards' for @command{g++} starting with @samp{gnu} enable `GNU
extensions': what those are is hard to track down.

For the use of C++11 and later in @R{} packages see the `Writing R
For the use of C++ in @R{} packages see the `Writing R
Extensions' manual. Prior to @R{} 3.6.0 the default C++ standard was
that of the compiler used: currently it is C++17 (if available): this
can be overridden by setting @samp{CXXSTD} when @R{} is configured.
that of the compiler used: currently it is C++17 (if available).

@uref{https://en.cppreference.com/w/cpp/compiler_support} indicates
which versions of common compilers support (parts of) which C++
standards. GCC 5 was the minimum version with sufficient C++14
support. GCC introduced C++17 support gradually, but version 7 should
standards. GCC introduced C++17 support gradually, but version 7 should
suffice.

@node C standards, Link-Time Optimization, C++ Support, Other Options
Expand Down
8 changes: 7 additions & 1 deletion doc/manual/R-exts.texi
Original file line number Diff line number Diff line change
Expand Up @@ -4917,7 +4917,13 @@ platforms but do not have the intended results.

Note that the @option{-C} flag for @command{make} is not included in the
POSIX specification and is not implemented by some of the
@command{make}s which have been used with @R{}.
@command{make}s which have been used with @R{}. However, it is more
commonly implemented (e.g.@: by FreeBSD @command{make}) than the GNU-specific
@option{--directory=}.

You should not rely on built-in/default @command{make} rules, even when
specified by POSIX, as some @command{make}s do not have the POSIX ones
and others have altered them.

The use of @code{$@{shell ...@}} can be avoided by using backticks, e.g.@:

Expand Down

0 comments on commit 11111d7

Please sign in to comment.