summaryrefslogtreecommitdiff
path: root/src/lib/ector
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
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')
-rw-r--r--src/lib/ector/cairo/meson.build4
-rw-r--r--src/lib/ector/gl/meson.build4
-rw-r--r--src/lib/ector/meson.build8
-rw-r--r--src/lib/ector/software/meson.build4
4 files changed, 15 insertions, 5 deletions
diff --git a/src/lib/ector/cairo/meson.build b/src/lib/ector/cairo/meson.build
index 2b45ce2b87..e9ebc60708 100644
--- a/src/lib/ector/cairo/meson.build
+++ b/src/lib/ector/cairo/meson.build
@@ -21,12 +21,14 @@ foreach eo_file : pub_eo_files
21 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 21 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
22 input : eo_file, 22 input : eo_file,
23 output : [eo_file + '.h'], 23 output : [eo_file + '.h'],
24 depfile : eo_file + '.d',
24 install : false, 25 install : false,
25 install_dir : dir_package_include, 26 install_dir : dir_package_include,
26 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 27 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
27 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 28 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
28 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 29 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
29 '-gch', '@INPUT@']) 30 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
31 '-gchd', '@INPUT@'])
30endforeach 32endforeach
31 33
32install_data(pub_eo_files, 34install_data(pub_eo_files,
diff --git a/src/lib/ector/gl/meson.build b/src/lib/ector/gl/meson.build
index dad958c0fc..11bb8cfc6a 100644
--- a/src/lib/ector/gl/meson.build
+++ b/src/lib/ector/gl/meson.build
@@ -24,12 +24,14 @@ foreach eo_file : pub_eo_files
24 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 24 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
25 input : eo_file, 25 input : eo_file,
26 output : [eo_file + '.h'], 26 output : [eo_file + '.h'],
27 depfile : eo_file + '.d',
27 install : false, 28 install : false,
28 install_dir : dir_package_include, 29 install_dir : dir_package_include,
29 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 30 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
30 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 31 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
31 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 32 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
32 '-gch', '@INPUT@']) 33 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
34 '-gchd', '@INPUT@'])
33endforeach 35endforeach
34 36
35install_data(pub_eo_files, 37install_data(pub_eo_files,
diff --git a/src/lib/ector/meson.build b/src/lib/ector/meson.build
index be3c6a5f62..58e4f96d53 100644
--- a/src/lib/ector/meson.build
+++ b/src/lib/ector/meson.build
@@ -34,12 +34,14 @@ foreach eo_file : pub_eo_files
34 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 34 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
35 input : eo_file, 35 input : eo_file,
36 output : [eo_file + '.h'], 36 output : [eo_file + '.h'],
37 depfile : eo_file + '.d',
37 install : false, 38 install : false,
38 install_dir : dir_package_include, 39 install_dir : dir_package_include,
39 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 40 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
40 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 41 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
41 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), 42 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
42 '-gch', '@INPUT@']) 43 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
44 '-gchd', '@INPUT@'])
43endforeach 45endforeach
44 46
45eolian_include_directories += ['-I', meson.current_source_dir()] 47eolian_include_directories += ['-I', meson.current_source_dir()]
@@ -60,11 +62,13 @@ foreach eo_file : pub_eo_types_files
60 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 62 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
61 input : eo_file, 63 input : eo_file,
62 output : [eo_file + '.h'], 64 output : [eo_file + '.h'],
65 depfile : eo_file + '.d',
63 install : false, 66 install : false,
64 install_dir : dir_package_include, 67 install_dir : dir_package_include,
65 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, 68 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
66 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), 69 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
67 '-gh', '@INPUT@']) 70 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
71 '-ghd', '@INPUT@'])
68endforeach 72endforeach
69 73
70ector_lib = library('ector', 74ector_lib = library('ector',
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,