Skip to content

Commit 2adbe20

Browse files
Backport the fix to new versions of meson (fix #21)
1 parent 7a9ff99 commit 2adbe20

File tree

1 file changed

+12
-24
lines changed

1 file changed

+12
-24
lines changed

target/hexagon/meson.build

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ gen_semantics = executable(
3333
semantics_generated = custom_target(
3434
'semantics_generated.pyinc',
3535
output: 'semantics_generated.pyinc',
36-
input: gen_semantics,
37-
command: ['@INPUT@', '@OUTPUT@'],
36+
command: [gen_semantics, '@OUTPUT@'],
3837
)
3938
hexagon_ss.add(semantics_generated)
4039

@@ -54,90 +53,81 @@ hexagon_ss.add(semantics_generated)
5453
shortcode_generated = custom_target(
5554
'shortcode_generated.h.inc',
5655
output: 'shortcode_generated.h.inc',
57-
input: 'gen_shortcode.py',
5856
depends: [semantics_generated],
5957
depend_files: [hex_common_py, attribs_def],
60-
command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
58+
command: [python, files('gen_shortcode.py'), semantics_generated, attribs_def, '@OUTPUT@'],
6159
)
6260
hexagon_ss.add(shortcode_generated)
6361

6462
helper_protos_generated = custom_target(
6563
'helper_protos_generated.h.inc',
6664
output: 'helper_protos_generated.h.inc',
67-
input: 'gen_helper_protos.py',
6865
depends: [semantics_generated],
6966
depend_files: [hex_common_py, attribs_def, gen_tcg_h],
70-
command: [python, '@INPUT@', semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
67+
command: [python, files('gen_helper_protos.py'), semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
7168
)
7269
hexagon_ss.add(helper_protos_generated)
7370

7471
tcg_funcs_generated = custom_target(
7572
'tcg_funcs_generated.c.inc',
7673
output: 'tcg_funcs_generated.c.inc',
77-
input: 'gen_tcg_funcs.py',
7874
depends: [semantics_generated],
7975
depend_files: [hex_common_py, attribs_def, gen_tcg_h],
80-
command: [python, '@INPUT@', semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
76+
command: [python, files('gen_tcg_funcs.py'), semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
8177
)
8278
hexagon_ss.add(tcg_funcs_generated)
8379

8480
tcg_func_table_generated = custom_target(
8581
'tcg_func_table_generated.c.inc',
8682
output: 'tcg_func_table_generated.c.inc',
87-
input: 'gen_tcg_func_table.py',
8883
depends: [semantics_generated],
8984
depend_files: [hex_common_py, attribs_def],
90-
command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
85+
command: [python, files('gen_tcg_func_table.py'), semantics_generated, attribs_def, '@OUTPUT@'],
9186
)
9287
hexagon_ss.add(tcg_func_table_generated)
9388

9489
helper_funcs_generated = custom_target(
9590
'helper_funcs_generated.c.inc',
9691
output: 'helper_funcs_generated.c.inc',
97-
input: 'gen_helper_funcs.py',
9892
depends: [semantics_generated],
9993
depend_files: [hex_common_py, attribs_def, gen_tcg_h],
100-
command: [python, '@INPUT@', semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
94+
command: [python, files('gen_helper_funcs.py'), semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
10195
)
10296
hexagon_ss.add(helper_funcs_generated)
10397

10498
printinsn_generated = custom_target(
10599
'printinsn_generated.h.inc',
106100
output: 'printinsn_generated.h.inc',
107-
input: 'gen_printinsn.py',
108101
depends: [semantics_generated],
109102
depend_files: [hex_common_py, attribs_def],
110-
command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
103+
command: [python, files('gen_printinsn.py'), semantics_generated, attribs_def, '@OUTPUT@'],
111104
)
112105
hexagon_ss.add(printinsn_generated)
113106

114107
op_regs_generated = custom_target(
115108
'op_regs_generated.h.inc',
116109
output: 'op_regs_generated.h.inc',
117-
input: 'gen_op_regs.py',
118110
depends: [semantics_generated],
119111
depend_files: [hex_common_py, attribs_def],
120-
command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
112+
command: [python, files('gen_op_regs.py'), semantics_generated, attribs_def, '@OUTPUT@'],
121113
)
122114
hexagon_ss.add(op_regs_generated)
123115

124116
op_attribs_generated = custom_target(
125117
'op_attribs_generated.h.inc',
126118
output: 'op_attribs_generated.h.inc',
127-
input: 'gen_op_attribs.py',
128119
depends: [semantics_generated],
129120
depend_files: [hex_common_py, attribs_def],
130-
command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
121+
command: [python, files('gen_op_attribs.py'), semantics_generated, attribs_def, '@OUTPUT@'],
131122
)
132123
hexagon_ss.add(op_attribs_generated)
133124

134125
opcodes_def_generated = custom_target(
135126
'opcodes_def_generated.h.inc',
136127
output: 'opcodes_def_generated.h.inc',
137-
input: 'gen_opcodes_def.py',
138128
depends: [semantics_generated],
139129
depend_files: [hex_common_py, attribs_def],
140-
command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
130+
command: [python, files('gen_opcodes_def.py'), semantics_generated, attribs_def, '@OUTPUT@'],
141131
)
142132
hexagon_ss.add(opcodes_def_generated)
143133

@@ -154,8 +144,7 @@ gen_dectree_import = executable(
154144
iset_py = custom_target(
155145
'iset.py',
156146
output: 'iset.py',
157-
input: gen_dectree_import,
158-
command: ['@INPUT@', '@OUTPUT@'],
147+
command: [gen_dectree_import, '@OUTPUT@'],
159148
)
160149
hexagon_ss.add(iset_py)
161150

@@ -166,9 +155,8 @@ hexagon_ss.add(iset_py)
166155
dectree_generated = custom_target(
167156
'dectree_generated.h.inc',
168157
output: 'dectree_generated.h.inc',
169-
input: 'dectree.py',
170158
depends: [iset_py],
171-
command: ['PYTHONPATH=' + meson.current_build_dir(), '@INPUT@', '@OUTPUT@'],
159+
command: ['env', 'PYTHONPATH=' + meson.current_build_dir(), files('dectree.py'), '@OUTPUT@'],
172160
)
173161
hexagon_ss.add(dectree_generated)
174162

0 commit comments

Comments
 (0)