Each port is extracted into a working directory, which must
be writable. The ports system defaults to having
DISTFILES unpack in to a directory called
${DISTNAME}. In other words, if the
Makefile has:
PORTNAME= foo
PORTVERSION= 1.0then the port's distribution files contain a top-level
directory, foo-1.0, and the rest of the
files are located under that directory.
A number of variables can be overridden if that is not the case.
The variable lists the name of the directory that is
created when the application's distfiles are extracted. If
our previous example extracted into a directory called
foo (and not
foo-1.0) write:
WRKSRC= ${WRKDIR}/fooor possibly
WRKSRC= ${WRKDIR}/${PORTNAME}If the source files needed for the port are in a
subdirectory of the extracted distribution file, set
WRKSRC_SUBDIR to that directory.
WRKSRC_SUBDIR= src
If the port does not extract in to a subdirectory at all,
then set NO_WRKSUBDIR to
indicate that.
NO_WRKSUBDIR= yes
Because WRKDIR is the only directory
that is supposed to be writable during the build, and is
used to store many files recording the status of the build,
the port's extraction will be forced into a
subdirectory.
本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/。
若有 FreeBSD 方面疑問,請先閱讀
FreeBSD 相關文件,如不能解決的話,再洽詢
<questions@FreeBSD.org>。
關於本文件的問題,請洽詢
<doc@FreeBSD.org>。