File: meson.build

package info (click to toggle)
clevis 18-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 832 kB
  • sloc: sh: 4,441; ansic: 1,280; makefile: 8
file content (63 lines) | stat: -rw-r--r-- 1,739 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
project('clevis', 'c', license: 'GPL3+',
  version: '18',
  default_options: 'c_std=c99'
)

libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
bindir = join_paths(get_option('prefix'), get_option('bindir'))

data = configuration_data()
data.set('libexecdir', libexecdir)
data.set('sysconfdir', sysconfdir)
data.set('bindir', bindir)

add_project_arguments(
  '-Wall',
  '-Wextra',
  '-Werror',
  '-Wstrict-aliasing',
  '-Wchar-subscripts',
  '-Wformat-security',
  '-Wmissing-declarations',
  '-Wmissing-prototypes',
  '-Wnested-externs',
  '-Wpointer-arith',
  '-Wshadow',
  '-Wsign-compare',
  '-Wstrict-prototypes',
  '-Wtype-limits',
  '-Wunused-function',
  '-Wno-missing-field-initializers',
  '-Wno-unused-parameter',
  '-Wno-unknown-pragmas',
  '-D_DEFAULT_SOURCE',
  '-D_POSIX_C_SOURCE=200112L',
  '-DBINDIR="' + bindir + '"',
  '-DCLEVIS_USER="' + get_option('user') + '"',
  '-DCLEVIS_GROUP="' + get_option('group') + '"',
  language: 'c'
)

jansson = dependency('jansson', version: '>=2.10', required: false)
jose = dependency('jose', version: '>=8')
asciidoctor = find_program('asciidoctor', required: false)

bins = []
mans = []

subdir('src')

install_data(bins, install_dir: bindir)

if asciidoctor.found()
  foreach m : mans
    custom_target(m.split('/')[-1], input: m + '.adoc', output: m.split('/')[-1],
      command: [asciidoctor, '--attribute', 'reproducible', '--backend=manpage', '-D', meson.current_build_dir(), '@INPUT@'],
      install_dir: join_paths(get_option('mandir'), 'man' + m.split('.')[-1]),
      install: true
    )
  endforeach
else
  warning('Will not build man pages due to missing dependencies!')
endif