Browse Source

keep version generating in build-helper, so people cloning from git don't need make

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2.1
Nico Schottelius 9 years ago
parent
commit
0cf0cdd0c3
  1. 13
      Makefile
  2. 2
      bin/cdist
  3. 3
      build-helper

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)

2
bin/cdist

@ -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}"

3
build-helper

@ -299,6 +299,9 @@ eof
python3 -m unittest "$@"
fi
;;
version)
git describe > cdist/version.py
;;
*)
echo "Unknown target $@ - aborting"

Loading…
Cancel
Save