The autotools are providing a suite of utilities allowing the developer to configure the source code during compilation specifically to ease packaging.
One of the capabilities is the definition of several installation directory variables set during compilation and which avoids making assumptions on where the application is to be installed.
For example:
Variable | Default |
---|---|
prefix |
/usr/local |
datarootdir |
${prefix}/share |
sysconfdir |
${prefix}/etc |
localstatedir |
${prefix}/var |
... |
How to mimic this behavior in Rust at compile time? Is there any existing standard or best practices for such need?
I'd like to make use of system paths but without having them fully hard-coded and allowing the packager to customize part of it.