Merge pull request #3178 from progandy/sysconfdir

Meson: Fix SYSCONFDIR definition
This commit is contained in:
emersion 2018-11-24 08:06:25 +01:00 committed by GitHub
commit d9ed1f080b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,13 +108,7 @@ if scdoc.found()
endforeach endforeach
endif endif
# If prefix is '/usr', sysconfdir will be explicitly set to '/etc' by Meson to add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')
# enforce FHS compliance, so we should look for configs there as well.
if prefix == '/usr'
add_project_arguments('-DSYSCONFDIR="/@0@"'.format(sysconfdir), language : 'c')
else
add_project_arguments('-DSYSCONFDIR="/@0@/@1@"'.format(prefix, sysconfdir), language : 'c')
endif
version = get_option('sway-version') version = get_option('sway-version')
if version != '' if version != ''
@ -159,14 +153,7 @@ subdir('swaylock')
config = configuration_data() config = configuration_data()
config.set('datadir', join_paths(prefix, datadir)) config.set('datadir', join_paths(prefix, datadir))
config.set('prefix', prefix) config.set('prefix', prefix)
config.set('sysconfdir', join_paths(prefix, sysconfdir))
# If prefix is '/usr', sysconfdir will be explicitly set to '/etc' by Meson to
# enforce FHS compliance, so we should look for configs there as well.
if prefix == '/usr'
config.set('sysconfdir', sysconfdir)
else
config.set('sysconfdir', join_paths(prefix, sysconfdir))
endif
configure_file( configure_file(
configuration: config, configuration: config,