diff --git a/configure/RULES_EXPAND b/configure/RULES_EXPAND index 0f43db347..51657ebd8 100644 --- a/configure/RULES_EXPAND +++ b/configure/RULES_EXPAND @@ -14,8 +14,6 @@ EXPANDFLAGS += $(addprefix -D ,$(EXPAND_VARS)) # The names of files to be expanded must end with '@' EXPANDED = $(EXPAND:%@=%) -buildInstall: $(EXPANDED) - $(EXPANDED): %: %@ $(ECHO) "Expanding $< to $@" @$(RM) $@ @@ -26,7 +24,8 @@ clean: expand_clean expand_clean: @$(RM) $(EXPANDED) -.PHONY : expand_clean +.PRECIOUS: $(EXPANDED) +.PHONY: expand_clean #--------------------------------------------------------------- # Assemblies (files assembled from snippets) diff --git a/configure/os/CONFIG_SITE.linux-x86.linux-arm b/configure/os/CONFIG_SITE.linux-x86.linux-arm index 1dadb9172..1500c4526 100644 --- a/configure/os/CONFIG_SITE.linux-x86.linux-arm +++ b/configure/os/CONFIG_SITE.linux-x86.linux-arm @@ -3,11 +3,12 @@ # Site specific definitions for linux-x86 host - linux-arm target builds #------------------------------------------------------- -# Tools install path -#GNU_DIR = /home/targetOS/linux-arm/host/x86-linux/gcc_3.3.3 +# Set GNU crosscompiler target name +GNU_TARGET = arm-xilinx-linux-gnueabi -# APS: +# Set GNU tools install path +# This is the install path at APS: GNU_DIR = /usr/local/vw/zynq-2011.09 -# GNU crosscompiler target name -GNU_TARGET = arm-xilinx-linux-gnueabi +# With a Xilinx SDK, it'll be something like +#GNU_DIR = /usr/local/zynq/Xilinx/SDK/2015.4/gnu/arm/lin diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index f81ad70ad..982e6b998 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -133,6 +133,22 @@ dbQuietMacroWarnings=1 VxWorks

In preparation for moving to git in place of the Bazaar revision control system we have removed all the keywords from the Base source code.

+

Linux systemd service file for CA Repeater

+ +

Building this version of Base on a Linux system creates a systemd service +file suitable for starting the Channel Access Repeater under systemd. The file +will be installed into the target bin directory, from where it can be copied +into the appropriate systemd location and modified as necessary. Installation +instructions are included as comments in the file.

+ +

NTP Time Provider adjusts to OS tick rate changes

+ +

Dirk Zimoch provided code that allows the NTP Time provider (used on VxWorks +and RTEMS only) to adapt to changes in the OS clock tick rate after the provider +has been initialized. Note that changing the tick rate after iocInit() is not +advisable, and that other software might still misbehave if initialized before +an OS tick rate change. This change was back-ported from the 3.15 branch.

+

Making IOC ca_get operations atomic

