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



##########
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:
       But we need to define the new targets as well and as you can see they 
are slightly different in different cases (according to flags, bin path) and at 
least the way I found to handle that is to use different dep file extensions 
for each case (so one target for each).




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to