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

index 10497621c40816ea3ec0331b0647e556daa67934..dd1e9eda07ee9137e27cf93736ac6c43392271f8 100644 (file)
@@ -248,6 +248,7 @@ conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbin
 conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH',           join_paths(bindir, 'systemd-stdio-bridge'))
 conf.set_quoted('ROOTBINDIR',                                 rootbindir)
 conf.set_quoted('ROOTPREFIX',                                 rootprefixdir)
+conf.set_quoted('PREFIX',                                     prefixdir)
 conf.set_quoted('ROOTPREFIX_NOSLASH',                         rootprefixdir_noslash)
 conf.set_quoted('RANDOM_SEED_DIR',                            randomseeddir)
 conf.set_quoted('RANDOM_SEED',                                join_paths(randomseeddir, 'random-seed'))
@@ -276,6 +277,7 @@ conf.set_quoted('LIBDIR',                                     libdir)
 conf.set_quoted('ROOTLIBDIR',                                 rootlibdir)
 conf.set_quoted('ROOTLIBEXECDIR',                             rootlibexecdir)
 conf.set_quoted('BOOTLIBDIR',                                 bootlibdir)
+conf.set_quoted('INCLUDE_DIR',                                includedir)
 conf.set_quoted('SYSTEMD_PULL_PATH',                          join_paths(rootlibexecdir, 'systemd-pull'))
 conf.set_quoted('SYSTEMD_IMPORT_PATH',                        join_paths(rootlibexecdir, 'systemd-import'))
 conf.set_quoted('SYSTEMD_IMPORT_FS_PATH',                     join_paths(rootlibexecdir, 'systemd-import-fs'))
index b657b7d0683965c8cad419834d9d0cc793bc5b47..89028aaa6bf2a02cced695aba50e045c1022d959 100644 (file)
@@ -7,13 +7,13 @@
 #  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: libudev
 Description: Library to access udev device information
-Version: @PROJECT_VERSION@
+Version: {{PROJECT_VERSION}}
 Libs: -L${libdir} -ludev
 Cflags: -I${includedir}
index b3ffb8b10aeb55187a545a2eb6ba5a2e3ade5a4f..61e7cc20a6abbc46718a2058262241d5d753349f 100644 (file)
@@ -39,11 +39,14 @@ libudev_static = static_library(
 static_libudev = get_option('static-libudev')
 static_libudev_pic = static_libudev == 'true' or static_libudev == 'pic'
 
-configure_file(
+custom_target(
+        'libudev.pc',
         input : 'libudev.pc.in',
         output : 'libudev.pc',
-        configuration : substs,
-        install_dir : pkgconfiglibdir == 'no' ? '' : pkgconfiglibdir)
+        command : [meson_render_jinja2, config_h, '@INPUT@'],
+        capture : true,
+        install : pkgconfiglibdir != 'no',
+        install_dir : pkgconfiglibdir)
 
 ############################################################