Use $(RULEDIR) to avoid an implicit dependency on output_to_genfiles.

PiperOrigin-RevId: 611652089
This commit is contained in:
jax authors 2024-02-29 17:39:28 -08:00
parent 30d3bb4aba
commit 32bb3b0613

View File

@ -49,9 +49,11 @@ genrule(
"_triton_ops_gen.py",
"_triton_enum_gen.py",
],
# Use $(RULEDIR) to avoid an implicit dependency on whether inputs are in bin or genfiles.
cmd = """
for src in $(SRCS); do
out=$${src//_raw/}
base=$$(basename $$src)
out=$(RULEDIR)/$${base//_raw/}
echo '# pytype: skip-file' > $${out} && \
cat $${src} |
sed -e 's/^from \\.\\./from jaxlib.mlir\\./g' |