File: meson.build

package info (click to toggle)
fastd 21-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,664 kB
  • sloc: asm: 15,114; ansic: 9,737; yacc: 584; sh: 561; makefile: 160; python: 34; perl: 11
file content (32 lines) | stat: -rw-r--r-- 515 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
project(
	'fastd',
	'c',
	version : '21',
	default_options : [ 'c_std=c99', 'warning_level=2' ],
	meson_version: '>=0.49',
)

subdir('src')
subdir('test')


clang_format = find_program(
	'clang-format',
	required : false,
	disabler : true,
)

custom_target(
	'format',
	build_by_default : false,
	build_always_stale : true,
	output: ['format'],
	command : [
		'sh',
		'-c',
		'cd "$1" && find src test -type f -name "*.[ch]" | xargs "$2" -i --style=file',
		'-',
		meson.current_source_dir(),
		clang_format,
	],
)