Ouss4 commented on a change in pull request #380: URL: https://github.com/apache/incubator-nuttx-apps/pull/380#discussion_r487385182
########## File path: Make.defs ########## @@ -108,10 +108,6 @@ define REGISTER $(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated" endef -define ARLOCK - $(Q) flock $1.lock $(call ARCHIVE, $1, $(2)) Review comment: Hmmmm flock was necessary to get the nightly build in a stable situation. @xiaoxiang781216 could you please comment here. ########## 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: Directories that are going to be cleaned are filtered-out using this marker ".built". Removing it will keep object files (and other autogenerated files) after a clean/distclean. ########## File path: Make.defs ########## @@ -108,10 +108,6 @@ define REGISTER $(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated" endef -define ARLOCK - $(Q) flock $1.lock $(call ARCHIVE, $1, $(2)) Review comment: Hmmmm flock was necessary to get the nightly build to stabilise. @xiaoxiang781216 could you please comment here. ########## 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: Hmm.. is ".depend" covering everything? ########## File path: Makefile ########## @@ -87,6 +87,10 @@ else ifeq ($(CONFIG_BUILD_LOADABLE),) $(BIN): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all) + $(RM) $(BIN) Review comment: Is this to remove old members that are not going to get replaced with the 'r' of `ar crs`? ########## File path: Make.defs ########## @@ -108,10 +108,6 @@ define REGISTER $(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated" endef -define ARLOCK - $(Q) flock $1.lock $(call ARCHIVE, $1, $(2)) Review comment: Hmmmm flock was necessary to get the nightly build to stabilise. @xiaoxiang781216 could you please comment here. ########## 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". 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. 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. ########## 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. 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. ########## File path: Make.defs ########## @@ -108,10 +108,6 @@ define REGISTER $(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated" endef -define ARLOCK - $(Q) flock $1.lock $(call ARCHIVE, $1, $(2)) Review comment: Hmmmm flock was necessary to get the nightly build in a stable situation. @xiaoxiang781216 could you please comment here. ########## 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: Directories that are going to be cleaned are filtered-out using this marker ".built". Removing it will keep object files (and other autogenerated files) after a clean/distclean. ########## File path: Make.defs ########## @@ -108,10 +108,6 @@ define REGISTER $(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated" endef -define ARLOCK - $(Q) flock $1.lock $(call ARCHIVE, $1, $(2)) Review comment: Hmmmm flock was necessary to get the nightly build to stabilise. @xiaoxiang781216 could you please comment here. ########## 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: Hmm.. is ".depend" covering everything? ########## File path: Makefile ########## @@ -87,6 +87,10 @@ else ifeq ($(CONFIG_BUILD_LOADABLE),) $(BIN): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all) + $(RM) $(BIN) Review comment: Is this to remove old members that are not going to get replaced with the 'r' of `ar crs`? ########## File path: Make.defs ########## @@ -108,10 +108,6 @@ define REGISTER $(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated" endef -define ARLOCK - $(Q) flock $1.lock $(call ARCHIVE, $1, $(2)) Review comment: Hmmmm flock was necessary to get the nightly build to stabilise. @xiaoxiang781216 could you please comment here. ########## 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". 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. 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. ########## 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. 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. ---------------------------------------------------------------- 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