summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
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_con
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_con')
-rw-r--r--src/lib/ecore_con/meson.build27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/lib/ecore_con/meson.build b/src/lib/ecore_con/meson.build
index b8b5a36b2a..f945ccd0d4 100644
--- a/src/lib/ecore_con/meson.build
+++ b/src/lib/ecore_con/meson.build
@@ -27,15 +27,25 @@ pub_eo_file_target = []
27foreach eo_file : pub_legacy_eo_files 27foreach eo_file : pub_legacy_eo_files
28 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 28 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
29 input : eo_file, 29 input : eo_file,
30 output : [eo_file + '.h', eo_file + '.legacy.h',], 30 output : [eo_file + '.h'],
31 depfile : eo_file + '.d',
31 install : true, 32 install : true,
32 install_dir : dir_package_include, 33 install_dir : dir_package_include,
33 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 34 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
34 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 35 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
35 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 36 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
37 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
38 '-gchd', '@INPUT@'])
39 pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file,
40 input : eo_file,
41 output : [eo_file + '.legacy.h'],
42 depfile : eo_file + '.legacy.d',
43 install : true,
44 install_dir : dir_package_include,
45 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
36 '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'), 46 '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'),
37 '-gchl', '@INPUT@']) 47 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.d'),
38 48 '-gld', '@INPUT@'])
39endforeach 49endforeach
40 50
41pub_eo_files = [ 51pub_eo_files = [
@@ -85,14 +95,15 @@ endif
85foreach eo_file : pub_eo_files 95foreach eo_file : pub_eo_files
86 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 96 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
87 input : eo_file, 97 input : eo_file,
88 output : [eo_file + '.h', eo_file + '.legacy.h',], 98 output : [eo_file + '.h'],
99 depfile : eo_file + '.d',
89 install : true, 100 install : true,
90 install_dir : dir_package_include, 101 install_dir : dir_package_include,
91 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 102 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
92 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 103 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
93 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 104 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
94 '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'), 105 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
95 '-gch', '@INPUT@']) 106 '-gchd', '@INPUT@'])
96endforeach 107endforeach
97 108
98 109
@@ -106,11 +117,13 @@ foreach eo_file : pub_eo_types_files
106 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 117 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
107 input : eo_file, 118 input : eo_file,
108 output : [eo_file + '.h'], 119 output : [eo_file + '.h'],
120 depfile : eo_file + '.d',
109 install : true, 121 install : true,
110 install_dir : dir_package_include, 122 install_dir : dir_package_include,
111 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 123 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
112 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 124 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
113 '-gh', '@INPUT@']) 125 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
126 '-ghd', '@INPUT@'])
114endforeach 127endforeach
115 128
116eolian_include_directories += ['-I', meson.current_source_dir()] 129eolian_include_directories += ['-I', meson.current_source_dir()]