6.3. Building mechanisms

6.3.1. make, gmake, and imake

If your port uses GNU make, set USE_GMAKE=yes.

表格 6.1. Variables for ports related to gmake
VariableMeans
USE_GMAKEThe port requires gmake to build.
GMAKEThe full path for gmake if it is not in the PATH.

If your port is an X application that creates Makefile files from Imakefile files using imake, then set USE_IMAKE=yes. This will cause the configure stage to automatically do an xmkmf -a. If the -a flag is a problem for your port, set XMKMF=xmkmf. If the port uses imake but does not understand the install.man target, NO_INSTALL_MANPAGES=yes should be set.

If your port's source Makefile has something else than all as the main build target, set ALL_TARGET accordingly. Same goes for install and INSTALL_TARGET.

6.3.2. configure script

If your port uses the configure script to generate Makefile files from Makefile.in files, set GNU_CONFIGURE=yes. If you want to give extra arguments to the configure script (the default argument is --prefix=${PREFIX} --infodir=${PREFIX}/${INFO_PATH} --mandir=${MANPREFIX}/man --build=${CONFIGURE_TARGET}), set those extra arguments in CONFIGURE_ARGS. Extra environment variables can be passed using CONFIGURE_ENV variable.

表格 6.2. Variables for ports that use configure
VariableMeans
GNU_CONFIGUREThe port uses configure script to prepare build.
HAS_CONFIGURESame as GNU_CONFIGURE, except default configure target is not added to CONFIGURE_ARGS.
CONFIGURE_ARGSAdditional arguments passed to configure script.
CONFIGURE_ENVAdditional environment variables to be set for configure script run.
CONFIGURE_TARGETOverride default configure target. Default value is ${MACHINE_ARCH}-portbld-freebsd${OSREL}.

6.3.3. Using scons

If your port uses SCons, define USE_SCONS=yes.

表格 6.3. Variables for ports that use scons
VariableMeans
SCONS_ARGSPort specific SCons flags passed to the SCons environment.
SCONS_BUILDENVVariables to be set in system environment.
SCONS_ENVVariables to be set in SCons environment.
SCONS_TARGETLast argument passed to SCons, similar to MAKE_TARGET.

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>.