[Rd] R CMD SHLIB uses foo.c instead of foo.cc if both are present (PR#2645)

faheem at email.unc.edu faheem at email.unc.edu
Sun Mar 16 21:44:27 MET 2003



On Sun, 16 Mar 2003, Duncan Temple Lang wrote:

> The "fix" is relatively simple. One can change the order of the
> suffixes listed in $R_HOME/etc/Makeconf (i.e. the Makeconf.in version)
> to alter the precedence. If one changes the line
>
>  .SUFFIXES: .c .cc .cpp .C .d .f .lo .o
>
> to place the '.c' after the '.cc', your example will work as you want it.

Just to clarify. Is this something that you (ie. R developers) are
planning to change, or are you just recommending that I change it? If so,
it will break on every upgrade. Wonder if I can put this in Makevars as a
local override, though...

Hmm. Perhaps using makefiles would be easier, really.

> While the behavior is not desirable since you specified foo.cc on the
> command line for R CMD SHLIB, I don't think it is a good idea to be
> using files named x.c and x.cc in the same directory.  I would think
> that this will lead to confusions with other tools and I can't think
> of a context in which it is necessary.

Mmm. Certainly not *necessary*. I still think it is a bug, though.

                                              Faheem.



More information about the R-devel mailing list