xiaoxiang781216 commented on a change in pull request #5069: URL: https://github.com/apache/incubator-nuttx/pull/5069#discussion_r776573421
########## File path: tools/Makefile.unix ########## @@ -42,9 +42,13 @@ CONFIG_VERSION_BUILD ?= "0" VERSION_ARG = -v $(CONFIG_VERSION_STRING) -b $(CONFIG_VERSION_BUILD) else -# Generate .version every time from GIT history +# Generate .version.tmp every time from GIT history +# Only update .version if the contents actually changes + +$(shell tools/version.sh .version.tmp) +$(shell cp -u .version.tmp .version) +# $(shell rm .version.tmp) Review comment: remove ########## File path: tools/Makefile.unix ########## @@ -42,9 +42,13 @@ CONFIG_VERSION_BUILD ?= "0" VERSION_ARG = -v $(CONFIG_VERSION_STRING) -b $(CONFIG_VERSION_BUILD) else -# Generate .version every time from GIT history +# Generate .version.tmp every time from GIT history +# Only update .version if the contents actually changes + +$(shell tools/version.sh .version.tmp) +$(shell cp -u .version.tmp .version) Review comment: why not use mv -u? ########## File path: tools/Makefile.unix ########## @@ -222,8 +226,11 @@ $(TOPDIR)/.version: $(Q) tools/version.sh $(VERSION_ARG) .version $(Q) chmod 755 .version +testa: $(TOPDIR)/.version Review comment: remove -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org