Makefile practice

Eugene Grosbein eugen at grosbein.net
Fri Jul 10 18:43:36 UTC 2020


11.07.2020 1:23, Harry Newton wrote:

> I look after a port that has a poor Makefile [the one supplied with the
> distribution, not the FreeBSD port Makefile].  The principal problem is
> where it installs things.
> 
> To get the port to do the right thing, I could either: heavily patch the
> supplied Makefile or: move files around in the stage tree.
> 
> Could someone give me a steer about recommended practice ?

It's up to porter. I tend to keep things simple: if moving files around
in the stage tree is simplier, do it with post-install target of the port.
We have large number of examples in the ports tree of post-install usage.

If it is simplier with small correction of software's Makefile or Makefile.in correcting DESTDIR,
do it with a patch or post-patch target of the port.



More information about the freebsd-ports mailing list