--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To post to this group, send email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/ee00303a-6a2b-441a-b518-b15de7d10217%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No magic sauce unfortunately. I'll switch to deleting and creating an output directory with a suffix.
Thanks for your help,
Sanjay
On Mon, Mar 30, 2015 at 8:07 AM, <balas...@gmail.com> wrote:
> Hi,
>
> I wrote a custom `latex_pdf' rule to compile some documentation in our project. It looks something like this: https://gist.github.com/balasanjay/efc7a59d658aef6533d2
to get an output directory, rather than stripping the filename from
your output, I'd recommend to do this:
output_dir = ctx.outputs.output_pdf.path + ".dir"
otherwise, your rule wil share output dirs if there are 2 .tex files
in the same directory.
You can do
"rm -rf %s && mkdir -p %s" % (output_dir, output_dir)
to create the directory.
> pdflatex will generate some extra files during compilation. The Makefile I wrote for this purpose deleted and recreated the output directory to ensure that intermediate files don't leak between compilations.
>
> So, I was wondering: does bazel clean up intermediate files from previous executions before running the command again?
>
> Thanks,
> Sanjay
>
> --
> You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.