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

O. Hartmann ohartman at mail.zedat.fu-berlin.de
Thu Nov 18 00:58:09 UTC 2010


On 11/17/10 22:01, Rob Farmer wrote:
> 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:
>
> 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/
>
Thanks.
I got it. But it seems that my first porting task run into some 
difficulties for the advanced porters, since there is no autotool 
environment.

By the way, the global environment variable ${CSH} seems to be 
noneexistent, instead ${SH} exists.

Regards,
Oliver


More information about the freebsd-questions mailing list