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



##########
File path: tools/Config.mk
##########
@@ -458,7 +458,8 @@ define CLEAN
 endef
 else
 define CLEAN
-       $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp
+       $(call DELFILE, $(wildcard $(foreach obj, $(OBJS), $(addsuffix /$(obj), 
$(subst :, ,$(VPATH))))))
+       $(call DELFILE, *$(OBJEXT) *$(LIBEXT) *~ .*.swp)

Review comment:
       If we don't consider reconfigure which may change $(OBJS), it's enough 
to just "rm $(OBJS)". On the other hand, we have to "rm *$(OBJEXT)" for the 
current working directory and it's child directories.
   OBJEXT and LIBEXIT is always defined here:
   https://github.com/apache/incubator-nuttx/blob/master/tools/Config.mk#L108
   so it should be safe.




----------------------------------------------------------------
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:
[email protected]


Reply via email to