Skip to content

Commit

Permalink
.version fix apache#3
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRosenthal committed Dec 30, 2021
1 parent 667b036 commit a297b24
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tools/Makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -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)

.PHONY: $(TOPDIR)/.version
endif

# Process architecture specific directories
Expand Down Expand Up @@ -222,8 +226,11 @@ $(TOPDIR)/.version:
$(Q) tools/version.sh $(VERSION_ARG) .version
$(Q) chmod 755 .version

testa: $(TOPDIR)/.version
@cat $^

include/nuttx/version.h: $(TOPDIR)/.version tools/mkversion$(HOSTEXEEXT)
$(Q) echo "Create version.h"
@echo "Create version.h"
$(Q) tools/mkversion $(TOPDIR) > [email protected]
$(Q) $(call TESTANDREPLACEFILE, [email protected], $@)

Expand Down

0 comments on commit a297b24

Please sign in to comment.