Merge 3.14 changes up to 3.14.12.2-pre1 release
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
@@ -34,6 +34,7 @@
|
||||
# LIBSRCS source files for building libraries (deprecated)
|
||||
# PROD_OBJS object files for building prods
|
||||
# LIB_OBJS object files for building libraries
|
||||
# USR_OBJS object files for building libraries and prods
|
||||
# USR_LIBS libs needed by PROD and TESTPROD and LIBRARY
|
||||
# PROD_LIBS libs needed by PROD and TESTPROD
|
||||
# LIB_LIBS libs needed by shared LIBRARY
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne
|
||||
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
BASE_3_14=YES
|
||||
|
||||
# EPICS_VERSION must be a number >0 and <256
|
||||
# EPICS_VERSION must be a number >0 and <256
|
||||
EPICS_VERSION = 3
|
||||
|
||||
# EPICS_REVISION must be a number >=0 and <256
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
#
|
||||
|
||||
@@ -121,7 +121,7 @@ MAKEDBDEPENDS = $(PERL) $(TOOLS)/makeDbDepends.pl
|
||||
|
||||
ifndef T_A
|
||||
|
||||
ECHO := $(if $(findstring s,$(MAKEFLAGS)),\#,@echo)
|
||||
ECHO := $(if $(findstring s,$(MAKEFLAGS)),$(COMMENT),@echo)
|
||||
COMMON_DIR = .
|
||||
INSTALL_DBDS =
|
||||
INSTALL_DBS =
|
||||
@@ -227,58 +227,65 @@ $(INSTALL_DB)/%.template: %.template
|
||||
$(COMMON_DIR)/%Record.h: $(COMMON_DIR)/%Record.dbd
|
||||
@$(RM) $(notdir $@)$(DEP)
|
||||
@$(DBDDEPENDS_CMD)
|
||||
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
|
||||
@$(RM) $@
|
||||
$(DBTORECORDTYPEH) $(DBDFLAGS) $< $@
|
||||
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
|
||||
@$(RM) $(notdir $@)
|
||||
$(DBTORECORDTYPEH) $(DBDFLAGS) $< $(notdir $@)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%Record.h: %Record.dbd
|
||||
@$(RM) $(notdir $@)$(DEP)
|
||||
@$(DBDDEPENDS_CMD)
|
||||
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
|
||||
@$(RM) $@
|
||||
$(DBTORECORDTYPEH) $(DBDFLAGS) $< $@
|
||||
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
|
||||
@$(RM) $(notdir $@)
|
||||
$(DBTORECORDTYPEH) $(DBDFLAGS) $< $(notdir $@)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/menu%.h: $(COMMON_DIR)/menu%.dbd
|
||||
@$(RM) $(notdir $@)$(DEP)
|
||||
@$(DBDDEPENDS_CMD)
|
||||
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
|
||||
@$(RM) $@
|
||||
$(DBTOMENUH) $(DBDFLAGS) $< $@
|
||||
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
|
||||
@$(RM) $(notdir $@)
|
||||
$(DBTOMENUH) $(DBDFLAGS) $< $(notdir $@)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/menu%.h: menu%.dbd
|
||||
@$(RM) $(notdir $@)$(DEP)
|
||||
@$(DBDDEPENDS_CMD)
|
||||
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
|
||||
@$(RM) $@
|
||||
$(DBTOMENUH) $(DBDFLAGS) $< $@
|
||||
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
|
||||
@$(RM) $(notdir $@)
|
||||
$(DBTOMENUH) $(DBDFLAGS) $< $(notdir $@)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
.PRECIOUS: $(COMMON_DIR)/%.h
|
||||
|
||||
##################################################### DBD files
|
||||
|
||||
$(COMMON_DIR)/bpt%.dbd: bpt%.data
|
||||
@$(RM) $@
|
||||
$(MAKEBPT) $< $@
|
||||
$(MAKEBPT) $< $(notdir $@)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.dbd: $(COMMON_DIR)/%Include.dbd
|
||||
@$(RM) $(notdir $@)$(DEP)
|
||||
@$(DBDDEPENDS_CMD)
|
||||
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
|
||||
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
|
||||
$(ECHO) "Expanding dbd"
|
||||
@$(RM) $@
|
||||
$(DBEXPAND) $(DBDFLAGS) -o $@ $<
|
||||
@$(RM) $(notdir $@)
|
||||
@$(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $<
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.dbd: %Include.dbd
|
||||
@$(RM) $(notdir $@)$(DEP)
|
||||
@$(DBDDEPENDS_CMD)
|
||||
$(ECHO) "$<:../Makefile" >> $(notdir $@)$(DEP)
|
||||
echo "$< : ../Makefile" >> $(notdir $@)$(DEP)
|
||||
$(ECHO) "Expanding dbd"
|
||||
@$(RM) $@
|
||||
$(DBEXPAND) $(DBDFLAGS) -o $@ $<
|
||||
@$(RM) $(notdir $@)
|
||||
$(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $<
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%Include.dbd:
|
||||
@$(RM) $@
|
||||
$(PERL) $(TOOLS)/makeIncludeDbd.pl $($*_DBD) $@
|
||||
@$(RM) $(notdir $@)
|
||||
$(PERL) $(TOOLS)/makeIncludeDbd.pl $($*_DBD) $(notdir $@)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(INSTALL_DBD)/%: $(COMMON_DIR)/%
|
||||
$(ECHO) "Installing created dbd file $@"
|
||||
@@ -306,8 +313,8 @@ $(COMMON_DIR)/%.db$(RAW): $(COMMON_DIR)/%.edf
|
||||
|
||||
$(COMMON_DIR)/%.db$(RAW): %.substitutions
|
||||
@$(RM) $(notdir $@)$(DEP)
|
||||
$(MAKEDBDEPENDS) $@ $< $(TEMPLATE_FILENAME) >> $(notdir $@)$(DEP)
|
||||
$(ECHO) "$@:$(TEMPLATE_FILENAME)" >> $(notdir $@)$(DEP)
|
||||
@$(MAKEDBDEPENDS) $@ $< $(TEMPLATE_FILENAME) >> $(notdir $@)$(DEP)
|
||||
echo "$@ : $(TEMPLATE_FILENAME)" >> $(notdir $@)$(DEP)
|
||||
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
|
||||
@$(RM) $@ $*.tmp
|
||||
$(MSI) $(DBFLAGS) -S$< $(TEMPLATE_FILENAME) > $*.tmp
|
||||
|
||||
@@ -33,6 +33,12 @@ ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),)
|
||||
PERL_SCRIPTS += camonitor.pl
|
||||
|
||||
PERL_MODULES += CA.pm
|
||||
|
||||
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
|
||||
# Can only create docs in Host build
|
||||
HTMLS_DIR = .
|
||||
HTMLS = CA.html
|
||||
endif
|
||||
endif
|
||||
|
||||
Cap5_SRCS = Cap5.xs
|
||||
@@ -40,12 +46,6 @@ Cap5_LIBS = ca Com
|
||||
Cap5_INCLUDES = -I$(shell $(PERL) ../perlConfig.pl archlib)/CORE
|
||||
Cap5_CFLAGS = $(shell $(PERL) ../perlConfig.pl ccflags)
|
||||
|
||||
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
|
||||
# Can only create docs in Host build
|
||||
HTMLS_DIR = .
|
||||
HTMLS = CA.html
|
||||
endif
|
||||
|
||||
CLEANS += Cap5.c pod2htmd.tmp pod2htmi.tmp
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
@@ -251,7 +251,6 @@ int caget (pv *pvs, int nPvs, OutputT format,
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
int n;
|
||||
int i;
|
||||
int result; /* CA result */
|
||||
OutputT format = plain; /* User specified format */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
@@ -18,7 +18,7 @@ SRC_DIRS += $(TOP)/src/template/base/top/caServerApp
|
||||
#
|
||||
# Added ws2_32 winmm user32 for the non-dll build
|
||||
#
|
||||
SYS_PROD_LIBS_WIN32 += ws2_32 advapi32 user32
|
||||
PROD_SYS_LIBS_WIN32 += ws2_32 advapi32 user32
|
||||
|
||||
|
||||
PROD_HOST = excas
|
||||
|
||||
@@ -23,8 +23,8 @@ PROD_LIBS := cas ca gdd Com
|
||||
#
|
||||
PROD_SYS_LIBS_WIN32 := ws2_32 advapi32 user32
|
||||
|
||||
SRCS += main.cc
|
||||
SRCS += directoryServer.cc
|
||||
caDirServ_SRCS += main.cc
|
||||
caDirServ_SRCS += directoryServer.cc
|
||||
|
||||
PROD_HOST = caDirServ
|
||||
|
||||
|
||||
@@ -22,5 +22,6 @@ BPT_DBD += bptTypeKdegF.dbd
|
||||
DBD += $(BPT_DBD)
|
||||
|
||||
PROD_HOST += makeBpt
|
||||
makeBpt_SRCS=makeBpt
|
||||
|
||||
makeBpt_SRCS = makeBpt
|
||||
|
||||
|
||||
@@ -11,15 +11,14 @@ include $(TOP)/configure/CONFIG
|
||||
|
||||
INC += epicsRtemsInitHooks.h
|
||||
|
||||
SRCS += rtems_init.c
|
||||
SRCS += rtems_config.c
|
||||
SRCS += rtems_netconfig.c
|
||||
SRCS += rtems_util.c
|
||||
SRCS += setBootConfigFromNVRAM.c
|
||||
SRCS += epicsRtemsInitHookPre.c
|
||||
SRCS += epicsRtemsInitHookPost.c
|
||||
rtemsCom_SRCS += rtems_init.c
|
||||
rtemsCom_SRCS += rtems_config.c
|
||||
rtemsCom_SRCS += rtems_netconfig.c
|
||||
rtemsCom_SRCS += rtems_util.c
|
||||
rtemsCom_SRCS += setBootConfigFromNVRAM.c
|
||||
rtemsCom_SRCS += epicsRtemsInitHookPre.c
|
||||
rtemsCom_SRCS += epicsRtemsInitHookPost.c
|
||||
|
||||
LIBRARY_RTEMS = rtemsCom
|
||||
LIBRARY_SRCS = $(SRCS) $(BUILD_ARCHS)
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
@@ -272,10 +272,6 @@ static void threadCleanupWIN32 ( void )
|
||||
ellFirst ( & pGbl->threadList ) ) ) {
|
||||
epicsParmCleanupWIN32 ( pParm );
|
||||
}
|
||||
|
||||
TlsFree ( pGbl->tlsIndexThreadLibraryEPICS );
|
||||
|
||||
DeleteCriticalSection ( & pGbl->mutex );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -60,6 +60,7 @@ static int osdTimeGetCurrent ( epicsTimeStamp *pDest );
|
||||
// for mingw
|
||||
#if !defined ( MAXLONGLONG )
|
||||
#define MAXLONGLONG LL_CONSTANT(0x7fffffffffffffff)
|
||||
#define MINLONGLONG LL_CONSTANT(~0x7fffffffffffffff)
|
||||
#endif
|
||||
|
||||
static const LONGLONG epicsEpochInFileTime = LL_CONSTANT(0x01b41e2a18d64000);
|
||||
@@ -81,7 +82,7 @@ private:
|
||||
epicsTimerQueueActive * pTimerQueue;
|
||||
epicsTimer * pTimer;
|
||||
bool perfCtrPresent;
|
||||
|
||||
static const int pllDelay; /* integer seconds */
|
||||
epicsTimerNotify::expireStatus expire ( const epicsTime & );
|
||||
};
|
||||
|
||||
@@ -91,6 +92,8 @@ static const LONGLONG EPICS_TIME_TICKS_PER_SEC = 1000000000;
|
||||
static const LONGLONG ET_TICKS_PER_FT_TICK =
|
||||
EPICS_TIME_TICKS_PER_SEC / FILE_TIME_TICKS_PER_SEC;
|
||||
|
||||
const int currentTime :: pllDelay = 5;
|
||||
|
||||
//
|
||||
// Start and register time provider
|
||||
//
|
||||
@@ -302,8 +305,8 @@ currentTime::currentTime () :
|
||||
}
|
||||
else {
|
||||
errlogPrintf (
|
||||
"win32 osdTime.cpp detected questionable "
|
||||
"system date prior to EPICS epoch\n" );
|
||||
"win32 osdTime.cpp init detected questionable "
|
||||
"system date prior to EPICS epoch, epics time will not advance\n" );
|
||||
this->epicsTimeLast = 0;
|
||||
}
|
||||
|
||||
@@ -346,7 +349,7 @@ void currentTime::getCurrentTime ( epicsTimeStamp & dest )
|
||||
// counter resolution will more than likely improve over time.
|
||||
//
|
||||
offset = ( MAXLONGLONG - this->lastPerfCounter )
|
||||
+ ( curPerfCounter.QuadPart + MAXLONGLONG );
|
||||
+ ( curPerfCounter.QuadPart - MINLONGLONG ) + 1;
|
||||
}
|
||||
if ( offset < MAXLONGLONG / EPICS_TIME_TICKS_PER_SEC ) {
|
||||
offset *= EPICS_TIME_TICKS_PER_SEC;
|
||||
@@ -392,6 +395,8 @@ void currentTime::getCurrentTime ( epicsTimeStamp & dest )
|
||||
//
|
||||
epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
|
||||
{
|
||||
EnterCriticalSection ( & this->mutex );
|
||||
|
||||
// avoid interruptions by briefly becoming a time critical thread
|
||||
LARGE_INTEGER curFileTime;
|
||||
LARGE_INTEGER curPerfCounter;
|
||||
@@ -407,8 +412,6 @@ epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
|
||||
curFileTime.HighPart = ft.dwHighDateTime;
|
||||
}
|
||||
|
||||
EnterCriticalSection ( & this->mutex );
|
||||
|
||||
LONGLONG perfCounterDiff;
|
||||
if ( curPerfCounter.QuadPart >= this->lastPerfCounterPLL ) {
|
||||
perfCounterDiff = curPerfCounter.QuadPart - this->lastPerfCounterPLL;
|
||||
@@ -424,7 +427,7 @@ epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
|
||||
// counter resolution will more than likely improve over time.
|
||||
//
|
||||
perfCounterDiff = ( MAXLONGLONG - this->lastPerfCounterPLL )
|
||||
+ ( curPerfCounter.QuadPart + MAXLONGLONG );
|
||||
+ ( curPerfCounter.QuadPart - MINLONGLONG ) + 1;
|
||||
}
|
||||
this->lastPerfCounterPLL = curPerfCounter.QuadPart;
|
||||
|
||||
@@ -432,10 +435,10 @@ epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
|
||||
this->lastFileTimePLL = curFileTime.QuadPart;
|
||||
|
||||
// discard glitches
|
||||
if ( fileTimeDiff == 0 ) {
|
||||
if ( fileTimeDiff <= 0 ) {
|
||||
LeaveCriticalSection( & this->mutex );
|
||||
debugPrintf ( ( "currentTime: file time difference in PLL was zero\n" ) );
|
||||
return expireStatus ( restart, 1.0 /* sec */ );
|
||||
debugPrintf ( ( "currentTime: file time difference in PLL was less than zero\n" ) );
|
||||
return expireStatus ( restart, pllDelay /* sec */ );
|
||||
}
|
||||
|
||||
LONGLONG freq = ( FILE_TIME_TICKS_PER_SEC * perfCounterDiff ) / fileTimeDiff;
|
||||
@@ -449,7 +452,7 @@ epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
|
||||
static_cast < int > ( -bound ),
|
||||
static_cast < int > ( delta ),
|
||||
static_cast < int > ( bound ) ) );
|
||||
return expireStatus ( restart, 1.0 /* sec */ );
|
||||
return expireStatus ( restart, pllDelay /* sec */ );
|
||||
}
|
||||
|
||||
// update feedback loop estimating the performance counter's frequency
|
||||
@@ -473,7 +476,21 @@ epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
|
||||
//
|
||||
perfCounterDiffSinceLastFetch =
|
||||
( MAXLONGLONG - this->lastPerfCounter )
|
||||
+ ( curPerfCounter.QuadPart + MAXLONGLONG );
|
||||
+ ( curPerfCounter.QuadPart - MINLONGLONG ) + 1;
|
||||
}
|
||||
|
||||
// discard performance counter delay measurement glitches
|
||||
{
|
||||
const LONGLONG expectedDly = this->perfCounterFreq * pllDelay;
|
||||
const LONGLONG bnd = expectedDly / 4;
|
||||
if ( perfCounterDiffSinceLastFetch <= 0 ||
|
||||
perfCounterDiffSinceLastFetch >= expectedDly + bnd ) {
|
||||
LeaveCriticalSection( & this->mutex );
|
||||
debugPrintf ( ( "perf ctr measured delay out of bounds m=%d max=%d\n",
|
||||
static_cast < int > ( perfCounterDiffSinceLastFetch ),
|
||||
static_cast < int > ( expectedDly + bnd ) ) );
|
||||
return expireStatus ( restart, pllDelay /* sec */ );
|
||||
}
|
||||
}
|
||||
|
||||
// Update the current estimated time.
|
||||
@@ -482,9 +499,32 @@ epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
|
||||
/ this->perfCounterFreq;
|
||||
this->lastPerfCounter = curPerfCounter.QuadPart;
|
||||
|
||||
LONGLONG epicsTimeFromCurrentFileTime =
|
||||
( curFileTime.QuadPart - epicsEpochInFileTime ) *
|
||||
ET_TICKS_PER_FT_TICK;
|
||||
LONGLONG epicsTimeFromCurrentFileTime;
|
||||
|
||||
{
|
||||
static bool firstMessageWasSent = false;
|
||||
if ( curFileTime.QuadPart >= epicsEpochInFileTime ) {
|
||||
epicsTimeFromCurrentFileTime =
|
||||
( curFileTime.QuadPart - epicsEpochInFileTime ) *
|
||||
ET_TICKS_PER_FT_TICK;
|
||||
firstMessageWasSent = false;
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* if the system time jumps to before the EPICS epoch
|
||||
* then latch to the EPICS epoch printing only one
|
||||
* warning message the first time that the issue is
|
||||
* detected
|
||||
*/
|
||||
if ( ! firstMessageWasSent ) {
|
||||
errlogPrintf (
|
||||
"win32 osdTime.cpp time PLL update detected questionable "
|
||||
"system date prior to EPICS epoch, epics time will not advance\n" );
|
||||
firstMessageWasSent = true;
|
||||
}
|
||||
epicsTimeFromCurrentFileTime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
delta = epicsTimeFromCurrentFileTime - this->epicsTimeLast;
|
||||
if ( delta > EPICS_TIME_TICKS_PER_SEC || delta < -EPICS_TIME_TICKS_PER_SEC ) {
|
||||
@@ -537,7 +577,7 @@ epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
|
||||
|
||||
LeaveCriticalSection ( & this->mutex );
|
||||
|
||||
return expireStatus ( restart, 1.0 /* sec */ );
|
||||
return expireStatus ( restart, pllDelay /* sec */ );
|
||||
}
|
||||
|
||||
void currentTime::startPLL ()
|
||||
@@ -546,7 +586,7 @@ void currentTime::startPLL ()
|
||||
if ( this->perfCtrPresent && ! this->pTimerQueue ) {
|
||||
this->pTimerQueue = & epicsTimerQueueActive::allocate ( true );
|
||||
this->pTimer = & this->pTimerQueue->createTimer ();
|
||||
this->pTimer->start ( *this, 1.0 );
|
||||
this->pTimer->start ( *this, pllDelay );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ MAIN(epicsErrlogTest)
|
||||
pvt.expect = truncmsg;
|
||||
pvt.checkLen = 255;
|
||||
|
||||
errlogPrintfNoConsole(longmsg);
|
||||
errlogPrintfNoConsole("%s", longmsg);
|
||||
errlogFlush();
|
||||
|
||||
testOk1(pvt.count == 3);
|
||||
@@ -228,7 +228,7 @@ MAIN(epicsErrlogTest)
|
||||
*/
|
||||
pvt.jam = 1;
|
||||
|
||||
errlogPrintfNoConsole(longmsg);
|
||||
errlogPrintfNoConsole("%s", longmsg);
|
||||
epicsThreadSleep(0.1);
|
||||
|
||||
testOk1(pvt.count == 3);
|
||||
|
||||
@@ -42,7 +42,7 @@ static void check(const char *str, const char *expect)
|
||||
testDiag("Got \"%s\", expected \"%s\".\n", got, expect);
|
||||
pass = 0;
|
||||
}
|
||||
testOk(pass, str);
|
||||
testOk(pass, "%s", str);
|
||||
}
|
||||
|
||||
MAIN(macEnvExpandTest)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2011 The University of Chicago, as Operator of Argonne
|
||||
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
|
||||
@@ -4,10 +4,15 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
||||
# Authors: Ralph Lange, Marty Kraimer, Andrew Johnson and Janet Anderson
|
||||
# $Revision-Id$
|
||||
|
||||
use FindBin qw($Bin);
|
||||
use lib ("$Bin/../../lib/perl", $Bin);
|
||||
|
||||
use Cwd;
|
||||
use Getopt::Std;
|
||||
use File::Find;
|
||||
use File::Path;
|
||||
use File::Path 'mkpath';
|
||||
use EPICS::Path;
|
||||
use EPICS::Release;
|
||||
|
||||
$app_top = cwd();
|
||||
|
||||
@@ -17,10 +22,8 @@ $app_top = cwd();
|
||||
$bad_ident_chars = '[^0-9A-Za-z_]';
|
||||
|
||||
&GetUser; # Ensure we know who's in charge
|
||||
&readRelease("configure/RELEASE", \%release, \@apps) if (-r "configure/RELEASE");
|
||||
&readRelease("configure/RELEASE.$ENV{EPICS_HOST_ARCH}", \%release, \@apps)
|
||||
if (-r "configure/RELEASE.$ENV{EPICS_HOST_ARCH}");
|
||||
&expandRelease(\%release, \@apps);
|
||||
&readReleaseFiles("configure/RELEASE", \%release, \@apps);
|
||||
&expandRelease(\%release);
|
||||
&get_commandline_opts; # Check command-line options
|
||||
|
||||
#
|
||||
@@ -297,57 +300,6 @@ sub get_commandline_opts { #no args
|
||||
. "EPICS-Base: $epics_base\n\n" if $opt_d;
|
||||
}
|
||||
|
||||
#
|
||||
# Parse a configure/RELEASE file.
|
||||
#
|
||||
# NB: This subroutine also appears in base/configure/tools/convertRelease.pl
|
||||
# If you make changes here, they will be needed there as well.
|
||||
#
|
||||
sub readRelease {
|
||||
my ($file, $Rmacros, $Rapps) = @_;
|
||||
# $Rmacros is a reference to a hash, $Rapps a ref to an array
|
||||
my ($pre, $var, $post, $macro, $path);
|
||||
local *IN;
|
||||
open(IN, $file) or die "Can't open $file: $!\n";
|
||||
while (<IN>) {
|
||||
chomp;
|
||||
s/\r$//; # Shouldn't need this, but sometimes...
|
||||
s/\s*#.*$//; # Remove trailing comments
|
||||
next if /^\s*$/; # Skip blank lines
|
||||
|
||||
# Expand all already-defined macros in the line:
|
||||
while (($pre,$var,$post) = /(.*)\$\((\w+)\)(.*)/) {
|
||||
last unless (exists $Rmacros->{$var});
|
||||
$_ = $pre . $Rmacros->{$var} . $post;
|
||||
}
|
||||
|
||||
# Handle "<macro> = <path>"
|
||||
($macro, $path) = /^\s*(\w+)\s*=\s*(.*)/;
|
||||
if ($macro ne "") {
|
||||
$Rmacros->{$macro} = $path;
|
||||
push @$Rapps, $macro;
|
||||
next;
|
||||
}
|
||||
# Handle "include <path>" syntax
|
||||
($path) = /^\s*include\s+(.*)/;
|
||||
&readRelease($path, $Rmacros, $Rapps) if (-r $path);
|
||||
}
|
||||
close IN;
|
||||
}
|
||||
|
||||
sub expandRelease {
|
||||
my ($Rmacros, $Rapps) = @_;
|
||||
# $Rmacros is a reference to a hash, $Rapps a ref to an array
|
||||
|
||||
# Expand any (possibly nested) macros that were defined after use
|
||||
while (($macro, $path) = each %$Rmacros) {
|
||||
while (($pre,$var,$post) = $path =~ /(.*)\$\((\w+)\)(.*)/) {
|
||||
$path = $pre . $Rmacros->{$var} . $post;
|
||||
$Rmacros->{$macro} = $path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# List application types
|
||||
#
|
||||
@@ -480,29 +432,3 @@ sub GetUser {
|
||||
}
|
||||
die "No user name" unless $user;
|
||||
}
|
||||
|
||||
# Path rewriting rules for various OSs
|
||||
# These functions are duplicated in configure/convertRelease.pl
|
||||
sub UnixPath {
|
||||
my ($newpath) = @_;
|
||||
if ($^O eq 'cygwin') {
|
||||
$newpath =~ s{\\}{/}go;
|
||||
$newpath =~ s{^([a-zA-Z]):/}{/cygdrive/$1/};
|
||||
} elsif ($^O eq 'MSWin32') {
|
||||
$newpath =~ s{\\}{/}go;
|
||||
} elsif ($^O eq 'sunos') {
|
||||
$newpath =~ s{^/tmp_mnt/}{/};
|
||||
}
|
||||
return $newpath;
|
||||
}
|
||||
|
||||
sub LocalPath {
|
||||
my ($newpath) = @_;
|
||||
if ($^O eq "cygwin") {
|
||||
$newpath =~ s{^/cygdrive/([a-zA-Z])/}{$1:/};
|
||||
} elsif ($^O eq "darwin") {
|
||||
# These rules are likely to be site-specific
|
||||
$newpath =~ s{^/private/var/auto\.home/}{/home/}; # APS
|
||||
}
|
||||
return $newpath;
|
||||
}
|
||||
|
||||
@@ -17,15 +17,15 @@ PROD_LIBS += $(EPICS_BASE_HOST_LIBS)
|
||||
#
|
||||
# Added ws2_32 winmm user32 for the non-dll build
|
||||
#
|
||||
SYS_PROD_LIBS_WIN32 += ws2_32 advapi32 user32
|
||||
PROD_SYS_LIBS_WIN32 += ws2_32 advapi32 user32
|
||||
|
||||
SRCS += main.cc
|
||||
SRCS += exServer.cc
|
||||
SRCS += exPV.cc
|
||||
SRCS += exVectorPV.cc
|
||||
SRCS += exScalarPV.cc
|
||||
SRCS += exAsyncPV.cc
|
||||
SRCS += exChannel.cc
|
||||
casexample_SRCS += main.cc
|
||||
casexample_SRCS += exServer.cc
|
||||
casexample_SRCS += exPV.cc
|
||||
casexample_SRCS += exVectorPV.cc
|
||||
casexample_SRCS += exScalarPV.cc
|
||||
casexample_SRCS += exAsyncPV.cc
|
||||
casexample_SRCS += exChannel.cc
|
||||
|
||||
PROD_HOST = casexample
|
||||
|
||||
|
||||
Reference in New Issue
Block a user