On Wed, Dec 18, 2002 at 04:05:40PM -0800, [EMAIL PROTECTED] wrote: > On Wed, Dec 18, 2002 at 09:38:43PM +0000, Ed Avis wrote: > > It doesn't help with getting a Makefile.PL that works on machines with > > current MakeMakers installed (I want to support as far back as > > perl 5.005). So I guess the question I should have asked is not 'what > > is the best way to do this?' but rather 'what workaround can I use to > > get the desired effect with current MakeMaker versions?'. > > As the problem primarily effects only rpm authors, they should simply upgrade. > 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? Anyway, rpms are not only binary - I personally
very much value src.rpms and those should also build on user machines.
> Barring that, "make install PREFIX=foo" will work on anything older
> than 5.91 (I think that's where it was broken, check the logs).
> > 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?
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.
Shoot me, I deserve it ...
--
[EMAIL PROTECTED]
msg00778/pgp00000.pgp
Description: PGP signature
