1 # dpkg manual page - dpkg-buildtree(1)
3 # Copyright © 2023 Guillem Jover <guillem@debian.org>
5 # This is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <https://www.gnu.org/licenses/>.
22 dpkg-buildtree - helper for build tree operations during package builds
26 B<dpkg-buildtree> [I<option>...] [I<command>]
30 B<dpkg-buildtree> is a tool to perform common operations on the build tree
33 This program was introduced in dpkg 1.22.3.
41 Removes all artifacts generated during a build by the various dpkg tools,
42 and pathnames used or controlled by dpkg tools that are safe to clean.
43 These files are used to track state between package build runs,
44 and are in many cases internal implementation details the packager should
45 not be concerned about,
46 or are staging directories containing build artifacts.
50 Show the usage message and exit.
54 Show the version and exit.
65 The currently accepted values are: B<auto> (default), B<always> and
70 If set, it will be used to decide whether to activate Native Language Support,
71 also known as internationalization (or i18n) support.
72 The accepted values are: B<0> and B<1> (default).
84 =item F<debian/files.new>
86 Files generated by L<dpkg-distaddfile(1)>.
88 =item F<debian/substvars>
90 =item F<debian/substvars.new>
92 Files generated by L<dpkg-shlibdeps(1)>.
96 Staging directory containing the contents to be used when creating a package.
97 Both L<dpkg-gencontrol(1)> and L<dpkg-gensymbols(1)> generate files within.
103 =head2 Usage in debian/rules
105 You can call B<dpkg-buildtree clean> from the F<debian/rules> B<clean> target,
106 after having performed other necessary cleanups.
108 For example for an autoconf-like build system:
113 [ ! -f Makefile ] || $(MAKE) distclean