3 echo "version='`git describe --tag`'" >"`dirname "$0"`"/lib/00_version.sh
4 .PHONY: lib/00_version.sh
6 mapsectorsh: mapsector lib/[0-9][0-9]_*.sh
11 echo "# $@ automatically generated from"; \
12 for script in $^; do \
15 sed -n -e '2,/^load$$/p' $<; \
16 for script in `ls lib/[0-9][0-9]_*.sh | sort`; do \
17 echo "#### $$script"; \
22 sed -n -e '/^load$$/,$$p' $<; \
24 @sed -i -e 's/^load$$/###########################################################################/' $@
28 @echo "generating debian/changelog"
31 (git tag -l 'v*'; echo) | while read tag; do \
33 HEAD) version="`git describe --tag --match='v*' | sed -e 's/-/~/' -e 's/-/./g'`"; \
34 release="UNRELEASED" ;; \
35 v*) version="$${lasttag#v}"; \
36 release="unstable" ;; \
38 echo "mapsector ($$version) $$release; urgency=low"; \
40 git log --pretty=oneline --abbrev-commit $$tag$${tag:+..}$$lasttag \
41 | while read commit description; do \
42 echo " * [$$commit] $$description"; \
45 date="`git log --format='%cD' $$lasttag'^!'`"; \
46 author="`git log --format='%an <%ae>' $$lasttag'^!'`"; \
47 echo " -- $$author $$date"; \
52 .PHONY: debian/changelog
54 prepare: lib/00_version.sh debian/changelog
59 rm -f debian/changelog
60 rm -f lib/00_version.sh