When a CA client gets data from an IOC record using a compound data type such diff --git a/src/ca/client/Makefile b/src/ca/client/Makefile index fcbc574cf..36c763d57 100644 --- a/src/ca/client/Makefile +++ b/src/ca/client/Makefile @@ -100,8 +100,12 @@ caConnTest_SRCS = caConnTestMain.cpp caConnTest.cpp casw_SYS_LIBS_solaris = socket -SCRIPTS_solaris := S99caRepeater -SCRIPTS_Linux := S99caRepeater +SCRIPTS_HOST = S99caRepeater +SCRIPTS_Linux = caRepeater.service + +EXPAND += S99caRepeater@ +EXPAND += caRepeater.service@ +EXPAND_VARS = INSTALL_BIN=$(abspath $(INSTALL_BIN)) SRC_DIRS += $(TOP)/src/ca/client/test PROD_HOST += ca_test @@ -112,6 +116,3 @@ ca_test_SYS_LIBS_WIN32 = ws2_32 advapi32 user32 OBJS_vxWorks += ca_test include $(TOP)/configure/RULES - -S99%: ../rc2.% - sed -e s%:INSTALL_BIN:%`cd $(INSTALL_BIN); pwd`% $< >$@ diff --git a/src/ca/client/rc2.caRepeater b/src/ca/client/S99caRepeater@ similarity index 96% rename from src/ca/client/rc2.caRepeater rename to src/ca/client/S99caRepeater@ index 4db37b49a..aabefb72c 100644 --- a/src/ca/client/rc2.caRepeater +++ b/src/ca/client/S99caRepeater@ @@ -3,7 +3,7 @@ # System-V init script for the EPICS CA Repeater. # -INSTALL_BIN=:INSTALL_BIN: +INSTALL_BIN=@INSTALL_BIN@ # To change the default values for the EPICS environment parameters, # uncomment and modify the relevant lines below. These are the only diff --git a/src/ca/client/caRepeater.service@ b/src/ca/client/caRepeater.service@ new file mode 100644 index 000000000..ee50305a1 --- /dev/null +++ b/src/ca/client/caRepeater.service@ @@ -0,0 +1,25 @@ +# +# Linux systemd service file for the EPICS CA Repeater +# +# To install this file, as root: +# cp caRepeater.service /etc/systemd/system +# chmod 664 /etc/systemd/system/caRepeater.service +# systemctl daemon-reload +# systemctl enable caRepeater +# systemctl start caRepeater +# +# To check the status: +# systemctl status caRepeater + +[Unit] +Description=EPICS CA Repeater +Requires=network.target +After=network.target + +[Service] +ExecStart=@INSTALL_BIN@/caRepeater +Restart=always +User=daemon + +[Install] +WantedBy=multi-user.target diff --git a/src/libCom/Makefile b/src/libCom/Makefile index 33955acfd..2bff26e0c 100644 --- a/src/libCom/Makefile +++ b/src/libCom/Makefile @@ -56,7 +56,6 @@ include $(LIBCOM)/as/RULES include $(LIBCOM)/env/RULES include $(LIBCOM)/error/RULES include $(LIBCOM)/flex/RULES -include $(LIBCOM)/log/RULES include $(LIBCOM)/misc/RULES include $(LIBCOM)/osi/RULES diff --git a/src/libCom/log/Makefile b/src/libCom/log/Makefile index 5b0f23cea..7d7a6b620 100644 --- a/src/libCom/log/Makefile +++ b/src/libCom/log/Makefile @@ -21,6 +21,8 @@ iocLogServer_LIBS = Com iocLogServer_SYS_LIBS_solaris += socket iocLogServer_SYS_LIBS_WIN32 += user32 ws2_32 -SCRIPTS_solaris := S99logServer -SCRIPTS_Linux := S99logServer +SCRIPTS_HOST = S99logServer + +EXPAND += S99logServer@ +EXPAND_VARS = INSTALL_BIN=$(abspath $(INSTALL_BIN)) diff --git a/src/libCom/log/RULES b/src/libCom/log/RULES deleted file mode 100644 index 0483b0518..000000000 --- a/src/libCom/log/RULES +++ /dev/null @@ -1,12 +0,0 @@ -#************************************************************************* -# Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne -# National Laboratory. -# EPICS BASE is distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. -#************************************************************************* - -# This is a Makefile fragment, see src/libCom/Makefile. - -S99%: ../log/rc2.% - sed -e s%:INSTALL_BIN:%`cd $(INSTALL_BIN); pwd`% $< >$@ - diff --git a/src/libCom/log/rc2.logServer b/src/libCom/log/S99logServer@ similarity index 96% rename from src/libCom/log/rc2.logServer rename to src/libCom/log/S99logServer@ index 407227d91..294b2ec01 100644 --- a/src/libCom/log/rc2.logServer +++ b/src/libCom/log/S99logServer@ @@ -3,7 +3,7 @@ # System-V init script for the EPICS IOC Log Server. # -INSTALL_BIN=:INSTALL_BIN: +INSTALL_BIN=@INSTALL_BIN@ # To change the default values for the EPICS Environment parameters, # uncomment and modify the relevant lines below. diff --git a/src/libCom/test/Makefile b/src/libCom/test/Makefile index cb3dab0de..6de92321e 100755 --- a/src/libCom/test/Makefile +++ b/src/libCom/test/Makefile @@ -171,11 +171,6 @@ epicsAtomicTest_SRCS += epicsAtomicTest.cpp testHarness_SRCS += epicsAtomicTest.cpp TESTS += epicsAtomicTest -TESTPROD_HOST += epicsExceptionTest -epicsExceptionTest_SRCS += epicsExceptionTest.cpp -testHarness_SRCS += epicsExceptionTest.cpp -TESTS += epicsExceptionTest - TESTPROD_HOST += macDefExpandTest macDefExpandTest_SRCS += macDefExpandTest.c testHarness_SRCS += macDefExpandTest.c diff --git a/src/libCom/test/epicsExceptionTest.cpp b/src/libCom/test/epicsExceptionTest.cpp deleted file mode 100644 index d6c3ecd9b..000000000 --- a/src/libCom/test/epicsExceptionTest.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2006 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 is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -// -// Verify that the local c++ exception mechanism matches the ANSI/ISO standard. -// Author: Jeff Hill -// - -#include -#include -#include -#if defined(__GNUC__) && (__GNUC__<2 || (__GNUC__==2 && __GNUC_MINOR__<=96)) -#include -#else -#include -#endif - -#include "epicsUnitTest.h" -#include "epicsThread.h" -#include "testMain.h" - -using namespace std; - -#if defined ( _MSC_VER ) - // some interesting bugs found in the MS implementation of new -# if _MSC_VER >= 1900 - static size_t unsuccessfulNewSize = numeric_limits < size_t > :: max (); -# elif _MSC_VER > 1310 /* this gets fixed some release after visual studio 7 we hope */ - static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max (); -# else - static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max () - 100; -# endif - // passing a size_t to printf() needs "%zu" on some platforms -#elif defined(vxWorks) - // Neither vxWorks 5 or 6 supply true ANSI C++ - static const size_t unsuccessfulNewSize = UINT_MAX - 15u; -#else - static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max (); -#endif - -class exThread : public epicsThreadRunable { -public: - exThread (); - void waitForCompletion (); - ~exThread() {}; -private: - epicsThread thread; - bool done; - void run (); -}; - -static void epicsExceptionTestPrivate () -{ - try { - char * p = new char [unsuccessfulNewSize]; - testFail("new char[%lu] returned %p", - (unsigned long) unsuccessfulNewSize, p); - } - catch ( const bad_alloc & ) { - testPass("new char[%lu] threw", - (unsigned long) unsuccessfulNewSize); - } - catch ( ... ) { - testFail("new: threw wrong type"); - } - try { - char * p = new ( nothrow ) - char [unsuccessfulNewSize]; - testOk(p == 0, "new (nothrow) returned %p", p); - } - catch( ... ) { - testFail("new (nothrow): threw"); - } -} - -exThread::exThread () : - thread ( *this, "testExceptions", epicsThreadGetStackSize(epicsThreadStackSmall) ), - done ( false ) -{ - this->thread.start (); -} - -void exThread::run () -{ - epicsExceptionTestPrivate (); - this->done = true; -} - -void exThread::waitForCompletion () -{ - while ( ! this->done ) { - epicsThreadSleep ( 0.1 ); - } -} - -MAIN(epicsExceptionTest) -{ - testPlan(4); - epicsExceptionTestPrivate (); - - exThread athread; - athread.waitForCompletion (); - return testDone(); -} diff --git a/src/libCom/test/epicsRunLibComTests.c b/src/libCom/test/epicsRunLibComTests.c index 3a39c7713..389d7e305 100644 --- a/src/libCom/test/epicsRunLibComTests.c +++ b/src/libCom/test/epicsRunLibComTests.c @@ -24,7 +24,6 @@ int epicsEllTest(void); int epicsEnvTest(void); int epicsErrlogTest(void); int epicsEventTest(void); -int epicsExceptionTest(void); int epicsExitTest(void); int epicsMathTest(void); int epicsMessageQueueTest(void); @@ -80,7 +79,6 @@ void epicsRunLibComTests(void) runTest(epicsEnvTest); runTest(epicsErrlogTest); runTest(epicsEventTest); - runTest(epicsExceptionTest); runTest(epicsMathTest); runTest(epicsMessageQueueTest); runTest(epicsMMIOTest); diff --git a/src/template/base/makeBaseApp.pl b/src/template/base/makeBaseApp.pl index b53a0541e..13d749d4c 100644 --- a/src/template/base/makeBaseApp.pl +++ b/src/template/base/makeBaseApp.pl @@ -418,7 +418,8 @@ EOF } sub GetUser { - $user = $opt_u || $ENV{USER} || $ENV{USERNAME} || Win32::LoginName(); + $user = $opt_u || $ENV{USER} || $ENV{USERNAME} || getlogin(); + $user = Win32::LoginName() if !$user && $^ eq 'MSWin32'; unless ($user) { print "Strange, I cannot figure out your user name!\n"; diff --git a/src/template/base/top/configure/RELEASE b/src/template/base/top/configure/RELEASE index 84074fe15..ba28bcb26 100644 --- a/src/template/base/top/configure/RELEASE +++ b/src/template/base/top/configure/RELEASE @@ -14,19 +14,24 @@ # RELEASE.Common.$(T_A) # RELEASE.$(EPICS_HOST_ARCH).$(T_A) # -# This file should ONLY define paths to other support modules, -# or include statements that pull in similar RELEASE files. -# Build settings that are NOT module paths should appear in a -# CONFIG_SITE file. +# This file is parsed by both GNUmake and an EPICS Perl script, +# so it can ONLY contain definititions of paths to other support +# modules, variable definitions that are used in module paths, +# and include statements that pull in other RELEASE files. +# Variables may be used before their values have been set. +# Build variables that are NOT used in paths should be set in +# the CONFIG_SITE file. -TEMPLATE_TOP=_TEMPLATE_TOP_ +# Variables and paths to dependent modules: +#MODULES = /path/to/modules +#MYMODULE = $(MODULES)/my-module # If using the sequencer, point SNCSEQ at its top directory: -#SNCSEQ=$(EPICS_BASE)/../modules/soft/seq +#SNCSEQ = $(MODULES)/seq-ver -# EPICS_BASE usually appears last so other apps can override stuff: -EPICS_BASE=_EPICS_BASE_ +# EPICS_BASE should appear last so earlier modules can override stuff: +EPICS_BASE = _EPICS_BASE_ -# Set RULES here if you want to take build rules from somewhere +# Set RULES here if you want to use build rules from somewhere # other than EPICS_BASE: -#RULES=/path/to/epics/support/module/rules/x-y +#RULES = $(MODULES)/build-rules diff --git a/src/template/base/top/exampleApp/src/Makefile b/src/template/base/top/exampleApp/src/Makefile index f3b262c77..bc9f18619 100644 --- a/src/template/base/top/exampleApp/src/Makefile +++ b/src/template/base/top/exampleApp/src/Makefile @@ -26,6 +26,7 @@ _APPNAME_Support_SRCS += initTrace.c _APPNAME_Support_LIBS += $(EPICS_BASE_IOC_LIBS) + # Build the IOC application PROD_IOC = _APPNAME_ @@ -46,9 +47,6 @@ _APPNAME__SRCS += _APPNAME__registerRecordDeviceDriver.cpp _APPNAME__SRCS_DEFAULT += _APPNAME_Main.cpp _APPNAME__SRCS_vxWorks += -nil- -# Add support from base/src/vxWorks if needed -#_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary - # Link in the code from our support library _APPNAME__LIBS += _APPNAME_Support @@ -58,6 +56,7 @@ ifneq ($(SNCSEQ),) # Build sncExample into _APPNAME_Support sncExample_SNCFLAGS += +r _APPNAME__DBD += sncExample.dbd + # A .stt sequence program is *not* pre-processed: _APPNAME_Support_SRCS += sncExample.stt _APPNAME_Support_LIBS += seq pv _APPNAME__LIBS += seq pv @@ -65,6 +64,7 @@ ifneq ($(SNCSEQ),) # Build sncProgram as a standalone program PROD_HOST += sncProgram sncProgram_SNCFLAGS += +m + # A .st sequence program *is* pre-processed: sncProgram_SRCS += sncProgram.st sncProgram_LIBS += seq pv sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS) diff --git a/src/tools/convertRelease.pl b/src/tools/convertRelease.pl index a9b5aef23..651faef29 100644 --- a/src/tools/convertRelease.pl +++ b/src/tools/convertRelease.pl @@ -237,7 +237,7 @@ sub checkRelease { } } - my @modules = @apps; + my @modules = grep(!m/^(RULES|TOP|TEMPLATE_TOP)$/, @apps); my $app = shift @modules; my $latest = AbsPath($macros{$app}); my %paths = ($latest => $app);