Generate module version files with new RULES_EXPAND facilities
Also removes the separate *VersionNum.h@ templates
This commit is contained in:
@@ -26,7 +26,13 @@ INC += cacIO.h
|
||||
INC += caDiagnostics.h
|
||||
INC += net_convert.h
|
||||
INC += caVersion.h
|
||||
INC += caVersionNum.h
|
||||
|
||||
EXPAND_COMMON += caVersion.h@
|
||||
|
||||
EXPAND_ME += EPICS_CA_MAJOR_VERSION
|
||||
EXPAND_ME += EPICS_CA_MINOR_VERSION
|
||||
EXPAND_ME += EPICS_CA_MAINTENANCE_VERSION
|
||||
EXPAND_ME += EPICS_CA_DEVELOPMENT_FLAG
|
||||
|
||||
LIBSRCS += cac.cpp
|
||||
LIBSRCS += cacChannel.cpp
|
||||
@@ -120,20 +126,7 @@ ca_test_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
|
||||
|
||||
OBJS_vxWorks += ca_test
|
||||
|
||||
EXPANDVARS += EPICS_CA_MAJOR_VERSION
|
||||
EXPANDVARS += EPICS_CA_MINOR_VERSION
|
||||
EXPANDVARS += EPICS_CA_MAINTENANCE_VERSION
|
||||
EXPANDVARS += EPICS_CA_DEVELOPMENT_FLAG
|
||||
|
||||
EXPANDFLAGS += $(foreach var,$(EXPANDVARS),-D$(var)="$(strip $($(var)))")
|
||||
|
||||
# shared library ABI version.
|
||||
SHRLIB_VERSION = $(EPICS_CA_MAJOR_VERSION).$(EPICS_CA_MINOR_VERSION).$(EPICS_CA_MAINTENANCE_VERSION)
|
||||
|
||||
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/caVersionNum.h: ../caVersionNum.h@
|
||||
$(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@
|
||||
|
||||
@@ -8,17 +8,14 @@
|
||||
#ifndef INC_caVersion_H
|
||||
#define INC_caVersion_H
|
||||
|
||||
#include <epicsVersion.h>
|
||||
#define EPICS_CA_MAJOR_VERSION @EPICS_CA_MAJOR_VERSION@
|
||||
#define EPICS_CA_MINOR_VERSION @EPICS_CA_MINOR_VERSION@
|
||||
#define EPICS_CA_MAINTENANCE_VERSION @EPICS_CA_MAINTENANCE_VERSION@
|
||||
#define EPICS_CA_DEVELOPMENT_FLAG @EPICS_CA_DEVELOPMENT_FLAG@
|
||||
|
||||
/* include generated headers with:
|
||||
* EPICS_CA_MAJOR_VERSION
|
||||
* EPICS_CA_MINOR_VERSION
|
||||
* EPICS_CA_MAINTENANCE_VERSION
|
||||
* EPICS_CA_DEVELOPMENT_FLAG
|
||||
*/
|
||||
#include "caVersionNum.h"
|
||||
#include <epicsVersion.h>
|
||||
|
||||
#define CA_VERSION_INT VERSION_INT(EPICS_CA_MAJOR_VERSION, \
|
||||
EPICS_CA_MINOR_VERSION, EPICS_CA_MAINTENANCE_VERSION, 0)
|
||||
|
||||
#endif /* ifndef INC_caVersion_H */
|
||||
#endif /* INC_caVersion_H */
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef INC_caVersion_H
|
||||
# error include caVersion.h, not this header
|
||||
#endif
|
||||
#define EPICS_CA_MAJOR_VERSION @EPICS_CA_MAJOR_VERSION@
|
||||
#define EPICS_CA_MINOR_VERSION @EPICS_CA_MINOR_VERSION@
|
||||
#define EPICS_CA_MAINTENANCE_VERSION @EPICS_CA_MAINTENANCE_VERSION@
|
||||
#define EPICS_CA_DEVELOPMENT_FLAG @EPICS_CA_DEVELOPMENT_FLAG@
|
||||
@@ -23,10 +23,15 @@ dbCore_LIBS += ca Com
|
||||
dbCore_SYS_LIBS_WIN32 += ws2_32
|
||||
|
||||
dbCore_RCS += dbCore.rc
|
||||
dbStaticHost_RCS = dbStaticHost.rc
|
||||
|
||||
EXPAND_COMMON += databaseVersion.h@
|
||||
|
||||
EXPAND_ME += EPICS_DATABASE_MAJOR_VERSION
|
||||
EXPAND_ME += EPICS_DATABASE_MINOR_VERSION
|
||||
EXPAND_ME += EPICS_DATABASE_MAINTENANCE_VERSION
|
||||
EXPAND_ME += EPICS_DATABASE_DEVELOPMENT_FLAG
|
||||
|
||||
INC += databaseVersion.h
|
||||
INC += databaseVersionNum.h
|
||||
|
||||
PROD_LIBS = Com
|
||||
|
||||
@@ -42,13 +47,6 @@ include $(IOCDIR)/rsrv/Makefile
|
||||
GENVERSION = epicsVCS.h
|
||||
GENVERSIONMACRO = EPICS_VCS_VERSION
|
||||
|
||||
EXPANDVARS += EPICS_DATABASE_MAJOR_VERSION
|
||||
EXPANDVARS += EPICS_DATABASE_MINOR_VERSION
|
||||
EXPANDVARS += EPICS_DATABASE_MAINTENANCE_VERSION
|
||||
EXPANDVARS += EPICS_DATABASE_DEVELOPMENT_FLAG
|
||||
|
||||
EXPANDFLAGS += $(foreach var,$(EXPANDVARS),-D$(var)="$(strip $($(var)))")
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
include $(IOCDIR)/dbStatic/RULES
|
||||
@@ -56,10 +54,4 @@ include $(IOCDIR)/bpt/RULES
|
||||
include $(IOCDIR)/db/RULES
|
||||
include $(IOCDIR)/dbtemplate/RULES
|
||||
|
||||
# Can't use EXPAND as generated headers must appear
|
||||
# in O.Common, but EXPAND emits rules for O.$(T_A)
|
||||
../O.Common/databaseVersionNum.h: ../databaseVersionNum.h@
|
||||
$(MKDIR) $(COMMON_DIR)
|
||||
$(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@
|
||||
|
||||
epicsRelease$(DEP): $(COMMON_DIR)/$(GENVERSION)
|
||||
|
||||
@@ -5,23 +5,17 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef DATABASEVERSION_H
|
||||
#define DATABASEVERSION_H
|
||||
#ifndef INC_databaseVersion_H
|
||||
#define INC_databaseVersion_H
|
||||
|
||||
#define EPICS_DATABASE_MAJOR_VERSION @EPICS_DATABASE_MAJOR_VERSION@
|
||||
#define EPICS_DATABASE_MINOR_VERSION @EPICS_DATABASE_MINOR_VERSION@
|
||||
#define EPICS_DATABASE_MAINTENANCE_VERSION @EPICS_DATABASE_MAINTENANCE_VERSION@
|
||||
#define EPICS_DATABASE_DEVELOPMENT_FLAG @EPICS_DATABASE_DEVELOPMENT_FLAG@
|
||||
|
||||
#include <epicsVersion.h>
|
||||
|
||||
#ifndef VERSION_INT
|
||||
# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
|
||||
#endif
|
||||
#define DATABASE_VERSION_INT VERSION_INT(EPICS_DATABASE_MAJOR_VERSION, \
|
||||
EPICS_DATABASE_MINOR_VERSION, EPICS_DATABASE_MAINTENANCE_VERSION, 0)
|
||||
|
||||
/* include generated headers with:
|
||||
* EPICS_DATABASE_MAJOR_VERSION
|
||||
* EPICS_DATABASE_MINOR_VERSION
|
||||
* EPICS_DATABASE_MAINTENANCE_VERSION
|
||||
* EPICS_DATABASE_DEVELOPMENT_FLAG
|
||||
*/
|
||||
#include "databaseVersionNum.h"
|
||||
|
||||
#define DATABASE_VERSION_INT VERSION_INT(EPICS_DATABASE_MAJOR_VERSION, EPICS_DATABASE_MINOR_VERSION, EPICS_DATABASE_MAINTENANCE_VERSION, 0)
|
||||
|
||||
#endif // DATABASEVERSION_H
|
||||
#endif /* INC_databaseVersion_H */
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef DATABASEVERSION_H
|
||||
# error include databaseVersion.h, not this header
|
||||
#endif
|
||||
#define EPICS_DATABASE_MAJOR_VERSION @EPICS_DATABASE_MAJOR_VERSION@
|
||||
#define EPICS_DATABASE_MINOR_VERSION @EPICS_DATABASE_MINOR_VERSION@
|
||||
#define EPICS_DATABASE_MAINTENANCE_VERSION @EPICS_DATABASE_MAINTENANCE_VERSION@
|
||||
#define EPICS_DATABASE_DEVELOPMENT_FLAG @EPICS_DATABASE_DEVELOPMENT_FLAG@
|
||||
@@ -5,7 +5,7 @@
|
||||
\*************************************************************************/
|
||||
|
||||
/* This test includes all public headers from libCom and database modules
|
||||
* to ensure they are all syntaxtically correct in C and C++
|
||||
* to ensure they are all syntaxtically correct in both C and C++
|
||||
*/
|
||||
|
||||
#include <aaiRecord.h>
|
||||
@@ -31,14 +31,12 @@
|
||||
#include <cantProceed.h>
|
||||
#include <caProto.h>
|
||||
#include <caVersion.h>
|
||||
#include <caVersionNum.h>
|
||||
#include <chfPlugin.h>
|
||||
#include <compilerDependencies.h>
|
||||
#include <compressRecord.h>
|
||||
#include <cvtFast.h>
|
||||
#include <cvtTable.h>
|
||||
#include <databaseVersion.h>
|
||||
#include <databaseVersionNum.h>
|
||||
#include <dbAccessDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <dbAddr.h>
|
||||
@@ -152,7 +150,6 @@
|
||||
#endif
|
||||
#include <libComRegister.h>
|
||||
#include <libComVersion.h>
|
||||
#include <libComVersionNum.h>
|
||||
#include <link.h>
|
||||
#ifdef __cplusplus
|
||||
# include <locationException.h>
|
||||
|
||||
@@ -16,8 +16,14 @@ include $(TOP)/configure/CONFIG
|
||||
|
||||
INC += valgrind/valgrind.h
|
||||
|
||||
EXPAND_COMMON = libComVersion.h@
|
||||
|
||||
EXPAND_ME += EPICS_LIBCOM_MAJOR_VERSION
|
||||
EXPAND_ME += EPICS_LIBCOM_MINOR_VERSION
|
||||
EXPAND_ME += EPICS_LIBCOM_MAINTENANCE_VERSION
|
||||
EXPAND_ME += EPICS_LIBCOM_DEVELOPMENT_FLAG
|
||||
|
||||
INC += libComVersion.h
|
||||
INC += libComVersionNum.h
|
||||
|
||||
include $(LIBCOM)/as/Makefile
|
||||
include $(LIBCOM)/bucketLib/Makefile
|
||||
@@ -61,13 +67,6 @@ ifeq ($(T_A),$(EPICS_HOST_ARCH))
|
||||
DELAY_INSTALL_LIBS = YES
|
||||
endif
|
||||
|
||||
EXPANDVARS += EPICS_LIBCOM_MAJOR_VERSION
|
||||
EXPANDVARS += EPICS_LIBCOM_MINOR_VERSION
|
||||
EXPANDVARS += EPICS_LIBCOM_MAINTENANCE_VERSION
|
||||
EXPANDVARS += EPICS_LIBCOM_DEVELOPMENT_FLAG
|
||||
|
||||
EXPANDFLAGS += $(foreach var,$(EXPANDVARS),-D$(var)="$(strip $($(var)))")
|
||||
|
||||
# shared library ABI version.
|
||||
SHRLIB_VERSION = $(EPICS_LIBCOM_MAJOR_VERSION).$(EPICS_LIBCOM_MINOR_VERSION).$(EPICS_LIBCOM_MAINTENANCE_VERSION)
|
||||
|
||||
@@ -80,8 +79,3 @@ include $(LIBCOM)/flex/RULES
|
||||
include $(LIBCOM)/misc/RULES
|
||||
include $(LIBCOM)/osi/RULES
|
||||
include $(LIBCOM)/yajl/RULES
|
||||
|
||||
# Can't use EXPAND as generated headers must appear
|
||||
# in O.Common, but EXPAND emits rules for O.$(T_A)
|
||||
../O.Common/libComVersionNum.h: ../libComVersionNum.h@
|
||||
$(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@
|
||||
|
||||
@@ -5,24 +5,17 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef LIBCOMVERSION_H
|
||||
#define LIBCOMVERSION_H
|
||||
#ifndef INC_libComVersion_H
|
||||
#define INC_libComVersion_H
|
||||
|
||||
#define EPICS_LIBCOM_MAJOR_VERSION @EPICS_LIBCOM_MAJOR_VERSION@
|
||||
#define EPICS_LIBCOM_MINOR_VERSION @EPICS_LIBCOM_MINOR_VERSION@
|
||||
#define EPICS_LIBCOM_MAINTENANCE_VERSION @EPICS_LIBCOM_MAINTENANCE_VERSION@
|
||||
#define EPICS_LIBCOM_DEVELOPMENT_FLAG @EPICS_LIBCOM_DEVELOPMENT_FLAG@
|
||||
|
||||
#include <epicsVersion.h>
|
||||
#include <shareLib.h>
|
||||
|
||||
#ifndef VERSION_INT
|
||||
# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
|
||||
#endif
|
||||
#define LIBCOM_VERSION_INT VERSION_INT(EPICS_LIBCOM_MAJOR_VERSION, \
|
||||
EPICS_LIBCOM_MINOR_VERSION, EPICS_LIBCOM_MAINTENANCE_VERSION, 0)
|
||||
|
||||
/* include generated headers with:
|
||||
* EPICS_LIBCOM_MAJOR_VERSION
|
||||
* EPICS_LIBCOM_MINOR_VERSION
|
||||
* EPICS_LIBCOM_MAINTENANCE_VERSION
|
||||
* EPICS_LIBCOM_DEVELOPMENT_FLAG
|
||||
*/
|
||||
#include "libComVersionNum.h"
|
||||
|
||||
#define LIBCOM_VERSION_INT VERSION_INT(EPICS_LIBCOM_MAJOR_VERSION, EPICS_LIBCOM_MINOR_VERSION, EPICS_LIBCOM_MAINTENANCE_VERSION, 0)
|
||||
|
||||
#endif // LIBCOMVERSION_H
|
||||
#endif /* INC_libComVersion_H */
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef LIBCOMVERSION_H
|
||||
# error include libComVersion.h, not this header
|
||||
#endif
|
||||
#define EPICS_LIBCOM_MAJOR_VERSION @EPICS_LIBCOM_MAJOR_VERSION@
|
||||
#define EPICS_LIBCOM_MINOR_VERSION @EPICS_LIBCOM_MINOR_VERSION@
|
||||
#define EPICS_LIBCOM_MAINTENANCE_VERSION @EPICS_LIBCOM_MAINTENANCE_VERSION@
|
||||
#define EPICS_LIBCOM_DEVELOPMENT_FLAG @EPICS_LIBCOM_DEVELOPMENT_FLAG@
|
||||
Reference in New Issue
Block a user