meson: reindent all files with 8 spaces

The indentation for emacs'es meson-mode is added .dir-locals.

All files are reindented automatically, using the lasest meson-mode from git.
Indentation should now be fairly consistent.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-04-17 19:25:00 -04:00
parent 0a76b0e8a2
commit 37efbbd821
45 changed files with 4063 additions and 4138 deletions

View File

@@ -20,4 +20,5 @@
(eval . (c-set-offset 'arglist-intro '++))
(eval . (c-set-offset 'arglist-close 0))))
(nxml-mode . ((nxml-child-indent . 2)
(fill-column . 119))))
(fill-column . 119)))
(meson-mode . ((meson-indent-basic . 8))))

View File

@@ -1,17 +1,15 @@
# -*- mode: meson -*-
in_files = '''
systemd.bg.catalog
systemd.be.catalog
systemd.be@latin.catalog
systemd.fr.catalog
systemd.it.catalog
systemd.pl.catalog
systemd.pt_BR.catalog
systemd.ru.catalog
systemd.zh_CN.catalog
systemd.zh_TW.catalog
systemd.catalog
systemd.bg.catalog
systemd.be.catalog
systemd.be@latin.catalog
systemd.fr.catalog
systemd.it.catalog
systemd.pl.catalog
systemd.pt_BR.catalog
systemd.ru.catalog
systemd.zh_CN.catalog
systemd.zh_TW.catalog
systemd.catalog
'''.split()
support_url = get_option('support-url')
@@ -19,12 +17,12 @@ support_sed = 's~%SUPPORT_URL%~@0@~'.format(support_url)
build_catalog_dir = meson.current_build_dir()
foreach file : in_files
custom_target(
file,
input : file + '.in',
output: file,
command : [sed, support_sed, '@INPUT@'],
capture : true,
install : true,
install_dir : catalogdir)
custom_target(
file,
input : file + '.in',
output: file,
command : [sed, support_sed, '@INPUT@'],
capture : true,
install : true,
install_dir : catalogdir)
endforeach

View File

@@ -1,8 +1,6 @@
# -*- mode: meson -*-
file = configure_file(
input : 'README.in',
output : 'README',
configuration : substs)
input : 'README.in',
output : 'README',
configuration : substs)
install_data(file,
install_dir : sysvinit_path)

View File

@@ -1,8 +1,6 @@
# -*- mode: meson -*-
file = configure_file(
input : 'README.in',
output : 'README',
configuration : substs)
input : 'README.in',
output : 'README',
configuration : substs)
install_data(file,
install_dir : varlogdir)

View File

@@ -1,39 +1,37 @@
# -*- mode: meson -*-
hwdb_files = files('''
20-pci-vendor-model.hwdb
20-pci-classes.hwdb
20-usb-vendor-model.hwdb
20-usb-classes.hwdb
20-sdio-vendor-model.hwdb
20-sdio-classes.hwdb
20-bluetooth-vendor-product.hwdb
20-acpi-vendor.hwdb
20-OUI.hwdb
20-net-ifname.hwdb
60-evdev.hwdb
60-keyboard.hwdb
60-sensor.hwdb
70-mouse.hwdb
70-pointingstick.hwdb
70-touchpad.hwdb
20-pci-vendor-model.hwdb
20-pci-classes.hwdb
20-usb-vendor-model.hwdb
20-usb-classes.hwdb
20-sdio-vendor-model.hwdb
20-sdio-classes.hwdb
20-bluetooth-vendor-product.hwdb
20-acpi-vendor.hwdb
20-OUI.hwdb
20-net-ifname.hwdb
60-evdev.hwdb
60-keyboard.hwdb
60-sensor.hwdb
70-mouse.hwdb
70-pointingstick.hwdb
70-touchpad.hwdb
'''.split())
if conf.get('ENABLE_HWDB', 0) == 1
install_data(hwdb_files,
install_dir : udevhwdbdir)
install_data(hwdb_files,
install_dir : udevhwdbdir)
meson.add_install_script('sh', '-c',
mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
meson.add_install_script('sh', '-c',
mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
meson.add_install_script('sh', '-c',
'test -n "$DESTDIR" || @0@/systemd-hwdb update'
.format(rootbindir))
meson.add_install_script('sh', '-c',
'test -n "$DESTDIR" || @0@/systemd-hwdb update'
.format(rootbindir))
endif
############################################################
custom_target(
'update',
output : 'update',
command : [hwdb_update_sh, meson.current_source_dir()])
'update',
output : 'update',
command : [hwdb_update_sh, meson.current_source_dir()])

View File

@@ -1,5 +1,3 @@
# -*- mode: meson -*-
# This is lame, I know, but meson has no other include mechanism
subdir('rules')
@@ -14,123 +12,122 @@ want_man = want_man != 'false' and xsltproc.found()
want_html = want_html != 'false' and xsltproc.found()
xsltproc_flags = [
'--nonet',
'--xinclude',
'--stringparam', 'man.output.quietly', '1',
'--stringparam', 'funcsynopsis.style', 'ansi',
'--stringparam', 'man.authors.section.enabled', '0',
'--stringparam', 'man.copyright.section.enabled', '0',
'--stringparam', 'systemd.version', '@0@'.format(meson.project_version()),
'--path',
'@0@:@1@'.format(meson.current_build_dir(), meson.current_source_dir())]
'--nonet',
'--xinclude',
'--stringparam', 'man.output.quietly', '1',
'--stringparam', 'funcsynopsis.style', 'ansi',
'--stringparam', 'man.authors.section.enabled', '0',
'--stringparam', 'man.copyright.section.enabled', '0',
'--stringparam', 'systemd.version', '@0@'.format(meson.project_version()),
'--path',
'@0@:@1@'.format(meson.current_build_dir(), meson.current_source_dir())]
custom_man_xsl = files('custom-man.xsl')
custom_html_xsl = files('custom-html.xsl')
xslt_cmd = [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags
custom_entities_ent = configure_file(
input : 'custom-entities.ent.in',
output : 'custom-entities.ent',
configuration : conf)
input : 'custom-entities.ent.in',
output : 'custom-entities.ent',
configuration : conf)
man_pages = []
html_pages = []
source_xml_files = []
foreach tuple : manpages
stem = tuple[0]
section = tuple[1]
aliases = tuple[2]
condition = tuple[3]
stem = tuple[0]
section = tuple[1]
aliases = tuple[2]
condition = tuple[3]
xml = stem + '.xml'
html = stem + '.html'
man = stem + '.' + section
xml = stem + '.xml'
html = stem + '.html'
man = stem + '.' + section
manaliases = []
htmlaliases = []
foreach alias : aliases
manaliases += [alias + '.' + section]
htmlaliases += [alias + '.html']
endforeach
manaliases = []
htmlaliases = []
foreach alias : aliases
manaliases += [alias + '.' + section]
htmlaliases += [alias + '.html']
endforeach
mandirn = join_paths(get_option('mandir'), 'man' + section)
mandirn = join_paths(get_option('mandir'), 'man' + section)
have = condition == '' or conf.get(condition, 0) == 1
if condition == '' or conf.get(condition, 0) == 1
p1 = custom_target(
man,
input : xml,
output : [man] + manaliases,
command : xslt_cmd + [custom_man_xsl, '@INPUT@'],
depend_files : custom_entities_ent,
install : want_man,
install_dir : mandirn)
man_pages += [p1]
if have
p1 = custom_target(
man,
input : xml,
output : [man] + manaliases,
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_man_xsl, '@INPUT@'],
depend_files : custom_entities_ent,
install : want_man,
install_dir : mandirn)
man_pages += [p1]
p2 = custom_target(
html,
input : xml,
output : [html] + htmlaliases,
command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
depend_files : custom_entities_ent,
install : want_html,
install_dir : join_paths(docdir, 'html'))
html_pages += [p2]
p2 = custom_target(
html,
input : xml,
output : [html] + htmlaliases,
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_html_xsl, '@INPUT@'],
depend_files : custom_entities_ent,
install : want_html,
install_dir : join_paths(docdir, 'html'))
html_pages += [p2]
source_xml_files += files(tuple[0] + '.xml')
else
message('Skipping @0@.@1@ because @2@ is @3@'.format(stem, section, condition, have))
endif
source_xml_files += files(tuple[0] + '.xml')
else
message('Skipping @0@.@1@ because @2@ is false'.format(stem, section, condition))
endif
endforeach
############################################################
have_lxml = run_command(xml_helper_py).returncode() == 0
if not have_lxml
message('python-lxml not available, not making man page indices')
message('python-lxml not available, not making man page indices')
endif
systemd_directives_xml = custom_target(
'systemd.directives.xml',
input : source_xml_files,
output : 'systemd.directives.xml',
command : [make_directive_index_py, '@OUTPUT@'] + source_xml_files)
'systemd.directives.xml',
input : source_xml_files,
output : 'systemd.directives.xml',
command : [make_directive_index_py, '@OUTPUT@'] + source_xml_files)
nonindex_xml_files = source_xml_files + [systemd_directives_xml]
systemd_index_xml = custom_target(
'systemd.index.xml',
input : nonindex_xml_files,
output : 'systemd.index.xml',
command : [make_man_index_py, '@OUTPUT@'] + nonindex_xml_files)
'systemd.index.xml',
input : nonindex_xml_files,
output : 'systemd.index.xml',
command : [make_man_index_py, '@OUTPUT@'] + nonindex_xml_files)
foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
['systemd.index', '7', systemd_index_xml]]
stem = tuple[0]
section = tuple[1]
xml = tuple[2]
stem = tuple[0]
section = tuple[1]
xml = tuple[2]
html = stem + '.html'
man = stem + '.' + section
html = stem + '.html'
man = stem + '.' + section
mandirn = join_paths(get_option('mandir'), 'man' + section)
mandirn = join_paths(get_option('mandir'), 'man' + section)
p1 = custom_target(
man,
input : xml,
output : man,
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_man_xsl, '@INPUT@'],
install : want_man and have_lxml,
install_dir : mandirn)
man_pages += [p1]
p1 = custom_target(
man,
input : xml,
output : man,
command : xslt_cmd + [custom_man_xsl, '@INPUT@'],
install : want_man and have_lxml,
install_dir : mandirn)
man_pages += [p1]
p2 = custom_target(
html,
input : xml,
output : html,
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_html_xsl, '@INPUT@'],
install : want_html and have_lxml,
install_dir : join_paths(docdir, 'html'))
html_pages += [p2]
p2 = custom_target(
html,
input : xml,
output : html,
command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
install : want_html and have_lxml,
install_dir : join_paths(docdir, 'html'))
html_pages += [p2]
endforeach
man = custom_target('man',

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,11 @@
# -*- mode: meson -*-
if conf.get('ENABLE_NETWORKD', 0) == 1
install_data('80-container-host0.network',
'80-container-ve.network',
'80-container-vz.network',
install_dir : networkdir)
install_data('80-container-host0.network',
'80-container-ve.network',
'80-container-vz.network',
install_dir : networkdir)
meson.add_install_script('sh', '-c',
mkdir_p.format(join_paths(sysconfdir, 'systemd/network')))
meson.add_install_script('sh', '-c',
mkdir_p.format(join_paths(sysconfdir, 'systemd/network')))
endif
install_data('99-default.link',

View File

@@ -1,5 +1,3 @@
# -*- mode: meson -*-
i18n = import('i18n')
i18n.gettext(meson.project_name())

View File

@@ -1,40 +1,38 @@
# -*- mode: meson -*-
rules = files('''
60-block.rules
60-cdrom_id.rules
60-drm.rules
60-evdev.rules
60-persistent-alsa.rules
60-persistent-input.rules
60-persistent-storage.rules
60-persistent-storage-tape.rules
60-persistent-v4l.rules
60-sensor.rules
60-serial.rules
64-btrfs.rules
70-mouse.rules
70-touchpad.rules
75-net-description.rules
75-probe_mtd.rules
78-sound-card.rules
80-drivers.rules
80-net-setup-link.rules
60-block.rules
60-cdrom_id.rules
60-drm.rules
60-evdev.rules
60-persistent-alsa.rules
60-persistent-input.rules
60-persistent-storage.rules
60-persistent-storage-tape.rules
60-persistent-v4l.rules
60-sensor.rules
60-serial.rules
64-btrfs.rules
70-mouse.rules
70-touchpad.rules
75-net-description.rules
75-probe_mtd.rules
78-sound-card.rules
80-drivers.rules
80-net-setup-link.rules
'''.split())
install_data(rules,
install_dir : udevrulesdir)
rules_in = '''
50-udev-default.rules
99-systemd.rules
50-udev-default.rules
99-systemd.rules
'''.split()
foreach file : rules_in
gen = configure_file(
input : file + '.in',
output : file,
configuration : substs)
install_data(gen,
install_dir : udevrulesdir)
gen = configure_file(
input : file + '.in',
output : file,
configuration : substs)
install_data(gen,
install_dir : udevrulesdir)
endforeach

View File

@@ -1,52 +1,50 @@
# -*- mode: meson -*-
bashcompletiondir = get_option('bashcompletiondir')
if bashcompletiondir == ''
bash_completion = dependency('bash-completion', required : false)
if bash_completion.found()
bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
else
bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
endif
bash_completion = dependency('bash-completion', required : false)
if bash_completion.found()
bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
else
bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
endif
message('bash completions: @0@'.format(bashcompletiondir))
message('bash completions: @0@'.format(bashcompletiondir))
endif
if bashcompletiondir != 'no'
bash_systemctl = configure_file(
input : 'systemctl.in',
output : 'systemctl',
configuration : substs)
bash_systemctl = configure_file(
input : 'systemctl.in',
output : 'systemctl',
configuration : substs)
items = [['busctl', ''],
['journalctl', ''],
['systemd-analyze', ''],
['systemd-cat', ''],
['systemd-cgls', ''],
['systemd-cgtop', ''],
['systemd-delta', ''],
['systemd-detect-virt', ''],
['systemd-nspawn', ''],
['systemd-path', ''],
['systemd-run', ''],
['udevadm', ''],
['kernel-install', ''],
[bash_systemctl, ''],
['bootctl', 'ENABLE_EFI'],
['coredumpctl', 'ENABLE_COREDUMP'],
['hostnamectl', 'ENABLE_HOSTNAMED'],
['localectl', 'ENABLE_LOCALED'],
['loginctl', 'ENABLE_LOGIND'],
['machinectl', 'ENABLE_MACHINED'],
['networkctl', 'ENABLE_NETWORKD'],
['systemd-resolve', 'ENABLE_RESOLVED'],
['timedatectl', 'ENABLE_TIMEDATED'],
]
items = [['busctl', ''],
['journalctl', ''],
['systemd-analyze', ''],
['systemd-cat', ''],
['systemd-cgls', ''],
['systemd-cgtop', ''],
['systemd-delta', ''],
['systemd-detect-virt', ''],
['systemd-nspawn', ''],
['systemd-path', ''],
['systemd-run', ''],
['udevadm', ''],
['kernel-install', ''],
[bash_systemctl, ''],
['bootctl', 'ENABLE_EFI'],
['coredumpctl', 'ENABLE_COREDUMP'],
['hostnamectl', 'ENABLE_HOSTNAMED'],
['localectl', 'ENABLE_LOCALED'],
['loginctl', 'ENABLE_LOGIND'],
['machinectl', 'ENABLE_MACHINED'],
['networkctl', 'ENABLE_NETWORKD'],
['systemd-resolve', 'ENABLE_RESOLVED'],
['timedatectl', 'ENABLE_TIMEDATED'],
]
foreach item : items
if item[1] == '' or conf.get(item[1], 0) == 1
install_data(item[0],
install_dir : bashcompletiondir)
endif
endforeach
foreach item : items
if item[1] == '' or conf.get(item[1], 0) == 1
install_data(item[0],
install_dir : bashcompletiondir)
endif
endforeach
endif

View File

@@ -1,49 +1,47 @@
# -*- mode: meson -*-
zshcompletiondir = get_option('zshcompletiondir')
if zshcompletiondir == ''
zshcompletiondir = join_paths(datadir, 'zsh/site-functions')
zshcompletiondir = join_paths(datadir, 'zsh/site-functions')
message('zsh completions: @0@'.format(zshcompletiondir))
message('zsh completions: @0@'.format(zshcompletiondir))
endif
if zshcompletiondir != 'no'
zsh_systemctl = configure_file(
input : '_systemctl.in',
output : '_systemctl',
configuration : substs)
zsh_systemctl = configure_file(
input : '_systemctl.in',
output : '_systemctl',
configuration : substs)
items = [['_busctl', ''],
['_journalctl', ''],
['_systemd-analyze', ''],
['_systemd-delta', ''],
['_systemd-nspawn', ''],
['_systemd', ''],
['_systemd-run', ''],
['_udevadm', ''],
['_kernel-install', ''],
['_sd_hosts_or_user_at_host', ''],
['_sd_outputmodes', ''],
['_sd_unit_files', ''],
['_sd_machines', ''],
[zsh_systemctl, ''],
['_bootctl', 'ENABLE_EFI'],
['_coredumpctl', 'ENABLE_COREDUMP'],
['_hostnamectl', 'ENABLE_HOSTNAMED'],
['_localectl', 'ENABLE_LOCALED'],
['_loginctl', 'ENABLE_LOGIND'],
['_machinectl', 'ENABLE_MACHINED'],
['_networkctl', 'ENABLE_NETWORKD'],
['_systemd-inhibit', 'ENABLE_LOGIND'],
['_systemd-resolve', 'ENABLE_RESOLVED'],
['_systemd-tmpfiles', 'ENABLE_TMPFILES'],
['_timedatectl', 'ENABLE_TIMEDATED'],
]
items = [['_busctl', ''],
['_journalctl', ''],
['_systemd-analyze', ''],
['_systemd-delta', ''],
['_systemd-nspawn', ''],
['_systemd', ''],
['_systemd-run', ''],
['_udevadm', ''],
['_kernel-install', ''],
['_sd_hosts_or_user_at_host', ''],
['_sd_outputmodes', ''],
['_sd_unit_files', ''],
['_sd_machines', ''],
[zsh_systemctl, ''],
['_bootctl', 'ENABLE_EFI'],
['_coredumpctl', 'ENABLE_COREDUMP'],
['_hostnamectl', 'ENABLE_HOSTNAMED'],
['_localectl', 'ENABLE_LOCALED'],
['_loginctl', 'ENABLE_LOGIND'],
['_machinectl', 'ENABLE_MACHINED'],
['_networkctl', 'ENABLE_NETWORKD'],
['_systemd-inhibit', 'ENABLE_LOGIND'],
['_systemd-resolve', 'ENABLE_RESOLVED'],
['_systemd-tmpfiles', 'ENABLE_TMPFILES'],
['_timedatectl', 'ENABLE_TIMEDATED'],
]
foreach item : items
if item[1] == '' or conf.get(item[1], 0) == 1
install_data(item[0],
install_dir : zshcompletiondir)
endif
endforeach
foreach item : items
if item[1] == '' or conf.get(item[1], 0) == 1
install_data(item[0],
install_dir : zshcompletiondir)
endif
endforeach
endif

View File

@@ -1,7 +1,5 @@
# -*- mode: meson -*-
systemd_analyze_sources = files('''
analyze.c
analyze-verify.c
analyze-verify.h
analyze.c
analyze-verify.c
analyze-verify.h
'''.split())

File diff suppressed because it is too large Load Diff

View File

@@ -1,191 +1,192 @@
efi_headers = files('''
console.h
disk.h
graphics.h
linux.h
measure.h
pefile.h
splash.h
util.h
console.h
disk.h
graphics.h
linux.h
measure.h
pefile.h
splash.h
util.h
'''.split())
common_sources = '''
disk.c
graphics.c
measure.c
pefile.c
util.c
disk.c
graphics.c
measure.c
pefile.c
util.c
'''.split()
systemd_boot_sources = '''
boot.c
console.c
boot.c
console.c
'''.split()
stub_sources = '''
linux.c
splash.c
stub.c
linux.c
splash.c
stub.c
'''.split()
if conf.get('ENABLE_EFI', 0) == 1 and get_option('gnu-efi') != 'false'
efi_cc = get_option('efi-cc')
efi_ld = get_option('efi-ld')
efi_cc = get_option('efi-cc')
efi_ld = get_option('efi-ld')
efi_incdir = get_option('efi-includedir')
efibind_h = '@0@/@1@/efibind.h'.format(efi_incdir, efi_arch)
have_header = cc.has_header(efibind_h)
efi_incdir = get_option('efi-includedir')
efibind_h = '@0@/@1@/efibind.h'.format(efi_incdir, efi_arch)
have_header = cc.has_header(efibind_h)
if have_header and EFI_MACHINE_TYPE_NAME == ''
error('gnu-efi is available, but EFI_MACHINE_TYPE_NAME is unknown')
endif
if have_header and EFI_MACHINE_TYPE_NAME == ''
error('gnu-efi is available, but EFI_MACHINE_TYPE_NAME is unknown')
endif
efi_libdir = get_option('efi-libdir')
if efi_libdir == ''
cmd = 'cd /usr/lib/$(@0@ -print-multi-os-directory) && pwd'.format(efi_cc)
ret = run_command('sh', '-c', cmd)
if ret.returncode() == 0
efi_libdir = ret.stdout().strip()
endif
endif
efi_libdir = get_option('efi-libdir')
if efi_libdir == ''
cmd = 'cd /usr/lib/$(@0@ -print-multi-os-directory) && pwd'.format(efi_cc)
ret = run_command('sh', '-c', cmd)
if ret.returncode() == 0
efi_libdir = ret.stdout().strip()
endif
endif
have_gnu_efi = have_header and efi_libdir != ''
have_gnu_efi = have_header and efi_libdir != ''
else
have_gnu_efi = false
have_gnu_efi = false
endif
if get_option('gnu-efi') == 'true' and not have_gnu_efi
error('gnu-efi support requested, but headers were not found')
error('gnu-efi support requested, but headers were not found')
endif
if have_gnu_efi
efi_conf = configuration_data()
efi_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
efi_conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
efi_conf = configuration_data()
efi_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
efi_conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
efi_config_h = configure_file(
output : 'efi_config.h',
configuration : efi_conf)
efi_config_h = configure_file(
output : 'efi_config.h',
configuration : efi_conf)
objcopy = find_program('objcopy')
objcopy = find_program('objcopy')
efi_ldsdir = get_option('efi-ldsdir')
if efi_ldsdir == ''
efi_ldsdir = join_paths(efi_libdir, 'gnuefi')
endif
efi_ldsdir = get_option('efi-ldsdir')
if efi_ldsdir == ''
efi_ldsdir = join_paths(efi_libdir, 'gnuefi')
endif
message('efi-libdir: "@0@"'.format(efi_libdir))
message('efi-ldsdir: "@0@"'.format(efi_ldsdir))
message('efi-includedir: "@0@"'.format(efi_incdir))
message('efi-libdir: "@0@"'.format(efi_libdir))
message('efi-ldsdir: "@0@"'.format(efi_ldsdir))
message('efi-includedir: "@0@"'.format(efi_incdir))
compile_args = ['-Wall',
'-Wextra',
'-std=gnu90',
'-nostdinc',
'-ggdb', '-O0',
'-fpic',
'-fshort-wchar',
'-ffreestanding',
'-fno-strict-aliasing',
'-fno-stack-protector',
'-Wsign-compare',
'-Wno-missing-field-initializers',
'-isystem', efi_incdir,
'-isystem', join_paths(efi_incdir, efi_arch),
'-include', efi_config_h]
if efi_arch == 'x86_64'
compile_args += ['-mno-red-zone',
'-mno-sse',
'-mno-mmx',
'-DEFI_FUNCTION_WRAPPER',
'-DGNU_EFI_USE_MS_ABI']
elif efi_arch == 'ia32'
compile_args += ['-mno-sse',
'-mno-mmx']
endif
compile_args = ['-Wall',
'-Wextra',
'-std=gnu90',
'-nostdinc',
'-ggdb', '-O0',
'-fpic',
'-fshort-wchar',
'-ffreestanding',
'-fno-strict-aliasing',
'-fno-stack-protector',
'-Wsign-compare',
'-Wno-missing-field-initializers',
'-isystem', efi_incdir,
'-isystem', join_paths(efi_incdir, efi_arch),
'-include', efi_config_h]
if efi_arch == 'x86_64'
compile_args += ['-mno-red-zone',
'-mno-sse',
'-mno-mmx',
'-DEFI_FUNCTION_WRAPPER',
'-DGNU_EFI_USE_MS_ABI']
elif efi_arch == 'ia32'
compile_args += ['-mno-sse',
'-mno-mmx']
endif
efi_ldflags = ['-T',
'@0@/elf_@1@_efi.lds'.format(efi_ldsdir, efi_arch),
'-shared',
'-Bsymbolic',
'-nostdlib',
'-znocombreloc',
'-L', efi_libdir,
'@0@/crt0-efi-@1@.o'.format(efi_ldsdir, efi_arch)]
if efi_arch == 'aarch64' or efi_arch == 'arm'
# Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary'
# instead, and add required symbols manually.
efi_ldflags += ['--defsym=EFI_SUBSYSTEM=0xa']
efi_format = ['-O', 'binary']
else
efi_format = ['--target=efi-app-@0@'.format(efi_arch)]
endif
efi_ldflags = ['-T',
'@0@/elf_@1@_efi.lds'.format(efi_ldsdir, efi_arch),
'-shared',
'-Bsymbolic',
'-nostdlib',
'-znocombreloc',
'-L', efi_libdir,
'@0@/crt0-efi-@1@.o'.format(efi_ldsdir, efi_arch)]
if efi_arch == 'aarch64' or efi_arch == 'arm'
# Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary'
# instead, and add required symbols manually.
efi_ldflags += ['--defsym=EFI_SUBSYSTEM=0xa']
efi_format = ['-O', 'binary']
else
efi_format = ['--target=efi-app-@0@'.format(efi_arch)]
endif
systemd_boot_objects = []
stub_objects = []
foreach file : common_sources + systemd_boot_sources + stub_sources
o_file = custom_target(file + '.o',
input : file,
output : file + '.o',
command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
+ compile_args,
depend_files : efi_headers)
if (common_sources + systemd_boot_sources).contains(file)
systemd_boot_objects += [o_file]
endif
if (common_sources + stub_sources).contains(file)
stub_objects += [o_file]
endif
endforeach
systemd_boot_objects = []
stub_objects = []
foreach file : common_sources + systemd_boot_sources + stub_sources
o_file = custom_target(file + '.o',
input : file,
output : file + '.o',
command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
+ compile_args,
depend_files : efi_headers)
if (common_sources + systemd_boot_sources).contains(file)
systemd_boot_objects += [o_file]
endif
if (common_sources + stub_sources).contains(file)
stub_objects += [o_file]
endif
endforeach
libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
no_undefined_symbols = find_program('no-undefined-symbols.sh')
libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
no_undefined_symbols = find_program('no-undefined-symbols.sh')
foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects],
['stub.so', stub_efi_name, stub_objects]]
so = custom_target(
tuple[0],
input : tuple[2],
output : tuple[0],
command : [efi_ld, '-o', '@OUTPUT@'] +
efi_ldflags + tuple[2] +
['-lefi', '-lgnuefi', libgcc_file_name])
foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects],
['stub.so', stub_efi_name, stub_objects]]
so = custom_target(
tuple[0],
input : tuple[2],
output : tuple[0],
command : [efi_ld, '-o', '@OUTPUT@'] +
efi_ldflags + tuple[2] +
['-lefi', '-lgnuefi', libgcc_file_name])
test('no-undefined-symbols-' + tuple[0],
no_undefined_symbols,
args : [so])
test('no-undefined-symbols-' + tuple[0],
no_undefined_symbols,
args : [so])
stub = custom_target(
tuple[1],
input : so,
output : tuple[1],
command : [objcopy,
'-j', '.text',
'-j', '.sdata',
'-j', '.data',
'-j', '.dynamic',
'-j', '.dynsym',
'-j', '.rel',
'-j', '.rela',
'-j', '.reloc']
+ efi_format +
['@INPUT@', '@OUTPUT@'],
install : true,
install_dir : bootlibdir)
stub = custom_target(
tuple[1],
input : so,
output : tuple[1],
command : [objcopy,
'-j', '.text',
'-j', '.sdata',
'-j', '.data',
'-j', '.dynamic',
'-j', '.dynsym',
'-j', '.rel',
'-j', '.rela',
'-j', '.reloc']
+ efi_format +
['@INPUT@', '@OUTPUT@'],
install : true,
install_dir : bootlibdir)
set_variable(tuple[0].underscorify(), so)
set_variable(tuple[0].underscorify() + '_stub', stub)
endforeach
set_variable(tuple[0].underscorify(), so)
set_variable(tuple[0].underscorify() + '_stub', stub)
endforeach
endif
############################################################
if have_gnu_efi
test_efi_disk_img = custom_target(
'test-efi-disk.img',
input : [systemd_boot_so, stub_so_stub],
output : 'test-efi-disk.img',
command : [test_efi_create_disk_sh, '@OUTPUT@', '@INPUT0@', '@INPUT1@', splash_bmp])
test_efi_disk_img = custom_target(
'test-efi-disk.img',
input : [systemd_boot_so, stub_so_stub],
output : 'test-efi-disk.img',
command : [test_efi_create_disk_sh, '@OUTPUT@',
'@INPUT0@', '@INPUT1@', splash_bmp])
endif

View File

@@ -1,191 +1,189 @@
# -*- mode: meson -*-
libcore_la_sources = '''
unit.c
unit.h
unit-printf.c
unit-printf.h
job.c
job.h
manager.c
manager.h
transaction.c
transaction.h
load-fragment.c
load-fragment.h
service.c
service.h
socket.c
socket.h
busname.c
busname.h
bus-policy.c
bus-policy.h
target.c
target.h
device.c
device.h
mount.c
mount.h
automount.c
automount.h
swap.c
swap.h
timer.c
timer.h
path.c
path.h
slice.c
slice.h
scope.c
scope.h
load-dropin.c
load-dropin.h
execute.c
execute.h
dynamic-user.c
dynamic-user.h
kill.c
kill.h
dbus.c
dbus.h
dbus-manager.c
dbus-manager.h
dbus-unit.c
dbus-unit.h
dbus-job.c
dbus-job.h
dbus-service.c
dbus-service.h
dbus-socket.c
dbus-socket.h
dbus-busname.c
dbus-busname.h
dbus-target.c
dbus-target.h
dbus-device.c
dbus-device.h
dbus-mount.c
dbus-mount.h
dbus-automount.c
dbus-automount.h
dbus-swap.c
dbus-swap.h
dbus-timer.c
dbus-timer.h
dbus-path.c
dbus-path.h
dbus-slice.c
dbus-slice.h
dbus-scope.c
dbus-scope.h
dbus-execute.c
dbus-execute.h
dbus-kill.c
dbus-kill.h
dbus-cgroup.c
dbus-cgroup.h
cgroup.c
cgroup.h
selinux-access.c
selinux-access.h
selinux-setup.c
selinux-setup.h
smack-setup.c
smack-setup.h
ima-setup.c
ima-setup.h
locale-setup.h
locale-setup.c
hostname-setup.c
hostname-setup.h
machine-id-setup.c
machine-id-setup.h
mount-setup.c
mount-setup.h
kmod-setup.c
kmod-setup.h
loopback-setup.h
loopback-setup.c
namespace.c
namespace.h
killall.h
killall.c
audit-fd.c
audit-fd.h
show-status.c
show-status.h
emergency-action.c
emergency-action.h
unit.c
unit.h
unit-printf.c
unit-printf.h
job.c
job.h
manager.c
manager.h
transaction.c
transaction.h
load-fragment.c
load-fragment.h
service.c
service.h
socket.c
socket.h
busname.c
busname.h
bus-policy.c
bus-policy.h
target.c
target.h
device.c
device.h
mount.c
mount.h
automount.c
automount.h
swap.c
swap.h
timer.c
timer.h
path.c
path.h
slice.c
slice.h
scope.c
scope.h
load-dropin.c
load-dropin.h
execute.c
execute.h
dynamic-user.c
dynamic-user.h
kill.c
kill.h
dbus.c
dbus.h
dbus-manager.c
dbus-manager.h
dbus-unit.c
dbus-unit.h
dbus-job.c
dbus-job.h
dbus-service.c
dbus-service.h
dbus-socket.c
dbus-socket.h
dbus-busname.c
dbus-busname.h
dbus-target.c
dbus-target.h
dbus-device.c
dbus-device.h
dbus-mount.c
dbus-mount.h
dbus-automount.c
dbus-automount.h
dbus-swap.c
dbus-swap.h
dbus-timer.c
dbus-timer.h
dbus-path.c
dbus-path.h
dbus-slice.c
dbus-slice.h
dbus-scope.c
dbus-scope.h
dbus-execute.c
dbus-execute.h
dbus-kill.c
dbus-kill.h
dbus-cgroup.c
dbus-cgroup.h
cgroup.c
cgroup.h
selinux-access.c
selinux-access.h
selinux-setup.c
selinux-setup.h
smack-setup.c
smack-setup.h
ima-setup.c
ima-setup.h
locale-setup.h
locale-setup.c
hostname-setup.c
hostname-setup.h
machine-id-setup.c
machine-id-setup.h
mount-setup.c
mount-setup.h
kmod-setup.c
kmod-setup.h
loopback-setup.h
loopback-setup.c
namespace.c
namespace.h
killall.h
killall.c
audit-fd.c
audit-fd.h
show-status.c
show-status.h
emergency-action.c
emergency-action.h
'''.split()
load_fragment_gperf_gperf = custom_target(
'load-fragment-gperf.gperf',
input : 'load-fragment-gperf.gperf.m4',
output: 'load-fragment-gperf.gperf',
command : [m4, '-P'] + m4_defines + ['@INPUT@'],
capture : true)
'load-fragment-gperf.gperf',
input : 'load-fragment-gperf.gperf.m4',
output: 'load-fragment-gperf.gperf',
command : [m4, '-P'] + m4_defines + ['@INPUT@'],
capture : true)
load_fragment_gperf_c = custom_target(
'load-fragment-gperf.c',
input : load_fragment_gperf_gperf,
output : 'load-fragment-gperf.c',
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
'load-fragment-gperf.c',
input : load_fragment_gperf_gperf,
output : 'load-fragment-gperf.c',
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
awkscript = 'load-fragment-gperf-nulstr.awk'
load_fragment_gperf_nulstr_c = custom_target(
'load-fragment-gperf-nulstr.c',
input : [awkscript, load_fragment_gperf_gperf],
output : 'load-fragment-gperf-nulstr.c',
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
capture : true)
'load-fragment-gperf-nulstr.c',
input : [awkscript, load_fragment_gperf_gperf],
output : 'load-fragment-gperf-nulstr.c',
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
capture : true)
libcore = static_library(
'core',
libcore_la_sources,
load_fragment_gperf_c,
load_fragment_gperf_nulstr_c,
include_directories : includes,
link_with : [libshared_static],
dependencies : [threads,
libpam,
libaudit,
libkmod,
libapparmor,
libmount])
'core',
libcore_la_sources,
load_fragment_gperf_c,
load_fragment_gperf_nulstr_c,
include_directories : includes,
link_with : [libshared_static],
dependencies : [threads,
libpam,
libaudit,
libkmod,
libapparmor,
libmount])
systemd_sources = files('main.c')
systemd_shutdown_sources = files('''
shutdown.c
umount.c
umount.h
mount-setup.c
mount-setup.h
killall.c
killall.h
shutdown.c
umount.c
umount.h
mount-setup.c
mount-setup.h
killall.c
killall.h
'''.split())
in_files = [['macros.systemd', rpmmacrosdir],
['triggers.systemd', ''],
['systemd.pc', pkgconfigdatadir]]
in_files = [['macros.systemd', rpmmacrosdir],
['triggers.systemd', ''],
['systemd.pc', pkgconfigdatadir]]
foreach item : in_files
file = item[0]
dir = item[1]
file = item[0]
dir = item[1]
# If "no", disable generation completely.
# If "", generate, but do not install.
if dir != 'no'
gen = configure_file(
input : file + '.in',
output : file,
configuration : substs)
if dir != ''
install_data(gen,
install_dir : dir)
endif
endif
# If 'no', disable generation completely.
# If '', generate, but do not install.
if dir != 'no'
gen = configure_file(
input : file + '.in',
output : file,
configuration : substs)
if dir != ''
install_data(gen,
install_dir : dir)
endif
endif
endforeach
install_data('org.freedesktop.systemd1.conf',
@@ -194,17 +192,17 @@ install_data('org.freedesktop.systemd1.service',
install_dir : dbussystemservicedir)
policy_in = configure_file(
input : 'org.freedesktop.systemd1.policy.in.in',
output : 'org.freedesktop.systemd1.policy.in',
configuration : substs)
input : 'org.freedesktop.systemd1.policy.in.in',
output : 'org.freedesktop.systemd1.policy.in',
configuration : substs)
custom_target(
'org.freedesktop.systemd1.policy',
input : policy_in,
output : 'org.freedesktop.systemd1.policy',
command : intltool_command,
install : install_polkit,
install_dir : polkitpolicydir)
'org.freedesktop.systemd1.policy',
input : policy_in,
output : 'org.freedesktop.systemd1.policy',
command : intltool_command,
install : install_polkit,
install_dir : polkitpolicydir)
# TODO: this might work with meson from git, see
# https://github.com/mesonbuild/meson/issues/1441#issuecomment-283585493

View File

@@ -1,14 +1,12 @@
# -*- mode: meson -*-
systemd_coredump_sources = files('''
coredump.c
coredump-vacuum.c
coredump-vacuum.h
coredump.c
coredump-vacuum.c
coredump-vacuum.h
'''.split())
if conf.get('HAVE_ELFUTILS', 0) == 1
systemd_coredump_sources += files(['stacktrace.c',
'stacktrace.h'])
systemd_coredump_sources += files(['stacktrace.c',
'stacktrace.h'])
endif
coredumpctl_sources = files('coredumpctl.c')
@@ -17,10 +15,10 @@ install_data('coredump.conf',
install_dir : pkgsysconfdir)
tests += [
[['src/coredump/test-coredump-vacuum.c',
'src/coredump/coredump-vacuum.c',
'src/coredump/coredump-vacuum.h'],
[],
[],
'ENABLE_COREDUMP', 'manual'],
]
[['src/coredump/test-coredump-vacuum.c',
'src/coredump/coredump-vacuum.c',
'src/coredump/coredump-vacuum.h'],
[],
[],
'ENABLE_COREDUMP', 'manual'],
]

View File

@@ -1,16 +1,14 @@
# -*- mode: meson -*-
install_data('org.freedesktop.hostname1.conf',
install_dir : dbuspolicydir)
install_data('org.freedesktop.hostname1.service',
install_dir : dbussystemservicedir)
if conf.get('ENABLE_HOSTNAMED', 0) == 1
custom_target(
'org.freedesktop.hostname1.policy',
input : 'org.freedesktop.hostname1.policy.in',
output : 'org.freedesktop.hostname1.policy',
command : intltool_command,
install : install_polkit,
install_dir : polkitpolicydir)
custom_target(
'org.freedesktop.hostname1.policy',
input : 'org.freedesktop.hostname1.policy.in',
output : 'org.freedesktop.hostname1.policy',
command : intltool_command,
install : install_polkit,
install_dir : polkitpolicydir)
endif

View File

@@ -1,79 +1,77 @@
# -*- mode: meson -*-
systemd_importd_sources = files('''
importd.c
importd.c
'''.split())
systemd_pull_sources = files('''
pull.c
pull-raw.c
pull-raw.h
pull-tar.c
pull-tar.h
pull-job.c
pull-job.h
pull-common.c
pull-common.h
import-common.c
import-common.h
import-compress.c
import-compress.h
curl-util.c
curl-util.h
qcow2-util.c
qcow2-util.h
pull.c
pull-raw.c
pull-raw.h
pull-tar.c
pull-tar.h
pull-job.c
pull-job.h
pull-common.c
pull-common.h
import-common.c
import-common.h
import-compress.c
import-compress.h
curl-util.c
curl-util.h
qcow2-util.c
qcow2-util.h
'''.split())
systemd_import_sources = files('''
import.c
import-raw.c
import-raw.h
import-tar.c
import-tar.h
import-common.c
import-common.h
import-compress.c
import-compress.h
qcow2-util.c
qcow2-util.h
import.c
import-raw.c
import-raw.h
import-tar.c
import-tar.h
import-common.c
import-common.h
import-compress.c
import-compress.h
qcow2-util.c
qcow2-util.h
'''.split())
systemd_export_sources = files('''
export.c
export-tar.c
export-tar.h
export-raw.c
export-raw.h
import-common.c
import-common.h
import-compress.c
import-compress.h
export.c
export-tar.c
export-tar.h
export-raw.c
export-raw.h
import-common.c
import-common.h
import-compress.c
import-compress.h
'''.split())
if conf.get('ENABLE_IMPORTD', 0) == 1
install_data('org.freedesktop.import1.conf',
install_dir : dbuspolicydir)
install_data('org.freedesktop.import1.service',
install_dir : dbussystemservicedir)
install_data('org.freedesktop.import1.conf',
install_dir : dbuspolicydir)
install_data('org.freedesktop.import1.service',
install_dir : dbussystemservicedir)
custom_target(
'org.freedesktop.import1.policy',
input : 'org.freedesktop.import1.policy.in',
output : 'org.freedesktop.import1.policy',
command : intltool_command,
install : install_polkit,
install_dir : polkitpolicydir)
custom_target(
'org.freedesktop.import1.policy',
input : 'org.freedesktop.import1.policy.in',
output : 'org.freedesktop.import1.policy',
command : intltool_command,
install : install_polkit,
install_dir : polkitpolicydir)
install_data('import-pubring.gpg',
install_dir : rootlibexecdir)
# TODO: shouldn't this be in pkgdatadir?
install_data('import-pubring.gpg',
install_dir : rootlibexecdir)
# TODO: shouldn't this be in pkgdatadir?
endif
tests += [
[['src/import/test-qcow2.c',
'src/import/qcow2-util.c',
'src/import/qcow2-util.h'],
[libshared],
[libz],
'HAVE_ZLIB', 'manual'],
]
[['src/import/test-qcow2.c',
'src/import/qcow2-util.c',
'src/import/qcow2-util.h'],
[libshared],
[libz],
'HAVE_ZLIB', 'manual'],
]

View File

@@ -1,44 +1,42 @@
# -*- mode: meson -*-
systemd_journal_upload_sources = files('''
journal-upload.h
journal-upload.c
journal-upload-journal.c
journal-upload.h
journal-upload.c
journal-upload-journal.c
'''.split())
systemd_journal_remote_sources = files('''
journal-remote-parse.h
journal-remote-parse.c
journal-remote-write.h
journal-remote-write.c
journal-remote.h
journal-remote.c
microhttpd-util.h
microhttpd-util.c
journal-remote-parse.h
journal-remote-parse.c
journal-remote-write.h
journal-remote-write.c
journal-remote.h
journal-remote.c
microhttpd-util.h
microhttpd-util.c
'''.split())
systemd_journal_gatewayd_sources = files('''
journal-gatewayd.c
microhttpd-util.h
microhttpd-util.c
journal-gatewayd.c
microhttpd-util.h
microhttpd-util.c
'''.split())
if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_LIBCURL', 0) == 1
journal_upload_conf = configure_file(
input : 'journal-upload.conf.in',
output : 'journal-upload.conf',
configuration : substs)
install_data(journal_upload_conf,
install_dir : pkgsysconfdir)
journal_upload_conf = configure_file(
input : 'journal-upload.conf.in',
output : 'journal-upload.conf',
configuration : substs)
install_data(journal_upload_conf,
install_dir : pkgsysconfdir)
endif
if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_MICROHTTPD', 0) == 1
journal_remote_conf = configure_file(
input : 'journal-remote.conf.in',
output : 'journal-remote.conf',
configuration : substs)
install_data(journal_remote_conf,
install_dir : pkgsysconfdir)
journal_remote_conf = configure_file(
input : 'journal-remote.conf.in',
output : 'journal-remote.conf',
configuration : substs)
install_data(journal_remote_conf,
install_dir : pkgsysconfdir)
endif
install_data('browse.html',

Some files were not shown because too many files have changed in this diff Show More