From 9e4adc4633b321bf4f3f41feeac7597162cf88f9 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 13 Dec 2009 01:52:03 +0100 Subject: build: Untangle the package version from the soversion Add a new script to generate the package version from git. Use that for the pkg-config file and the tarball name. --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 282fa7c..7f165e7 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +VERSION := $(shell ./get-version) + LIB_NAME := libbsd LIB_VERSION_MAJOR := 0 LIB_VERSION_MINOR := 1 @@ -10,7 +12,7 @@ LIB_SHARED_SO := $(LIB_NAME).so LIB_SONAME := $(LIB_SHARED_SO).$(LIB_VERSION_MAJOR) LIB_SHARED := $(LIB_SONAME).$(LIB_VERSION_MINOR).$(LIB_VERSION_MICRO) -TAR_NAME := $(LIB_NAME)-$(LIB_VERSION) +TAR_NAME := $(LIB_NAME)-$(VERSION) TAR_FILE := $(TAR_NAME).tar.gz LIB_DIST := \ @@ -120,7 +122,7 @@ src/hash/md5hl.c: src/hash/helper.c sed -e 's:hashinc:bsd/md5.h:g' -e 's:HASH:MD5:g' $< > $@ $(LIB_PKGCONFIG): $(LIB_PKGCONFIG).in - sed -e 's:@VERSION@:$(LIB_VERSION):' \ + sed -e 's:@VERSION@:$(VERSION):' \ -e 's:@prefix@:$(value prefix):' \ -e 's:@exec_prefix@:$(value exec_prefix):' \ -e 's:@libdir@:$(value usrlibdir):' \ @@ -149,6 +151,7 @@ ChangeLog: .PHONY: dist dist: $(LIB_DIST) mkdir $(TAR_NAME) + echo $(VERSION) >$(TAR_NAME)/.dist-version cp -a --parents $(LIB_DIST) `git ls-files` $(TAR_NAME) tar czf $(TAR_FILE) --exclude=.gitignore $(TAR_NAME) rm -rf $(TAR_NAME) -- cgit v1.2.3