Package: debhelper
Version: 13.11.4

Currently `dh_install` for makefile-based project sets the `DESTDIR` variable only.

(See <https://salsa.debian.org/debian/debhelper/-/blob/3d91b51f/lib/Debian/Debhelper/Buildsystem/makefile.pm#L192-194>.)

According to the GNU guidelines there are other standard variables that an installer should set, the most important of which is `prefix=`.

From <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>:

> "prefix"
>
>    A prefix used in constructing the default values of the variables
>  listed below. The default value of prefix should be `/usr/local` […]

and

> Installers are expected to override these values when calling
> make (e.g., make prefix=/usr install)

A code search shows that setting `prefix=` and `sysconfdir=` is quite common in `d/rules` files:

https://codesearch.debian.net/search?q=%5B%5E-%5Dprefix%3D%2Fusr+path%3Adebian%2Frules&literal=0&perpkg=1

Given that debhelper sets `DESTDIR`, couldn't it also set `prefix` and all other common makefile variables, just like it does for autoconf-based projects (see <https://salsa.debian.org/debian/debhelper/-/blob/main/lib/Debian/Debhelper/Buildsystem/autoconf.pm#L36-41>)?

Regards,

--
Gioele Barabucci

Reply via email to