mesonbuild/meson

Add support for runstatedir

Open

#4141 aperta il 8 set 2018

Vedi su GitHub
 (6 commenti) (4 reazioni) (0 assegnatari)Python (1465 fork)batch import
good first issue

Metriche repository

Star
 (4978 star)
Metriche merge PR
 (Merge medio 139g 13h) (51 PR mergiate in 30 g)

Descrizione

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

Guida contributor