Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 2010 13:01:58 -0800
From:      Rob Farmer <rfarmer@predatorlabs.net>
To:        "O. Hartmann" <ohartman@zedat.fu-berlin.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: porting software to FreeBSD, what to do if Makefile lacks?
Message-ID:  <AANLkTik-TZNc7ZkwKxH%2BrE2Dmd17vgAsmmnNwtRBwwH0@mail.gmail.com>
In-Reply-To: <4CE416D0.2020105@zedat.fu-berlin.de>
References:  <4CE416D0.2020105@zedat.fu-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
2010/11/17 O. Hartmann <ohartman@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:

do-build:
	${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
problems:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/

-- 
Rob Farmer



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik-TZNc7ZkwKxH%2BrE2Dmd17vgAsmmnNwtRBwwH0>