mesonbuild/meson

Add support for runstatedir

Open

#4,141 opened on Sep 8, 2018

View on GitHub
 (6 comments) (4 reactions) (0 assignees)Python (4,978 stars) (1,465 forks)batch import
good first issue

Description

Newer autotools versions have support for runstatedir which is typically set to /run. While /run is not officially part of the FHS, all linux distros I know use and support that nowadays. From the autotools documentation at https://www.gnu.org/prep/standards/html_node/Directory-Variables.html

‘runstatedir’

    The directory for installing data files which the programs modify while they run, that pertain to one 
specific machine, and which need not persist longer than the execution of the program—which is 
generally long-lived, for example, until the next reboot. PID files for system daemons are a typical use. 
In addition, this directory should not be cleaned except perhaps at reboot, while the general /tmp 
(TMPDIR) may be cleaned arbitrarily. This should normally be /var/run, but write it as 
$(localstatedir)/run. Having it as a separate variable allows the use of /run if desired, for example. (If 
you are using Autoconf 2.70 or later, write it as ‘@runstatedir@’.) 

While individual projects could introduce a -Drunstatedir option, it would be better if meson provided first class support for setting this directory, similar to --libdir. I would suggest choosing the same name as autotools, i.e. --runstatedir

Contributor guide