b109e8b164
This uses the output of "git describe" directly in configure.ac to determine the version number to use, instead of hardcoding it. With this change, current version information is completely removed from the codebase itself, and is always fetched on-the-fly from git as the single source of truth. In order to ensure make dist always uses the current version number in the contents of the packaged configure script as well as the package name, a dependency is added to the dist target such that autoconf is always run before dist to regenerate the version number. If this wasn't the case, make dist would use the version number from when autoconf was originally run, not the version number that make dist is running from. That said, errors from that rule are ignored so that people can still run make dist without a working autoconf. In addition, the NEWS check is dropped, as it would then become annoying because it would force make dist users to always have a line for the current commit in the NEWS file.
35 lines
839 B
Makefile
35 lines
839 B
Makefile
## Process this file with automake to get Makefile.in
|
|
|
|
AUTOMAKE_OPTIONS = gnu
|
|
|
|
SUBDIRS = m4 src doc gui test
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
EXTRA_DIST = COPYING.README README.android
|
|
|
|
# If git describe works, force autoconf to run in order to make sure we have the
|
|
# current version number from git in the resulting configure script.
|
|
configure-version:
|
|
-git describe && autoconf --force
|
|
|
|
# Triggering the README target means we are building a distribution (make dist).
|
|
README: configure-version
|
|
|
|
ChangeLog:
|
|
git log > ChangeLog
|
|
|
|
deb:
|
|
dpkg-buildpackage -rfakeroot
|
|
|
|
rpm: dist
|
|
cp $(distdir).tar.gz /usr/src/redhat/SOURCES/
|
|
cp redhat/tinc.spec /usr/src/redhat/SOURCES/
|
|
cd /usr/src/redhat/SOURCES/ && rpm -bb tinc.spec
|
|
|
|
release:
|
|
rm -f ChangeLog
|
|
$(MAKE) ChangeLog
|
|
echo "Please edit the NEWS file now..."
|
|
/usr/bin/editor NEWS
|
|
$(MAKE) dist
|