Differential D29450 Diff 86404 documentation/content/en/books/porters-handbook/porting-dads/chapter.adoc
Changeset View
Changeset View
Standalone View
Standalone View
documentation/content/en/books/porters-handbook/porting-dads/chapter.adoc
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
Make sure the port honors `WRKDIRPREFIX`. Most ports do not have to worry about this. In particular, when referring to a `WRKDIR` of another port, note that the correct location is [.filename]#WRKDIRPREFIXPORTSDIR/subdir/name/work# not [.filename]#PORTSDIR/subdir/name/work# or [.filename]#.CURDIR/../../subdir/name/work# or some such. | Make sure the port honors `WRKDIRPREFIX`. Most ports do not have to worry about this. In particular, when referring to a `WRKDIR` of another port, note that the correct location is [.filename]#WRKDIRPREFIXPORTSDIR/subdir/name/work# not [.filename]#PORTSDIR/subdir/name/work# or [.filename]#.CURDIR/../../subdir/name/work# or some such. | ||||
Also, if defining `WRKDIR`, make sure to prepend `${WRKDIRPREFIX}${.CURDIR}` in the front. | Also, if defining `WRKDIR`, make sure to prepend `${WRKDIRPREFIX}${.CURDIR}` in the front. | ||||
[[porting-versions]] | [[porting-versions]] | ||||
== Differentiating Operating Systems and OS Versions | == Differentiating Operating Systems and OS Versions | ||||
Some code needs modifications or conditional compilation based upon what version of FreeBSD Unix it is running under. The preferred way to tell FreeBSD versions apart are the `{freebsd-version}` and `{freebsd}` macros defined in https://svnweb.freebsd.org/base/head/sys/sys/param.h?view=markup[sys/param.h]. If this file is not included add the code, | Some code needs modifications or conditional compilation based upon what version of FreeBSD Unix it is running under. The preferred way to tell FreeBSD versions apart are the `{freebsd-version}` and `{freebsd}` macros defined in https://cgit.freebsd.org/src/tree/sys/sys/param.h[sys/param.h]. If this file is not included add the code, | ||||
[.programlisting] | [.programlisting] | ||||
.... | .... | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
.... | .... | ||||
to the proper place in the [.filename]#.c# file. | to the proper place in the [.filename]#.c# file. | ||||
▲ Show 20 Lines • Show All 403 Lines • Show Last 20 Lines |