Yes, this is what we are considering to change. It desn't only improve the parallelization, but also avoids generating the full library(e.g. libc) dependency if the user just changes one source file.
On Sun, Sep 27, 2020 at 10:55 AM Matias N. <mat...@imap.cc> wrote: > > Hi, > as a test I changed the depend generation to main nuttx Makefiles to this: > > %.dd: %.c > $(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $< > $@ > > makedepfile: $(patsubst %.c,%.dd,$(SRCS)) > @for f in $^; do cat $$f; done > Make.dep > $(call DELFILE, $^) > > .depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config > $(Q) $(MAKE) makedepfile > $(Q) touch $@ > > This allows to parallelize each MKDEP call, which currently is done once with > all $(SRCS) together. > > Original: > make depend -j8 11.29s user 6.67s system 106% cpu 16.888 total > Parallel: > make depend -j8 14.34s user 5.73s system 286% cpu 6.994 total > > So about 10 seconds less and much more CPU utilized. > > What do you think of the change? Any reason not to do this? > > Best, > Matias