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



##########
File path: Makefile
##########
@@ -87,6 +87,10 @@ else
 ifeq ($(CONFIG_BUILD_LOADABLE),)
 
 $(BIN): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all)
+       $(RM) $(BIN)

Review comment:
       Yes

##########
File path: Makefile
##########
@@ -100,9 +104,9 @@ $(SYMTABOBJ): %$(OBJEXT): %.c
 
 $(BIN): $(SYMTABOBJ)
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
-       $(call ARLOCK, "${shell cygpath -w $(BIN)}", $^)
+       $(call ARCHIVE, "${shell cygpath -w $(BIN)}", $^)

Review comment:
       I understand this is the only call to the archive being created (it is 
either the previous recursive call into subdirectories or this one, according 
to the `if`). So in this case we need to create the library from scratch. But 
I'm not really familiar with this SYMTABOBJ rule.

##########
File path: Application.mk
##########
@@ -131,13 +131,12 @@ $(CXXOBJS): %$(SUFFIX)$(OBJEXT): %$(CXXEXT)
        $(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \
                $(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
 
-.built: $(OBJS)
+link:
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
-       $(call ARLOCK, "${shell cygpath -w $(BIN)}", $^)
+       $(call ARCHIVE_ADD, "${shell cygpath -w $(BIN)}", $(OBJS))
 else
-       $(call ARLOCK, $(BIN), $^)
+       $(call ARCHIVE_ADD, $(BIN), $(OBJS))
 endif
-       $(Q) touch $@

Review comment:
       I will take a look at the clean.

##########
File path: Application.mk
##########
@@ -131,13 +131,12 @@ $(CXXOBJS): %$(SUFFIX)$(OBJEXT): %$(CXXEXT)
        $(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \
                $(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
 
-.built: $(OBJS)
+link:
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
-       $(call ARLOCK, "${shell cygpath -w $(BIN)}", $^)
+       $(call ARCHIVE_ADD, "${shell cygpath -w $(BIN)}", $(OBJS))
 else
-       $(call ARLOCK, $(BIN), $^)
+       $(call ARCHIVE_ADD, $(BIN), $(OBJS))
 endif
-       $(Q) touch $@

Review comment:
       Yes, it appears .depend covers it, don't really understand the purpose 
of the extra search for .built.
   

##########
File path: Application.mk
##########
@@ -131,13 +131,12 @@ $(CXXOBJS): %$(SUFFIX)$(OBJEXT): %$(CXXEXT)
        $(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \
                $(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
 
-.built: $(OBJS)
+link:
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
-       $(call ARLOCK, "${shell cygpath -w $(BIN)}", $^)
+       $(call ARCHIVE_ADD, "${shell cygpath -w $(BIN)}", $(OBJS))
 else
-       $(call ARLOCK, $(BIN), $^)
+       $(call ARCHIVE_ADD, $(BIN), $(OBJS))
 endif
-       $(Q) touch $@

Review comment:
       > I tried again to see if there is any leftover if we omit the search 
for ".built", but things seem clean. I'm not sure if there is a place where 
only .built is generated. We need to let the checks of this PR run to know 
(after we merge the dependency).
   > If ".built" is not needed, please remove the search from Direcotry.mk too.
   
   Yes, I did the same check. I have already modified my local commit to 
include it but did not want to push to step on your review.
   
   > 
   > BTW, can you build stm32f4discovery:wifi? I pulled your changes (both 
os&apps) I can build other cofings like esp32-core:nsh but the 
stm32f4discovery:wifi is giving me the libapp.a file not found error.
   
   Thanks for testing, yes it fails. It seems this is the LOADABLE case. I will 
look into how to fix this.

##########
File path: Application.mk
##########
@@ -131,13 +131,12 @@ $(CXXOBJS): %$(SUFFIX)$(OBJEXT): %$(CXXEXT)
        $(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \
                $(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
 
-.built: $(OBJS)
+link:
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
-       $(call ARLOCK, "${shell cygpath -w $(BIN)}", $^)
+       $(call ARCHIVE_ADD, "${shell cygpath -w $(BIN)}", $(OBJS))
 else
-       $(call ARLOCK, $(BIN), $^)
+       $(call ARCHIVE_ADD, $(BIN), $(OBJS))
 endif
-       $(Q) touch $@

Review comment:
       I managed to solve this, I force pushed the change.

##########
File path: Makefile
##########
@@ -100,9 +104,9 @@ $(SYMTABOBJ): %$(OBJEXT): %.c
 
 $(BIN): $(SYMTABOBJ)
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
-       $(call ARLOCK, "${shell cygpath -w $(BIN)}", $^)
+       $(call ARCHIVE, "${shell cygpath -w $(BIN)}", $^)

Review comment:
       You were right, this needed ARCHIVE_ADD and remove the library earlier. 
I just pushed a change which consideres both the CONFIG_BUILD_LOADABLE and 
!CONFIG_BUILD_LOADABLE case.




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