]> git.tdb.fi Git - ext/sigc++-2.0.git/blob - sigc++/functors/meson.build
Import libsigc++ 2.10.8 sources
[ext/sigc++-2.0.git] / sigc++ / functors / meson.build
1 # sigc++/functors
2
3 # Input: maintainer_mode, python3, handle_built_files, m4_template, m4_include_dir
4 # Input and output: built_h_files, built_h_file_targets
5
6 # .m4 files to build .h files from.
7 functors_h_m4_files = [
8   'functor_trait.h',
9   'mem_fun.h',
10   'ptr_fun.h',
11   'slot.h',
12 ]
13 foreach file : functors_h_m4_files
14   built_h_files += 'functors' / file
15 endforeach
16
17 if maintainer_mode
18   # Maintainer mode. Generate .h files from .m4 files in macros/ directory.
19   foreach file : functors_h_m4_files
20     built_h_file_targets += custom_target('functors_' + file,
21       input: 'macros' / file + '.m4',
22       output: file,
23       command: [
24         python3, handle_built_files, 'build_from_m4',
25         m4_include_dir,
26         '@INPUT@',
27         '@OUTPUT@',
28       ],
29       depend_files: m4_template,
30       build_by_default: maintainer_mode,
31       install: false,
32     )
33   endforeach
34 endif