On Thu, Dec 19, 2002 at 01:56:15AM +0100, Axel Thimm wrote: > > Otherwise, Mandrake and RH have a small patch to apply against 5.8.0 to > > restore 'make install PREFIX=~' > > Where can that patch be found?
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=78053 > Anyway, rpms are not only binary - I personally > very much value src.rpms and those should also build on user machines. Then they'll have to upgrade or patch MakeMaker, sorry. PREFIX is very badly broken in older versions anyway. > > > Axel Thimm's suggestion of running the Makefile.PL twice (once before > > > building and once before installing) sounds like the best way. > > The Makefile might not like being newer than the files its building, I > > wouldn't trust it even if it happens to work. > > Yes, that's true. Does MakeMaker generate rules that would cause a target to > depend on the Makefile? If it doesn't now, there's a good chance it may in the future. > Other than that, here is the definitely ugliest workaround, which works at > least on RedHat 8 (I rebuilt xmltv with it) and might even be backwards and > forwards compatible: > > Build with: > > ... perl Makefile.PL 'PREFIX=$(MYDESTDIR)'%{_prefix} > > Install with: > > %makeinstall MYDESTDIR=$RPM_BUILD_ROOT > > This hack injects a reference to a variable MYDESTDIR in front of every use of > PREFIX in the Makefile and is subject to late evaluation at make runtime. It > shouldn't be called DESTDIR, because it will conflict with the recent > DESTDIR-patch (resulting in the path being doubled). I am not sure whether > PERLPREFIX should be treated in a similar way. If it is used for installation > purposes then it should. PERLPREFIX is just like SITEPREFIX and VENDORPREFIX. It applies only when installing core perl modules. I believe INSTALLDIRS=vendor is what you want to use since you're producing an RPM. By supplying your own PREFIX you override all that anyway. Since PREFIX is broken pre-5.8.0, your above method will likely produce odd results on older perls and RHs. With DESTDIR, the proper invokation would likely be: perl Makefile.PL INSTALLDIRS=vendor make make install DESTDIR=$RPM_BUILD_ROOT
