From 3edffa1d31617c02de3f302c8efe9b35efb06df3 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 26 Jan 2016 12:51:10 -0500 Subject: [PATCH 1/2] move module version into src/Makefile --- src/Makefile | 16 ++++++++++++++++ src/pva/Makefile | 1 + src/pva/pvaVersion.h | 7 +------ src/pva/pvaVersionNum.h@ | 7 +++++++ 4 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 src/pva/pvaVersionNum.h@ diff --git a/src/Makefile b/src/Makefile index 6d6b9d7..44d77de 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,6 +3,18 @@ TOP = .. include $(TOP)/configure/CONFIG +EPICS_PVA_MAJOR_VERSION = 4 +EPICS_PVA_MINOR_VERSION = 2 +EPICS_PVA_MAINTENANCE_VERSION = 0 +EPICS_PVA_DEVELOPMENT_FLAG = 1 + +EXPANDVARS += EPICS_PVA_MAJOR_VERSION +EXPANDVARS += EPICS_PVA_MINOR_VERSION +EXPANDVARS += EPICS_PVA_MAINTENANCE_VERSION +EXPANDVARS += EPICS_PVA_DEVELOPMENT_FLAG + +EXPANDFLAGS += $(foreach var,$(EXPANDVARS),-D$(var)="$(strip $($(var)))") + INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv USR_INCLUDES += -I$(INSTALL_LOCATION)/include @@ -33,3 +45,7 @@ pvAccess_SYS_LIBS_WIN32 += ws2_32 include $(TOP)/configure/RULES +# Can't use EXPAND as generated headers must appear +# in O.Common, but EXPAND emits rules for O.$(T_A) +../O.Common/pvaVersionNum.h: pvaVersionNum.h@ + $(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@ diff --git a/src/pva/Makefile b/src/pva/Makefile index ae58254..e68702d 100644 --- a/src/pva/Makefile +++ b/src/pva/Makefile @@ -4,6 +4,7 @@ SRC_DIRS += $(PVACCESS_SRC)/pva INC += pvaConstants.h INC += pvaVersion.h +INC += pvaVersionNum.h INC += clientFactory.h LIBSRCS += pvaVersion.cpp diff --git a/src/pva/pvaVersion.h b/src/pva/pvaVersion.h index 8714ef0..969c5b2 100644 --- a/src/pva/pvaVersion.h +++ b/src/pva/pvaVersion.h @@ -22,12 +22,7 @@ #include -// module version -// TODO to be generated, etc. -#define EPICS_PVA_MAJOR_VERSION 4 -#define EPICS_PVA_MINOR_VERSION 2 -#define EPICS_PVA_MAINTENANCE_VERSION 0 -#define EPICS_PVA_DEVELOPMENT_FLAG 1 +#include "pvaVersionNum.h" namespace epics { namespace pvAccess { diff --git a/src/pva/pvaVersionNum.h@ b/src/pva/pvaVersionNum.h@ new file mode 100644 index 0000000..65d9a9e --- /dev/null +++ b/src/pva/pvaVersionNum.h@ @@ -0,0 +1,7 @@ +#ifndef VERSION_H_ +# error include pvaVersion.h, not this header +#endif +#define EPICS_PVA_MAJOR_VERSION @EPICS_PVA_MAJOR_VERSION@ +#define EPICS_PVA_MINOR_VERSION @EPICS_PVA_MINOR_VERSION@ +#define EPICS_PVA_MAINTENANCE_VERSION @EPICS_PVA_MAINTENANCE_VERSION@ +#define EPICS_PVA_DEVELOPMENT_FLAG @EPICS_PVA_DEVELOPMENT_FLAG@ From 33cefc6846dae14a711a750203413428b2a88636 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 26 Jan 2016 12:51:21 -0500 Subject: [PATCH 2/2] set SHRLIB_VERSION --- src/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile b/src/Makefile index 44d77de..093b709 100644 --- a/src/Makefile +++ b/src/Makefile @@ -36,6 +36,8 @@ include $(PVACCESS_SRC)/ioc/Makefile LIBRARY = pvAccess +SHRLIB_VERSION = $(EPICS_PVA_MAJOR_VERSION).$(EPICS_PVA_MINOR_VERSION).$(EPICS_PVA_MAINTENANCE_VERSION) + pvAccess_LIBS += pvData pvAccess_LIBS += ca pvAccess_LIBS += Com