[Rcpp-devel] Remove hard-coded path to /usr/bin in Makevars

Dirk Eddelbuettel edd at debian.org
Sun Apr 28 03:01:10 CEST 2013


On 27 April 2013 at 20:47, Valentin Kuznetsov wrote:
| Hi Dirk,
| environment variable is not that bad and I'm ok with such solution.

A simple snippet should do. First attempt (indented two for the email)

  # -*- mode: makefile -*-

  all:	setval
  	echo The value is ${val}

  setval:
  ifeq ($(val),)
  val="123"
  endif


which tests out fine. The default works:

  $ make -f /tmp/mypath.make          # default case
  echo The value is "123"
  The value is 123
  $

and we can also override it:

  $ val=456 make -f /tmp/mypath.make  # value set                                                                                                  
  echo The value is 456
  The value is 456
  $ 

Should be good enough.

Dirk

| Valentin.
| 
| On Apr 27, 2013, at ,Apr 27, 9:52 AM, Dirk Eddelbuettel wrote:
| 
| > 
| > On 26 April 2013 at 20:11, Valentin Kuznetsov wrote:
| > | Simon,
| > | 
| > | > 
| > | > I suppose it would be possible to replace it simply with
| > | > 	@-install_name_tool -id $(R_PACKAGE_DIR)/lib$(R_ARCH)/$(USERLIB) $(USERLIB) 2>/dev/null
| > | 
| > | I'll leave it up to you (or to developers) to decide. In any case it would be appropriate to document this use case and provide suitable documentation for people who may end-up with similar problem. If you need me to test any solution I'll be happy to do so.
| > 
| > The best idea I have had so far was to replace the hardcoded /usr/bin with an
| > environment variable (say: RCPP_PATH) which we set to /usr/bin/ if no value
| > has been set by the user.  That would allow you to override it, and other to
| > continue to use the working setup.  
| > 
| > Thoughts? 
| > 
| > Dirk
| > 
| > -- 
| > Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
| 

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


More information about the Rcpp-devel mailing list