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

Portable Makefiles



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)?

PMake won't "export" so we get DESTDIR explicitly set in the sub-makes'
environments.

PMake also (although the manual claims to the contrary) seems to allow
the "DESTDIR=" to override the command-line setting, so we get
"DESTDIR ?=".

That causes Solaris make to barf.

We can't just leave out the explicit set to the empty string, as PMake
will allegedly not replace an implicitly empty variable, but will just
leave the "${DESTDIR}" in place instead.

Any suggestions, other than "tell everyone to use GNU make"?


Cheers,


Nick
-- 
Nick Phillips -- nwp@lemon-computing.com
You are confused; but this is your normal state.



Reply to: