Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   debhelper    ( 7 )

набор инструментов debhelper (the debhelper tool suite)

BUILD SYSTEM OPTIONS

The following command line options are supported by all of the
       dh_auto_* debhelper programs. These programs support a variety of
       build systems, and normally heuristically determine which to use,
       and how to use them.  You can use these command line options to
       override the default behavior.  Typically these are passed to
       dh(1), which then passes them to all the dh_auto_* programs.

-Sbuildsystem, --buildsystem=buildsystem Force use of the specified buildsystem, instead of trying to auto-select one which might be applicable for the package.

Pass none as buildsystem to disable auto-selection.

-Ddirectory, --sourcedir=directory, --sourcedirectory=directory Assume that the original package source tree is at the specified directory rather than the top level directory of the Debian source package tree.

Warning: The --sourcedir variant matches a similar named option in dh_install and dh_missing (etc.) for historical reasons. While they have a similar name, they have very distinct purposes and in some cases it can cause errors when this variant is passed to dh (when then passes it on to all tools).

-B[directory], --builddir[=directory], --builddirectory[=directory] Enable out of source building and use the specified directory as the build directory. If directory parameter is omitted, a default build directory will be chosen.

If this option is not specified, building will be done in source by default unless the build system requires or prefers out of source tree building. In such a case, the default build directory will be used even if --builddirectory is not specified.

If the build system prefers out of source tree building but still allows in source building, the latter can be re-enabled by passing a build directory path that is the same as the source directory path.

--parallel, --no-parallel Control whether parallel builds should be used if underlying build system supports them. The number of parallel jobs is controlled by the DEB_BUILD_OPTIONS environment variable ("Debian Policy, section 4.9.1") at build time. It might also be subject to a build system specific limit.

If neither option is specified, debhelper currently defaults to --parallel in compat 10 (or later) and --no-parallel otherwise.

As an optimization, dh will try to avoid passing these options to subprocesses, if they are unnecessary and the only options passed. Notably this happens when DEB_BUILD_OPTIONS does not have a parallel parameter (or its value is 1).

--max-parallel=maximum This option implies --parallel and allows further limiting the number of jobs that can be used in a parallel build. If the package build is known to only work with certain levels of concurrency, you can set this to the maximum level that is known to work, or that you wish to support.

Notably, setting the maximum to 1 is effectively the same as using --no-parallel.

--reload-all-buildenv-variables By default, dh(1) will compute several environment (e.g. by using dpkg-buildflags(1)) and cache them to avoid having all dh_auto_* tool recompute them.

When passing this option, the concrete dh_auto_* tool will ignore the cache from dh(1) and retrigger a rebuild of these variables. This is useful in the very rare case where the package need to do multiple builds but with different ...FLAGS options. A concrete example would be needing to change the -O parameter in CFLAGS in the second build:

export DEB_CFLAGS_MAINT_APPEND=-O3

%: dh $@

override_dh_auto_configure: dh_auto_configure -Bbuild-deb ... DEB_CFLAGS_MAINT_APPEND=-Os dh_auto_configure \ --reload-all-buildenv-variables -Bbuild-udeb ...

Without --reload-all-buildenv-variables in the second call to dh_auto_configure(1), the change in DEB_CFLAGS_MAINT_APPEND would be ignored as dh_auto_configure(1) would use the cached value of CFLAGS set by dh(1).

This option is only available with debhelper (>= 12.7~) when the package uses compatibility level 9 or later.

--list, -l List all build systems supported by debhelper on this system. The list includes both default and third party build systems (marked as such). Also shows which build system would be automatically selected, or which one is manually specified with the --buildsystem option.