mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
Fix indentation
This commit is contained in:
parent
2ce6e4218a
commit
61ff24a51d
1 changed files with 57 additions and 57 deletions
114
meson.build
114
meson.build
|
|
@ -93,66 +93,66 @@ conf_data.set10('HAVE_TRAY', have_tray)
|
||||||
|
|
||||||
scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages'))
|
scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages'))
|
||||||
if scdoc.found()
|
if scdoc.found()
|
||||||
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
|
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
|
||||||
sh = find_program('sh', native: true)
|
sh = find_program('sh', native: true)
|
||||||
mandir = get_option('mandir')
|
mandir = get_option('mandir')
|
||||||
man_files = {
|
man_files = {
|
||||||
'sway': [
|
'sway': [
|
||||||
'sway.1.scd',
|
'sway.1.scd',
|
||||||
'sway.5.scd',
|
'sway.5.scd',
|
||||||
'sway-bar.5.scd',
|
'sway-bar.5.scd',
|
||||||
'sway-input.5.scd',
|
'sway-input.5.scd',
|
||||||
'sway-ipc.7.scd',
|
'sway-ipc.7.scd',
|
||||||
'sway-output.5.scd'
|
'sway-output.5.scd'
|
||||||
],
|
],
|
||||||
'swaybar': [
|
'swaybar': [
|
||||||
'swaybar-protocol.7.scd'
|
'swaybar-protocol.7.scd'
|
||||||
],
|
],
|
||||||
'swaymgs': [
|
'swaymgs': [
|
||||||
'swaymsg.1.scd'
|
'swaymsg.1.scd'
|
||||||
],
|
],
|
||||||
'swaynag': [
|
'swaynag': [
|
||||||
'swaynag.1.scd',
|
'swaynag.1.scd',
|
||||||
'swaynag.5.scd'
|
'swaynag.5.scd'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
locales = ['en']
|
locales = ['en']
|
||||||
|
|
||||||
foreach proj, sources: man_files
|
foreach proj, sources: man_files
|
||||||
foreach locale: locales
|
foreach locale: locales
|
||||||
if locale == 'en'
|
if locale == 'en'
|
||||||
docdir = mandir
|
docdir = mandir
|
||||||
projdir = join_paths(meson.source_root(), proj, 'doc')
|
projdir = join_paths(meson.source_root(), proj, 'doc')
|
||||||
outdir = join_paths(meson.build_root(), 'doc')
|
outdir = join_paths(meson.build_root(), 'doc')
|
||||||
else
|
else
|
||||||
docdir = join_paths(mandir, locale)
|
docdir = join_paths(mandir, locale)
|
||||||
projdir = join_paths(meson.source_root(), proj, 'doc', locale)
|
projdir = join_paths(meson.source_root(), proj, 'doc', locale)
|
||||||
outdir = join_paths(meson.build_root(), 'doc', locale)
|
outdir = join_paths(meson.build_root(), 'doc', locale)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Checks if locale dir exists before proceeding with scdoc compilation
|
# Checks if locale dir exists before proceeding with scdoc compilation
|
||||||
if run_command('[', '-d', projdir, ']').returncode() == 0
|
if run_command('[', '-d', projdir, ']').returncode() == 0
|
||||||
if run_command('[', '-d', outdir, ']').returncode() != 0
|
if run_command('[', '-d', outdir, ']').returncode() != 0
|
||||||
if run_command('mkdir', outdir).returncode() != 0
|
if run_command('mkdir', outdir).returncode() != 0
|
||||||
warning('Failed to create directory at: @0@'.format(outdir))
|
warning('Failed to create directory at: @0@'.format(outdir))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach filename: sources
|
foreach filename: sources
|
||||||
input = join_paths(projdir, filename)
|
input = join_paths(projdir, filename)
|
||||||
if run_command('[', '-e', input, ']').returncode() == 0
|
if run_command('[', '-e', input, ']').returncode() == 0
|
||||||
topic = input.split('.')[-3].split('/')[-1]
|
topic = input.split('.')[-3].split('/')[-1]
|
||||||
section = input.split('.')[-2]
|
section = input.split('.')[-2]
|
||||||
output = '@0@/@1@.@2@'.format(outdir, topic, section)
|
output = '@0@/@1@.@2@'.format(outdir, topic, section)
|
||||||
cmd = '@0@ < @1@ > @2@'.format(scdoc_prog.path(), input, output)
|
cmd = '@0@ < @1@ > @2@'.format(scdoc_prog.path(), input, output)
|
||||||
if run_command(sh, '-c', cmd).returncode() == 0
|
if run_command(sh, '-c', cmd).returncode() == 0
|
||||||
install_data(output, install_dir: docdir)
|
install_data(output, install_dir: docdir)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')
|
add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue