File: meson.build

package info (click to toggle)
libvirt 7.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 143,760 kB
  • sloc: ansic: 502,517; xml: 180,512; python: 8,627; sh: 3,992; perl: 2,763; makefile: 509; javascript: 116; cpp: 22
file content (49 lines) | stat: -rw-r--r-- 1,191 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
syntax_check_conf = configuration_data()
syntax_check_conf.set('top_srcdir', meson.source_root())
syntax_check_conf.set('top_builddir', meson.build_root())

flake8_path = ''
if flake8_prog.found()
  flake8_path = flake8_prog.path()
endif
syntax_check_conf.set('flake8_path', flake8_path)
syntax_check_conf.set('runutf8', ' '.join(runutf8))
syntax_check_conf.set('PYTHON3', python3_prog.path())

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 ],
      depends: [
        potfiles_dep,
      ],
      suite: 'syntax-check',
    )
  endforeach
endif