]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - meson.build
Merge pull request #6058 from keszybz/chrooted-test-fixes
[thirdparty/systemd.git] / meson.build
index af97969f575680afeced8e52da570344dbe39059..f932d06a5324dba90321ac4eaf2da17dcfe03a8f 100644 (file)
@@ -224,6 +224,12 @@ cc = meson.get_compiler('c')
 pkgconfig = import('pkgconfig')
 check_compilation_sh = find_program('tools/meson-check-compilation.sh')
 
+cxx = find_program('c++', required : false)
+if cxx.found()
+        #  Used only for tests
+        add_languages('cpp')
+endif
+
 foreach arg : ['-Wundef',
                '-Wlogical-op',
                '-Wmissing-include-dirs',
@@ -1150,15 +1156,14 @@ test_dlopen = executable(
         link_with : [libbasic],
         dependencies : [libdl])
 
-foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME', []],
-                 ['systemd',     '',               []],
-                 ['mymachines', 'ENABLE_MACHINED', []],
-                 ['resolve',    'ENABLE_RESOLVED', [libdl]]]
+foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME'],
+                 ['systemd',    ''               ],
+                 ['mymachines', 'ENABLE_MACHINED'],
+                 ['resolve',    'ENABLE_RESOLVED']]
 
         condition = tuple[1] == '' or conf.get(tuple[1], false)
         if condition
                 module = tuple[0]
-                extra_deps = tuple[2]
 
                 sym = 'src/nss-@0@/nss-@0@.sym'.format(module)
                 version_script_arg = join_paths(meson.current_source_dir(), sym)
@@ -1174,7 +1179,7 @@ foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME', []],
                         link_with : [libsystemd_internal,
                                      libbasic],
                         dependencies : [threads,
-                                        librt] + extra_deps,
+                                        librt],
                         link_depends : sym,
                         install : true,
                         install_dir : rootlibdir)
@@ -2070,6 +2075,7 @@ public_programs += [exe]
 exe = executable('systemd-udevd',
                  systemd_udevd_sources,
                  include_directories : includes,
+                 c_args : ['-DLOG_REALM=LOG_REALM_UDEV'],
                  link_with : [libudev_core,
                               libsystemd_network,
                               libudev_internal],
@@ -2319,11 +2325,10 @@ if git.found() and etags.found()
                  ':/*.[ch]'])
         all_files = files(all_files.stdout().split())
 
-        custom_target(
+        run_target(
                 'TAGS',
-                output : 'TAGS',
                 input : all_files,
-                command : [etags, '-o', '@OUTPUT@'] + all_files)
+                command : [etags, '-o', '@0@/TAGS'.format(meson.source_root())] + all_files)
 endif
 
 if git.found()