Skip to content

Commit d7a7e1c

Browse files
committed
Makefile: improve print-binary-sizes to be more meaningful.
Users care about memory more than disk, and they care about programs they run more than our test programs and tools. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent ac60568 commit d7a7e1c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,7 @@ ccan-rune-coding.o: $(CCANDIR)/ccan/rune/coding.c
11071107
@$(call VERBOSE, "cc $<", $(CC) $(CFLAGS) -c -o $@ $<)
11081108

11091109
print-binary-sizes: $(ALL_PROGRAMS) $(ALL_TEST_PROGRAMS)
1110-
@find $(ALL_PROGRAMS) $(ALL_TEST_PROGRAMS) -printf '%p\t%s\n'
1111-
@echo 'Total program size: '`find $(ALL_PROGRAMS) -printf '%s\n' | awk '{TOTAL+= $$1} END {print TOTAL}'`
1112-
@echo 'Total tests size: '`find $(ALL_TEST_PROGRAMS) -printf '%s\n' | awk '{TOTAL+= $$1} END {print TOTAL}'`
1110+
@echo User programs:
1111+
@size -t $(PKGLIBEXEC_PROGRAMS) $(filter-out tools/reckless,$(BIN_PROGRAMS)) $(PLUGINS)
1112+
@echo All programs:
1113+
@size -t $(ALL_PROGRAMS) $(ALL_TEST_PROGRAMS) | tail -n1

0 commit comments

Comments
 (0)