2 Author: Russ Allbery <rra@debian.org>
6 Info: Check targets and actions in debian/rules.
9 Tag: debian-rules-is-symlink
12 Info: The file <tt>debian/rules</tt> is a symlink instead of a regular
13 file. This is unnecessary and makes package checking and manipulation
14 more difficult. If the rules file should be available in the source
15 package under multiple names, make <tt>debian/rules</tt> the real
16 file and the other names symlinks to it.
18 This problem may have prevented lintian from performing other checks,
19 leading to undetected changelog errors.
21 Tag: debian-rules-not-a-makefile
25 Info: The <tt>debian/rules</tt> file for this package does not appear to
26 be a makefile or does not start with the required line.
27 <tt>debian/rules</tt> must be a valid makefile and must have
28 "<tt>#!/usr/bin/make -f</tt>" as its first line.
30 Tag: debian-rules-missing-required-target
34 Info: The <tt>debian/rules</tt> file for this package does not provide one
35 of the required targets. All of build, binary, binary-arch,
36 binary-indep, and clean must be provided, even if they don't do anything
39 Tag: debian-rules-uses-pwd
42 Info: The <tt>debian/rules</tt> file for this package appears to use the
43 variable $(PWD) to refer to the current directory. This variable is not
44 set by GNU make and therefore will have whatever value it has in the
45 environment, which may not be the actual current directory. Some ways of
46 building Debian packages (such as through sudo) will clear the PWD
49 Instead of $(PWD), use $(CURDIR), which is set by GNU make, ignores the
50 environment, and is guaranteed to always be set.
52 Tag: debian-rules-ignores-make-clean-error
55 Info: A rule in the <tt>debian/rules</tt> file for this package calls the
56 package's clean or distclean target with a line like:
62 The leading "-" or the option -i tells make to ignore all errors.
63 Normally this is done for packages using Autoconf since Makefile may not
64 exist. However, this line ignores all other error messages, not just
65 the missing Makefile error. It's better to use:
67 [ ! -f Makefile ] || $(MAKE) distclean
69 so that other error messages from the clean or distclean rule will still
70 be caught (or just remove the "-" if the package uses a static makefile).
72 Tag: debian-rules-uses-DEB_BUILD_OPTS
75 Info: The standard environment variable for build options is
76 DEB_BUILD_OPTIONS. Usually, referring to DEB_BUILD_OPTS is a mistake and
77 DEB_BUILD_OPTIONS was intended instead.
79 Tag: debian-rules-sets-DH_COMPAT
83 Info: As of debhelper version 4, the DH_COMPAT environment variable is
84 only to be used for temporarily overriding <tt>debian/compat</tt>. Any
85 line in <tt>debian/rules</tt> that sets it globally should be deleted and
86 a separate <tt>debian/compat</tt> file created if needed.
88 Tag: binary-arch-rules-but-pkg-is-arch-indep
91 Info: It looks like you try to run code in the binary-arch target of
92 <tt>debian/rules</tt>, even though your package is architecture-
95 Tag: debian-rules-calls-debhelper-in-odd-order
98 Info: One of the targets in the <tt>debian/rules</tt> file for this
99 package calls debhelper programs in an odd order. Normally,
100 dh_makeshlibs should be called before dh_shlibdeps or dh_installdeb,
101 dh_shlibdeps should be called before dh_gencontrol, and all should be
102 called before dh_builddeb. Calling them in the wrong order may cause
103 incorrect or missing package files and metadata.