]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: do not fail if rsync is not installed with meson 0.57.2
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 12 Apr 2021 12:03:32 +0000 (14:03 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 12 Apr 2021 20:28:23 +0000 (21:28 +0100)
https://github.com/mesonbuild/meson/issues/8641

Our CI started to fail. Even if the change is reverted in meson,
we need a quick workaround here.

man/meson.build

index 3cae8446cda77c1194ebd61c03f598c89cd683f6..f9c4b83dc8150a839591edd9b859a92605d6920c 100644 (file)
@@ -184,17 +184,20 @@ html = custom_target(
         depends : html_pages,
         command : ['echo'])
 
-run_target(
-        'doc-sync',
-        depends : man_pages + html_pages,
-        command : ['rsync', '-rlv',
-                   '--delete-excluded',
-                   '--include=man',
-                   '--include=*.html',
-                   '--exclude=*',
-                   '--omit-dir-times',
-                   meson.current_build_dir(),
-                   get_option('www-target')])
+rsync = find_program('rsync', required : false)
+if rsync.found()
+        run_target(
+                'doc-sync',
+                depends : man_pages + html_pages,
+                command : [rsync, '-rlv',
+                           '--delete-excluded',
+                           '--include=man',
+                           '--include=*.html',
+                           '--exclude=*',
+                           '--omit-dir-times',
+                           meson.current_build_dir(),
+                           get_option('www-target')])
+endif
 
 ############################################################