File: meson.build

package info (click to toggle)
libvirt-glib 5.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,592 kB
  • sloc: ansic: 21,146; xml: 591; sh: 471; python: 310; javascript: 30; makefile: 9
file content (52 lines) | stat: -rw-r--r-- 1,116 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
scripts = [
    'check-symfile.py',
    'check-symsorting.py',
    'dist.py',
    'gen-authors.py',
]

foreach name : scripts
  sname = name.split('.')[0].underscorify()
  set_variable('@0@_prog'.format(sname), find_program(name))
endforeach

syntax_check_conf = configuration_data()
syntax_check_conf.set('srcdir', meson.project_source_root())

configure_file(
  input: 'Makefile.in',
  output: '@BASENAME@',
  configuration: syntax_check_conf,
)


if host_machine.system() == 'freebsd'
  make_prog = find_program('gmake')
else
  make_prog = find_program('make')
endif

rc = run_command(
  'sed', '-n',
  's/^\\(sc_[a-zA-Z0-9_-]*\\):.*/\\1/p',
  meson.current_source_dir() / 'syntax-check.mk',
  check: true,
)

sc_tests = rc.stdout().strip().split()

# Skip syntax-check if not building from git because we get the list of files
# to check using git commands and it fails if we are not in git repository.
if git
  foreach target : sc_tests
    test(
      target,
      make_prog,
      args: [
        '-C', meson.current_build_dir(),
        target
      ],
      suite: 'syntax-check',
    )
  endforeach
endif