Ouss4 commented on a change in pull request #1149:
URL: https://github.com/apache/incubator-nuttx/pull/1149#discussion_r432872103



##########
File path: tools/Makefile.unix
##########
@@ -381,9 +370,9 @@ include tools/LibTargets.mk
 # is an archive.  Exactly what is performed during pass1 or what it generates
 # is unknown to this makefile unless CONFIG_PASS1_OBJECT is defined.
 
-pass1: $(USERLIBS)
+pass1: tools/incdir$(HOSTEXEEXT) $(USERLIBS)

Review comment:
       Yes, I understand that.
   What do you think about what's described here: 
https://stackoverflow.com/questions/16829933/how-can-i-use-notparallel-in-makefile-only-on-specific-targets
 
   In our example it could be something like:
   ```Make
   pass1libs: $(USERLIBS)
   pass1:
        $(MAKE) tools/incdir$(HOSTEXEEXT)
        $(MAKE) pass1libs
   
   pass2libs: $(NUTTXLIBS)
   pass2: 
        $(MAKE) tools/incdir$(HOSTEXEEXT)
        $(MAKE) pass2libs
   ```
   Or even
   ```Make
   pass1libs: $(USERLIBS)
   pass1: tools/incdir$(HOSTEXEEXT)
        $(MAKE) pass1libs
   
   pass2libs: $(NUTTXLIBS)
   pass2: tools/incdir$(HOSTEXEEXT)
        $(MAKE) pass2libs
   ```
   I guess also the order-only dependency answer could work (if acceptable in 
our Makefiles):
   
   ```Make
   pass1: $(USERLIBS) | tools/incdir$(HOSTEXEEXT)
   
   pass2: $(NUTTXLIBS) | tools/incdir$(HOSTEXEEXT)
   ```
   This would insure that the libs are not built before incdir (but will not 
update pass1/2 if incdir is changed)
   




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