Chapter 5. Configuring the Makefile

Table of Contents
5.1. The Original Source
5.2. Naming
5.3. Categorization
5.4. The Distribution Files
5.5. MAINTAINER
5.6. COMMENT
5.7. PORTSCOUT
5.8. Dependencies
5.9. MASTERDIR
5.10. Man Pages
5.11. Info Files
5.12. Makefile Options
5.13. Specifying the Working Directory
5.14. Conflict Handling
5.15. Installing Files

Configuring the Makefile is pretty simple, and again we suggest that you look at existing examples before starting. Also, there is a sample Makefile in this handbook, so take a look and please follow the ordering of variables and sections in that template to make your port easier for others to read.

Now, consider the following problems in sequence as you design your new Makefile:

5.1. The Original Source

Does it live in DISTDIR as a standard gzipped tarball named something like foozolix-1.2.tar.gz? If so, you can go on to the next step. If not, you should look at overriding any of the DISTVERSION, DISTNAME, EXTRACT_CMD, EXTRACT_BEFORE_ARGS, EXTRACT_AFTER_ARGS, EXTRACT_SUFX, or DISTFILES variables, depending on how alien a format your port's distribution file is.

In the worst case, you can simply create your own do-extract target to override the default, though this should be rarely, if ever, necessary.

All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.