+ $(LINK) -'$(PROG)[op]'
+
+$(PROG).rel: config.inc version.inc
+
+$(foreach X,$(subst =,:=,$(subst ",,$(filter VCS_%,\
+ $(shell autorevision -t sh -o $(CURDIR)/autorevision.cache)))),$(eval $X))
+
+VERS := $(shell echo "$(VCS_TAG)" | sed -e 's/^v//g')
+
+ifneq ($(VCS_TICK),0)
+ VERS := $(VERS)-$(VCS_TICK)
+endif
+ifneq ($(VCS_BRANCH),master)
+ VERS := $(VERS)-$(VCS_BRANCH)
+endif
+ifeq ($(VCS_WC_MODIFIED),1)
+ VERS := $(VERS)-dirty
+endif
+
+
+
+version.inc: autorevision.cache
+ @echo update $@ to $(VERS)
+ @printf "defvers macro\r\n\
+ db '$(VERS)'\r\n\
+ endm\r\n\032" > $@