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>
This commit is contained in:
Bikal Lem
2021-11-15 13:09:30 +00:00
parent 55288b9483
commit 5051cd3596
4 changed files with 12 additions and 9 deletions
+2 -4
View File
@@ -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
+5
View File
@@ -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)
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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)