By default, use consistent versioning between framework shared objects and resources

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24862 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2007-03-13 19:15:19 +00:00
parent 279b5b0dcf
commit ba38bbaa97
3 changed files with 53 additions and 22 deletions

View file

@ -1,3 +1,13 @@
2007-03-13 Nicola Pero <nicola.pero@meta-innovation.com>
* Instance/framework.make (CURRENT_VERSION_NAME): If no
CURRENT_VERSION_NAME is set, use INTERFACE_VERSION for it (instead
of 'A'), so that by default the shared object and the resources
follow a similar versioning (can still be configured, as before,
to have separated versioning).
* Master/rules.make (%.variables, %.subprojects): Corresponding
update.
2007-03-13 Nicola Pero <nicola.pero@meta-innovation.com>
* Instance/framework.make

View file

@ -74,12 +74,36 @@ endif
# might be installed at the same time :-).
#
# Set VERSION from xxx_VERSION
ifneq ($($(GNUSTEP_INSTANCE)_VERSION),)
VERSION = $($(GNUSTEP_INSTANCE)_VERSION)
endif
ifeq ($(VERSION),)
VERSION = 0.0.1
endif
# By setting xxx_INTERFACE_VERSION you can change the soversion used
# when linking the library. See comments in library.make for the
# variables with the same name for libraries.
ifeq ($($(GNUSTEP_INSTANCE)_INTERFACE_VERSION),)
# By default, if VERSION is 1.0.0, INTERFACE_VERSION is 1
INTERFACE_VERSION = $(word 1,$(subst ., ,$(VERSION)))
else
INTERFACE_VERSION = $($(GNUSTEP_INSTANCE)_INTERFACE_VERSION)
endif
# CURRENT_VERSION_NAME is the name of the version as used when
# building the library structure. We recommend just using
# INTERFACE_VERSION for that, so your resources and your shared
# library have the same versioning.
# Warning - the following variable is also used in Master/rules.make
# to build the OWNING_PROJECT_HEADER_DIR for the framework's
# subprojects. Make sure you keep them in sync if you change them.
CURRENT_VERSION_NAME = $($(GNUSTEP_INSTANCE)_CURRENT_VERSION_NAME)
ifeq ($(CURRENT_VERSION_NAME),)
CURRENT_VERSION_NAME = A
CURRENT_VERSION_NAME = $(INTERFACE_VERSION)
endif
# xxx_MAKE_CURRENT_VERSION can be set to 'no' if you do not want the
@ -113,15 +137,6 @@ ifeq ($(FRAMEWORK_VERSION_SUPPORT),no)
MAKE_CURRENT_VERSION = no
endif
# Set VERSION from xxx_VERSION
ifneq ($($(GNUSTEP_INSTANCE)_VERSION),)
VERSION = $($(GNUSTEP_INSTANCE)_VERSION)
endif
ifeq ($(VERSION),)
VERSION = 0.0.1
endif
# This is used on Apple to build frameworks which can be embedded into
# applications. You usually set it to something like
# @executable_path/../Frameworks and then you can embed the framework
@ -225,16 +240,6 @@ FRAMEWORK_LIBRARY_DIR = $(GNUSTEP_BUILD_DIR)/$(FRAMEWORK_LIBRARY_DIR_NAME)
FRAMEWORK_CURRENT_LIBRARY_DIR_NAME = $(FRAMEWORK_CURRENT_DIR_NAME)/$(GNUSTEP_TARGET_LDIR)
FRAMEWORK_CURRENT_LIBRARY_DIR = $(GNUSTEP_BUILD_DIR)/$(FRAMEWORK_CURRENT_LIBRARY_DIR_NAME)
# By setting xxx_INTERFACE_VERSION you can change the soversion used
# when linking the library. See comments in library.make for the
# variables with the same name for libraries.
ifeq ($($(GNUSTEP_INSTANCE)_INTERFACE_VERSION),)
# By default, if VERSION is 1.0.0, INTERFACE_VERSION is 1
INTERFACE_VERSION = $(word 1,$(subst ., ,$(VERSION)))
else
INTERFACE_VERSION = $($(GNUSTEP_INSTANCE)_INTERFACE_VERSION)
endif
ifneq ($(BUILD_DLL), yes)
FRAMEWORK_LIBRARY_FILE = lib$(GNUSTEP_INSTANCE)$(SHARED_LIBEXT)

View file

@ -290,7 +290,15 @@ if [ "$($(basename $(basename $*))_SUBPROJECTS)" != "" ]; then \
if [ "$$type" = "framework" ]; then \
if [ "$(FRAMEWORK_VERSION_SUPPORT)" = "yes" ]; then \
framework_version="$($(basename $(basename $*))_CURRENT_VERSION_NAME)"; \
if [ "$$framework_version" = "" ]; then framework_version="A"; fi; \
if [ "$$framework_version" = "" ]; then \
framework_version="$($(basename $(basename $*))_INTERFACE_VERSION)"; \
if [ "$$framework_version" = "" ]; then \
framework_version="$(word 1,$(subst ., ,$($(basename $(basename $*))_VERSION)))"; \
if [ "$$framework_version" = "" ]; then \
framework_version="0.0"; \
fi; \
fi; \
fi; \
owning_project_header_dir="../$${instance}.framework/Versions/$${framework_version}/Headers"; \
else \
owning_project_header_dir="../$${instance}.framework/Headers"; \
@ -357,7 +365,15 @@ if [ "$($(basename $(basename $*))_SUBPROJECTS)" != "" ]; then \
if [ "$$type" = "framework" ]; then \
if [ "$(FRAMEWORK_VERSION_SUPPORT)" = "yes" ]; then \
framework_version="$($(basename $(basename $*))_CURRENT_VERSION_NAME)"; \
if [ "$$framework_version" = "" ]; then framework_version="A"; fi; \
if [ "$$framework_version" = "" ]; then \
framework_version="$($(basename $(basename $*))_INTERFACE_VERSION)"; \
if [ "$$framework_version" = "" ]; then \
framework_version="$(word 1,$(subst ., ,$($(basename $(basename $*))_VERSION)))"; \
if [ "$$framework_version" = "" ]; then \
framework_version="0.0"; \
fi; \
fi; \
fi; \
owning_project_header_dir="../$${instance}.framework/Versions/$${framework_version}/Headers"; \
else \
owning_project_header_dir="../$${instance}.framework/Headers"; \