]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: exit earlier from the subdirectory when bash/zshcompletiondir is 'no' 39816/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 20 Nov 2025 05:46:18 +0000 (14:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 20 Nov 2025 05:50:30 +0000 (14:50 +0900)
shell-completion/bash/meson.build
shell-completion/zsh/meson.build

index 43b9c28cb32a0ba156c5413f951fec45d4dba251..178986e17165bb0a1ed93c85dde9e3c2c71f9d1d 100644 (file)
@@ -1,7 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 bashcompletiondir = get_option('bashcompletiondir')
-if bashcompletiondir == ''
+if bashcompletiondir == 'no'
+        subdir_done()
+elif bashcompletiondir == ''
         bash_completion = dependency('bash-completion', required : false)
         if bash_completion.found()
                 bashcompletiondir = bash_completion.get_variable(pkgconfig : 'completionsdir')
@@ -14,7 +16,7 @@ custom_target(
         input : 'systemctl.in',
         output : 'systemctl',
         command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
-        install : bashcompletiondir != 'no',
+        install : true,
         install_dir : bashcompletiondir)
 
 foreach item : [
@@ -58,7 +60,7 @@ foreach item : [
         ['varlinkctl',          ''],
 ]
 
-        if bashcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1)
+        if item[1] == '' or conf.get(item[1]) == 1
                 install_data(item[0],
                              install_dir : bashcompletiondir)
         endif
index f2db67881bef8ed492fc96d9882996203a9ea4a1..221c30627f722c6ff4ef29484f886171f6a60d41 100644 (file)
@@ -1,7 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 zshcompletiondir = get_option('zshcompletiondir')
-if zshcompletiondir == ''
+if zshcompletiondir == 'no'
+        subdir_done()
+elif zshcompletiondir == ''
         zshcompletiondir = datadir / 'zsh/site-functions'
 endif
 
@@ -9,7 +11,7 @@ custom_target(
         input : '_systemctl.in',
         output : '_systemctl',
         command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
-        install : zshcompletiondir != 'no',
+        install : true,
         install_dir : zshcompletiondir)
 
 foreach item : [
@@ -44,7 +46,7 @@ foreach item : [
         ['_varlinkctl',               ''],
 ]
 
-        if zshcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1)
+        if item[1] == '' or conf.get(item[1]) == 1
                 install_data(item[0],
                              install_dir : zshcompletiondir)
         endif