]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: use custom configuration_data() object for man/man and man/html helpers
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 16 May 2021 13:43:41 +0000 (15:43 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 May 2021 01:24:43 +0000 (10:24 +0900)
I want to stop using 'substs'. But in this case, configure_file() is nicer
than custom_target(), because it causes meson to immediately generate the
helpers after configuration, so it's possible to do
'meson build && build/man/man ...', without building anything first.

We only substitute one variable here, so let's use a custom configuration_data()
object.

man/meson.build
meson.build

index 2e3b858f4f3461c5fd6fb3ab32662818ecb4ca92..b21631b873c719763e58689c956375bbe9cd91a3 100644 (file)
@@ -200,12 +200,15 @@ endif
 
 ############################################################
 
+buildroot_substs = configuration_data()
+buildroot_substs.set_quoted('BUILD_ROOT', project_build_root)
+
 configure_file(
         input : 'man.in',
         output : 'man',
-        configuration : substs)
+        configuration : buildroot_substs)
 
 configure_file(
         input : 'html.in',
         output : 'html',
-        configuration : substs)
+        configuration : buildroot_substs)
index f43e9a775c3331a2aaad886e96630e4a1ecc0d91..214096b726dee0f37a7c60952aaa0a80983f55ca 100644 (file)
@@ -319,7 +319,6 @@ substs.set('RC_LOCAL_PATH',                                   get_option('rc-loc
 substs.set('MEMORY_ACCOUNTING_DEFAULT',                       memory_accounting_default ? 'yes' : 'no')
 substs.set('STATUS_UNIT_FORMAT_DEFAULT',                      status_unit_format_default)
 substs.set('HIGH_RLIMIT_NOFILE',                              conf.get('HIGH_RLIMIT_NOFILE'))
-substs.set('BUILD_ROOT',                                      project_build_root)
 
 #####################################################################