@@ -26,9 +26,8 @@ HAS_GIT=$(shell git rev-parse --is-inside-work-tree >/dev/null 2>&1 ; echo $$?)
2626
2727ifneq ($(HAS_GIT ) , 0)
2828# We have no git used manually set version number.
29- VERSION: =1.0.0
29+ VERSION: =$( shell cat dist/VERSION)
3030COMMIT_HASH: =
31- DEBVERSION: =1.0.0
3231else
3332# We have git, extract information from it.
3433 SUPRE =
5049 ifeq ($(COMMIT),$(TAG_COMMIT))
5150 # Exactly on the tagged commit. The version is the tag!
5251 VERSION: =$(TAG )
53- DEBVERSION: =$(TAG )
5452 else
5553 VERSION: =$(TAG ) ++
56- DEBVERSION: =$(TAG ) ++
5754 endif
5855
5956 ifneq ($(strip $(CHANGES)),)
6057 # There are changes, signify that with a +changes
6158 VERSION: =$(VERSION ) with uncommitted changes
6259 COMMIT_HASH: =$(COMMIT_HASH ) but with uncommitted changes
63- DEBVERSION: =$(DEBVERSION ) l
6460 endif
6561
6662endif
@@ -129,6 +125,7 @@ lcov:
129125 @for x in $(BUILDDIRS ) ; do echo ; echo Bulding $$(basename $$x) ; $(MAKE ) --no-print-directory -C $$ x debug lcov ; done
130126
131127dist :
128+ @echo " $( VERSION) " | cut -f 1 -d ' -' > dist/VERSION
132129 @cat CHANGES | sed ' /20..-..-..:/q' | head -n -1 | sed ' $d' > RELEASE
133130 @rm -f dist/xmq.c dist/xmq.h
134131 @$(MAKE ) --no-print-directory -C $(FIRSTDIR ) release $(shell pwd) /dist/xmq.c $(shell pwd) /dist/xmq.h
@@ -176,14 +173,10 @@ clean-all:
176173
177174DESTDIR? =/usr/local
178175install :
179- install -Dm 755 -s build/default/release/xmq $(DESTDIR ) /bin/xmq
180- install -Dm 644 doc/xmq.1 $(DESTDIR ) /man/man1/xmq.1
181- install -Dm 644 scripts/autocompletion_for_xmq.sh /etc/bash_completion.d/xmq
176+ @./install.sh build/default/release $(DESTDIR )
182177
183178uninstall :
184- rm -f $(DESTDIR ) /bin/xmq
185- rm -f $(DESTDIR ) /man/man1/xmq.1
186- rm -f /etc/bash_completion.d/xmq
179+ @./uninstall.sh $(DESTDIR )
187180
188181linux64 :
189182
0 commit comments