You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/18 17:54:41 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2335: Parallelize depend file generation

xiaoxiang781216 commented on a change in pull request #2335:
URL: https://github.com/apache/incubator-nuttx/pull/2335#discussion_r526302883



##########
File path: boards/Makefile
##########
@@ -98,13 +98,28 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
 
 $(BIN): $(OBJS)
 	$(call ARCHIVE, $@, $(OBJS))
+  
+%.dd: %.c
+	$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $< > $@
+  
+%.ddxx: %.cxx
+	$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CXXFLAGS) -- $< > $@
+
+makedepfile: $(patsubst %.c,%.dd,$(SRCS))
+	@for f in $^; do cat $$f; done >> Make.dep
+	$(call DELFILE, $^)
+
+makedepxxfile: $(patsubst %.cxx,%.ddxx,$(CXXSRCS))
+	@for f in $^; do cat $$f; done >> Make.dep
+	$(call DELFILE, $^)
 
 .depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
+	$(call DELFILE, Make.dep)

Review comment:
       if we still use Make.dep which contain all dependence info as before. The simplest approach is to enhance MKDEP to launch $(CC) in parallel, then we don't touch so many Makefile.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org