I have a project with fairly large makefiles, and they tend to grow slower over time (even when nothing needs to be done).
Most of this slowdown is because there are many variables instantiated by executing subprocess:
ANSWER=$(shell echo 1 + 41 | bc)
The fix is typically easy (find another way to do it, or at least assign using :=), but the problem is finding all these (and measuring the impact of each, since 100 echos can be much faster than a single bc)
Unfortunately neither make nor remake seem to provide a way to trace this.
$ cat Makefile
ANSWER=$(shell echo 1 + 41 | bc)
all:
@echo ANSWER=$(ANSWER)%
$ make --debug=all | grep bc
[no output]
$ remake --trace=full | grep bc
[no output]
So it would be nice if remake provided a way to trace every subprocess created by make (and maybe even how long it took to execute).
I have a project with fairly large makefiles, and they tend to grow slower over time (even when nothing needs to be done).
Most of this slowdown is because there are many variables instantiated by executing subprocess:
The fix is typically easy (find another way to do it, or at least assign using
:=
), but the problem is finding all these (and measuring the impact of each, since 100echo
s can be much faster than a singlebc
)Unfortunately neither
make
norremake
seem to provide a way to trace this.So it would be nice if remake provided a way to trace every subprocess created by make (and maybe even how long it took to execute).