support for 4 digit EPICS versions

This commit is contained in:
2020-04-30 11:14:00 +02:00
parent 78ec34f299
commit 66e2ded783
3 changed files with 12 additions and 4 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ HEADERS += require.h
USR_INCLUDES_Linux=-idirafter ${EPICS_BASE}/include
# Pass T_A to the code
USR_CFLAGS += -DT_A='"${T_A}"'
USR_CFLAGS += -DT_A='"${T_A}"' -DEPICSVERSION='"${EPICSVERSION}"'
# This should really go into some global WIN32 config file
USR_CFLAGS_WIN32 += /D_WIN32_WINNT=0x502
+6 -2
View File
@@ -176,16 +176,20 @@ then
/^[ \t]*EPICS_VERSION[ \t]*=/ {v=$2}
/^[ \t]*EPICS_REVISION[ \t]*=/ {r=$2}
/^[ \t]*EPICS_MODIFICATION[ \t]*=/ {m=$2+0}
END {print "BASE="v"."r"."m";BASECODE="v*10000+r*100+m}
END {print "XBASE="v"."r"."m";BASECODE="v*10000+r*100+m}
' < $EPICS_BASE/configure/CONFIG_BASE_VERSION)
elif [ -f $EPICS_BASE/lib/$EPICS_HOST_ARCH/${LIBPREFIX}Com$LIBPOSTFIX ]
then
eval $(strings $EPICS_BASE/lib/$EPICS_HOST_ARCH/${LIBPREFIX}Com$LIBPOSTFIX | awk -F'[.R-]' '
/EPICS R[0-9]/ {print "BASE="$2"."$3"."$4";BASECODE="$2*10000+$3*100+$4 }')
/EPICS R[0-9]/ {print "XBASE="$2"."$3"."$4";BASECODE="$2*10000+$3*100+$4 }')
else
echo "Cannot guess EPICS base version." >&2
exit 1;
fi
if [ ${BASE#$XBASE} = $BASE ]
then
BASE=$XBASE
fi
# IOC name derives from hostname
# (trailing possible '\r' under cygwin)
+5 -1
View File
@@ -266,7 +266,11 @@ int requireDebug;
#define TOSTR(s) TOSTR2(s)
#define TOSTR2(s) #s
const char epicsRelease[] = TOSTR(EPICS_VERSION)"."TOSTR(EPICS_REVISION)"."TOSTR(EPICS_MODIFICATION);
#ifndef EPICSVERSION
#error EPICSVERSION not defined: Compile with USR_CFLAGS += -DEPICSVERSION='"${EPICSVERSION}"'
#endif
const char epicsRelease[] = EPICSVERSION;
const char epicsBasetype[] = TOSTR(EPICS_VERSION)"."TOSTR(EPICS_REVISION);
#ifndef T_A