Skip to content

Commit

Permalink
Update ab.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Oct 18, 2024
1 parent d096d77 commit fb5bb87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion build/ab.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ endif
EXT ?=

ifeq ($(PROGRESSINFO),)
rulecount := $(strip $(shell $(MAKE) --no-print-directory -q $(OBJ)/build.mk PROGRESSINFO=1 && $(MAKE) --no-print-directory -n $(MAKECMDGOALS) PROGRESSINFO=XXXPROGRESSINFOXXX | grep XXXPROGRESSINFOXXX | wc -l))
# The first make invocation here has to have its output discarded or else it
# produces spurious 'Leaving directory' messages... don't know why.
rulecount := $(shell $(MAKE) --no-print-directory -q $(OBJ)/build.mk PROGRESSINFO=1 > /dev/null \
&& $(MAKE) --no-print-directory -n $(MAKECMDGOALS) PROGRESSINFO=XXXPROGRESSINFOXXX | grep XXXPROGRESSINFOXXX | wc -l)
ruleindex := 1
PROGRESSINFO = "[$(ruleindex)/$(rulecount)]$(eval ruleindex := $(shell expr $(ruleindex) + 1))"
endif
Expand Down
2 changes: 1 addition & 1 deletion build/ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def emit_rule(name, ins, outs, cmds=[], label=None):
emit(*fouts, "&:" if len(fouts) > 1 else ":", *fins, "\x01", into=lines)

if label:
emit("\t$(hide)", "$(ECHO) $(PROGRESSINFO) ", label, into=lines)
emit("\t$(hide)", "$(ECHO) $(PROGRESSINFO)", label, into=lines)
for c in cmds:
emit("\t$(hide)", c, into=lines)
else:
Expand Down
2 changes: 1 addition & 1 deletion build/protobuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def protojava(self, name, srcs: Targets = [], deps: Targets = []):
cwd=self.cwd,
ins=protos,
outs=[f"={self.localname}.srcjar"],
deps=deps,
deps=srcs + deps,
commands=[
"mkdir -p {dir}/srcs",
"cd {dir} && "
Expand Down

0 comments on commit fb5bb87

Please sign in to comment.