summaryrefslogtreecommitdiff
path: root/src/lib/ector/software
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2018-10-21 15:55:51 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2018-10-24 12:02:55 +0200
commit5a3d79d3833a85675a26875594b5b07a99d79365 (patch)
treee264900c8e160240eaafc45f5d739d611374b4ee /src/lib/ector/software
parentd82deea833d1adf993b115049ee60b628c530420 (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 'src/lib/ector/software')
-rw-r--r--src/lib/ector/software/meson.build4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/ector/software/meson.build b/src/lib/ector/software/meson.build
index ceb08ef3f2..5e5dc599d7 100644
--- a/src/lib/ector/software/meson.build
+++ b/src/lib/ector/software/meson.build
@@ -23,12 +23,14 @@ foreach eo_file : pub_eo_files
23 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 23 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
24 input : eo_file, 24 input : eo_file,
25 output : [eo_file + '.h'], 25 output : [eo_file + '.h'],
26 depfile : eo_file + '.d',
26 install : false, 27 install : false,
27 install_dir : dir_package_include, 28 install_dir : dir_package_include,
28 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 29 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
29 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 30 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
30 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 31 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
31 '-gch', '@INPUT@']) 32 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
33 '-gchd', '@INPUT@'])
32endforeach 34endforeach
33 35
34install_data(pub_eo_files, 36install_data(pub_eo_files,