keep version generating in build-helper, so people cloning from git don't need make
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
9195c9b8e8
commit
0cf0cdd0c3
3 changed files with 15 additions and 3 deletions
13
Makefile
13
Makefile
|
@ -18,6 +18,10 @@
|
|||
#
|
||||
#
|
||||
|
||||
A2XM=a2x -f manpage --no-xmllint -a encoding=UTF-8
|
||||
A2XH=a2x -f xhtml --no-xmllint -a encoding=UTF-8
|
||||
helper=./build-helper
|
||||
|
||||
MANDIR=docs/man
|
||||
MAN1DSTDIR=$(MANDIR)/man1
|
||||
MAN7DSTDIR=$(MANDIR)/man7
|
||||
|
@ -32,7 +36,6 @@ RELEASE=release-web release-man release-pypi release-archlinux-makepkg
|
|||
RELEASE+=release-blog release-ml
|
||||
RELEASE+=release-freecode release-archlinux-aur-upload
|
||||
|
||||
helper=./build-helper
|
||||
version=`git describe`
|
||||
versionchangelog=`$(helper) changelog-version`
|
||||
versionfile=cdist/version.py
|
||||
|
@ -40,7 +43,7 @@ versionfile=cdist/version.py
|
|||
archlinuxtar=cdist-${versionchangelog}-1.src.tar.gz
|
||||
|
||||
$(versionfile):
|
||||
echo $(version) > $@
|
||||
$(helper) version
|
||||
|
||||
|
||||
$(DIST): dist-check
|
||||
|
@ -48,6 +51,12 @@ $(RELEASE): $(DIST) $(CHECKS)
|
|||
|
||||
man: $(MANREF) mantype manbuild
|
||||
|
||||
$(MAN7DSTDIR)/cdist-type__motd.7: $(MAN7DSTDIR)/cdist-type__motd.text
|
||||
$(A2XM) $^
|
||||
|
||||
$(MAN7DSTDIR)/cdist-type__motd.text: cdist/conf/type/__motd/man.text
|
||||
echo ln -sf $@ $^
|
||||
|
||||
$(MANREF): $(MANREFSH)
|
||||
$(MANREFSH)
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ dir=${0%/*}
|
|||
|
||||
# Ensure version is present - the bundled/shipped version contains a static version,
|
||||
# the git version contains a dynamic version
|
||||
"$dir/../build" version
|
||||
"$dir/../build-helper" version
|
||||
|
||||
libdir=$(cd "${dir}/../" && pwd -P)
|
||||
export PYTHONPATH="${libdir}"
|
||||
|
|
|
@ -299,6 +299,9 @@ eof
|
|||
python3 -m unittest "$@"
|
||||
fi
|
||||
;;
|
||||
version)
|
||||
git describe > cdist/version.py
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown target $@ - aborting"
|
||||
|
|
Loading…
Reference in a new issue