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 2022/11/08 03:16:17 UTC

[GitHub] [incubator-nuttx] Gary-Hobson opened a new pull request, #7552: tools: ignore errors when indir does not exist

Gary-Hobson opened a new pull request, #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552

   ## Summary
   fix the error message when executing make -C nuttx/tools -f Makefile.host clean
   /bin/sh: 1: nuttx/tools/../tools/incdir: not found
   
   ## Impact
   
   ## Testing
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1023501541


##########
tools/Config.mk:
##########
@@ -577,9 +583,9 @@ $(1)_$(2):
 
 endef
 
-export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})
-export INCDIR_PREFIX := $(subst "X",,${shell $(INCDIR) "$(CC)" "X"})
-export INCSYSDIR_PREFIX := $(subst "X",,${shell $(INCDIR) -s "$(CC)" "X"})
+export DEFINE_PREFIX ?= $(subst X,,${shell $(DEFINE) "$(CC)" "X" 2> ${EMPTYFILE}})

Review Comment:
   OK



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1022993501


##########
tools/Config.mk:
##########
@@ -577,9 +583,9 @@ $(1)_$(2):
 
 endef
 
-export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})
-export INCDIR_PREFIX := $(subst "X",,${shell $(INCDIR) "$(CC)" "X"})
-export INCSYSDIR_PREFIX := $(subst "X",,${shell $(INCDIR) -s "$(CC)" "X"})
+export DEFINE_PREFIX ?= $(subst X,,${shell $(DEFINE) "$(CC)" "X" 2> ${EMPTYFILE}})

Review Comment:
   does ?= still improve the build speed?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] Gary-Hobson commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
Gary-Hobson commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1016187654


##########
tools/Config.mk:
##########
@@ -578,8 +578,8 @@ $(1)_$(2):
 endef
 
 export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})
-export INCDIR_PREFIX := $(subst "X",,${shell $(INCDIR) "$(CC)" "X"})
-export INCSYSDIR_PREFIX := $(subst "X",,${shell $(INCDIR) -s "$(CC)" "X"})
+export INCDIR_PREFIX := $(subst "X",,${shell $(INCDIR) "$(CC)" "X" 2>/dev/null})

Review Comment:
   Done~



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1017003851


##########
tools/Config.mk:
##########
@@ -241,10 +241,12 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
   INCDIR ?= "$(TOPDIR)\tools\incdir.bat"
 else ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   DEFINE ?= "$(TOPDIR)/tools/define.sh" -w
-  INCDIR ?= "$(TOPDIR)/tools/incdir$(HOSTEXEEXT)" -w
+  INCDIR ?= $(shell if [ -f $(TOPDIR)/tools/incdir${HOSTEXEEXT} ];\
+              then echo "$(TOPDIR)/tools/incdir$(HOSTEXEEXT)" -w; else echo ":";fi)

Review Comment:
   wildcard(https://www.gnu.org/software/make/manual/html_node/Wildcard-Function.html) is more simple and portable.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1016166347


##########
tools/Config.mk:
##########
@@ -578,8 +578,8 @@ $(1)_$(2):
 endef
 
 export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})
-export INCDIR_PREFIX := $(subst "X",,${shell $(INCDIR) "$(CC)" "X"})
-export INCSYSDIR_PREFIX := $(subst "X",,${shell $(INCDIR) -s "$(CC)" "X"})
+export INCDIR_PREFIX := $(subst "X",,${shell $(INCDIR) "$(CC)" "X" 2>/dev/null})

Review Comment:
   /dev/null doesn't exist on Windows, it's better to check $(INCDIR) exist before invoke it



##########
tools/Config.mk:
##########
@@ -578,8 +578,8 @@ $(1)_$(2):
 endef
 
 export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})

Review Comment:
   why change this line



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] Gary-Hobson commented on pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
Gary-Hobson commented on PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#issuecomment-1314701867

   Cannot assign value to INCDIR according to whether incdir exists
   Because the INCDIR variable is needed when generating incdir


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] Gary-Hobson commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
Gary-Hobson commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1023046452


##########
tools/Config.mk:
##########
@@ -577,9 +583,9 @@ $(1)_$(2):
 
 endef
 
-export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})
-export INCDIR_PREFIX := $(subst "X",,${shell $(INCDIR) "$(CC)" "X"})
-export INCSYSDIR_PREFIX := $(subst "X",,${shell $(INCDIR) -s "$(CC)" "X"})
+export DEFINE_PREFIX ?= $(subst X,,${shell $(DEFINE) "$(CC)" "X" 2> ${EMPTYFILE}})

Review Comment:
   Yes, ?= only assigns if the variable does not exist
   https://stackoverflow.com/questions/4879592/whats-the-difference-between-and-in-makefile
   
   The following is the data of different branch compilation times:
   |   branch| first  |  second |  
   |---|---|---|
   | release-11  |  0m9.706s |  0m1.697s |  
   |  master | 0m4.810s  |  0m0.998s |   
   |  HEAD |   0m4.499s |  0m1.078s |   
   
    



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1017002856


##########
tools/Config.mk:
##########
@@ -578,8 +578,8 @@ $(1)_$(2):
 endef
 
 export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})

Review Comment:
   sorry, I mean why not change this line too



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] Gary-Hobson commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
Gary-Hobson commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1018618338


##########
tools/Config.mk:
##########
@@ -247,6 +247,10 @@ else
   INCDIR ?= "$(TOPDIR)/tools/incdir$(HOSTEXEEXT)"
 endif
 
+ifeq ($(wildcard $(TOPDIR)$(DELIM)tools$(DELIM)incdir${HOSTEXEEXT}),)

Review Comment:
   😅



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] Gary-Hobson commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
Gary-Hobson commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1016188324


##########
tools/Config.mk:
##########
@@ -578,8 +578,8 @@ $(1)_$(2):
 endef
 
 export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})

Review Comment:
   it didn't change



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1018256782


##########
tools/Config.mk:
##########
@@ -247,6 +247,10 @@ else
   INCDIR ?= "$(TOPDIR)/tools/incdir$(HOSTEXEEXT)"
 endif
 
+ifeq ($(wildcard $(TOPDIR)$(DELIM)tools$(DELIM)incdir${HOSTEXEEXT}),)

Review Comment:
   not all host use this(e.g. line 241)



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx] Gary-Hobson commented on a diff in pull request #7552: tools: ignore errors when indir does not exist

Posted by GitBox <gi...@apache.org>.
Gary-Hobson commented on code in PR #7552:
URL: https://github.com/apache/incubator-nuttx/pull/7552#discussion_r1018618451


##########
tools/Config.mk:
##########
@@ -247,6 +247,10 @@ else
   INCDIR ?= "$(TOPDIR)/tools/incdir$(HOSTEXEEXT)"
 endif
 
+ifeq ($(wildcard $(TOPDIR)$(DELIM)tools$(DELIM)incdir${HOSTEXEEXT}),)

Review Comment:
   done~



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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