[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Portable Makefiles



On Wed, Mar 20, 2002 at 06:09:24PM +1200, Nick Phillips wrote:
> On Wed, Mar 20, 2002 at 05:40:52AM +0100, Manfred Wassmann wrote:
> 
> > > Does anyone have any experience of making the DESTDIR idiom used in
> > > Makefiles to get stuff to install in the right place portable across
> > > at least GNU make, PMake (BSD) and Solaris make (preferably whatever POS
> > > HP-UX uses, too)?
> 
> > You could define DESTDIR in a Makefile.GNU, Makefile.BSD,
> > Makefile.Solaris etc and have them included appropriately.
> 
> You could, but boss-man upstream thinks that would be very ugly, and he's
> right. But it looks increasingly like it's going to be ugly no matter what.
> 
> I've left this one hanging for a bit, so if anyone has any other suggestions,
> I'd be grateful for them...
> 
> Surely *somebody* has worked this out nicely before?

Not that I'm aware of, other than using $(MAKE) so that you can type 'gmake
foo' on Solaris and BSD boxes, and have it be sane. The files don't even
have the same formats, much of the time (hint: type 'make <foo>' on any
even moderately complex GNU Makefile, on a BSD box, and see it blow up on
separator warnings...)
-- 
***************************************************************************
Joel Baker                           System Administrator - lightbearer.com
lucifer@lightbearer.com              http://users.lightbearer.com/lucifer/



Reply to: