2020-11-09 12:23:58 +08:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2017-11-19 01:32:01 +08:00
|
|
|
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 11:03:47 +08:00
|
|
|
# This is lame, I know, but meson has no other include mechanism
|
|
|
|
subdir('rules')
|
|
|
|
|
2017-04-06 10:46:03 +08:00
|
|
|
want_man = get_option('man')
|
|
|
|
want_html = get_option('html')
|
|
|
|
xsltproc = find_program('xsltproc',
|
2023-08-10 22:00:55 +08:00
|
|
|
required : want_man.enabled() or want_html.enabled())
|
|
|
|
want_man = want_man.allowed() and xsltproc.found()
|
|
|
|
want_html = want_html.allowed() and xsltproc.found()
|
2017-04-06 10:46:03 +08:00
|
|
|
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 11:03:47 +08:00
|
|
|
xsltproc_flags = [
|
2017-04-18 07:25:00 +08:00
|
|
|
'--nonet',
|
|
|
|
'--xinclude',
|
2017-09-19 14:04:02 +08:00
|
|
|
'--maxdepth', '9000',
|
2017-04-18 07:25:00 +08:00
|
|
|
'--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',
|
2023-05-30 19:02:57 +08:00
|
|
|
'@0@:@1@:@2@'.format(meson.current_build_dir(),
|
|
|
|
meson.current_source_dir(),
|
|
|
|
libshared_build_dir)]
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 11:03:47 +08:00
|
|
|
|
|
|
|
custom_man_xsl = files('custom-man.xsl')
|
2017-04-06 10:46:03 +08:00
|
|
|
custom_html_xsl = files('custom-html.xsl')
|
2017-04-18 07:25:00 +08:00
|
|
|
xslt_cmd = [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags
|
2017-04-06 07:44:41 +08:00
|
|
|
|
2021-05-17 00:46:59 +08:00
|
|
|
custom_entities_ent = custom_target(
|
|
|
|
'custom-entities.ent',
|
2017-04-18 07:25:00 +08:00
|
|
|
input : 'custom-entities.ent.in',
|
|
|
|
output : 'custom-entities.ent',
|
2022-04-05 22:52:44 +08:00
|
|
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'])
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 11:03:47 +08:00
|
|
|
|
2023-05-30 19:02:57 +08:00
|
|
|
man_page_depends += custom_entities_ent
|
|
|
|
|
2017-04-06 10:46:03 +08:00
|
|
|
man_pages = []
|
|
|
|
html_pages = []
|
|
|
|
source_xml_files = []
|
2020-04-25 02:12:03 +08:00
|
|
|
dbus_docs = []
|
2021-07-28 02:11:41 +08:00
|
|
|
foreach tuple : manpages
|
2017-04-18 07:25:00 +08:00
|
|
|
stem = tuple[0]
|
|
|
|
section = tuple[1]
|
|
|
|
aliases = tuple[2]
|
|
|
|
condition = tuple[3]
|
|
|
|
|
|
|
|
xml = stem + '.xml'
|
|
|
|
html = stem + '.html'
|
|
|
|
man = stem + '.' + section
|
|
|
|
|
|
|
|
manaliases = []
|
|
|
|
htmlaliases = []
|
|
|
|
foreach alias : aliases
|
2018-07-31 15:44:11 +08:00
|
|
|
manaliases += alias + '.' + section
|
|
|
|
htmlaliases += alias + '.html'
|
2017-04-18 07:25:00 +08:00
|
|
|
endforeach
|
|
|
|
|
2021-07-28 01:32:35 +08:00
|
|
|
mandirn = get_option('mandir') / ('man' + section)
|
2017-04-18 07:25:00 +08:00
|
|
|
|
2024-03-05 21:41:17 +08:00
|
|
|
have = true
|
|
|
|
foreach word : condition.split()
|
|
|
|
if conf.get(word) != 1
|
|
|
|
have = false
|
|
|
|
break
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
if have
|
2020-04-25 02:12:03 +08:00
|
|
|
file = files(tuple[0] + '.xml')
|
2021-09-21 16:59:13 +08:00
|
|
|
source_xml_files += file
|
2020-04-25 02:12:03 +08:00
|
|
|
if tuple[0].startswith('org.freedesktop.')
|
|
|
|
dbus_docs += file
|
|
|
|
endif
|
2021-07-28 02:11:41 +08:00
|
|
|
|
|
|
|
if xsltproc.found()
|
|
|
|
p1 = custom_target(
|
|
|
|
man,
|
|
|
|
input : xml,
|
|
|
|
output : [man] + manaliases,
|
|
|
|
command : xslt_cmd + [custom_man_xsl, '@INPUT@'],
|
2023-05-30 19:02:57 +08:00
|
|
|
depends : man_page_depends,
|
2021-07-28 02:11:41 +08:00
|
|
|
install : want_man,
|
|
|
|
install_dir : mandirn)
|
|
|
|
man_pages += p1
|
|
|
|
|
|
|
|
p2 = []
|
|
|
|
foreach htmlalias : htmlaliases
|
|
|
|
link = custom_target(
|
|
|
|
htmlalias,
|
|
|
|
output : htmlalias,
|
|
|
|
command : [ln, '-fs', html, '@OUTPUT@'])
|
|
|
|
if want_html
|
2024-01-30 16:34:17 +08:00
|
|
|
meson.add_install_script(sh, '-c', ln_s.format(docdir / 'html' / html, docdir / 'html' / htmlalias))
|
2021-07-28 02:11:41 +08:00
|
|
|
p2 += link
|
|
|
|
endif
|
|
|
|
html_pages += link
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
p3 = custom_target(
|
|
|
|
html,
|
|
|
|
input : xml,
|
|
|
|
output : html,
|
|
|
|
command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
|
2023-05-30 19:02:57 +08:00
|
|
|
depends : [man_page_depends, p2],
|
2021-07-28 02:11:41 +08:00
|
|
|
install : want_html,
|
|
|
|
install_dir : docdir / 'html')
|
|
|
|
html_pages += p3
|
|
|
|
endif
|
2017-04-18 07:25:00 +08:00
|
|
|
else
|
|
|
|
message('Skipping @0@.@1@ because @2@ is false'.format(stem, section, condition))
|
|
|
|
endif
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 11:03:47 +08:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
2022-01-11 17:56:22 +08:00
|
|
|
have_lxml = run_command(xml_helper_py, check: false).returncode() == 0
|
2017-04-14 07:59:21 +08:00
|
|
|
if not have_lxml
|
2017-04-18 07:25:00 +08:00
|
|
|
message('python-lxml not available, not making man page indices')
|
2017-04-14 07:59:21 +08:00
|
|
|
endif
|
|
|
|
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 11:03:47 +08:00
|
|
|
systemd_directives_xml = custom_target(
|
2017-04-18 07:25:00 +08:00
|
|
|
'systemd.directives.xml',
|
2020-05-07 20:31:13 +08:00
|
|
|
input : ['directives-template.xml', source_xml_files],
|
2017-04-18 07:25:00 +08:00
|
|
|
output : 'systemd.directives.xml',
|
2023-05-30 19:02:57 +08:00
|
|
|
depends : man_page_depends,
|
2020-05-07 20:31:13 +08:00
|
|
|
command : [make_directive_index_py, '@OUTPUT@', '@INPUT@'])
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 11:03:47 +08:00
|
|
|
|
|
|
|
nonindex_xml_files = source_xml_files + [systemd_directives_xml]
|
|
|
|
systemd_index_xml = custom_target(
|
2017-04-18 07:25:00 +08:00
|
|
|
'systemd.index.xml',
|
|
|
|
input : nonindex_xml_files,
|
|
|
|
output : 'systemd.index.xml',
|
|
|
|
command : [make_man_index_py, '@OUTPUT@'] + nonindex_xml_files)
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 11:03:47 +08:00
|
|
|
|
2018-07-08 21:14:46 +08:00
|
|
|
foreach tuple : xsltproc.found() ? [['systemd.directives', '7', systemd_directives_xml],
|
|
|
|
['systemd.index', '7', systemd_index_xml]] : []
|
2017-04-18 07:25:00 +08:00
|
|
|
stem = tuple[0]
|
|
|
|
section = tuple[1]
|
|
|
|
xml = tuple[2]
|
|
|
|
|
|
|
|
html = stem + '.html'
|
|
|
|
man = stem + '.' + section
|
|
|
|
|
2021-07-28 01:32:35 +08:00
|
|
|
mandirn = get_option('mandir') / ('man' + section)
|
2017-04-18 07:25:00 +08:00
|
|
|
|
|
|
|
p1 = custom_target(
|
|
|
|
man,
|
|
|
|
input : xml,
|
|
|
|
output : man,
|
|
|
|
command : xslt_cmd + [custom_man_xsl, '@INPUT@'],
|
|
|
|
install : want_man and have_lxml,
|
|
|
|
install_dir : mandirn)
|
2018-07-31 15:44:11 +08:00
|
|
|
man_pages += p1
|
2017-04-18 07:25:00 +08:00
|
|
|
|
2017-05-01 12:17:20 +08:00
|
|
|
p2 = []
|
2017-05-01 23:02:17 +08:00
|
|
|
if html == 'systemd.index.html'
|
|
|
|
htmlalias = 'index.html'
|
2017-05-01 12:17:20 +08:00
|
|
|
link = custom_target(
|
2017-05-01 23:02:17 +08:00
|
|
|
htmlalias,
|
|
|
|
input : p2,
|
|
|
|
output : htmlalias,
|
2021-05-14 20:16:17 +08:00
|
|
|
command : [ln, '-fs', html, '@OUTPUT@'])
|
2017-05-01 23:02:17 +08:00
|
|
|
if want_html
|
2024-01-30 16:34:17 +08:00
|
|
|
meson.add_install_script(sh, '-c', ln_s.format(docdir / 'html' / html, docdir / 'html' / htmlalias))
|
2018-07-31 15:44:11 +08:00
|
|
|
p2 += link
|
2017-05-01 23:02:17 +08:00
|
|
|
endif
|
2018-07-31 15:44:11 +08:00
|
|
|
html_pages += link
|
2017-05-01 23:02:17 +08:00
|
|
|
endif
|
2017-05-01 12:17:20 +08:00
|
|
|
|
|
|
|
p3 = custom_target(
|
|
|
|
html,
|
|
|
|
input : xml,
|
|
|
|
output : html,
|
|
|
|
command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
|
2023-05-30 19:02:57 +08:00
|
|
|
depends : [man_page_depends, p2],
|
2017-05-01 12:17:20 +08:00
|
|
|
install : want_html and have_lxml,
|
2021-07-28 01:32:35 +08:00
|
|
|
install_dir : docdir / 'html')
|
2018-07-31 15:44:11 +08:00
|
|
|
html_pages += p3
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 11:03:47 +08:00
|
|
|
endforeach
|
2017-04-06 10:46:03 +08:00
|
|
|
|
2018-07-24 21:04:28 +08:00
|
|
|
# Cannot use run_target because those targets are used in depends
|
|
|
|
# Also see https://github.com/mesonbuild/meson/issues/368.
|
2017-04-19 23:30:32 +08:00
|
|
|
man = custom_target(
|
2017-04-18 07:48:20 +08:00
|
|
|
'man',
|
2017-04-19 23:30:32 +08:00
|
|
|
output : 'man',
|
2017-04-18 07:48:20 +08:00
|
|
|
depends : man_pages,
|
2021-05-14 20:16:17 +08:00
|
|
|
command : [echo])
|
2017-04-18 07:48:20 +08:00
|
|
|
|
2017-08-09 21:41:44 +08:00
|
|
|
html = custom_target(
|
2017-04-18 07:48:20 +08:00
|
|
|
'html',
|
|
|
|
output : 'html',
|
2017-08-09 21:41:44 +08:00
|
|
|
depends : html_pages,
|
2021-05-14 20:16:17 +08:00
|
|
|
command : [echo])
|
2017-04-18 07:48:20 +08:00
|
|
|
|
2021-04-12 20:03:32 +08:00
|
|
|
if rsync.found()
|
|
|
|
run_target(
|
|
|
|
'doc-sync',
|
|
|
|
depends : man_pages + html_pages,
|
2023-10-04 03:00:19 +08:00
|
|
|
command : [sync_docs_py,
|
|
|
|
'--version',
|
|
|
|
'@0@'.format(meson.project_version()),
|
2021-04-12 20:03:32 +08:00
|
|
|
meson.current_build_dir(),
|
|
|
|
get_option('www-target')])
|
|
|
|
endif
|
2017-04-19 09:00:46 +08:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
2021-05-16 21:43:41 +08:00
|
|
|
buildroot_substs = configuration_data()
|
|
|
|
buildroot_substs.set_quoted('BUILD_ROOT', project_build_root)
|
|
|
|
|
2019-05-09 19:23:50 +08:00
|
|
|
configure_file(
|
|
|
|
input : 'man.in',
|
|
|
|
output : 'man',
|
2021-05-16 21:43:41 +08:00
|
|
|
configuration : buildroot_substs)
|
2019-05-09 19:23:50 +08:00
|
|
|
|
|
|
|
configure_file(
|
|
|
|
input : 'html.in',
|
|
|
|
output : 'html',
|
2021-05-16 21:43:41 +08:00
|
|
|
configuration : buildroot_substs)
|
2021-07-28 02:11:41 +08:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
update_dbus_docs = custom_target(
|
2023-03-03 13:54:21 +08:00
|
|
|
'update-dbus-docs-impl',
|
2021-07-28 02:11:41 +08:00
|
|
|
output : 'update-dbus-docs',
|
|
|
|
command : [update_dbus_docs_py, '--build-dir', project_build_root, '@INPUT@'],
|
|
|
|
input : dbus_docs)
|
|
|
|
|
|
|
|
if conf.get('BUILD_MODE_DEVELOPER') == 1
|
|
|
|
test('dbus-docs-fresh',
|
|
|
|
update_dbus_docs_py,
|
2023-05-18 23:16:33 +08:00
|
|
|
suite : 'dist',
|
2022-01-21 22:28:23 +08:00
|
|
|
args : ['--build-dir', project_build_root, '--test', dbus_docs],
|
|
|
|
depends : dbus_programs)
|
2023-09-27 01:25:06 +08:00
|
|
|
|
|
|
|
test('check-version-history',
|
|
|
|
check_version_history_py,
|
|
|
|
suite : 'dist',
|
|
|
|
args : source_xml_files)
|
2021-07-28 02:11:41 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
update_man_rules = custom_target(
|
2023-03-03 13:54:21 +08:00
|
|
|
'update-man-rules-impl',
|
2021-07-28 02:11:41 +08:00
|
|
|
output : 'update-man-rules',
|
2022-03-23 04:51:33 +08:00
|
|
|
command : [update_man_rules_py,
|
|
|
|
'@0@/man/*.xml'.format(project_source_root),
|
|
|
|
'@0@/rules/meson.build'.format(meson.current_source_dir())],
|
2023-05-30 19:02:57 +08:00
|
|
|
depends : man_page_depends)
|
2024-04-03 02:42:55 +08:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
simple_examples = files(
|
|
|
|
'event-quick-child.c',
|
|
|
|
'hwdb-usb-device.c',
|
|
|
|
'id128-app-specific.c',
|
|
|
|
'inotify-watch-tmp.c',
|
|
|
|
'journal-enumerate-fields.c',
|
|
|
|
'journal-iterate-foreach.c',
|
|
|
|
'journal-iterate-poll.c',
|
|
|
|
'journal-iterate-unique.c',
|
|
|
|
'journal-iterate-wait.c',
|
|
|
|
'journal-stream-fd.c',
|
|
|
|
'logcontrol-example.c',
|
|
|
|
'notify-selfcontained-example.c',
|
|
|
|
'path-documents.c',
|
|
|
|
'print-unit-path-call-method.c',
|
|
|
|
'print-unit-path.c',
|
|
|
|
'sd-bus-container-append.c',
|
|
|
|
'sd-bus-container-read.c',
|
|
|
|
'sd_bus_error-example.c',
|
|
|
|
'sd_bus_service_reconnect.c',
|
|
|
|
'send-unit-files-changed.c',
|
|
|
|
'vtable-example.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
examples = []
|
|
|
|
foreach example : simple_examples
|
|
|
|
examples += [ { 'file' : example } ]
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
if conf.get('HAVE_GLIB') == 1
|
|
|
|
examples += [
|
|
|
|
{
|
|
|
|
'file' : files('glib-event-glue.c'),
|
|
|
|
'opts' : [
|
|
|
|
'-I', libglib.get_variable('includedir') / 'glib-2.0',
|
|
|
|
'-I', libglib.get_variable('libdir') / 'glib-2.0/include',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
default_args = [
|
|
|
|
cc.cmd_array(),
|
|
|
|
'-c',
|
|
|
|
'-x', 'c',
|
|
|
|
'-pedantic',
|
|
|
|
'-Wall',
|
|
|
|
'-Werror',
|
|
|
|
'-Wextra',
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
'-o', '/dev/null',
|
|
|
|
'-I', meson.current_source_dir() / '../src',
|
|
|
|
]
|
|
|
|
|
|
|
|
std_args_in = [
|
2024-04-04 01:25:57 +08:00
|
|
|
[ '-std=c90', '-Wno-pedantic', '-Wno-variadic-macros', ],
|
2024-04-04 00:29:41 +08:00
|
|
|
[ '-std=c99', ],
|
|
|
|
[ '-std=c11', ],
|
|
|
|
[ '-std=c17', ],
|
|
|
|
[ '-std=c23', ],
|
2024-04-04 01:25:57 +08:00
|
|
|
[ '-std=gnu90', '-Wno-pedantic', '-Wno-variadic-macros', ],
|
2024-04-03 02:42:55 +08:00
|
|
|
[ '-std=gnu99', ],
|
|
|
|
[ '-std=gnu11', ],
|
|
|
|
[ '-std=gnu17', ],
|
|
|
|
[ '-std=gnu23', ],
|
|
|
|
]
|
|
|
|
|
|
|
|
std_args = []
|
|
|
|
foreach std : std_args_in
|
|
|
|
if cc.has_argument(std[0])
|
|
|
|
std_args += [std]
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
foreach item : examples
|
|
|
|
foreach std : std_args
|
|
|
|
file = item.get('file')
|
|
|
|
test('cc-' + fs.stem(file) + '-' + std[0].split('=')[1],
|
|
|
|
env,
|
|
|
|
suite : 'example',
|
|
|
|
args : default_args + std + item.get('opts', []) + [file])
|
|
|
|
endforeach
|
|
|
|
endforeach
|