*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> bsd.port.mk (5)              



NAME    [Toc]    [Back]

     bsd.port.mk - ports tree master Makefile fragment

SYNOPSIS    [Toc]    [Back]

     .include <bsd.port.mk>

DESCRIPTION    [Toc]    [Back]

     bsd.port.mk holds all the  standard  routines  used  by  the
ports tree.  Some
     variables  and  targets  are for its internal use only.  The
rest is documented

     Other  BSD  variants,  as  well   as   older   versions   of
bsd.port.mk, include
     other  targets  and  variables.  Conversion methods are outlined here.

     This is not quite complete; a few variables and targets  are
not yet documented.
   Mostly because undocumented stuff has fuzzy semantics, and it
     hasn't been decided yet how to define it.

TARGETS    [Toc]    [Back]

                   Print all dependencies for a port in order  to
build it, run
                   it, or both.  The output is formatted as package specification
 pairs, in a form suitable for tsort(1).

                   Print all dependencies a package depends  upon
for building,
                   running,  or both, as a list of package names.

                   Print a list of first level package specifications a port
                   depends  as build dependencies, library dependencies, or run

                   User convenience target that displays the  result of
                   full-{build,run}-depends  in  a  more readable

                   Most standard targets can be  specialized  according to a
                   given  port's  needs.   If  defined, the pre-*
hook will be invoked
 before running the  normal  action;  the
do-* hook will
                   be  invoked  instead of the normal action; the
post-* hook
                   will be invoked after the normal action.  Specialization
                   hooks  exist  for build, configure, distpatch,
extract, fake,
                   fetch, install, package, patch, regress.   See
                   targets for exceptions.

     addsum        Complete the ${CHECKSUM_FILE} record of checksums with
                   files that  have  been  added  since  makesum.
Complain if anything
 does not match.

     build,  all    Default target.  Build the port.  Essentially

                   env     -i     ${MAKE_ENV}     ${MAKE_PROGRAM}
${MAKE_FLAGS}                                 -f     ${MAKE_FILE}

                   Verify the ports mentioned  in  BUILD_DEPENDS,
by checking
                   the  corresponding  packages  are actually installed, and install
 the missing ports by  recursing  through
the ports
                   tree.   Invoked right after creating the working directory.

     checkpatch    Debugging version of  the  patch  target  that
simulates invoking

     checksum       Check  distribution archives and distribution
patches control
  sum  against  the  results  recorded  in
                   using  the  cryptographic  signature utilities
listed in
                   ${PREFERRED_CIPHERS}.  All the files needed to
recreate a
                   port should be in ${ALLFILES} and checksummed.
                   checksum with REFETCH=true will try to fetch a
version with
                   the  correct  checksum  from  the OpenBSD main
archive site in
                   the case of a checksum mismatch.   NO_CHECKSUM
can be used
                   to avoid all checksumming steps.

     clean          Clean  ports  contents.   By default, it will
clean the work
                   directory.   It  can  be   invoked   as   make
clean='[depends bulk
                   work  fake  flavors  dist  install sub package

                   work      Clean work directory.

                   bulk      Clean bulk cookie.

                   depends   Recurse into dependencies.

                   flavors   Clean all work directories.

                   dist      Clean distribution files.

                   install   Uninstall package.

                   package   Remove package file (and  copies  in
 and ${FTP_PACKAGES}).

                   readmes    Clean  files  generated through the
readme targets
                             (html files).

                   sub       With install or package, clean  subpackages as

                   packages  Short-hand for `sub package'.

                   Short hand for make clean=depends.

     configure      Configure  the  port.  Might be a void operation.  Unless
                   overridden, configure creates the  ${WRKBUILD}
                   (see  SEPARATE_BUILD),  runs ${SCRIPTDIR}/configure if it exists,
 and runs whatever configuration  methods
are recorded
                   in CONFIGURE_STYLE.

     depends        Check  all  the port's dependencies, that is:
                   lib-depends, run-depends, regress-depends.

     describe      Prints a one-line index  entry  of  the  port,
suitable for

     distclean     Short-hand for make clean=dist.

     distpatch      Apply  distribution  patches only.  See patch
                   for details.

     extract       Extract the distribution files under ${WRKDIR}
(but see
                   EXTRACT_ONLY).   Refer  to EXTRACT_CASES for a
complete description.
  Do not use pre-extract and  do-extract hooks.

     fake          Do a fake port installation, that is, simulate
the port installation
 under ${WRKINST}.  There is no  dofake and postfake
 hooks.  fake actually uses pre-fake, preinstall, doinstall
 and post-install.  Described in a separate section

     fetch          Fetch  the distribution files and patchfiles,
                   ${FETCH_CMD}.  Each file of the DISTFILES  and
                   lists  is  retrieved,  if  necessary, from the
list of sites in
                   MASTER_SITES.  If a filename ends with a  `:0'
to `:9' extension,
   it  will  be  retrieved  from  MASTER_SITES0 to
                   MASTER_SITES9 instead.   The  ports  framework
                   ${DISTDIR}/${DIST_SUBDIR}      (aliased     to
                   cache the ports distribution files  and  patch
files.  Note
                   that  this framework is also used by mirroring
                   which will also retrieve SUPDISTFILES, to fill
with supplementary
 distribution files which are not needed for every
                   configuration.   See   ALLFILES,   CDROM_SITE,
                   MASTER_SITES0,       ...,       MASTER_SITES9,
                   SUPDISTFILES, REFETCH.

     install       Install the package after building.   See  the
description of
                   THE  FAKE  FRAMEWORK for the non-intuitive details of the way
                   {pre,do,post}-install hooks are actually  used
by the ports

     lib-depends    Verify  that  the library dependencies a port
needs are actually
 there, by checking the library specifications.

                   Verify  that  the  LIB_DEPENDS hold all shared
libraries used
                   for the port.  See library-specs(7).

                   Check that PERMIT_PACKAGE_* settings match: if
any dependency
  has  a  more  restrictive setting, warn
about it.  This
                   warning is advisory, because the automated license checking
                   cannot  figure  out which ports were used only
for building
                   and did not taint the current port.

                   Create symbolic  links  in  other  directories
that correspond
                   to the port's CATEGORIES.  Note that this does
not affect
                   bulk package building, since those links don't
appear in
                   the    upper-level    Makefiles.    See   also

     makesum       Create the ${CHECKSUM_FILE} list  of  recorded
checksums by
                   running  the  cryptographic fingerprints sha1,
md5 and rmd160
                   on ${ALLFILES}.  NO_CHECKSUM can  be  used  to
avoid all
                   checksumming steps.

                   Verify that makewhatis(8) can do a correct job
with the
                   port's manpages.

     package       Build a port  package  (or  packages  in  MULTI_PACKAGES cases)
                   from the fake installation.  Involves creating
                   information  from  templates   (see   COMMENT,
                   SUBST_VARS among others) and invoking pkg_create(1) for
                   each package in the MULTI_PACKAGES  list.   If
  is  set to `Yes', copies built packages into
                   ${FTP_PACKAGES}, using hard links if possible.
  is  set  to  `Yes', copies
built packages
                   into ${CDROM_PACKAGES}, using  hard  links  if

     patch         Apply distribution and OpenBSD specific patches.  Because
                   of historical accident, patch does not  follow
the exact
                   same  scheme other standard targets do.  Namely, patch invokes
 pre-patch (if  defined),  do-patch,  and
post-patch, but
                   the  default do-patch target invokes distpatch
                   So, if the do-patch target is  overridden,  it
should still
                   begin by calling make distpatch, before applying OpenBSD
                   specific patches.  Accordingly, the exact  sequence of hooks
                   is:  pre-patch,  do-distpatch, post-distpatch,
                   post-patch.  If ${PATCHDIR} exists, the  files
described under
  PATCH_LIST will be applied under WRKDIST.
See also
                   REORDER_DEPENDENCIES for  possible  post-patch

     readmes        Create  an  html description of packages, including comments,
                   description, and dependencies.

     rebuild       Force rebuild of the port.

     regress       Run regression tests for the port.  Essentially depend on a
                   correct build and invoke

                   env     -i     ${MAKE_ENV}     ${MAKE_PROGRAM}
${REGRESS_FLAGS}                               -f    ${MAKE_FILE}

                   If  a port needs some other ports installed to
run regression
 tests, use REGRESS_DEPENDS.   If  a  port
needs special
                   configuration  or  build options to enable regression testing,
 define a `regress' FLAVOR.

                   Verify packages needed for  regression  tests,
using the same
                   scheme  as  build-depends.   Only invoked when
                   tests are run, or explicitly through  depends.

     reinstall      Force  reinstallation  of  a  port,  by first
cleaning the old

     repackage     For rebuilding of the packages of a  port,  by
first removing
                   the old packages.

     run-depends    Verify the ports mentioned in RUN_DEPENDS, by
checking the
                   corresponding packages are actually installed,
and install
                   the  missing  ports  by  recursing through the
ports tree.  Invoked
 right before installing the package.

     show          Invoked as make show=name, show  the  contents
of ${name}.
                   Invoked  as  make show="name1 name2 ...", show
the contents
                   of ${name1} ${name2} ..., one  variable  value
per line.
                   Mostly  used  from recursive makes, or to know
the contents
                   of another port's variables  without  guessing

                   Remove  symbolic  links  in  other directories
that correspond
                   to   the   port's   CATEGORIES.    See    also

                   Create  or  update  patches  for a port, using
diff(1) between
                   file and file.orig, based on  file.orig  existence.  In order
                   to  generate  a patch, the original file needs
to be named
                   file.orig and file edited.  After  the  target
is invoked,
                   the  patches are placed under the patches/ directory.  It
                   moves  existing  patches  from  patch-file  to

     update-plist  Update the packing lists for a port, using the
fake installation
  and  the   existing   packing   lists.
update-plist should
                   produce mostly correct PLIST, PFRAG.shared and
                   shared files, handling shared  libraries,  GNU
info(1) files,
                   setuid files, and empty directories.  It moves
                   files  to  PLIST.orig,  PFRAG.shared.orig  and
                   shared.orig.   If  the generated lists include
files and directories
 that shouldn't be included,  comment
these like

                   @comment unwanted-file
                   @comment @dirrm unwanted-dir

                   Subsequent calls to update-plist will automatically recognize
 and handle such lines correctly.

                   update-plist does not handle flavor situations
yet, so beware.

VARIABLES    [Toc]    [Back]

     Note  that  some  variables  are  marked as `User-settings',
which means that
     individual ports should not modify them, and that some variables are
     marked  as `read-only', which means that they shouldn't ever
be changed.

     show          Invoked as make show=name, show  the  contents
of ${name}.
                   Invoked  as  make show="name1 name2 ...", show
the contents
                   of ${name1} ${name2} ..., one  variable  value
per line.

     ALLFILES      List of all files that need to be retrieved by
fetch, with
                   master  site  selection   extension   removed.

     ALL_TARGET     Target  used  to  build software.  Default is
`all'.  Can be
                   set to empty, to  yield  a  package's  default

     ARCH          Current machine architecture (read-only).

     AUTOCONF       Location  of  the  autoconf binary if needed.
Defaults to autoconf
 (though make autoreconf might  be  more

     AUTOCONF_DIR  Where to invoke autoconf if ${CONFIGURE_STYLE}
includes autoconf.
  Defaults to ${WRKSRC}.

                   Starting with OpenBSD 3.3, several versions of
autoconf may
                   coexist  peacefully.  Setting AUTOCONF_VERSION
along with
                   CONFIGURE_STYLE set to autoconf is the correct
way to specify
 which one to use.  If autoconf must be run
                   MODGNU_AUTOCONF_DEPENDS can be used to specify
what packages
 to depend upon.

     BATCH          User-settings.   Set  to `Yes' to avoid ports
that require
                   user-interaction Use in conjunction  with  INTERACTIVE to
                   simplify bulk-package builds.  (See IGNORE).

     BROKEN         Define  only  for broken ports, set to reason
