English Persian
Chapter 15. Order of Variables in Port Makefiles
Order of Variables in Port Makefiles
The first sections of the [.filename]#Makefile# must always come in the same order. This standard makes it so everyone can easily read any port without having to search for variables in a random order.
The first line of a [.filename]#Makefile# is always a comment containing the Subversion version control ID, followed by an empty line. In new ports, it looks like this:
# $FreeBSD$
In existing ports, Subversion has expanded it to look like this:
# $FreeBSD: head/ports-mgmt/pkg/Makefile 437007 2017-03-26 21:25:47Z bapt $
The sections and variables described here are mandatory in a ordinary port. In a slave port, many sections and variables can be skipped.
Each following block must be separated from the previous block by a single blank line.
In the following blocks, only set the variables that are required by the port. Define these variables in the order they are shown here.
This block is the most important. It defines the port name, version, distribution file location, and category. The variables must be in this order:
<<makefile-versions,`PORTVERSION`][<<portversion-footnote, 1>>>>
<<makefile-versions,`DISTVERSION`][<<portversion-footnote, 1>>>>