Fix genrule cmd syntax: escape dollar paren for Soong
Soong interprets $(...) as variable references. dirname was being parsed as an unknown variable. Escape to $$(...) to pass it through to the shell as a literal dirname command. Copyright (C) 2026 Brendan Szymanski <hello@bscubed.dev>
This commit is contained in:
parent
e23fdcbdfe
commit
53d864b45d
1 changed files with 8 additions and 8 deletions
|
|
@ -238,7 +238,7 @@ genrule {
|
|||
],
|
||||
out: ["compiler/bi_opcodes.c"],
|
||||
tools: ["panfrost_bi_opcodes_c"],
|
||||
cmd: "PYTHONPATH=$(dirname $(location panfrost_bi_opcodes_c)):$$PYTHONPATH " +
|
||||
cmd: "PYTHONPATH=$$(dirname $(location panfrost_bi_opcodes_c)):$$PYTHONPATH " +
|
||||
"python3 $(location panfrost_bi_opcodes_c) $(in) > $(out)",
|
||||
}
|
||||
|
||||
|
|
@ -250,7 +250,7 @@ genrule {
|
|||
],
|
||||
out: ["compiler/bi_packer.c"],
|
||||
tools: ["panfrost_bi_packer_c"],
|
||||
cmd: "PYTHONPATH=$(dirname $(location panfrost_bi_packer_c)):$$PYTHONPATH " +
|
||||
cmd: "PYTHONPATH=$$(dirname $(location panfrost_bi_packer_c)):$$PYTHONPATH " +
|
||||
"python3 $(location panfrost_bi_packer_c) $(in) > $(out)",
|
||||
}
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ genrule {
|
|||
],
|
||||
out: ["compiler/bi_printer.c"],
|
||||
tools: ["panfrost_bi_printer_c"],
|
||||
cmd: "PYTHONPATH=$(dirname $(location panfrost_bi_printer_c)):$$PYTHONPATH " +
|
||||
cmd: "PYTHONPATH=$$(dirname $(location panfrost_bi_printer_c)):$$PYTHONPATH " +
|
||||
"python3 $(location panfrost_bi_printer_c) $(in) > $(out)",
|
||||
}
|
||||
|
||||
|
|
@ -274,7 +274,7 @@ genrule {
|
|||
],
|
||||
out: ["compiler/bi_swizzles.c"],
|
||||
tools: ["panfrost_bi_swizzles_c"],
|
||||
cmd: "PYTHONPATH=$(dirname $(location panfrost_bi_swizzles_c)):$$PYTHONPATH " +
|
||||
cmd: "PYTHONPATH=$$(dirname $(location panfrost_bi_swizzles_c)):$$PYTHONPATH " +
|
||||
"python3 $(location panfrost_bi_swizzles_c) $(in) > $(out)",
|
||||
}
|
||||
|
||||
|
|
@ -282,7 +282,7 @@ genrule {
|
|||
name: "panfrost_bifrost_nir_algebraic_c_gen",
|
||||
out: ["compiler/bifrost_nir_algebraic.c"],
|
||||
tools: ["panfrost_bifrost_nir_algebraic"],
|
||||
cmd: "PYTHONPATH=$(dirname $(location panfrost_bifrost_nir_algebraic))/../nir:$$PYTHONPATH " +
|
||||
cmd: "PYTHONPATH=$$(dirname $(location panfrost_bifrost_nir_algebraic))/../nir:$$PYTHONPATH " +
|
||||
"python3 $(location panfrost_bifrost_nir_algebraic) -p " +
|
||||
"$$(dirname $(location panfrost_bifrost_nir_algebraic))/../nir > $(out)",
|
||||
}
|
||||
|
|
@ -291,7 +291,7 @@ genrule {
|
|||
name: "panfrost_midgard_nir_algebraic_c_gen",
|
||||
out: ["midgard/midgard_nir_algebraic.c"],
|
||||
tools: ["panfrost_midgard_nir_algebraic"],
|
||||
cmd: "PYTHONPATH=$(dirname $(location panfrost_midgard_nir_algebraic))/../compiler/nir:$$PYTHONPATH " +
|
||||
cmd: "PYTHONPATH=$$(dirname $(location panfrost_midgard_nir_algebraic))/../compiler/nir:$$PYTHONPATH " +
|
||||
"python3 $(location panfrost_midgard_nir_algebraic) -p " +
|
||||
"$$(dirname $(location panfrost_midgard_nir_algebraic))/../compiler/nir > $(out)",
|
||||
}
|
||||
|
|
@ -303,7 +303,7 @@ genrule {
|
|||
],
|
||||
out: ["compiler/valhall/valhall.c"],
|
||||
tools: ["panfrost_valhall_c"],
|
||||
cmd: "PYTHONPATH=$(dirname $(location panfrost_valhall_c)):$$PYTHONPATH " +
|
||||
cmd: "PYTHONPATH=$$(dirname $(location panfrost_valhall_c)):$$PYTHONPATH " +
|
||||
"python3 $(location panfrost_valhall_c) > $(out)",
|
||||
}
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ genrule {
|
|||
],
|
||||
out: ["compiler/bifrost_gen_disasm.c"],
|
||||
tools: ["panfrost_gen_disasm"],
|
||||
cmd: "PYTHONPATH=$(dirname $(location panfrost_gen_disasm)):$$PYTHONPATH " +
|
||||
cmd: "PYTHONPATH=$$(dirname $(location panfrost_gen_disasm)):$$PYTHONPATH " +
|
||||
"python3 $(location panfrost_gen_disasm) $(in) > $(out)",
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue