summaryrefslogtreecommitdiff
path: root/src/lib/efl
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/efl
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/efl')
-rw-r--r--src/lib/efl/interfaces/meson.build24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build
index 8d29c404a8..cb39cff2e5 100644
--- a/src/lib/efl/interfaces/meson.build
+++ b/src/lib/efl/interfaces/meson.build
@@ -18,15 +18,25 @@ pub_eo_file_target = []
18foreach eo_file : pub_legacy_eo_files 18foreach eo_file : pub_legacy_eo_files
19 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 19 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
20 input : eo_file, 20 input : eo_file,
21 output : [eo_file + '.h', eo_file + '.legacy.h',], 21 output : [eo_file + '.h'],
22 depfile : eo_file + '.d',
22 install : true, 23 install : true,
23 install_dir : join_paths(dir_package_include, 'interfaces'), 24 install_dir : join_paths(dir_package_include, 'interfaces'),
24 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 25 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
25 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 26 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
26 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 27 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
28 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
29 '-gchd', '@INPUT@'])
30 pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file,
31 input : eo_file,
32 output : [eo_file + '.legacy.h'],
33 depfile : eo_file + '.legacy.d',
34 install : true,
35 install_dir : join_paths(dir_package_include, 'interfaces'),
36 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
27 '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'), 37 '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'),
28 '-gchl', '@INPUT@']) 38 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.d'),
29 39 '-gld', '@INPUT@'])
30endforeach 40endforeach
31 41
32pub_eo_files = [ 42pub_eo_files = [
@@ -99,12 +109,14 @@ foreach eo_file : pub_eo_files
99 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 109 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
100 input : eo_file, 110 input : eo_file,
101 output : [eo_file + '.h'], 111 output : [eo_file + '.h'],
112 depfile : eo_file + '.d',
102 install : true, 113 install : true,
103 install_dir : join_paths(dir_package_include, 'interfaces'), 114 install_dir : join_paths(dir_package_include, 'interfaces'),
104 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 115 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
105 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 116 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
106 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 117 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
107 '-gch', '@INPUT@']) 118 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
119 '-gchd', '@INPUT@'])
108endforeach 120endforeach
109 121
110pub_eo_types_files = [ 122pub_eo_types_files = [
@@ -119,11 +131,13 @@ foreach eo_file : pub_eo_types_files
119 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 131 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
120 input : eo_file, 132 input : eo_file,
121 output : [eo_file + '.h'], 133 output : [eo_file + '.h'],
134 depfile : eo_file + '.d',
122 install : true, 135 install : true,
123 install_dir : join_paths(dir_package_include, 'interfaces'), 136 install_dir : join_paths(dir_package_include, 'interfaces'),
124 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 137 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
125 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 138 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
126 '-gh', '@INPUT@']) 139 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
140 '-ghd', '@INPUT@'])
127endforeach 141endforeach
128 142
129pub_eo_files = files(pub_eo_files + pub_legacy_eo_files + pub_eo_types_files) 143pub_eo_files = files(pub_eo_files + pub_legacy_eo_files + pub_eo_types_files)