diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-05-16 18:46:59 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-05-19 10:25:26 +0900 |
commit | 46c4f8dc8a86faff6b0d14aebe6e1672ed502a82 (patch) | |
tree | a748b25a6cd9745b5252494b9469272e5e1b2f5c | |
parent | b1ac8498ac414f5eae76939e9db26530c85a9a1c (diff) | |
download | systemd-46c4f8dc8a86faff6b0d14aebe6e1672ed502a82.tar.gz |
meson: use jinja2 also for custom-entities.ent
This doesn't matter too much, but makes things a bit more consistent.
A minor advantage is that the file is not a configuration file for meson
anymore, so:
a) It is not built unless pulled in by another target. Since
we don't usually build man pages by default, this saves a tiny
amount of work.
b) When the .in file is updated, meson does not reconfigure everything,
but just rebuilds the dependent targets.
Now that the conversion is finished, time for benchmarking:
a full build with default settings (and -Dstandalonebinaries=true), yields
before this pull request: 1687 targets, 148.13s user 35.17s system 317% cpu 57.697 total
with the full pull request: 1714 targets, 143.07s user 27.87s system 314% cpu 54.369 total
The difference doesn't seem significant. Partial rebuilds might be faster as
mentioned before.
-rw-r--r-- | man/custom-entities.ent.in | 24 | ||||
-rw-r--r-- | man/meson.build | 14 | ||||
-rw-r--r-- | meson.build | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/man/custom-entities.ent.in b/man/custom-entities.ent.in index 8e494c7371..9c6a2d0558 100644 --- a/man/custom-entities.ent.in +++ b/man/custom-entities.ent.in @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8" ?> -<!ENTITY MOUNT_PATH @MOUNT_PATH@> -<!ENTITY UMOUNT_PATH @UMOUNT_PATH@> -<!ENTITY systemgeneratordir @SYSTEM_GENERATOR_DIR@> -<!ENTITY usergeneratordir @USER_GENERATOR_DIR@> -<!ENTITY systemenvgeneratordir @SYSTEM_ENV_GENERATOR_DIR@> -<!ENTITY userenvgeneratordir @USER_ENV_GENERATOR_DIR@> -<!ENTITY CERTIFICATE_ROOT @CERTIFICATE_ROOT@> -<!ENTITY FALLBACK_HOSTNAME @FALLBACK_HOSTNAME@> -<!ENTITY MEMORY_ACCOUNTING_DEFAULT @MEMORY_ACCOUNTING_DEFAULT_YES_NO@> -<!ENTITY KILL_USER_PROCESSES @KILL_USER_PROCESSES_YES_NO@> -<!ENTITY DEBUGTTY @DEBUGTTY@> -<!ENTITY RC_LOCAL_PATH @RC_LOCAL_PATH@> +<!ENTITY MOUNT_PATH "{{MOUNT_PATH}}"> +<!ENTITY UMOUNT_PATH "{{UMOUNT_PATH}}"> +<!ENTITY systemgeneratordir "{{SYSTEM_GENERATOR_DIR}}"> +<!ENTITY usergeneratordir "{{USER_GENERATOR_DIR}}"> +<!ENTITY systemenvgeneratordir "{{SYSTEM_ENV_GENERATOR_DIR}}"> +<!ENTITY userenvgeneratordir "{{USER_ENV_GENERATOR_DIR}}"> +<!ENTITY CERTIFICATE_ROOT "{{CERTIFICATE_ROOT}}"> +<!ENTITY FALLBACK_HOSTNAME "{{FALLBACK_HOSTNAME}}"> +<!ENTITY MEMORY_ACCOUNTING_DEFAULT "{{MEMORY_ACCOUNTING_DEFAULT_YES_NO}}"> +<!ENTITY KILL_USER_PROCESSES "{{KILL_USER_PROCESSES_YES_NO}}"> +<!ENTITY DEBUGTTY "{{DEBUGTTY}}"> +<!ENTITY RC_LOCAL_PATH "{{RC_LOCAL_PATH}}"> <!ENTITY fedora_latest_version "34"> <!ENTITY fedora_cloud_release "1.2"> diff --git a/man/meson.build b/man/meson.build index b21631b873..ff36d26cb4 100644 --- a/man/meson.build +++ b/man/meson.build @@ -26,10 +26,12 @@ 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( +custom_entities_ent = custom_target( + 'custom-entities.ent', input : 'custom-entities.ent.in', output : 'custom-entities.ent', - configuration : conf) + command : [meson_render_jinja2, config_h, '@INPUT@'], + capture : true) man_pages = [] html_pages = [] @@ -60,7 +62,7 @@ foreach tuple : xsltproc.found() ? manpages : [] input : xml, output : [man] + manaliases, command : xslt_cmd + [custom_man_xsl, '@INPUT@'], - depend_files : custom_entities_ent, + depends : custom_entities_ent, install : want_man, install_dir : mandirn) man_pages += p1 @@ -85,8 +87,7 @@ foreach tuple : xsltproc.found() ? manpages : [] input : xml, output : html, command : xslt_cmd + [custom_html_xsl, '@INPUT@'], - depend_files : custom_entities_ent, - depends : p2, + depends : [custom_entities_ent, p2], install : want_html, install_dir : join_paths(docdir, 'html')) html_pages += p3 @@ -163,8 +164,7 @@ foreach tuple : xsltproc.found() ? [['systemd.directives', '7', systemd_directiv input : xml, output : html, command : xslt_cmd + [custom_html_xsl, '@INPUT@'], - depend_files : custom_entities_ent, - depends : p2, + depends : [custom_entities_ent, p2], install : want_html and have_lxml, install_dir : join_paths(docdir, 'html')) html_pages += p3 diff --git a/meson.build b/meson.build index d4bd47ea2d..41129b92c4 100644 --- a/meson.build +++ b/meson.build @@ -3655,7 +3655,7 @@ custom_target( 'cd @0@ && '.format(meson.build_root()) + 'python3 @0@/tools/update-man-rules.py $(find @0@ -wholename "*/man/*.xml") >t && '.format(project_source_root) + 'mv t @0@/man/rules/meson.build'.format(meson.current_source_dir())], - depend_files : custom_entities_ent) + depends : custom_entities_ent) ############################################################ watchdog_opt = service_watchdog == '' ? 'disabled' : service_watchdog |