.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "dpkg-buildtree 1" .TH dpkg-buildtree 1 2026-03-06 1.23.7-dirty "dpkg suite" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME dpkg\-buildtree \- helper for build tree operations during package builds .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBdpkg\-buildtree\fR [\fIoption\fR...] [\fIcommand\fR] .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBdpkg\-buildtree\fR is a tool to perform common operations on the build tree for a source package. .PP This program was introduced in dpkg 1.22.3. .SH COMMANDS .IX Header "COMMANDS" .IP \fBclean\fR 4 .IX Item "clean" Removes all artifacts generated during a build by the various dpkg tools, and pathnames used or controlled by dpkg tools that are safe to clean. These files are used to track state between package build runs, and are in many cases internal implementation details the packager should not be concerned about, or are staging directories containing build artifacts. .IP \fBis\-rootless\fR 4 .IX Item "is-rootless" Checks whether the build tree can be built with no root privileges (since dpkg 1.22.12). .Sp This command can be used safely even with versions where the command was not yet available as the default will then be the historic one where root was required. .IP \fB\-\-help\fR 4 .IX Item "--help" Show the usage message and exit. .IP \fB\-\-version\fR 4 .IX Item "--version" Show the version and exit. .SH ENVIRONMENT .IX Header "ENVIRONMENT" .IP \fBDPKG_COLORS\fR 4 .IX Item "DPKG_COLORS" Sets the color mode. The currently accepted values are: \fBauto\fR (default), \fBalways\fR and \&\fBnever\fR. .IP \fBDPKG_NLS\fR 4 .IX Item "DPKG_NLS" If set, it will be used to decide whether to activate Native Language Support, also known as internationalization (or i18n) support. The accepted values are: \fB0\fR and \fB1\fR (default). .SH FILES .IX Header "FILES" .SS "Cleaned files" .IX Subsection "Cleaned files" .IP \fIdebian/files\fR 4 .IX Item "debian/files" .PD 0 .IP \fIdebian/files.new\fR 4 .IX Item "debian/files.new" .PD Files generated by \fBdpkg\-distaddfile\fR\|(1). .IP \fIdebian/substvars\fR 4 .IX Item "debian/substvars" .PD 0 .IP \fIdebian/substvars.new\fR 4 .IX Item "debian/substvars.new" .PD Files generated by \fBdpkg\-shlibdeps\fR\|(1). .IP \fIdebian/tmp\fR 4 .IX Item "debian/tmp" Staging directory containing the contents to be used when creating a package. Both \fBdpkg\-gencontrol\fR\|(1) and \fBdpkg\-gensymbols\fR\|(1) generate files within. .SH EXAMPLES .IX Header "EXAMPLES" .SS "Usage in debian/rules" .IX Subsection "Usage in debian/rules" You can call \fBdpkg\-buildtree clean\fR from the \fIdebian/rules\fR \fBclean\fR target, after having performed other necessary cleanups. .PP For example for an autoconf\-like build system: .Sp .Vb 3 \& clean: \& [ ! \-f Makefile ] || $(MAKE) distclean \& dpkg\-buildtree clean .Ve