diff options
author | Bikal Lem <gbikal+git@gmail.com> | 2021-11-15 13:09:30 +0000 |
---|---|---|
committer | Bikal Lem <gbikal+git@gmail.com> | 2021-11-15 13:09:30 +0000 |
commit | c0b43df28a982747e081343f23289357ab4615db (patch) | |
tree | 0b4ef14573b0842dd13791140a79390a3030c47e | |
parent | b7159e46bc002c7a174e184d94cfa61552f92e69 (diff) | |
download | liburing-c0b43df28a982747e081343f23289357ab4615db.tar.gz |
src/Makefile: use VERSION variable consistently
src/Makefile defines incorrect 'liburing.so' version, i.e 2.1 as
opposed to 2.2. This commit makes src/Makefile use correct version
defined in liburing.spec. Along the way we refactor the use of common
variables into Makefile.common and include it into both src/Makefile
and Makefile.
Signed-off-by: Bikal Lem <gbikal+git@gmail.com>
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | Makefile.common | 5 | ||||
-rw-r--r-- | liburing.spec | 2 | ||||
-rw-r--r-- | src/Makefile | 8 |
4 files changed, 12 insertions, 9 deletions
@@ -1,7 +1,5 @@ -NAME=liburing -SPECFILE=$(NAME).spec -VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE)) -TAG = $(NAME)-$(VERSION) +include Makefile.common + RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm") INSTALL=install diff --git a/Makefile.common b/Makefile.common new file mode 100644 index 0000000..e7c9412 --- /dev/null +++ b/Makefile.common @@ -0,0 +1,5 @@ +TOP := $(dir $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) +NAME=liburing +SPECFILE=$(TOP)/$(NAME).spec +VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE)) +TAG = $(NAME)-$(VERSION) diff --git a/liburing.spec b/liburing.spec index 7eb5731..df62d2f 100644 --- a/liburing.spec +++ b/liburing.spec @@ -1,5 +1,5 @@ Name: liburing -Version: 2.1 +Version: 2.2 Release: 1%{?dist} Summary: Linux-native io_uring I/O access library License: (GPLv2 with exceptions and LGPLv2+) or MIT diff --git a/src/Makefile b/src/Makefile index 09ff395..c29a80d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,3 +1,5 @@ +include ../Makefile.common + prefix ?= /usr includedir ?= $(prefix)/include libdir ?= $(prefix)/lib @@ -14,10 +16,8 @@ LINK_FLAGS= LINK_FLAGS+=$(LDFLAGS) ENABLE_SHARED ?= 1 -soname=liburing.so.2 -minor=1 -micro=0 -libname=$(soname).$(minor).$(micro) +soname=liburing.so +libname=$(soname).$(VERSION) all_targets += liburing.a ifeq ($(ENABLE_SHARED),1) |