summaryrefslogtreecommitdiff
path: root/src/meson.build
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-05-19 10:11:49 +0200
committerTimo Teräs <timo.teras@iki.fi>2020-10-02 12:07:05 +0300
commita904939a43bf43289345321da68b743e0d9ea804 (patch)
tree5a4a9530fe498aef1969340a7b053636fe1c06d3 /src/meson.build
parent111835e860034fe10d7351b3056aff851057fe2b (diff)
downloadapk-tools-a904939a43bf43289345321da68b743e0d9ea804.tar.gz
apk-tools-a904939a43bf43289345321da68b743e0d9ea804.tar.bz2
apk-tools-a904939a43bf43289345321da68b743e0d9ea804.tar.xz
apk-tools-a904939a43bf43289345321da68b743e0d9ea804.zip
build: allow building without help in meson
Diffstat (limited to 'src/meson.build')
-rw-r--r--src/meson.build25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/meson.build b/src/meson.build
index 972e4b4..07beac7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -54,15 +54,24 @@ apk_src = [
'help.c',
]
-genhelp_script = find_program('genhelp.lua')
+if lua_bin.found()
+ genhelp_script = find_program('genhelp.lua')
-generated_help = custom_target(
- 'help.h',
- capture: true,
- output: 'help.h',
- input: man_files,
- command: [genhelp_script, '@INPUT@'],
-)
+ generated_help = custom_target(
+ 'help.h',
+ capture: true,
+ output: 'help.h',
+ input: man_files,
+ command: [genhelp_script, '@INPUT@'],
+ )
+else
+ generated_help = custom_target(
+ 'help.h',
+ capture: true,
+ output: 'help.h',
+ command: ['echo', '#define NO_HELP'],
+ )
+endif
apk_src += [ generated_help ]