summaryrefslogtreecommitdiff
path: root/src/lib/ecore
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/ecore
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/ecore')
-rw-r--r--src/lib/ecore/meson.build20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build
index 732856dd23..dbb511e2bf 100644
--- a/src/lib/ecore/meson.build
+++ b/src/lib/ecore/meson.build
@@ -12,15 +12,25 @@ pub_eo_file_target = []
12foreach eo_file : pub_legacy_eo_files 12foreach eo_file : pub_legacy_eo_files
13 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 13 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
14 input : eo_file, 14 input : eo_file,
15 output : [eo_file + '.h', eo_file + '.legacy.h',], 15 output : [eo_file + '.h'],
16 depfile : eo_file + '.d',
16 install : true, 17 install : true,
17 install_dir : dir_package_include, 18 install_dir : dir_package_include,
18 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 19 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
19 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 20 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
20 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 21 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
22 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
23 '-gchd', '@INPUT@'])
24 pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file,
25 input : eo_file,
26 output : [eo_file + '.legacy.h'],
27 depfile : eo_file + '.legacy.d',
28 install : true,
29 install_dir : dir_package_include,
30 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
21 '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'), 31 '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'),
22 '-gchl', '@INPUT@']) 32 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.d'),
23 33 '-gld', '@INPUT@'])
24endforeach 34endforeach
25 35
26pub_eo_files = [ 36pub_eo_files = [
@@ -72,12 +82,14 @@ foreach eo_file : pub_eo_files
72 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 82 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
73 input : eo_file, 83 input : eo_file,
74 output : [eo_file + '.h'], 84 output : [eo_file + '.h'],
85 depfile : eo_file + '.d',
75 install : true, 86 install : true,
76 install_dir : dir_package_include, 87 install_dir : dir_package_include,
77 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 88 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
78 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 89 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
79 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 90 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
80 '-gch', '@INPUT@']) 91 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
92 '-gchd', '@INPUT@'])
81endforeach 93endforeach
82 94
83# special handling, because this is already eo API and legacy API 95# special handling, because this is already eo API and legacy API