R-beta: Re: R-beta makefile

Guido Masarotto (guido@sirio.stat.unipd.it)
Tue, 9 Jun 1998 20:40:35 +0100


Date: Tue, 9 Jun 1998 20:40:35 +0100
From: Guido Masarotto <guido@sirio.stat.unipd.it>
To: r-help@stat.math.ethz.ch
Subject: R-beta: Re: R-beta makefile
In-Reply-To: <4v1+bCA8dXf1EwAn@dsteele.demon.co.uk>; from Douglas Steele on Tue, Jun 09, 1998 at 06:57:16PM +0100

On Tue, Jun 09, 1998 at 06:57:16PM +0100, Douglas Steele wrote:
> >This mean that the specs file of Cygnus gcc is different from the
> >mingw32 one.
> OK thanks
> (I added main() {} as per FAQ and I got the dynload to build a dll ok)
> 
> 
> 
> I am also interested in building the R sources as per your descriptions.
> To simplify things, I have removed b18 cygwin and have now installed
> egcs-mingw32 with your djtools as recommended.
> 
> Everything seems to work OK; tools that are present run faster, and I
> can still build the dynaload dll example.
> 
> 
> 
> However, on going to (/R-0.61.3/src/gnuwin32)$
> and typing "make" I get:
> 
> *** No rule to make target `../appl/ROUTINES', needed by
> `../include/FFDecl.h'.  Stop.
> [exited with 2]
> 
Have you downloaded and uncompressed the R sources? rw0613s.zip
is just an add-on. ../appl/ROUTINES is in R-0.61.3.tar.gz.
If you expand R-0.61.3.tar.gz somewhere and then rw0613s.zip
in R-0.61.3, you should get a directory tree like this
R-0.61.3 -- afm
            demos
	    --
	    --
	    src -- appl
	           main
		   ---
		   ---
		   gnuwin32
		   library -- base
		              eda  -- src
			              R
				      ---
			      ---
                   ----
		   ----
		   ----
		   
	        

> 
> Do these directories exist (and does FFDecl.h exist) ?
FFDecl.h is generated by the command in the Makefile that gave you
an error. 

> The reason I ask is because in MakeDLL (for example) there are the lines
> 
> include ../../../gnuwin32/MkRule
> and
> DLLLIBS=-L../../../gnuwin32 -l_iR -lf2c
> 
> which seem to refer to directories on the wrong path
> (ie why ../../../)
> 
The main make runs in R-0.61.3/src/gnuwin32.
To build package xxx (e.g. eda), you find in the Makefile  a rule of the type
make -C ../library/xxx -f ../../gnuwin32/MakePkg PKG=xxx .................
Hence, this sub-make is executed in the ../library/xxx directory,
but in MakePkg you find a rule of the type
make -C ./src -f ../../../gnuwin32/MakeDLL .................
So, the sub-sub-make which build the shared library is executed 
in ../library/xxx/src (path starting from the gnuwin32 directory).
Now MkRule (this file is not R-specific but contain the rules
for compiling .c and .f file + building relocable executable
and dll) and lib_iR.a (the import library for R.exe) are
in the gnuwin32 directory. This is why they must prefixed by
.../../../gnuwin32.

I hope this can help (and that my English is not too obscure).
guido m.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._