diff options
author | Daniel Kolesa <d.kolesa@samsung.com> | 2018-10-21 15:55:51 +0200 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@samsung.com> | 2018-10-24 12:02:55 +0200 |
commit | 5a3d79d3833a85675a26875594b5b07a99d79365 (patch) | |
tree | e264900c8e160240eaafc45f5d739d611374b4ee /src/lib/emotion/meson.build | |
parent | d82deea833d1adf993b115049ee60b628c530420 (diff) |
meson: add eolian custom dependencies support
This uses the meson/ninja depfile functionality + eolian to make
sure proper dependencies between generated files and .eo files
are managed, to ensure consistent re-generation of all generated
files that are affected upon .eo file modification.
For custom rules with multiple outputs, Ninja currently does not
support depfiles. Therefore, split those into two custom rules
so that the depfiles functionality can be enabled. While this
is ugly and slows down the process a little by having to invoke
Eolian twice instead of once, it has to be done and it's still
better than what we had in Autotools anyway.
Differential revision: D7187
Fixes T6700.
Diffstat (limited to '')
-rw-r--r-- | src/lib/emotion/meson.build | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/emotion/meson.build b/src/lib/emotion/meson.build index 56fda43cb9..1caea9dcee 100644 --- a/src/lib/emotion/meson.build +++ b/src/lib/emotion/meson.build | |||
@@ -8,15 +8,25 @@ priv_eo_file_target = [] | |||
8 | foreach eo_file : pub_legacy_eo_files | 8 | foreach eo_file : pub_legacy_eo_files |
9 | pub_eo_file_target += custom_target('eolian_gen_' + eo_file, | 9 | pub_eo_file_target += custom_target('eolian_gen_' + eo_file, |
10 | input : eo_file, | 10 | input : eo_file, |
11 | output : [eo_file + '.h', eo_file + '.legacy.h',], | 11 | output : [eo_file + '.h'], |
12 | depfile : eo_file + '.d', | ||
12 | install : true, | 13 | install : true, |
13 | install_dir : dir_package_include, | 14 | install_dir : dir_package_include, |
14 | command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, | 15 | command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, |
15 | '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), | 16 | '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), |
16 | '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), | 17 | '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), |
18 | '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'), | ||
19 | '-gchd', '@INPUT@']) | ||
20 | pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file, | ||
21 | input : eo_file, | ||
22 | output : [eo_file + '.legacy.h'], | ||
23 | depfile : eo_file + '.legacy.d', | ||
24 | install : true, | ||
25 | install_dir : dir_package_include, | ||
26 | command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, | ||
17 | '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'), | 27 | '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'), |
18 | '-gchl', '@INPUT@']) | 28 | '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.d'), |
19 | 29 | '-gld', '@INPUT@']) | |
20 | endforeach | 30 | endforeach |
21 | 31 | ||
22 | eolian_include_directories += ['-I', meson.current_source_dir()] | 32 | eolian_include_directories += ['-I', meson.current_source_dir()] |