Skip to content

Commit

Permalink
use minor version for shared library version
Browse files Browse the repository at this point in the history
- make the 64 part of 2.064.2 the major version
- make the 2 part of 2.064.2 the minor version
- patch level is currently always 0
  • Loading branch information
MartinNowak committed Dec 3, 2013
1 parent 56862d3 commit fae5741
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions posix.mak
Expand Up @@ -144,16 +144,19 @@ DDOC=$(DMD)
# Set VERSION, where the file is that contains the version string
VERSION=../dmd/VERSION

# Set SONAME, the name of the shared library.
# The awk script will return the second group without leading zeros of the version string, i.e. 2.063.2 produces 63
SONAME = libphobos2.so.0.$(shell awk -F. '{ print $$2 + 0 }' $(VERSION))

# Set LIB, the ultimate target
ifeq (,$(findstring win,$(OS)))
LIB = $(ROOT)/libphobos2.a
LIBSO = $(ROOT)/$(SONAME).0
LIB:=$(ROOT)/libphobos2.a
# 2.064.2 => libphobos2.so.64.2.0
# 2.065 => libphobos2.so.65.0.0
MAJOR:=$(shell awk -F. '{ print int($$2) }' $(VERSION))
MINOR:=$(shell awk -F. '{ print int($$3) }' $(VERSION))
PATCH:=0
# SONAME doesn't use patch level (ABI compatible)
SONAME:=libphobos2.so.$(MAJOR).$(MINOR)
LIBSO:=$(ROOT)/$(SONAME).$(PATCH)
else
LIB = $(ROOT)/phobos.lib
LIB:=$(ROOT)/phobos.lib
endif

################################################################################
Expand Down

0 comments on commit fae5741

Please sign in to comment.