dmurdoch@pair.com
2003-Sep-28 01:39 UTC
[Rd] (fwd) package inst directory copied too early? (PR#4330)
This bug appears in the current Windows build; I don't know if it applies generally. Duncan Murdoch On Fri, 26 Sep 2003 15:25:57 +1200 (NZST), Ray Brownrigg <ray@mcs.vuw.ac.nz> wrote:>If you INSTALL (Rcmd INSTALL) or cross-compile >(make PKGDIR=/pkg RLIB=/library pkg-mypkg) the copying of the inst >directory seems to happen very early in the process, *before anything is >"made"*. > >Thus if the make actually contributes anything to the inst directory, >those items do not get copied across. For example: > >cafe-rozo> gmake PKGDIR=/vol/R/src/win32/package RLIB=/vol/R/src/win32/library pkg-maps > >---------- Making package maps ------------ > installing inst files > adding build stamp to DESCRIPTION > making DLL ... > : > etc. > >The problem appears to be in the file MakePkg, where the fragment: >ifneq ($(strip $(INSTFILES)),) > @$(ECHO) " installing inst files" > -@$(CP) -r inst/* $(DPKG) >endif >occurs as part of $(DPKG)/zzzz, which is the *first* item in the "all" >target. > >However, just moving the fragment to another target is not sufficient, >since the INSTFILES variable is generated before anything happens. > >What I have found to work is to make sure all the inst subdirectories >exist in the source package (to generate a correct INSTFILES variable) >and have the (new) target $(DPKG)/inst after $(DPKG)/exec in the >prerequisites for the "all" target. I cannot think of any way to deal >with an inst directory which is generated (perhaps conditionally) as >part of the 'make' process. > >If I understand it correctly, a similar problem would occur with the >exec directory; any items in exec that are generated by the "make" >will not get copied across. > >Ray Brownrigg