The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Building a port - background info on make 4 October 1998
Need more help on this topic? Click here
This article has no comments
Show me similar articles
In previous diary notes (Changing the shell and DHCP (again)) I wrote that a symbolic link should be created when building a port.  This is not necessary.  Perhaps it was once necessary because that's what is done in the Compiling ports from CDROM section of the FreeBSD Handbook.
A bit about make
One of the best features of the make process is the fetch process.  If the files it needs cannot be found, make will go and fetch the file for you.  It searches a list of file locations and uses the first location which succeeds.

If you examine /usr/share/mk/bsd.port.mk, you'll find that it modifies the URL search path and adds file:/crdom/ports/distfiles.   This tells the make process to search your CDROM.  If the device is not mounted, the fetch will fail and the search process continues with the next location in the list.

It is because of this search process that the following should be enough to build your port:

# #installer usually leaves /cdrom in fstab
# #which means you don't have to do much to mount it
# mount /cdrom
# cd /usr/ports/foo/bar
# make install


Need more help on this topic? Click here
This article has no comments
Show me similar articles