[Rd] Makefile for embedding OpenBUGS in R package

From: Tobias Verbeke <tobias.verbeke_at_telenet.be>
Date: Mon, 06 Aug 2007 11:09:28 +0000

   Dear list,

   I'm trying to embed OpenBUGS in an R package for use of it    on 64-bit Linux. In order to get the CLI working one has to    compile C code contained in $OpenBUGS/Manuals/CBugs.html    (copied to say CBugs.c) using  

   gcc -m32 -o bugs CBugs.c -ldl

   I put the OpenBUGS distribution in the ./inst subdirectory of    the package root. Where should I now put the CBugs.c and how    should the Makefile look like in order to be able to call    $PKG_ROOT/OpenBUGS/bugs afterwards ?

   Naively putting the following Makefile in ./src does not work

   -%--------
   bugs: ../inst/OpenBUGS/CBugs.c

        gcc -m32 -o bugs ../inst/OpenBUGS/CBugs.c -ldl    -%-------

   The objective is to use something along the following

   execfile <- system.file("OpenBUGS", "bugs", package = mypkg)    system(paste(execfile, "< somescript.script > somefile.out"))

   This system call to the CLI is currently the only (non-WINE)    way of using OpenBUGS on Linux in batch mode.

   Many thanks in advance,
   Tobias

--

Tobias Verbeke - Consultant
Business & Decision Benelux
Rue de la révolution 8
1000 Brussels - BELGIUM

+32 499 36 33 15
tobias.verbeke_at_businessdecision.com

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 06 Aug 2007 - 12:37:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 07 Aug 2007 - 00:37:52 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.