Bug 15231 - R CMD rtags outputs "-n" if xpg_echo is on (e.g. Mac OS X)
Summary: R CMD rtags outputs "-n" if xpg_echo is on (e.g. Mac OS X)
Alias: None
Product: R
Classification: Unclassified
Component: Misc (show other bugs)
Version: R 2.15.2
Hardware: All All
: P5 normal
Assignee: Deepayan Sarkar
Depends on:
Reported: 2013-03-10 08:42 UTC by ARABIKI Takeshi
Modified: 2013-07-16 11:49 UTC (History)
0 users

See Also:

replace "echo -n" with "printf" (451 bytes, patch)
2013-03-10 08:44 UTC, ARABIKI Takeshi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ARABIKI Takeshi 2013-03-10 08:42:52 UTC
R CMD rtags outputs "-n" if xpg_echo is on.
/bin/sh of Mac OS X enable xpg_echo by default, so R CMD rtags output "-n" when executed on Mac OS X.

To fix this issue, "echo -n" should be replaced with "printf".
I attached the patch.
Comment 1 ARABIKI Takeshi 2013-03-10 08:44:02 UTC
Created attachment 1417 [details]
replace "echo -n" with "printf"
Comment 2 Brian Ripley 2013-07-15 20:51:19 UTC
printf is not portable.
Comment 3 Brian Ripley 2013-07-16 11:49:46 UTC
There are options in configure for this (use echo ...\c for XSI-conformant systems'.  Changed in R-devel.