summaryrefslogtreecommitdiff
path: root/buildlib
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2009-10-28 19:13:56 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2009-10-28 19:13:56 +0100
commit23d8465817e7bc0d188f36fc2ad14f41ff01c221 (patch)
tree29f65f669e430c701971d946cd6b71c480b3a02a /buildlib
parent10c9f030e02ccec5c002abc42776f994c124c574 (diff)
refactor the buildsystem to extract library versions from one file,
so it is not needed to change x-files to just increase a version number (because this is far to easy to forget one of the files, which will not result in failures or is bad in general, but is inconsitent.)
Diffstat (limited to 'buildlib')
-rw-r--r--buildlib/libversion.mak14
1 files changed, 14 insertions, 0 deletions
diff --git a/buildlib/libversion.mak b/buildlib/libversion.mak
new file mode 100644
index 000000000..796c956e7
--- /dev/null
+++ b/buildlib/libversion.mak
@@ -0,0 +1,14 @@
+# -*- make -*-
+# Version number of libapt-pkg.
+# Please increase MAJOR with each ABI break,
+# with each non-ABI break to the lib, please increase RELEASE.
+# The versionnumber is extracted from apt-pkg/init.h - see also there.
+LIBAPTPKG_MAJOR=$(shell awk -v ORS='.' '/^\#define APT_PKG_M/ {print $$3}' $(BASE)/apt-pkg/init.h | sed 's/\.$$//')
+LIBAPTPKG_RELEASE=$(shell grep -E '^\#define APT_PKG_RELEASE' $(BASE)/apt-pkg/init.h | cut -d ' ' -f 3)
+
+# Version number of libapt-inst
+# Please increase MAJOR with each ABI break,
+# with each non-ABI break to the lib, please increase MINOR.
+# The versionnumber is extracted from apt-inst/makefile - see also there.
+LIBAPTINST_MAJOR=$(shell egrep '^MAJOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2)
+LIBAPTINST_MINOR=$(shell egrep '^MINOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2)