From edd at debian.org  Tue Sep 27 16:30:09 2016
From: edd at debian.org (Dirk Eddelbuettel)
Date: Tue, 27 Sep 2016 09:30:09 -0500
Subject: [Rd] src/Makevars ignored ?
In-Reply-To: <b11e2a62-95bd-0d2f-66ba-2d6177f62bb9@pasteur.fr>
References: <5abedec3-552a-b141-a9e2-ef74e212b893@pasteur.fr>
	<22506.22668.727653.313373@max.nulle.part>
	<b11e2a62-95bd-0d2f-66ba-2d6177f62bb9@pasteur.fr>
Message-ID: <22506.33393.332368.471733@max.nulle.part>


On 27 September 2016 at 15:23, Eric Deveaud wrote:
| so why ~/R/Makevars allows to change CC and not src/Makevars ?
| 
| this is pretty confusing.

It seems weird at first, but makes some sense when you think about it like
this:

  -- src/Makevars is inside a package and cannot / should not alter "system"
     parameters like compiler brand or version as there may only be one
     compiler, the one R was built with

     it does allow however to set compilation flags, language standards,
     include directories etc as needed to build the package

  -- (user- or system-level) Makeconf allow compiler changes, but that is
     orthogonal to the per-package config and stays local to the machine
 
| in unix world mechanism of overwriting system default in user and 
| package order is something standadr and consistent given the level
| 
| priority is package specific stuff overwrite user configuration that 
| overwrite system default
| 
| mechanism of Makevars is NOT consistent

Yes we sometimes wish we could override system Makeconf settings in a
package, but we can't.

| as a side note I solved the problem of overwritting CC for this 
| particular package using MAKEFLAGS="CC=gcc" R CMD INSTALL package

That works and is documented, but is not "portable" to other machines.

Hope this helps,  Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] src/Makevars ignored ?
Dirk Eddelbuettel