porting software to FreeBSD, what to do if Makefile lacks?

Rob Farmer rfarmer at predatorlabs.net
Wed Nov 17 21:01:59 UTC 2010

2010/11/17 O. Hartmann <ohartman at zedat.fu-berlin.de>:
> Hello.
> I try to create a port of a software which does not have a Makefile and is
> build via a propriate csh script. Installation is done temporarely into some
> lib's and exe's subfolder withing the source folder, so I need to tell the
> top level Makefile of the port to use a specific build script instead
> implying having Makefile and a home-brewn install script, which takes the
> binaries and libs out of the temporary folders and install them at the
> proper places within the FreeBSD's tree. How can I perform these two tasks?

You want to override the do-build target, something like:

	${CSH} ${WRKSRC}/build-script.csh
	<you can list additional commands as necessary>

For the install, do the same with the do-install target. Unless your
install script is particularly long or complicated, it will probably
be best to put it right into the port's Makefile. Then you can use the
INSTALL macros to ensure permissions are set correctly, binaries are
stripped if the user doesn't specify WITH_DEBUG, etc.

If you haven't already, check out the Porter's Handbook - it will
familiarize you with important guidelines and covers a lot of common


Rob Farmer

More information about the freebsd-questions mailing list