Plasma GitLab Archive
Projects Blog Knowledge

GODI Project:
Home 
Highlights 
Screenshots 
Get GODI 
Docs 
Mailing List 
Resources 
Packages 
Workgroups 
OASIS 
Why Ocaml? 
GODI is discontinued. This is the archived content of the former site godi.camlcity.org.
======================================================================
Reference for makefile variables
======================================================================

$Id: makevar-ref.txt 1187 2014-05-25 16:43:23Z gerd $

The notation

var (flags)

means that for the variable "var" the annotations indicated by the
"flags" must be taken into consideration. List of flags:

- r: For a package "Makefile" this variable is read-only, i.e. it can
     be used, but it must not be modified

- w: For a package "Makefile" this variable is read-write

- c: configuration: This variable can be set in godi.conf

- f: preference: This variable is set by bsd.pref.mk, so you need only
     to include this makefile, not the whole of bsd.pkg.mk

- p: This variable is private for the make framework

- !: The meaning of the variable has changed, pay attention to which
     version of godi-core-mk interprets it in which way

======================================================================
Global configuration
======================================================================

PKGSRC_RUN_TEST (c)
    When "yes", package tests are enabled.

    (I don't know of any such test, however.)

GODI_VERIFY_PLIST (c)
    If set to "yes", the packaging step "godi_make install" is modified,
    and it is checked whether the PLIST of the packages cover all
    freshly installed files. This is recommended for package developers.

GODI_BINPKG (c)
    This can be set to a list of URLs or directories from where binary
    packages are received.

GODI_BUILD_SITES (cf)
    A list of URLs where to find build.tgz files (build instructions).
    Note: Since Skylift, this list is set in the profile. Avoid to set
    it in godi.conf unless for experimentation.

GODI_BUILD_SITE (cf)
    The primary URL with build.tgz files. The primary URL is used during
    bootstrap. It is usually the first URL of GODI_BUILD_SITES.

    Note: If both GODI_BUILD_SITE and GODI_BUILD_SITES are set, the latter
    has precedence.

    Not used in Skylift anymore.

GODI_SECTION (cf)
    The selected release line, e.g. 3.07. Changing this variable normally
    changes GODI_BUILD_SITES and GODI_BUILD_SITE implicitly, too.

MASTER_SITE_BACKUP
    Backup URLs of the GODI project for distfiles.
    Note: Since Skylift, this list is set in the profile. Avoid to set
    it in godi.conf unless for experimentation.

MASTER_SITE_PROFILE
    Profile-specific distfile URLs

MASTER_SITE_OVERRIDE (c) 
    If set, the distfiles are first tried to be fetched from this URL
    (or URLs).  This can be used to direct GODI to use a local cache
    of the distfiles as first download choice. The other sites
    (package site, backup sites) are tried later when the file is not
    found. E.g. set MASTER_SITE_OVERRIDE = $(MASTER_SITE_BACKUP) to
    configure that the backup sites are tried first.
    (NB: In Skylift this is the default.)

SEARCH_LIBS (cf)
    List of directories where to search for C libraries by default.
    This should be base directories in the sense that when /dir
    is in this list the libfoo.a file is found in /dir/lib, the
    include files are found in /dir/include etc.

    This variable is initialized with a reasonable default.
    If you set this variable in godi.conf, your settings are
    prepended to this default.

SEARCH_LIBS_OVERRIDE (cf)
    Same contents as SEARCH_LIBS, but overrides the search
    path completely (no default), that means SEARCH_LIBS does
    not have any effect.

SEARCH_CMDS (cf)  
    List of directories where GODI searches Unix utilities. This list
    is only used when godi-core-mk is configured ("Looking up system
    commands"). godi-core-mk uses the current value of this variable
    to determine the absolute paths of the Unix commands before this
    package is installed, and writes this value into cmd.defs.mk after
    this package is installed, just to have it for the next build. The
    initial value is written by the GODI bootstrap script.

    By setting this variable or appending to it in godi.conf, one can
    change the command path for the next time godi-core-mk will be
    installed. It does not have any further effect.

    The paths found out with the help of SEARCH_CMDS are usually only
    used by the GODI make framework, but not by the invoked upstream
    build scripts.

GODI_OVERRIDE_PREFS (cf)

WRKOBJDIR (c)
    Set this variable to the absolute name of a directory to
    configure that builds are performed in this directory. E.g.
    WRKOBJDIR=/tmp/godi

ENABLE_SANDBOX (cf)
    If set to "yes", the Gentoo sandbox is used to restrict
    the package build and install to "legal" directories.
    This is just a QA measure, e.g. used for GODI autobuilders,
    and should not be taken for a security feature. Get the
    Gentoo sandbox from 
    http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=summary

    The sandbox is invoked as $SANDBOX_CMD, defaulting to just
    "sandbox".

-- OS-specific --

OPSYS (cf)
    The base name of the operating system:
    Linux, SunOS, NetBSD, FreeBSD, OpenBSD, Darwin etc.

    Note: All Windows ports use the name of the scripting environment.
    This is always "CYGWIN" for now.

LOWER_OPSYS (cf)
    Same as OPSYS in lowercase letters

W32PORT (cf)
    Only set for native Win32 ports:
     - "mingw": The MinGW toolchain is used
     - "vc": The Visual C++ toolchain is used (not yet implemented)

    This variable is empty or unset for Unix, including Cygwin.

OS_VERSION (cf)
    The version as reported by uname

LOWER_OS_VERSION (cf)
    Same as OS_VERSION in lowercase letters

LOWER_VENDOR (cf)
    The vendor as reported by uname

MACHINE_ARCH (cf)

MACHINE_GNU_ARCH (cf)

MACHINE_GNU_PLATFORM (cf)

CREATE_SHLIBS (cf)
    see finding-libraries.txt

    Note when CREATE_SHLIBS is set and "no", C libraries must only
    be installed as static archives, and it must not be tried to
    create shared libraries.

    If unset, or not "no", C libraries should be installed as
    shared libraries.

    For O'Caml stub libraries, see GODI_HAVE_DLL, it has a similar
    meaning.

SHLIB_TYPE (cf)
    see finding-libraries.txt

ELF_RPATH (cf)
    see finding-libraries.txt

ELF_RPATH_FLAG (cf)
    see finding-libraries.txt

RPATH_FLAG (r)
    compatibility name for ELF_RPATH_FLAG


======================================================================
Directories
======================================================================

--- Global directories ---

LOCALBASE (rcf)
    The base directory where GODI is installed.

LOCALBASE_NATIVE (rcf)
    The base directory where GODI is installed. For native Win32 ports,
    this variable contains the Windows path (with drive letter, using
    forward slashes). For other ports it is identical to LOCALBASE.

PREFIX (r)
    The base directory used for install time. Currently, this is
    always the same as LOCALBASE, but alternate installation
    methods might need it

GODI_DBDIR (rcf)
    The directory containing the package database

DISTDIR (rf)
    The "distfiles" directory (tarballs with sources)

PACKAGES (rf)
    The "packages" directory (binary packages)

PROFILEPATCHES (r)
    The directory containing profile patches

--- Per-package directories ---

These variables are per package.

PKGDIR (r)
    The package directory containing the build instructions

WRKDIR (r)
    The "work" subdirectory in PKGDIR

WRKSRC (r)
    The directory with the unpacked package sources (usually below
    WRKDIR)

PATCHDIR (r)
    The directory containing patches, i.e. "patches" in PKGDIR

FILESDIR (r)
    The directory containing additional files, i.e. "files" in PKGDIR


======================================================================
O'Caml-specific global configuration
======================================================================

BUILD_OCAMLFIND

BUILD_OCAMLFIND_ENV


Note that the following options about the capabilities of the O'Caml
installation are meant as documention about available or missing
features. By setting them you cannot turn off these features! Build
scripts can test them, however, and build packages according to their
values.

GODI_HAVE_OCAMLOPT (r)
    "yes" or "no": whether there is an ocamlopt compiler

GODI_THREAD_MODEL (r)
    "bthr" or "pthr": "bthr" means that there is only the bytecode
    thread model, "pthr" means that both thread models are supported,
    bytecode threads and POSIX threads.

GODI_HAVE_DLL (r)
    "yes" or "no": whether O'Caml supports stub libraries that
    can be dynamically loaded into the running _bytecode_ interpreter.

    When CREATE_SHLIBS=no, it is ensured this variable is also "no".

GODI_HAVE_OCAMLOPT_DLL (r)
    "yes" or "no" or undefined (="no"). Only set since O'Caml 3.11.
    Whether O'Caml supports native-code plugins than can be dynamically
    loaded into the running native-code program.

    When CREATE_SHLIBS=no, it is ensured this variable is also "no".

GODI_HAVE_PROF (r)
    "yes" or "no": whether the ocamlopt compiler supports gprof-
    style profiling

GODI_HAVE_OCAMLOPT_PACK (r)
    undefined or "yes" or "no" or "revised": 
    - undefined: old versions of godi-ocaml-src did not define this
      variable. Interpret this value as "don't know".
    - no: The -pack option is not supported.
    - yes: The -pack option is supported in the way O'Caml 3.08
      handles packing.
    - revised: The -pack option is supported in the way O'Caml 3.09
      handles packing. Note that all version of 3.09 support packing,
      so "no" is no longer possible.

======================================================================
Utilities
======================================================================

These are (usually absolute) paths to utility programs, sometimes with
default arguments.

In Makefiles, the utilities must be called with these variables in
order to control which version is actually used (a number of OS have
several versions of the same utility).

We do not specify here exactly which version of the utilities can be
expected. As a rule of thumb, the Single Unix Specification can be
assumed. Note that GNU often has much more functionality which should
not be used, and that BSD often has a traditional interface which
should not be used, too. 

See also SEARCH_CMDS for how to change the search path for the
script that looks these commands up. Of course, it is also possible
to set these variables individually in godi.conf.


AR (cf)
    The ar utility

AWK (cf)
    The awk utility. One can assume nawk functionality.

BASENAME (cf)
    The basename utility

BZCAT (cf)
    The bzcat utility. This is optional.

BZIP2 (cf)
    The bzip2 utility. This is optional.

CAT (cf)
    The cat utility

CHMOD (cf)
    The chmod utility

CMP (cf)
    The cmp utility
 
CP (cf)
    The cp utility

CPP_EXE (cf)
    Path to a stand-alone C preprocessor (for applications requiring
    one, such as rpcgen)

CUT (cf)
    The cut utility

DATE (cf)
    The date utility

DIGEST (cf)
    The digest utility. This is always the version installed at
    GODI bootstrap time (godi_digest)

DIRNAME (cf)
    The dirname utility

ECHO (cf)
    The echo utility

EGREP (cf)
    The egrep utility.
    CHECK: Is this actually used? Better transition to ${GREP} -E

EXPR (cf)
    The expr utility

FALSE (cf)
    The false utility

FETCH_CMD (cf)
    The utility to download files. Related:

    FETCH_BEFORE_ARGS (cf)
    FETCH_AFTER_ARGS (cf)
        Arguments for FETCH_CMD to place before the download URL, and
	after the download URL, resp.

    The download utility must have certain properties not described here.

FGREP (cf)
    The fgrep utility
    CHECK: Is this actually used? Better transition to ${GREP} -F

FILE_CMD (cf)
    The file utility

FIND (cf)
    The find utility

GCC (cf)
    How to invoke the GNU C-compiler. Defaults to "gcc" without path.
    E.g. add "-V" options to select certain version of the compiler.

    "gcc" must never be referenced by absolute path.

GMAKE (cf)
    The GNU make utility

GREP (cf)
    The grep utility

GTAR (cf)
    The tar utility. (CHECK)

GUNZIP_CMD (cf)
    The gunzip utility

GZIP_CMD (cf)
    The gzip utility

GZCAT (cf)
    The gzcat utility

HEAD (cf)
    The head utility

HOSTNAME_CMD (cf)
    The hostname utility

ID (cf)
    The id utility

INSTALL (cf)
    The BSD-compatible install utility. If the OS does not have one,
    the godi_install script is used instead

LDCONFIG (cf)
    The ldconfig utility, or "true" if the OS does not have one

LDD (cf)
    The ldd utility, or "true" if the OS does not have one

LN (cf)
    The ln utility

LS (cf)
    The ls utility

M4 (cf)
    The m4 utility

MKDIR (cf)
    The mkdir utility plus -p option

MV (cf)
    The mv utility

NM_EXE (cf)
    The nm utility

PATCH (cf)
    The patch utility

PAX (cf)
    The pax utility. This is always the version installed at GODI
    bootstrap time.

PRINTF (cf)
    The printf utility

PWD_CMD (cf)
    The pwd utility. It is ensured that the version of pwd is put in
    here that prints the physical path

RANLIB_EXE (cf)
    The ranlib utility, or "true" if the OS does not need this

RM (cf)
    The rm utility

RMDIR (cf)
    The rmdir utility

SED (cf)
    The sed utility

SETENV (cf)
    The env utility

SH (cf)
    The preferred shell

SORT (cf)
    The sort utility

STRIP_EXE (cf)
    The strip utility, or "true" if the OS does not have one

TAIL (cf)
    the tail utility

TEE (cf)
    The tee utility

TEST (cf)
    The test utility

TOUCH (cf)
    The touch utility

TR (cf)
    The tr utility

TRUE (cf)
    The true utility

TYPE (cf)
    The type utility

WC (cf)
    The wc utility

WGET (cf)
    The wget utility (try not to use this var - the download will be
    redesigned soon)

WGET_OPTIONS (cf)
    Options for wget. This is set to some reasonable default, but can
    be overridden (i.e. you can set other timeouts)

XARGS (cf)
    The xargs utility



ESSENTIAL_PROGRAMS (r)
	This variable enumerates the variables that should go into
	ESSENTIAL_ENV. These are mostly variables with utility
	programs.

ESSENTIAL_ENV (r)
	The environment containing the utility programs enumerated
	in ESSENTIAL_PROGRAMS

======================================================================
General package description
======================================================================

These variables are per package.

PKGNAME (w)
    The name of the package and the version string, separated by "-".
    For example: godi-core-mk-3.5

    When setting this variable in "Makefile", the version string must
    not have a revision suffix like "godi4". However, bsd.pkg.mk
    appends this suffix, and sets PKGNAME_NOREV to the original,
    suffix-free name.

    If this variable is not set in a package "Makefile", DISTNAME will
    be used instead, and must be set to the package name plus version
    string.

PKGNAME_NOREV (r)
    The name of the package plus version string, but without revision
    suffix

PKGREVISION (w)
    The package revision, a decimal number. This number is appended
    to PKGNAME, separated by "godi", when the name of the .build.tgz
    file is constructed, e.g. godi-core-mk-3.5godi4.build.tgz.

    When the PKGREVISION is 0, no "godi" suffix is appended to the
    file, however. This is the same as not defining PKGREVISION at
    all. 

    The package revision should be increased when the build
    instructions are updated for the same version of the upstream
    software.

PKGBASE (r)
    The name of the package without version string, derived from
    PKGNAME.

PKGVERSION (r)
    The version string of the package only, derived from PKGNAME.
    Of course, this implies that there is no revision suffix, too.

DISTNAME (w)
    The "distibution name" as chosen by the upstream author. This
    should be set to the name of the directory that is created when
    the source tarball is extracted.

DISTFILES (w)
    The name(s) of the source tarball(s). By default, this is DISTNAME
    plus EXTRACT_SUFX (.tar.gz)

DISTPREFIX (w)
    An optional prefix to prepend to the DISTFILES when downloading the
    files, e.g. the file "foo-1.2.3.tar.gz" would be locally stored
    as "prefix-foo.1.2.3.tar.gz" if "DISTPREFIX=prefix-". This can
    be useful for working around conflicting names. 
    (Since godi-tools-3.0.19.)

IGNOREFILES (w)
    The names of distfiles and patches without checksum, i.e. the
    checksum verification step is skipped for these.

EXTRACT_SUFX (w)
    The tarball suffix, by default .tar.gz. The framework supports
    these suffixes: .tar.gz, .tgz, .tar.bz2, .tbz, .tar.Z, .tar,
    .shar.gz, .shar.bz2, .shar.Z, .shar, .Z, .bz2, .gz

    (Support for zip, lha, zoo has been removed!)

EXTRACT_ONLY (w)
    The name(s) of the source tarball(s) to extract. By default, the
    same as DISTFILES.

CATEGORIES (w)
    A list of categories. Currently, GODI defines only "apps", "base",
    "conf", and "godi".

MAINTAINER (w)
    A description who maintains this package. Should contain name and
    email address

DESCR_SRC (w)
    The file containing the long package description. 
    Defaults to DESCR in the package directory.

PLIST_SRC (w)
    The file containing the pack list.
    Defaults to PLIST in the package directory. If GODI_PLIST is
    defined, it defaults to PLIST.godi instead.

    Format of the file: see plist-ref.txt

GODI_PLIST (w)
    Changes the default for PLIST_SRC.

    In early versions of godi-core-mk, this variable also triggered
    the interpretation of additional PLIST directives.

PLIST_SUBST (w)
    Contains a substitution for variables in PLIST. One can add
    further variables in the format NAME=VALUE, where VALUE should be
    shell-quoted.

MESSAGE_SRC (w)
    The file containing the message displayed when a binary package
    is added. Defaults to MESSAGE in the package directory if this
    file exists

MESSAGE_SUBST (w)
    Contains a substitution for variables in MESSAGE. One can add
    further variables in the format NAME=VALUE, where VALUE should be
    shell-quoted.

DEPENDS (w)
    Enumerates the strict dependencies on other packages, i.e. it
    enumerates other packages that must be present when this package
    is used.

    The format is a space-separated list of dependencies like:

    <PKGBASE><OPERATOR><VERSION>

    Here, <PKGBASE> is the base name of the other package, without
    version string. <OPERATOR> is one of ==, !=, >=, >, <=, <.
    The <VERSION> is a version string without revision suffix.
    <CAT> and <PKGDIR> are chosen such that the part after ":"
    is the relative path to the package directory (note that this
    part is only interpreted by some legacy scripts, godi_console
    ignores it; however, it should be present for now).

    The exact algorithm comparing version strings is described
    elsewhere. The parts of hierarchical version strings must be
    separated by ".". The parts can be decimal numbers or alphanumeric
    strings. The keywords "pre", "test", "alpha", "beta", "rc", "pl" are 
    handled specially.

    Note that package revisions are ignored for the comparison.

    If the version does not matter, use

    <PKGBASE>-[0-9]*

    or, maybe better,

    <PKGBASE>>=0

    (with ">=").

    In ancient versions of GODI it was required to add a path to a
    dependency, e.g. "godi-foo>=3.14:../../godi/godi-foo". Such 
    paths are now ignored.

BUILD_DEPENDS (w)
    Enumerates the build dependencies on other packages, i.e. it
    enumerates other packages that must be present when this package
    is built.

    The format is the same as for DEPENDS.

CONFLICTS (w)
    Enumerates conflicts with other packages or package versions.
    The syntax is simply

    <PKGBASE><OPERATOR><VERSION>

    i.e. _without_ the colon and the directory!

    This variable should only be set if godi_console supports it.
    Use a test like

    .ifdef GODI_CONSOLE_SUPPORTS_CONFLICTS
    CONFLICTS=...
    .endif

MASTER_SITES (w)
    URLs of directories where to download the DISTFILES. The URLs must
    end with a slash.

MASTER_URLS (w)
    (since godi-tools-3.0.38)
    full URLs where to download the files (i.e. the URL refers to the
    file directly and not to the directory containing it like MASTER_SITES).
    This can be used instead of MASTER_SITES, especially if the URLs don't
    contain the right filename.

PATCH_SITES (w)
    URLs where to download the PATCHFILES. The URLs must
    end with a slash.

SELF_UPDATE_PKG (pw)
    Used internally by GODI to signal that an alternate
    installation method must be used.

======================================================================
Variables controlling the build
======================================================================

These variables are per package.

HAS_CONFIGURE (w)
	If defined, the configure script must be called

GNU_CONFIGURE (w)
	If defined, the configure script must be called, and it can be
	assumed that it is a GNU autoconf-style script

CONFIGURE_ENV (w) 
	The environment to use for "configure". The format
	of this variable is a space-separated list of NAME=VALUE
	strings that can be parsed by the shell. By
	default, a lot of variables are already defined. To add
	variables, use this syntax:

	CONFIGURE_ENV += MYVAR=${MYVAR:Q}

	(The :Q modifier enables shell quoting.)

CONFIGURE_GETS_ESSENTIALS (w)
	If "yes", a number of additional variables are added to
	CONFIGURE_ENV, in particular these of ESSENTIAL_ENV.

CONFIGURE_SCRIPT (w)
	The name of the configure script to call. Defaults to
	"configure".

CONFIGURE_ARGS (w)
	Arguments passed to the configure script.

CONFIGURE_DIRS (w)
	Enumerates the directories where "configure" is to be invoked.
	By default, only the WRKSRC directory is taken.

USE_GMAKE (w)
	When defined, GNU make is used to build/install the package; otherwise
	BSD make is used

USE_OMAKE (w)
	When defined, omake is used to build/install the package; otherwise
	BSD make is used

MAKE_PROGRAM (r)
	The selected version of the "make" utility

MAKE_ENV (w)
	The environment to use when "make" is called to build/install the
	package. The format of this variable is a space-separated list of
	NAME=VALUE strings that can be parsed by the shell. By
	default, a lot of variables are already defined. To add
	variables, use this syntax:

	MAKE_ENV += MYVAR=${MYVAR:Q}

	(The :Q modifier enables shell quoting.)

MAKE_GETS_ESSENTIALS (w)
	If "yes", a number of additional variables are added to
	MAKE_ENV, in particular these of ESSENTIAL_ENV.

MAKE_FLAGS (w)
	Arguments passed to "make" when it is called to build/install the
	package.

	Att: There is also MAKEFLAGS, but this has a different meaning.

MAKEFILE (w)
	The name of the makefile when "make" is called to build/install the
	package. Defaults to "Makefile".

ALL_TARGET (w)
	The "make" target to build the package. Defaults to "all"

BUILD_SCRIPT (w)
        The complete command to run for building. By default, 
        MAKE_PROGRAM is invoked with an ALL_TARGET.
        (Since godi-tools-3.0.19.)

BUILD_DIRS (w)
	Enumerates the directories where ALL_TARGET is invoked.
	By default WRKSRC.

        (By setting this to the empty string you can disable the build.)

TEST_SCRIPT (w)
        The complete command to run for testing. By default, 
        MAKE_PROGRAM is invoked with a TEST_TARGET.
        (Since godi-tools-3.0.19.)

TEST_TARGET (w)
	The "make" target to test the package. This is not defined
	by default, and no test is done. To enable tests, one must
	also set PKGSRC_RUN_TEST.

TEST_DIRS (w)
	Enumerates the directories where TEST_TARGET is invoked.
	By default WRKSRC.

INSTALL_TARGET (w)
	The "make" target to install the package. Defaults to
	"install"

INSTALL_SCRIPT (w)
        The complete command to run for installing. By default, 
        MAKE_PROGRAM is invoked with an INSTALL_TARGET.
        (Since godi-tools-3.0.19.)

INSTALL_DIRS (w)
	Enumerates the directories where INSTALL_TARGET is invoked.
	By default WRKSRC.

        (By setting this to the empty string you can disable the install.)

UNLIMIT_RESOURCES (w)
	When defined, resource restrictions are removed (ulimit)
	before a package is built

PROVIDE_FINDLIB (w)
        If set, it is checked at installation time whether these
        findlib libraries already exist, and if so, the installation
        is rejected.

        Set this to a space-separated list of findlib libraries.

        (Since godi-tools-3.0.19.)

======================================================================
OASIS builds
======================================================================

For supporting OASIS conventions:

OASIS (w)
        if set to "yes", a number of variables are set to different
        defaults:

        HAS_CONFIGURE=yes
        CONFIGURE_SCRIPT=ocaml setup.ml -configure
        BUILD_SCRIPT=ocaml setup.ml -build && ocaml setup.ml -doc
        INSTALL_SCRIPT=ocaml setup.ml -install

        Also, CONFIGURE_ARGS are filled with arguments like --prefix.
        The option --destdir is also passed, and AUTOGENERATE_PLIST 
        is set (i.e. the oasis package MUST interpret --destdir).

        (Since godi-tools-3.0.19.)

OASIS_SETUP (w)
	If set to "yes", CONFIGURE_SCRIPT is initialized differently.
	In particular, setup.ml is regenerated by calling the
	"oasis" program. According to Sylvain this is recommended,
	and hence this option defaults to "yes".

	(Since godi-tools-3.0.27.)

======================================================================
Autogenerated PLISTs
======================================================================

Some packages have the option to install into a prefix. This is
can be exploited:

AUTOGENERATE_PLIST (w):
        If set, it is expected that the package install into a
        subdirectory of ${WRKDIR}/image. The files found there
        are collected, and a PLIST is autogenerated.

AUTOGENERATE_IMAGE (w):
        Set this to the subdirectory of ${WRKDIR}/image that
        corresponds to ${LOCALBASE} in the final install.

        Defaults to ${WRKDIR}/image.

        (Since godi-tools-3.0.19. Before, PLIST autogeneration always
        acted as if AUTOGENERATE_IMAGE=${WRKDIR}/image.)


======================================================================
Variables controlling details of the build
======================================================================

--- traditional toolchain control ---

CC (c)
        The name/path of the C compiler. This should be the same C
        compiler that is invoked by the ocaml toolchain, and hence
        it MUST be already set at bootstrap time.

        Do so by: CC=<value> ./bootstrap <args>

        The value of CC is saved in godi.conf. There is no default if
        it is left unset.

CPP (cw)
        The name/path of the C++ compiler

CFLAGS (cw)
        Additional flags to pass to the C compiler. This variable
        is only honoured by "traditional" builds. If the C compiler
        is invoked via "ocamlc", CFLAGS is ignored by default, unless
        the option -ccopt "$(CFLAGS)" is added.

CPPFLAGS (cw)
        Additional flags to pass to the C++ compiler

LDFLAGS (cw)
        Additional flags for the linking step. GODI sets this by
        default to "-L $(LOCALBASE)/lib".


======================================================================
Site patches
======================================================================

These patches are provided by the site using GODI, and are applied to
packages when they are built.

LOCALPATCHES (c)
	The variable must contain the base directory for site
	patches. The site patches for package cat-foo are then found
         in the directory $LOCALPATCHES/cat/cat-foo (here, cat is the
         package category like "apps", or "godi", and foo is a
         placeholder for the name). For example, the patches for
         godi-ocamlnet would be expected in $LOCALPATCHES/godi/godi-ocamlnet.
	The patches in this directory are handled as if they were in
	the "patches" directory of the build directory. The patch files
	should obey the name convention "patch-LL-SUFFIX" where
	LL are two letters specifying the order in which all packages
	are applied (i.e. in alphebetical order). SUFFIX is an
	arbitrary suffix, usually describing the patched file.
	Patches should be in unified form (produced with
	diff -Naur); file names must be relative to the
	source directory ($WRKSRC), i.e. create patches with

	cd $WRKSRC
	diff -Naur file ... >$LOCALPATCHES/cat/cat-foo/patch-LL-SUFFIX

	Pitfall: Don't leave files ending in ~ in this directory,
	they are also treated as patch.

        Since Skylift, it is now easy to create patches. See the
        User's Manual for instructions.

======================================================================
Exports
======================================================================

EXPORT_DESTDIR (c)
        The directory where exports are placed.

EXPORT_BUILDFILES (c)
        The directory where buildfile exports are placed.
        (Default: $(EXPORT_DESTDIR)/buildfiles)
        
EXPORT_DISTFILES (c)
        The directory where distfile exports are placed.
        (Default: $(EXPORT_DESTDIR)/distfiles)

EXPORT_PROFILES (c)
        The directory where profile exports are placed.
        (Default: $(EXPORT_DESTDIR)/profiles)

EXPORT_PACKAGES (c)
        The directory where binary package exports are placed.
        (Default: $(EXPORT_DESTDIR)/packages)

EXPORT_SEEDS (c)
        The directory where seed exports are placed.
        (Default: $(EXPORT_DESTDIR)/seeds)
        
EXPORT_SECTION (c)
        The GODI_SECTION assumed for the exported objects
        (Default: $(GODI_SECTION)

EXPORT_SOURCE (c)
        The source name of the export

EXPORT_PROFILE_NAME (c)
        The profile name of the export
        (Default: current profile name)

======================================================================
Debugging
======================================================================

PKG_DEBUG_LEVEL (special)
	The value 0 means that no debugging output is generated.
	The value 1 means that shell commands are echoed before they
	are called.
	The value 2 means that the shell is even called with "-x"
	flag to echo even more commands.

	This variable should be set on the command line, e.g.
	godi_make build PKG_DEBUG_LEVEL=2

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml