meson: Use assert() to validate the prefix
authorArnaud Rebillout <arnaud.rebillout@collabora.com>
Fri, 19 Oct 2018 10:45:12 +0000 (17:45 +0700)
committerArun Raghavan <arun@arunraghavan.net>
Thu, 27 Dec 2018 11:55:56 +0000 (17:25 +0530)
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
meson.build

index a80bf81..58ff71c 100644 (file)
@@ -31,9 +31,7 @@ libversion = '@0@.@1@.0'.format(soversion, pa_version_minor.to_int() * 100 + pa_
 # Paths
 
 prefix = get_option('prefix')
-if not prefix.startswith('/')
-  error('Prefix is not absolute: "@0@"'.format(prefix))
-endif
+assert(prefix.startswith('/'), 'Prefix is not absolute: "@0@"'.format(prefix))
 
 bindir = join_paths(prefix, get_option('bindir'))
 libdir = join_paths(prefix, get_option('libdir'))