the port is
                   broken.  See also NO_IGNORE.

                   Macros passed to make  and  configure  invocations.  Set based
                   on corresponding INSTALL_* variables.

     BIN_PACKAGES   User  settings.  If set to `Yes', the package
target will
                   trust a package built in the repository to  be
                   and  will not rebuild it if the work directory
is absent.
                   See also BULK, TRUST_PACKAGES.

                   List of other ports the current port needs  to
build correctly.
  Each item has the form
                   ...][:target]'.   `target'  defaults  to  `install' if it is
                   not  specified.  `legacy' used to be a file to
check.  The
                   ports tree now uses `pkgspec'  instead,  as  a
package that
                   must be installed prior to the build.  `directory' is set
                   relative to ${PORTSDIR}.  `subpackage'  is  an
optional subpackage
  name,  to  install instead of the default main package
 name.  `flavor ...' is a  comma  separated
list of flavors.
   By  default, the dependency will build
the default
                   flavor.  Build dependencies are checked at the
beginning of
                   the extract stage.

                   Build  dependencies  that  are not the default
package or
                   install target will be processed in  a  subdirectory of the
                   working     directory,     specifically,    in

     BULK          User settings.  If set  to  `Yes',  successful
package builds
                   and installations will clean their working directories, after
  invoking   any   targets   mentioned   in
                   set  on a per-${PKGPATH} basis.  For instance,
                   BULK_misc/screen=No will override any BULK=Yes
passed on
                   the   command   line.   See  BULK_COOKIES_DIR,

                   User settings.  Used to store cookies for successful bulkpackage
 builds, defaults to

     BULK_FLAGS      Flags  to  pass  to  build  each  target  in

     BULK_TARGETS  Targets to run after each bulk  package  build
before cleaning
 up the working directory.  Empty defaults.
Can be set
                   on a  per-${PKGPATH}  basis,  e.g.,  BULK_TARGETS_${PKGPATH}=...

     BZIP2         Name of the bzip2 binary.

     CATEGORIES    List of descriptive categories into which this
port falls.
                   Mandatory.         See        link-categories,

     CDIAGFLAGS    Flags appended to CFLAGS if WARNINGS is set.

                   User  settings.   Base location where packages
suitable for a
                   CDROM  (see  PERMIT_PACKAGE_CDROM)   will   be
placed (default:

     CDROM_SITE     Path to a local database that holds distribution files
                   (usually a CD-ROM  or  other  similar  media),
used to retrieve
                   distribution  files  before  going to the network.  Defaults
                   to /cdrom/distfiles.  Set to  empty  to  avoid
checking any
                   path.   Distribution files are still copied or
linked (see
                   FETCH_SYMLINK_DISFILES) into DISTDIR  if  they
are found under

     CFLAGS         Default  flags  passed  to  the  compiler for
building.  Many
                   ports ignore it.  See also COPTS,  CDIAGFLAGS.

                   Location  for  this  port's checksums, used by
                   checksum, and makesum.  Defaults to  distinfo.

     CLEANDEPENDS   If set to `Yes', `make clean' will also clean
                   Can be overridden on a  per-${PKGPATH}  basis,
by setting

     COMMENT        Comment  used for the package, and in the INDEX.

     COMMENT-foo   Comment used for sub package foo in  a  multipackage set up.

                   Comment  used  for  a flavored package, if the
                   comment is inappropriate.

                   Comment used for a sub-, flavored package.

     COMES_WITH    The first release where the port was made part
of the standard
  distribution.   If  the  current OpenBSD
version is >=
                   this version then a notice will  be  displayed
instead of the
                   port being built.

                   Arguments  to  pass  to configure script.  Defaults are empty,
                   except for gnu-style configure,  where  prefix
and sysconfdir
                   are set.

                   Basic  environment  passed to configure script
(path and
                   libtool setup).  gnu-style  configure  adds  a
lot more variables.

                   Set  to  name  of  script invoked by configure
target, if appropriate.
  Should be relative to ${WRKSRC}.

                   Set to  --enable-shared  or  --disable-shared,
depending on
                   whether  the  architecture supports shared libraries.  Should
                   be appended to CONFIGURE_ARGS, for ports  that
build dynamic
                   libraries  and whose configure script supports
these options.

                   Set to style of configuration  that  needs  to
happen.  If
                   `perl', assume perl(1) ExtUtils::MakeMaker(3p)
style.  Add
                   `modbuild',    to    enable    perl(1)    Module::Build(3p) style.  If
                   `gnu', assume gnu configure style.  Add `dest'
if port does
                   not handle DESTDIR correctly, and needs to  be
configured to
                   add   DESTDIR  to  prefixes  (see  also  DESTDIRNAME).  Add `old'
                   if port is an older autoconf  port  that  does
not recognize
                   --sysconfdir.    Add  `autoconf'  if  autoconf
needs to be rerun
                   first.  Add `automake' if automake may need to
be rerun.
                   Otherwise,  automake  will  be explicitly disabled.  If
                   `imake',  assume  port  configures  using  X11
ports Imakefile
                   framework.   Add  `noman'  if  port has no man
pages the Imakefile
  should  try  installing.   If  `simple',
there is a configure
  script, but it does not fit the normal
gnu configure

                   If a port uses  config.guess  outside  WRKSRC,
the directories
                   containing  the other copies must be set here.

     COPTS         User settings.  Supplementary options appended
to ${CFLAGS}
                   for  building.   Since  most  ports ignore the
COPTS convention,
 they are actually told to use  ${CFLAGS}
${COPTS} as

     CXXDIAGFLAGS  Flags appended to CXXFLAGS if WARNINGS is set.

     CXXFLAGS      Default flags passed to the C++  compiler  for
                   Many ports ignore it.

     CXXOPTS       User settings.  Supplementary options appended
                   ${CXXFLAGS} for building.

     DEF_UMASK     Correct value of umask for the port  to  build
and package
                   correctly.  Tested against the actual umask at
fake time.
                   Default is 022.  Don't override.


     DESTDIRNAME   Name of variable to set  to  ${WRKINST}  while
faking.  Usually
  DESTDIR.   To  be  used  in the rare cases
where a port
                   heeds DESTDIR in a few directories  and  needs
to be configured
 with `gnu dest', so that those few directories do not
                   get in the way.

     DISTDIR       Directory where all ports  distribution  files
and patchfiles
                   are        stashed.         Defaults        to
${PORTSDIR}/distfiles.  Override
                   if distribution files  are  stored  elsewhere.
Always use
                   FULLDISTDIR  to  refer  to ports' distribution
files location,
                   as it takes an eventual DIST_SUBDIR  into  account.

     DISTFILES     The main port's distribution files (the actual
                   source, except for binary-only  ports).   Will
be retrieved
                   from the MASTER_SITES (see fetch), checksummed
and extracted
 (see checksum, extract).  DISTFILES normally holds a
                   list  of files, possibly with `:0' to `:9' appended to select
  a  different  MASTER_SITES.   See   also

     DISTNAME      Name used to identify the port.  See DISTFILES

     DISTORIG      Suffix used by distpatch  to  rename  original
files.  Defaults
  to  .bak.orig.  Distinct from .orig to
avoid confusing

     DIST_SUBDIR   Optional subdirectory of ${DISTDIR} where  the
                   port's  distribution files and patchfiles will
be located.
                   See target fetch.

     ECHO_MSG      User settings.  Used to display `===>  Configuring for foo'
                   and similar informative messages.  Override to
turn off,
                   for instance.

     ERRORS        List of errors found while parsing the  port's
                   Display  the  errors before making any target,
and if any error
 starts with "Fatal:",  do  not  make  anything.  For instance:

                         .if !defined(COMMENT)
                         ERRORS+="Fatal: Missing comment"

                   In  the  normal  extraction  stage  (when  EXTRACT_ONLY is not
                   empty), this is the contents of a case  statement, used to
                   extract  files.   Fragments  are automatically
appended to extract
 tar and zip archives, so  that  the  default case is
                   equivalent to the following shell fragment:

                   set -e
                   cd ${WRKDIR}
                   for archive in ${EXTRACT_ONLY}
                       case $$archive in
                             unzip -q ${FULLDISTDIR}/$$archive -d
                             bzip2 -dc  ${FULLDISTDIR}/$$archive|
tar xf -;;
                             gzcat   ${FULLDISTDIR}/$$archive   |
                             /bin/sh ${FULLDISTDIR}/$$archive;;
                             tar xf ${FULLDISTDIR}/$$archive;;
                             gzip -dc ${FULLDISTDIR}/$$archive  |
tar xf -;;

     EXTRACT_ONLY  Set if not all ${DISTFILES} should be extracted at do-extract
 stage.  Default value is ${DISTFILES}.

     EXTRACT_SUFX  Used to set DISTFILES default value to ${DISTNAME}${EXTRACT_SUFX}.
  Default value is .tar.gz.

     FAKE          Automatically set to `Yes' for most ports (and
all new
                   ports).   Indicates  that  the   port,   using
                   will    properly    fake   installation   into
${WRKINST}, to be
                   packaged and properly installed from the package.  Set to
                   `'  in  very  rare cases, and during port creation.

     FAKE_FLAGS    Flags passed to ${MAKE_PROGRAM} on fake  invocation.  By default,

     FAKE_TARGET    Target build by ${MAKE_PROGRAM} on fake invocation.  Defaults

     FAKEOBJDIR    If non empty, used as  a  base  for  the  fake
area.  The real
                   fake  directory  ${WRKINST}  is created there.
Can be set on
                   a per-${PKGPATH} basis.  For instance, setting
 will affect only the

     FETCH_CMD     Command used to fetch distribution  files  for
this port.
                   Defaults  to  ftp(1).   User settings.  Can be
used to go
                   through excessively paranoid firewalls.

                   Some ports' distfiles cannot be fetched  automatically for
                   licensing   reasons.    In   this   case,  set
                   list of strings that will  be  displayed,  one
per line, e.g.,

                   FETCH_MANUALLY= "You must fetch foo-1.0.tgz"
                   FETCH_MANUALLY+="from    http://www.fubar.com/
                   FETCH_MANUALLY+="after reading and agreeing to
the license."
                   Automatically sets IS_INTERACTIVE if some distribution
                   files are missing.

                   User settings.  Set to `Yes' to link distribution files off
                   CDROM_SITE instead of copying them.

     FILESDIR      Location of other files related to the current
ports.  (default:
 files.${ARCH} or files).

     FLAVOR        The port's current options.  Set by the  user,
and tested by
                   the port to activate wanted functionalities.

     FLAVORS       List of all flavors keywords a port may match.
Used to
                   sort FLAVOR into a canonical  order  to  build
the package
                   name,  or to select the packing-list, and as a
quick validity
 check.  See also PSEUDO_FLAVORS.

     FLAVOR_EXT    Canonical list of flavors being  set  for  the
current build,
                   dash-separated.  See FULLPKGNAME.

     FTP_PACKAGES   User  settings.  Base location where packages
suitable for
                   ftp (see PERMIT_PACKAGE_FTP)  will  be  placed

     FULLPKGNAME    Full name of the main created package, taking
flavors into
                   account.  Defaults to ${PKGNAME}${FLAVOR_EXT}.

                   Full  package name for sub-package foo, if the
default value
                   is not appropriate.

     FULLPKGPATH   Path to the current port's directory, relative
   including   flavors  and  subpackages.

     GMAKE         Location of the gnu make  binary,  if  needed.
Defaults to

     HOMEPAGE      Set to a link to the homepage of the software,
if applicable.

     LIB_DEPENDS   Libraries this port depends upon.   Each  item
has the form
                   ...][:target]'.  Similar to BUILD_DEPENDS, except for
                   `lib_specs',  which  is a comma-separated list
of `lib_spec'
                   of the form: `libname.[version.[subversion]]'.
                   library-specs(7) for more details.

                   On  architectures  that use dynamic libraries,
                   also  used  as  a  run-time  dependency,   and
recorded in the
                   package as such.

     FULLDISTDIR    Complete path to directory where ${DISTFILES}
 will be located, to be  used  in  handcrafted extraction
 targets (read-only).

     IGNORE         The  port is ignored and ${IGNORE} is printed
if defined.
                   Usually set to the reason the port is ignored.
See also
                   NOT_FOR_ARCHS,   NO_IGNORE,    ONLY_FOR_ARCHS,

                   If  set  to  `Yes', do not print anything when
ignoring a

                   Macros to use to install a program, a  script,
data, or a
                   man page (or the corresponding directory), respectively.

                   Target invoked to install the software, during
fake installation.
  Default is `install'.

     INTERACTIVE    User settings.  Set to `Yes' to skip all noninteractive
                   ports.  Used in conjunction with BATCH to simplify bulkpackage

                   Set  to  `Yes' if port needs human interaction
to build.
                   Usually implies NO_PACKAGE as  well.   Porters
should strive
                   to  minimize  IS_INTERACTIVE  ports,  by using
FLAVORS for multiple
 choice ports, and  by  postponing  human
intervention to
                   package installation time.

     LIBTOOL        Location of the libtool binary for ports that
                   USE_LIBTOOL         (default:         ${LOCALBASE}/bin/libtool).

                   Arguments  to pass to libtool.  If USE_LIBTOOL
is set, the
                   environment  variable  LIBTOOL   is   set   to

     LOCALBASE      where other ports have already been installed

     LOCKDIR       User settings.  If set, points to a  directory
common for
                   all instances of concurrent ports builds.

     LOCK_CMD       User  settings.  If set, expands to a command
that will acquire
  a  lock.   This  lock  will  reside  in
${LOCKDIR}.  See
                   also ports(7).

     LP64_ARCHS     Set to the list of 64-bit architectures.  Use

     MAINTAINER    E-mail address with full name  of  the  port's
                   Defaults to ports@openbsd.org.

     MAKE_ENV       Environment  variables passed to make invocations.  Sets at
                   least  PATH,   PREFIX,   LOCALBASE,   X11BASE,
                   DESTDIR, and the BSD_INSTALL_* macros.

     MAKE_FLAGS     Flags  used  for all make invocations, except
for the fake
                   stage, which  uses  FAKE_FLAGS,  and  for  the
regress stage,
                   which uses REGRESS_FLAGS.

     MAKE_FILE      Name of the Makefile used for ports building.
Defaults to
                   Makefile.  Used after  changing  directory  to

     MAKE_PROGRAM  The make program that is used for building the
port.  Set
                   to ${MAKE} or ${GMAKE} depending on USE_GMAKE.

     MASTER_SITES   List of primary location from which distribution files and
                   patchfiles are retrieved.  See the fetch  target for more
                   details.  See ports(7) for user configuration.

                   Supplementary locations from  which  distribution files and
                   patchfiles are retrieved.

     MESSAGE        File  recorded  in  the package and displayed
during installation.
  Defaults to ${PKGDIR}/MESSAGE  if  this
file exists.
                   Leave empty if no message is needed.

     MTREE_FILE     mtree(8) specification to check when creating
a PLIST with
                   the update-plist target.  MTREE_FILE can  hold
a list of
                   file names, to which
                   ${PORTSDIR}/infrastructure/db/fake.mtree    is
always appended.
   These  specifications  are   rooted   at
${WRKINST}, and are
                   subject  to  SUBST_VARS  substitution, to ease
${PREFIX} independence.
  This feature is primarily  intended
for large,
                   interconnected  ports,  such as the kde suite,
where a base
                   package sets up a large, extra directory hierarchy that
                   would  make  the  manual  checking  of packing
lists tedious.

     MOTIFLIB      Read-only.  Correct incantation to  link  with

                   Set  to a list of package extensions for ports
that create
                   multiple packages.  See  "Flavors  and  multipackages" below.

                   List  of architectures on which this port does
not build.
                   See also ONLY_FOR_ARCHS.

     NO_BUILD      Port does not need any build stage.

     NO_CHECKSUM   Set to `Yes' to avoid checksum,  makesum,  and
addsum actions
                   entirely.   User settings.  Beware of the full
                   of this mechanism, namely that it disables entirely the basic
  authentication  mechanisms  of  the ports

     NO_DEPENDS    User settings.  Don't verify build  of  dependencies.  Do not
                   use in any ports Makefile.  This is only meant
as a user
                   convenience  when,  e.g.,  you  just  want  to
browse through a
                   given port's source and do not wish to trigger
the build of

     NO_IGNORE     User settings.  If set to `Yes', avoid  ignoring a port for
                   the  usual  reasons.   Use,  for instance, for
fetching all
                   distribution files, or  for  fixing  a  broken
port.  See also

     NO_REGRESS    Port does not have any regression targets.

                   Set  to the list of platforms that do not support shared libraries.
  Use with NOT_FOR_ARCHS.

                   Set to `Yes'  if  platform  does  not  support
shared libraries.
                   To  be  tested after including bsd.port.mk, if
                   PFRAG.shared nor CONFIGURE_SHARED are  enough.

     NO_SYSTRACE    Port  does  not  build  with systrace enabled
build targets.

                   List  of  architectures  on  which  this  port
builds.  Can hold
                   both   processor-specific  information  (e.g.,
m68k), and more
                   specific model information (e.g., hp300).

     OPSYS         Always OpenBSD (read-only).

     OPSYS_VER     Revision number of OpenBSD (read-only).

     PACKAGING     Defined while  building  packages,  read-only.
See the description
detailed explanation.

     PATCH         Command to use to apply all patches.  Defaults

     PATCHORIG     Suffix used by patch to rename original files,
and update-
                   patches             to             re-generate
${PATCHDIR}/${PATCH_LIST} by looking
                   for  files  using  this  suffix.   Defaults to
.orig.  For a
                   port that already contains .orig files in  the
                   set this to something else, such as .pat.orig.
See also
                   distpatch, DISTORIG.

     PATCH_CASES   In the normal distpatch stage (when PATCHFILES
is not empty),
 this is the contents of a case statement,
used to apply
 distribution patches.  Fragments are automatically appended
  to handle gzip'ed and bzip'ed patches,
so that the
                   default case is equivalent  to  the  following
shell fragment:

                   set -e
                   cd ${FULLDISTDIR}
                   for patchfile in ${_PATCHFILES}
                       case $$patchfile in
                             bzip2  -dc  $$patchfile  |  ${PATCH}
                             gzcat   $$patchfile    |    ${PATCH}
                             ${PATCH}          ${PATCH_DIST_ARGS}

     PATCHDIR      Location for patches applied by  patch  target
                   patches.${ARCH} or patches).

     PATCHFILES    Files to fetch from the master sites like DISTFILES, but
                   serving a different purpose, as they hold distribution
                   patches  that  will  be  applied  at the patch
stage.  See also

     PATCH_ARGS    Full  list  of  options  used  while  applying
port's patches.

                   Set  to  Yes  by the checkpatch target.  Don't
touch unless
                   the default checkpatch target needs to be  redefined.  Ideally,
  user-defined  patch subtargets ought to
test checkpatch.
  In practice, they don't.

     PATCH_DEBUG   If set to `Yes', the patch stage  will  output
extra debug

                   Full  list of options used while applying distribution

                   Patch option used to  strip  directory  levels
while applying
                   distribution patches.  Defaults to -p0 .

     PATCH_LIST     Wildcard  pattern  of patches to select under
                   (default: patch-*).  Note that filenames  ending in .orig,
                   or  ~ are never applied.  Note that PATCH_LIST
can hold absolute
 pathnames, for instance to share patches among similar

                   PATCH_LIST=${PORTSDIR}/x11/kde/libs2/patches/p-* patch-*

     PATCH_STRIP   Patch option used to  strip  directory  levels
while applying
                   port's patches.  Defaults to -p0 .

     PKG_ARCH      Comma-separated list of architectures on which
this package
                   may    install.      Defaults     to     ${MACHINE_ARCH},${ARCH}.  Use *
                   to mean any arch.

     PKG_DBDIR      Path  to  package  installation records.  Defaults to
                   /var/db/pkg.  User settings.

                   User settings.  Location  for  packages  built

                   User  settings.   Base  location  for packages
built (default

     PORTHOME      Setting of env variable HOME  for  most  shell
                   Default will trip ports that try to write into
$HOME while

     PORTPATH      Path used by most  shell  invocations.   Don't
override unless
                   really needed.

     PORTSDIR       Root of the ports tree (default: /usr/ports).

                   Path     used     by     dependencies      and
bsd.port.subdir.mk to look up
                   package specifications.  Defaults to

     PKGDIR         Location  for  packaging information (packing
list, port description,
 port short description).   Default:
                   or pkg.

     PKGNAME        Name of the main created package.  Default is
                   for the main package, and ${DISTNAME} for multi-package
                   ports.   This  does  not take flavors into account.  See
                   FULLPKGNAME for that.

     PKGNAME-foo   Package name for sub-package foo, if  the  default value of
                   ${PKGNAME}${SUBPACKAGE} is not appropriate.

     PKGPATH       Path to the current port's directory, relative

                   List of cryptographic ciphers to use, in order
of preference.
   Default  is  `sha1  rmd160  md5'.  The
first cipher that
                   matches in ${CHECKSUM_FILE} is verified.

     PREFIX        Base directory for the current port  installation.  Usually
                   ${LOCALBASE},  though  some  ports may elect a
location under
                   /var, and some multi-package ports may install
under several

                   Extra  list of flavors that do not register in
                   names, but are still  used  to  control  build
logic, and e.g.,
                   working  directory names.  Its main use is for
                   part of a multi-packages build, for instance:

                   FLAVOR=no_gnome make package

                   Creation of a separate  working  directory  is
mandatory.  If,
                   at  a  later  time, a full build with all subpackages is required,
 all the work  will  need  to  be  done

     REFETCH        User settings.  If set to true, checksum will
                   ${CHECKSUM_FILE},  and  try  retrieving  files
with the correct
                   checksum off ftp.openbsd.org, in the directory

                   See BUILD_DEPENDS for specification.   Regress
                   are  only  checked if the regress stage is invoked.

                   Flags to pass to ${MAKE_PROGRAM}  to  run  the
                   tests.  Defaults to ${MAKE_FLAGS}.

                   Set  to  `Yes' if port needs human interaction
to run its

                   Target to run regression tests.   Defaults  to
`regress', except
  for  `perl'  and  `gnu' CONFIGURE_STYLE,
which default to
                   `test' and `check' respectively.

                   Points to a list of files that specify  interdependencies
                   for  make(1).   If  defined,  each line of the
file is either a
                   comment (starting with #) or  a  pair  of  two
files: most_recent
   older.    At  the  end  of  post-patch,
touch(1) will be
                   used to ensure those  files  are  put  in  the
proper order.
                   The  files  are assumed to be under ${WRKSRC}.
The notation
                   /file can be  used  to  ask  for  a  recursive
search, e.g., to
                   make sure that all Makefile.in are up-to-date.
                   ${PORTSDIR}/infrastructure/mk/automake.dep for
an example.

     RUN_DEPENDS    Specification  of  ports  this port needs installed to be
                   functional.   Same  format  as  BUILD_DEPENDS.
The corresponding
  packages  will be built at install stage,
and pkg_add(1)
                   will take care of installing them.

     SED_PLIST     Pipeline of commands used to create the actual
packing list
                   from     the     PLIST    template    (usually
                   bsd.port.mk appends to  it  substitution  commands corresponding
  to  the  port's FLAVOR and variables from
                   ${SED_PLIST} is invoked as  a  pipeline  after
                   PFRAG.shared fragments.

     SCRIPTDIR      Location  for  scripts related to the current
port (default:
                   scripts.${ARCH} or scripts).

                   Many gnu configure ports can be built in a directory distinct
  from the place they were unpacked.  For
some specific
                   ports, this is even mandatory.  Set  to  `simple' if this is
                   the  case.  The ports infrastructure will generate a separate
 ${WRKBUILD} directory in which  the  port
will be configured
  and built.  Wipe ${WRKBUILD} to start
anew, but
                   skipping  the  extract/patch  stage.   Set  to
`flavored' if
                   distinct  flavors of the port may share a common source

     SHARED_ONLY   Set to `Yes' if port can only be built on  architectures
                   with shared libraries.

     SUBPACKAGE     Set to the sub package suffix when building a
package in a
                   multi-package port.  Read-only.  Used to  test
for dependencies
 or to adjust the package name.

     SUBST_VARS    Make variables whole values get substituted to
create the
                   actual  package  information.   Always   holds
                   The special construct `${FLAVORS}' can be used
in the packing-list
  to  specify the current list of dash
separated flavors
 the port is  compiled  with  (useful  for
  in MULTI_PACKAGES).  Add other variables
as needed.

     SUDO           User  settings.   If  set   to   sudo(8)   in
mk.conf(5), the ports
                   tree  will  only  invoke root's privileges for
the parts that
                   really require it.

     SUPDISTFILES  Supplementary files that need to be  retrieved
under some
                   specific  circumstances.  For instance, a port
might need
                   architecture-specific   files.    SUPDISTFILES
should hold a
                   list  of all distribution files and patchfiles
that are not
                   always needed, so that a mirror will  be  able
to grab all
                   files,  or  that makesum will work.  Having an
overlap between
is admissible,
                   and  in  fact, expected, as it is much simpler
to build an
                   error-free list of files to retrieve  in  that
way.  See the
                   xanim port for an example.

     SYSCONFDIR    Location for ports system configuration files.
Defaults to
                   /etc, should never be set to /usr/local/etc.

                   Location of the systrace filter file which  is
the basis for
                   a  port's  actual  systrace  policy file.  Defaults to

                   List  of  variables used in ${SYSTRACE_FILTER}
that will be
                   substituted by their real value when  creating
the systrace
                   policy  file.   Always holds WRKOBJDIR, PORTSDIR, and

     TAR           Name of the tar binary.

     TEMPLATES     Base location for the templates  used  in  the
readmes target.
                   User settings.

                   User  settings.   If  set to `Yes', dependency
mechanisms will
                   assume the database of installed  packages  is
correct.  See
                   also BIN_PACKAGES, BULK.

     UNLOCK_CMD     User  settings.  If set, expands to a command
that will release
  a  lock.   This  lock  will  reside  in

     UNZIP         Name of the unzip binary.

     WARNINGS       User  settings.   If  set  to `Yes', add CDIAGFLAGS to CFLAGS
                   and CXXDIAGFLAGS to CXXFLAGS.

     WRKBUILD      Subdirectory of  ${WRKDIR}  where  the  actual
build occurs.
                   Defaults  to  ${WRKSRC}, unless SEPARATE_BUILD
is involved,
                   in which case it is set to an appropriate value.

     WRKDIR         Location  where  all  port  activity  occurs.
Apart from the
                   actual port, may hold  all  kinds  of  cookies
that checkpoint
                   the port's build.  Read-only.  Ports that need
to know the
                   WRKDIR   of   another   port   must   use   cd
that_port_dir && make
                   show=WRKDIR for this.  Note that WRKDIR may be
a symbolic

     WRKDIST       Subdirectory of ${WRKDIR} in which the distribution files
                   normally  unpacks.   Base for all patches (default:
                   ${WRKDIR}/${DISTNAME}).  Note that WRKDIST may
be a symbolic
 link, if set to ${WRKDIR}.

     WRKSRC         Subdirectory  of  ${WRKDIR}  where the actual
source is.  Base
                   for configuration (default:  ${WRKDIST})  Note
                   may be a symbolic link, if set to ${WRKDIR}.

     WRKPKG         Subdirectory of ${WRKBUILD} where package information gets
                   generated.  Defaults  to  ${WKRBUILD}/pkg,  do
not override
                   unless `pkg' conflicts with the port's conventions.

     WRKINST       Subdirectory of ${WRKDIR} where port  normally
installs (see
                   fake target).

     WRKOBJDIR      If  non  empty, used as a base for the actual
port working
                   directory.    The   real   working   directory
${WRKDIR} is created
                   there.   Can be set on a per-${PKGPATH} basis.
For instance,
 setting WRKOBJDIR_www/mozilla=/tmp/obj
will affect
                   only the mozilla port.

     X11BASE         Where   X11  has  been  installed  (default:

     USE_GMAKE     Set to `Yes' if gnu make (${GMAKE}) is  needed
for correct
                   behavior of this port.

     USE_LIBTOOL    Set  to `Yes' if libtool is required for correct behavior of
                   this port.   Adds  correct  dependencies,  and
passes LIBTOOL
                   environment variable to scripts invocations.

     USE_MOTIF     Set to `any' if port works with any version of
                   `lesstif' if port requires  lesstif  to  work;
`openmotif' if
                   ports  requires  openmotif to work.  The `any'
setting creates
 an extra flavor choice of `lesstif'.  See

     USE_SYSTRACE   Set  to  `Yes'  to protect port building with
systrace.  Set
                   by the user, e.g. in /etc/mk.conf.

     USE_X11       Set to `Yes' if port requires X11 to work.

     VMEM_WARNING  Set to `Yes' if the port  requires  a  lot  of
memory to compile,
  and the user is likely to see a message
like "virtual
                   memory exhausted"  with  the  default  process

     XMKMF          Invocation of xmkmf for CONFIGURE_STYLE=imake
port.  Defaults
 to xmkmf -a -DPorts.   The  -DPorts  is
specific to
                   OpenBSD and is always appended.

     YACC          Name of yacc program to pass to gnu-configure,
defaults to
                   yacc.  (gnu-configure would always try to  use
bison otherwise,
  which  leads to unreproducible builds.)
Set to bison
                   if needed.

FILES    [Toc]    [Back]

                Common Makefile fragment for a set of ports,  included automatically.

                Default path to a CD-ROM (or other media) full of

                Arch-dependent Makefile fragment, included  automatically.

                cache of all distribution files.

     distinfo    Checksum  file.   Holds  the  output  of md5(1),
sha1(1), and
                rmd160(1) for the ports ${DISTFILES} and ${PATCHFILES}.

                cache of distribution files for a given port.

                Description  for  the  port.   Variables  such as
                ${MAINTAINER} will be expanded (see  SUBST_VARS).
 ports will use DESCR${SUBPACKAGE}.

                Short,  one line description of the port, that is
displayed by
                pkg_info(1), and  appears  in  ${PORTSDIR}/INDEX.
Name will be
                adjusted for flavored and multi-packages ports.

                Specification  used  for populating ${WRKINST} at
the start of
                fake.  Use pre-fake if this is incomplete.

                Default setup of ${CDROM_PACKAGES}.

                Default setup of ${FTP_PACKAGES}.

                Default setup of ${PKGREPOSITORY}.

                Default setup of ${BULK_COOKIES_DIR}.

                Extra directory used to store local ports  before
                them.   All  depend  targets  will  normally look
there after the
                normal lookup fails.  See PORTSDIR_PATH.

                List of additional port specific filters, included automatically.

OBSOLETE TARGETS    [Toc]    [Back]

     cdrom-packages, ftp-packages
                   Links  are now created during the package target.

     depends-list  Renamed into full-build-depends

                   Don't override.  Set EXTRACT_ONLY  to  nothing
and override
                   post-extract instead.

     fetch-all, fetch-list, mirror-distfiles
                   See  mirroring-ports(7) for more efficient and
flexible ways
                   to build mirrors.

     obj           Starting with OpenBSD 3.3, using WRKOBJDIR  no
longer creates
  a  symlink between the current directory
and a subdirectory
 of ${WRKOBJDIR}, so obj is  no  longer

                   Use  print-build-depends and print-run-depends

                   Renamed into print-build-depends

                   Renamed into



     CATn          List of formatted manpages, per section.

     CATPREFIX     Location for storing formatted manpages.   Derived directly
                   from PREFIX.

     COMMENT        Used to be the name of the comment file for a
package.  It
                   now holds the comment itself.  Some magic  has
been put in
                   to allow for a seamless transition.

     DESCR_SRC      From NetBSD. This is DESCR.  OpenBSD does not
give a specific
 name to the generated file.  It  is  not
recommended to
                   try to access them directly.

                   Was used to cobble together the normal extraction command,
  Use EXTRACT_CASES instead.

                   Likewise, use EXTRACT_CASES instead.

     EXTRACT_CMD   Likewise, use EXTRACT_CASES instead.

                   Set  FETCH_CMD  to point to a script that does
any required
                   special treatment instead.

                   Used to specify dependencies that were  needed
to fetch
                   files.   It  is  much easier to mirror locally
weird distribution

                   Use CONFIGURE_STYLE instead.

                   Use CONFIGURE_STYLE instead.

     HAVE_MOTIF    Old user settings.   No  longer  needed  since
OpenMotif is now

     IGNOREFILES    Set to the list of files that can't be checksummed.  All
                   uses of it have led to postponing the  correct
action: talking
  to the software author and getting him to
provide versioned

     MANn          List of unformatted manpages, per section.

     MANPREFIX     Location  for  storing  unformatted  manpages.
Derived directly
 from PREFIX.

     MASTERDIR      From  FreeBSD.  Used to organize a collection
of ports that
                   share most files.  OpenBSD uses a single  port
with flavors
                   or  multi-packages  to  produce package variations instead.

                   Contents were used to  replace  `%SUBDIR%'  in
                   MASTER_SITES  variables.  Since `%SUBDIR%' almost always occur
 at the end of the directory, the simpler
                   ${VARIABLE:=subdir/} construct is now used instead (taken
                   from NetBSD).

     MD5_FILE      Use CHECKSUM_FILE instead.

                   Use   PERMIT_DISTFILES_FTP   and  PERMIT_DISTFILES_CDROM to determine
 which files can be  mirrored  instead.

     NEED_VERSION   Used to set a requirement on a specific revision of
                   bsd.port.mk needed by a port.  No longer needed as
                   bsd.port.mk  should always be kept up-to-date.

     NO_CONFIGURE  If ${CONFIGURE_SCRIPT} does not exist, no  automatic configuration
 will be done anyway.

     NO_DESCRIBE   All ports should generate a description.

     NO_EXTRACT    Set EXTRACT_ONLY= instead.

                   Use CONFIGURE_STYLE instead.

     NO_MTREE       Starting with OpenBSD 2.7, the operating system installation
 script runs the /usr/local  specification
globally, instead
  of  embedding  it  in each package.  So
packages no
                   longer record an mtree(8) specification.   Use
an explicit
                   `@exec' command if needed.

     NO_PACKAGE     All  ports should generate a package, preferably before install.

     NO_PATCH      The absence of a patches  directory  does  the
same.  Use
                   PATCHDIR  and PATCH_LIST if patches need to be
changed dynamically.

     NO_WRKDIR     All ports should have a working directory,  as
this is necessary
 to store cookies and keep state.

     NO_WRKSUBDIR  The same 

 Similar pages
Name OS Title
bsd.regress.mk OpenBSD regression test master Makefile fragment
glfragmentmaterial IRIX specify fragment material parameters for the fragment lighting model
automake Linux automatically create Makefile.in's from Makefile.am's
glfragmentcolormaterial IRIX cause a fragment material color to track the current fragment color
DXmSvnSetTreePosition Tru64 Sets the position of the tree in tree display mode.
gllightenv IRIX specify fragment lighting environment
glfragmentlight IRIX set fragment light source parameters
glgetfragmentmaterial IRIX return fragment material parameters
mkmf HP-UX make a makefile
glgetfragmentlight IRIX return fragment light source parameter values
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service