Skip to content
Prev 15536 / 63424 Next

forcing R CMD COMPILE

Let me tell an example.

I found the bayesSurv package in CRAN. It has some .cpp and .h files, and
doesn't have a makefile. I did the following steps:

1. compile the package (R CMD INSTALL)
2. write something in /src/List.cpp (only add an empty line)
3. recompile package (INSTALL)
   it works, OK.
4. write something in /src/List.h
5. recompile
   it does nothing. List.cpp was not changed and so R says List.o is up
   to date, right?

Is there any way to tell R that List.o depends on List.h???

I think it is not an R problem, because Makefiles can check it. My
question is: I know that List.o is not up to dated, because I changed
List.h, and my Makefile recognizes it. But if I tell R to compile List.cpp
again using COMPILE, it will say that the file is up to date, and won't
compile it. So, the only way to check dependencies, as I can see, is using a
Makefile, and compiling .cpp files without any R help. Is it true?

Pedro Andrade

--
LEG - Laboratório de Estatística e Geoinformação
          http://www.est.ufpr.br/leg/
          Departamento de Estatística
        Universidade Federal do Paraná
On Wed, 23 Mar 2005, Prof Brian Ripley wrote: