Marcel Hollerbach
2018-12-07 12:05:58 UTC
bu5hm4n pushed a commit to branch master.
http://git.enlightenment.org/core/efl.git/commit/?id=79ded15ad3c0074e1d378cc5a0accad2399fcc24
commit 79ded15ad3c0074e1d378cc5a0accad2399fcc24
Author: Marcel Hollerbach <***@marcel-hollerbach.de>
Date: Tue Dec 4 20:33:07 2018 +0100
meson: enable cross compiling
the inital work for this commit was coming from `Mark van der Putten`.
In order to not have more options for this, the idea came up to use
mesons autodetection using PATH.
If a cross file is specified, the binaries are used from the system,
rather than from the intree. (Which means --cross-file has the
dependency of efl on the buildsystem)
Differential Revision: https://phab.enlightenment.org/D7415
---
data/elementary/objects/meson.build | 3 +--
src/bin/edje/meson.build | 11 ++++++++---
src/bin/eet/meson.build | 8 +++++++-
src/bin/elementary/meson.build | 10 ++++++++++
src/bin/eolian/meson.build | 10 +++++++++-
5 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/data/elementary/objects/meson.build b/data/elementary/objects/meson.build
index 5e262e74d2..8fc5736c59 100644
--- a/data/elementary/objects/meson.build
+++ b/data/elementary/objects/meson.build
@@ -34,8 +34,7 @@ endforeach
custom_target('prefs_compile',
input: 'test_prefs.epc',
output: 'test_prefs.epb',
- command : ['/usr/bin/env', 'EFL_RUN_IN_TREE=1', elm_prefs_cc.full_path(),
- '@INPUT@', '@OUTPUT@'],
+ command : elm_prefs_cc_exe + ['@INPUT@', '@OUTPUT@'],
depends : elm_prefs_cc,
install : true,
install_dir : join_paths(dir_data, 'elementary', 'objects'),
diff --git a/src/bin/edje/meson.build b/src/bin/edje/meson.build
index 83e4cbbde3..24d62ead62 100644
--- a/src/bin/edje/meson.build
+++ b/src/bin/edje/meson.build
@@ -30,9 +30,14 @@ edje_cc = executable('edje_cc',
link_args : bin_linker_args
)
-env = find_program('env')
-
-edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
+if meson.is_cross_build()
+ _edje_cc = find_program('edje_cc', native: true)
+ edje_cc_path = _edje_cc.path()
+ edje_cc_exe = [_edje_cc]
+else
+ env = find_program('env', native: true)
+ edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
+endif
edje_decc_src = [
'edje_decc.c',
diff --git a/src/bin/eet/meson.build b/src/bin/eet/meson.build
index 8997b0cc64..6f742aea6a 100644
--- a/src/bin/eet/meson.build
+++ b/src/bin/eet/meson.build
@@ -1,4 +1,4 @@
-eet_bin = executable('eet',
+_eet_bin = executable('eet',
'eet_main.c',
dependencies: [eet],
install : true
@@ -8,3 +8,9 @@ install_data(['diffeet','vieet'],
install_mode: 'rwxr-xr-x',
install_dir : dir_bin
)
+
+if meson.is_cross_build()
+ eet_bin = find_program('eet', native : true)
+else
+ eet_bin = _eet_bin
+endif
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index d345af973b..a4a8dc2d21 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -220,6 +220,16 @@ elm_prefs_cc = executable('elm_prefs_cc',
link_args: '-rdynamic'
)
+if meson.is_cross_build()
+ _elm_prefs_cc = find_program('elm_prefs_cc', native: true)
+ elm_prefs_cc_path = _elm_prefs_cc.path()
+ elm_prefs_cc_exe = [_elm_prefs_cc]
+else
+ env = find_program('env', native: true)
+ elm_prefs_cc_exe = [env, 'EFL_RUN_IN_TREE=1', elm_prefs_cc.full_path()]
+endif
+
+
elementary_run_src = [
'run.c'
]
diff --git a/src/bin/eolian/meson.build b/src/bin/eolian/meson.build
index 0714fbea85..0e2152e552 100644
--- a/src/bin/eolian/meson.build
+++ b/src/bin/eolian/meson.build
@@ -21,4 +21,12 @@ eolian_gen_bin = executable('eolian_gen',
eolian_gen_path = eolian_gen_bin.full_path()
-eolian_gen = [eolian_gen_bin, '-S']
+if meson.is_cross_build()
+ _eolian_gen_bin = find_program('eolian_gen', native : true)
+ eolian_gen_path = _eolian_gen_bin.path()
+else
+ _eolian_gen_bin = eolian_gen_bin
+ eolian_gen_path = _eolian_gen_bin.full_path()
+endif
+
+eolian_gen = [_eolian_gen_bin, '-S']
--
http://git.enlightenment.org/core/efl.git/commit/?id=79ded15ad3c0074e1d378cc5a0accad2399fcc24
commit 79ded15ad3c0074e1d378cc5a0accad2399fcc24
Author: Marcel Hollerbach <***@marcel-hollerbach.de>
Date: Tue Dec 4 20:33:07 2018 +0100
meson: enable cross compiling
the inital work for this commit was coming from `Mark van der Putten`.
In order to not have more options for this, the idea came up to use
mesons autodetection using PATH.
If a cross file is specified, the binaries are used from the system,
rather than from the intree. (Which means --cross-file has the
dependency of efl on the buildsystem)
Differential Revision: https://phab.enlightenment.org/D7415
---
data/elementary/objects/meson.build | 3 +--
src/bin/edje/meson.build | 11 ++++++++---
src/bin/eet/meson.build | 8 +++++++-
src/bin/elementary/meson.build | 10 ++++++++++
src/bin/eolian/meson.build | 10 +++++++++-
5 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/data/elementary/objects/meson.build b/data/elementary/objects/meson.build
index 5e262e74d2..8fc5736c59 100644
--- a/data/elementary/objects/meson.build
+++ b/data/elementary/objects/meson.build
@@ -34,8 +34,7 @@ endforeach
custom_target('prefs_compile',
input: 'test_prefs.epc',
output: 'test_prefs.epb',
- command : ['/usr/bin/env', 'EFL_RUN_IN_TREE=1', elm_prefs_cc.full_path(),
- '@INPUT@', '@OUTPUT@'],
+ command : elm_prefs_cc_exe + ['@INPUT@', '@OUTPUT@'],
depends : elm_prefs_cc,
install : true,
install_dir : join_paths(dir_data, 'elementary', 'objects'),
diff --git a/src/bin/edje/meson.build b/src/bin/edje/meson.build
index 83e4cbbde3..24d62ead62 100644
--- a/src/bin/edje/meson.build
+++ b/src/bin/edje/meson.build
@@ -30,9 +30,14 @@ edje_cc = executable('edje_cc',
link_args : bin_linker_args
)
-env = find_program('env')
-
-edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
+if meson.is_cross_build()
+ _edje_cc = find_program('edje_cc', native: true)
+ edje_cc_path = _edje_cc.path()
+ edje_cc_exe = [_edje_cc]
+else
+ env = find_program('env', native: true)
+ edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
+endif
edje_decc_src = [
'edje_decc.c',
diff --git a/src/bin/eet/meson.build b/src/bin/eet/meson.build
index 8997b0cc64..6f742aea6a 100644
--- a/src/bin/eet/meson.build
+++ b/src/bin/eet/meson.build
@@ -1,4 +1,4 @@
-eet_bin = executable('eet',
+_eet_bin = executable('eet',
'eet_main.c',
dependencies: [eet],
install : true
@@ -8,3 +8,9 @@ install_data(['diffeet','vieet'],
install_mode: 'rwxr-xr-x',
install_dir : dir_bin
)
+
+if meson.is_cross_build()
+ eet_bin = find_program('eet', native : true)
+else
+ eet_bin = _eet_bin
+endif
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index d345af973b..a4a8dc2d21 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -220,6 +220,16 @@ elm_prefs_cc = executable('elm_prefs_cc',
link_args: '-rdynamic'
)
+if meson.is_cross_build()
+ _elm_prefs_cc = find_program('elm_prefs_cc', native: true)
+ elm_prefs_cc_path = _elm_prefs_cc.path()
+ elm_prefs_cc_exe = [_elm_prefs_cc]
+else
+ env = find_program('env', native: true)
+ elm_prefs_cc_exe = [env, 'EFL_RUN_IN_TREE=1', elm_prefs_cc.full_path()]
+endif
+
+
elementary_run_src = [
'run.c'
]
diff --git a/src/bin/eolian/meson.build b/src/bin/eolian/meson.build
index 0714fbea85..0e2152e552 100644
--- a/src/bin/eolian/meson.build
+++ b/src/bin/eolian/meson.build
@@ -21,4 +21,12 @@ eolian_gen_bin = executable('eolian_gen',
eolian_gen_path = eolian_gen_bin.full_path()
-eolian_gen = [eolian_gen_bin, '-S']
+if meson.is_cross_build()
+ _eolian_gen_bin = find_program('eolian_gen', native : true)
+ eolian_gen_path = _eolian_gen_bin.path()
+else
+ _eolian_gen_bin = eolian_gen_bin
+ eolian_gen_path = _eolian_gen_bin.full_path()
+endif
+
+eolian_gen = [_eolian_gen_bin, '-S']
--