1def genrule(cmd, **kwargs): 2 # Resolve a distracting inconsistency between Buck and Bazel. 3 # Bazel creates the directory for your output file, while Buck expects the 4 # cmd to create it. 5 # 6 # TODO: send this as a PR to Buck, because Bazel's behavior here is better. 7 cmd = "mkdir -p `dirname ${OUT}`; " + cmd 8 native.genrule(cmd = cmd, **kwargs) 9