]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: use jinja2 in src/libsystemd/
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 16 May 2021 15:56:15 +0000 (17:56 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 May 2021 01:25:26 +0000 (10:25 +0900)
src/libsystemd/libsystemd.pc.in
src/libsystemd/meson.build

index 74f33b70e668a7b97eef8bcc52e5f23ea7aa5051..da6e4e667ef78d1b7b00d69324371e6a2d1085ba 100644 (file)
@@ -7,14 +7,14 @@
 #  the Free Software Foundation; either version 2.1 of the License, or
 #  (at your option) any later version.
 
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@rootlibdir@
-includedir=@includedir@
+prefix={{PREFIX}}
+exec_prefix={{PREFIX}}
+libdir={{ROOTLIBDIR}}
+includedir={{INCLUDE_DIR}}
 
 Name: systemd
 Description: systemd Library
-URL: @PROJECT_URL@
-Version: @PROJECT_VERSION@
+URL: {{PROJECT_URL}}
+Version: {{PROJECT_VERSION}}
 Libs: -L${libdir} -lsystemd
 Cflags: -I${includedir}
index f55bdcd1a5c0da725d90d57e3d7e9f30c7636e4d..5af8b75af26d8d87a3ae4f8460cdebaaf38ac357 100644 (file)
@@ -177,11 +177,14 @@ libsystemd_sym_path = join_paths(meson.current_source_dir(), 'libsystemd.sym')
 static_libsystemd = get_option('static-libsystemd')
 static_libsystemd_pic = static_libsystemd == 'true' or static_libsystemd == 'pic'
 
-configure_file(
+custom_target(
+        'libsystemd.pc',
         input : 'libsystemd.pc.in',
         output : 'libsystemd.pc',
-        configuration : substs,
-        install_dir : pkgconfiglibdir == 'no' ? '' : pkgconfiglibdir)
+        command : [meson_render_jinja2, config_h, '@INPUT@'],
+        capture : true,
+        install : pkgconfiglibdir != 'no',
+        install_dir : pkgconfiglibdir)
 
 ############################################################