Compare commits
265 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7e42fab3c | ||
|
|
2f28ce94f4 | ||
|
|
732f8b19be | ||
|
|
b03e2f376b | ||
|
|
59c68807b6 | ||
|
|
2e7ed02a60 | ||
|
|
089954aaab | ||
|
|
34e0b2f305 | ||
|
|
ceb13797a6 | ||
|
|
084557bd3e | ||
|
|
aeed7cfbdd | ||
|
|
183c3b2a3e | ||
|
|
cf2fef2405 | ||
|
|
298c8706ec | ||
|
|
49de2ec498 | ||
|
|
0aa6e9603b | ||
|
|
314e09d8ca | ||
|
|
076175386f | ||
|
|
f40d379485 | ||
|
|
445cbb8221 | ||
|
|
a9c8d8d5d3 | ||
|
|
1ff64f72a9 | ||
|
|
f10d0d95b0 | ||
|
|
dfbda1394d | ||
|
|
d05d8807ec | ||
|
|
582a9dbef5 | ||
|
|
b655662131 | ||
|
|
be061e1084 | ||
|
|
91c18c32d4 | ||
|
|
3790ce4452 | ||
|
|
566ab038d2 | ||
|
|
648589e6ab | ||
|
|
841effe9ee | ||
|
|
a9727fd5cb | ||
|
|
fde0485d6b | ||
|
|
cbf917e833 | ||
|
|
45cf2ea5ce | ||
|
|
a95635a018 | ||
|
|
9df39475cd | ||
|
|
bdf01e7a67 | ||
|
|
0dd5f863ef | ||
|
|
38339b6ccf | ||
|
|
2aecf3142a | ||
|
|
1687757752 | ||
|
|
1533a4f13f | ||
|
|
a1aeb23314 | ||
|
|
933e276e1a | ||
|
|
7f02f8a386 | ||
|
|
cb3fb18f40 | ||
|
|
062c75a078 | ||
|
|
b2160bd618 | ||
|
|
5b7f896312 | ||
|
|
a9034bb586 | ||
|
|
f9820577c1 | ||
|
|
e6914f3b80 | ||
|
|
41f1b0ffb5 | ||
|
|
d82d3d3679 | ||
| e48cdb48ac | |||
|
|
3944b32e04 | ||
|
|
a0667a122b | ||
|
|
f2b4c412d3 | ||
|
|
8250339e0d | ||
|
|
803593560d | ||
|
|
bfae080af4 | ||
|
|
6ae3f56560 | ||
|
|
4844fbbd82 | ||
|
|
983937a52f | ||
|
|
6867f97346 | ||
|
|
1d9e9ff4f7 | ||
|
|
eb8ca22704 | ||
|
|
bfd289e85f | ||
|
|
a5bae49dab | ||
|
|
7a612f9524 | ||
|
|
0db8f8ca1b | ||
|
|
dbd6f7e807 | ||
|
|
54cd7e7ba1 | ||
|
|
cbe6173417 | ||
|
|
f64f84744e | ||
|
|
d97a12f095 | ||
|
|
475963453c | ||
|
|
f5a442c0de | ||
|
|
df519ce1a2 | ||
|
|
feb938fae2 | ||
|
|
e068191684 | ||
|
|
33f2d8c4aa | ||
|
|
60a092fa50 | ||
|
|
24f08460bb | ||
|
|
247fea0fa9 | ||
|
|
8a9637568e | ||
|
|
87229fdef0 | ||
|
|
b0418e5274 | ||
|
|
2e89a60c2d | ||
|
|
09ec3af337 | ||
|
|
70e9d46d75 | ||
|
|
1d18aa3e6c | ||
|
|
a85967caea | ||
|
|
a50b850ebd | ||
|
|
6767bcd31e | ||
|
|
81550ac4d3 | ||
| d2d8674cb9 | |||
| 6f193242e0 | |||
| 39e8ccdef4 | |||
| eb8992a750 | |||
| 62fb49f93b | |||
| a5c9db8c8e | |||
| 04e752c83a | |||
| a16ce877e7 | |||
| 15f28f1183 | |||
| 9c18ce007a | |||
| 765af2efea | |||
| 059c385286 | |||
| feb1f9b0df | |||
| 9d9840ad1e | |||
| af73e4cf65 | |||
| ad861a0617 | |||
| 1b88e834d6 | |||
| e000ea4913 | |||
| 06f1a8ec23 | |||
| cf2658be53 | |||
| 74a403090b | |||
| dc123a0a37 | |||
|
|
7eee262486 | ||
|
|
a10379327c | ||
|
|
b37bfe3ed0 | ||
|
|
41d86ecd7a | ||
|
|
961dd2bc5d | ||
|
|
db4ad455d2 | ||
|
|
74a90d141b | ||
|
|
ed9d7550f2 | ||
|
|
87c68663f3 | ||
|
|
3881328f2f | ||
|
|
9722e707fd | ||
|
|
10e9db3710 | ||
|
|
ec31feea05 | ||
|
|
d0ff3c7672 | ||
|
|
178d5779a2 | ||
|
|
00334c981c | ||
|
|
5b5fd8004c | ||
|
|
c7db681e25 | ||
|
|
3ff62f4ddb | ||
|
|
b34859fb86 | ||
|
|
953dd2b7f9 | ||
|
|
3128fdb930 | ||
|
|
47f295fecb | ||
|
|
4816a3c04b | ||
|
|
e0950643bb | ||
|
|
252983efca | ||
|
|
7ca26c515a | ||
|
|
a961ca2fe5 | ||
|
|
a2fe07aa76 | ||
|
|
a69803f278 | ||
|
|
ee38b99e0f | ||
|
|
0a01c38698 | ||
|
|
9efefad955 | ||
|
|
0c62fc8d84 | ||
|
|
292dfe8e16 | ||
|
|
1c93726ee6 | ||
|
|
643d58fd04 | ||
|
|
f08b412a18 | ||
|
|
77574022a1 | ||
|
|
75a1b82322 | ||
|
|
73fec88168 | ||
|
|
2461dc3574 | ||
|
|
704e6251e6 | ||
|
|
f70c17ee69 | ||
|
|
96e3e678e9 | ||
|
|
9d4b652c5e | ||
|
|
0d3cc5a20a | ||
|
|
9255256f15 | ||
|
|
4685f7567b | ||
|
|
e5f8683144 | ||
|
|
4f63bf139f | ||
|
|
d7d142650b | ||
|
|
eac3d2719b | ||
|
|
a3d0699b84 | ||
|
|
a16bf2dc38 | ||
|
|
13936680e9 | ||
|
|
7b6c67b51b | ||
|
|
33febb52ba | ||
|
|
44149c170e | ||
|
|
db6825f62e | ||
|
|
6905ded0d0 | ||
|
|
4f31205188 | ||
|
|
90d9be1c00 | ||
|
|
b93f92c843 | ||
|
|
83458421aa | ||
|
|
89e3c582b5 | ||
|
|
623539c3e8 | ||
|
|
2a0df61974 | ||
|
|
6e3a15e318 | ||
|
|
86b1882186 | ||
|
|
03e613cec0 | ||
|
|
177c377b81 | ||
|
|
1cf831939a | ||
|
|
26cd81d35f | ||
|
|
31811e53b3 | ||
|
|
128d2a93c8 | ||
|
|
67583b4bda | ||
|
|
8a39ca7489 | ||
|
|
b9bc836d1e | ||
|
|
9b5034f307 | ||
|
|
a6812c5869 | ||
|
|
b89494a840 | ||
|
|
771ad6a442 | ||
|
|
84c86e67e8 | ||
|
|
cac3e2dc3b | ||
|
|
8ff6ce4821 | ||
|
|
44ea66aaaf | ||
|
|
c9c4eea0f8 | ||
|
|
78ce2dac05 | ||
|
|
b2285bb8aa | ||
|
|
f79c69f0a0 | ||
|
|
e03c7edfe5 | ||
|
|
398fdee33e | ||
|
|
59cb5ba6a0 | ||
|
|
2db2f1a53f | ||
|
|
b811d3402f | ||
|
|
e75a72ef76 | ||
|
|
33e099a51b | ||
|
|
d3a8a49552 | ||
|
|
96998f55e0 | ||
|
|
b57f02ece2 | ||
|
|
b0db6568ea | ||
|
|
30812c23f0 | ||
|
|
5cfff383b2 | ||
|
|
345cfcffa8 | ||
|
|
deb9dbcd77 | ||
|
|
96259b7bdc | ||
|
|
25576c316a | ||
|
|
2d3de1916b | ||
|
|
16ddcaeaed | ||
|
|
297206e247 | ||
|
|
63bf8a8219 | ||
|
|
ec7193d0be | ||
|
|
1f95d0db12 | ||
|
|
e02c5c3026 | ||
|
|
8e9d75ad71 | ||
|
|
630663caa8 | ||
|
|
736075daf6 | ||
|
|
9ef3b77348 | ||
|
|
5e1bad2b34 | ||
|
|
a9606dbf6e | ||
|
|
409ee26fae | ||
|
|
9a4787155c | ||
|
|
84dba0d2b7 | ||
|
|
87f6c3dec9 | ||
|
|
940814becf | ||
|
|
68a1a529b2 | ||
|
|
ce38caf41b | ||
|
|
f03f10e664 | ||
|
|
b4f4fb853d | ||
|
|
b518ebe85b | ||
|
|
e461d782f4 | ||
|
|
ef2a381e92 | ||
|
|
265d4962a4 | ||
|
|
db9267bbd5 | ||
|
|
1cf3fa9ba9 | ||
|
|
3e8b0028dc | ||
|
|
d8f18c27f4 | ||
|
|
801c01b9b6 | ||
|
|
0c1874bbfe | ||
|
|
5f46d6dcee | ||
|
|
d41355e0fc | ||
|
|
a5aa5459e3 | ||
|
|
6201d37756 |
131
.appveyor.yml
Normal file
131
.appveyor.yml
Normal file
@@ -0,0 +1,131 @@
|
||||
# .appveyor.yml for use with EPICS Base ci-scripts
|
||||
# (see: https://github.com/epics-base/ci-scripts)
|
||||
|
||||
# Version format
|
||||
version: base-{branch}-{build}
|
||||
|
||||
#---------------------------------#
|
||||
# build cache #
|
||||
#---------------------------------#
|
||||
# The AppVeyor cache allowance is way too small (1GB per account across all projects, branches and jobs)
|
||||
# to be used for the dependency builds.
|
||||
|
||||
cache:
|
||||
- C:\Users\appveyor\.tools
|
||||
|
||||
#---------------------------------#
|
||||
# repository cloning #
|
||||
#---------------------------------#
|
||||
|
||||
# Called at very beginning, before repo cloning
|
||||
init:
|
||||
# Set autocrlf to make batch files work
|
||||
- git config --global core.autocrlf true
|
||||
|
||||
# Set clone depth (do not fetch complete history)
|
||||
clone_depth: 5
|
||||
|
||||
# Skipping commits affecting only specific files
|
||||
skip_commits:
|
||||
files:
|
||||
- 'documentation/*'
|
||||
- 'templates/*'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
|
||||
#---------------------------------#
|
||||
# build matrix configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# Build Configurations: dll/static, regular/debug
|
||||
configuration:
|
||||
- dynamic
|
||||
- static
|
||||
- dynamic-debug
|
||||
- static-debug
|
||||
|
||||
# Environment variables: compiler toolchain, base version, setup file, ...
|
||||
environment:
|
||||
# common / default variables for all jobs
|
||||
SETUP_PATH: .ci-local:.ci
|
||||
BASE: SELF
|
||||
|
||||
matrix:
|
||||
- CMP: vs2019
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
- CMP: vs2017
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- CMP: vs2015
|
||||
- CMP: vs2013
|
||||
- CMP: vs2012
|
||||
- CMP: vs2010
|
||||
- CMP: mingw
|
||||
|
||||
# Platform: processor architecture
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
|
||||
# Matrix configuration: exclude sets of jobs
|
||||
matrix:
|
||||
exclude:
|
||||
# VS2012 and older installs don't have the 64 bit compiler
|
||||
- platform: x64
|
||||
CMP: vs2012
|
||||
- platform: x64
|
||||
CMP: vs2010
|
||||
- platform: x64
|
||||
CMP: vs2008
|
||||
# Exclude more jobs to reduce build time
|
||||
# Skip 32-bit for "middle-aged" compilers
|
||||
- platform: x86
|
||||
CMP: vs2017
|
||||
- platform: x86
|
||||
CMP: vs2015
|
||||
|
||||
#---------------------------------#
|
||||
# building & testing #
|
||||
#---------------------------------#
|
||||
|
||||
install:
|
||||
- cmd: git submodule update --init --recursive
|
||||
- cmd: python .ci/appveyor/do.py prepare
|
||||
|
||||
build_script:
|
||||
- cmd: python .ci/appveyor/do.py build
|
||||
|
||||
test_script:
|
||||
- cmd: python .ci/appveyor/do.py test
|
||||
|
||||
on_finish:
|
||||
- ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||
- cmd: python .ci/appveyor/do.py build test-results -s
|
||||
|
||||
#---------------------------------#
|
||||
# debugging #
|
||||
#---------------------------------#
|
||||
|
||||
## if you want to connect by remote desktop to a failed build, uncomment these lines
|
||||
## note that you will need to connect within the usual build timeout limit (60 minutes)
|
||||
## so you may want to adjust the build matrix above to just build the one of interest
|
||||
|
||||
# print the connection info
|
||||
#init:
|
||||
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
# block a failed build (until the watchdog barks)
|
||||
#on_failure:
|
||||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
#---------------------------------#
|
||||
# notifications #
|
||||
#---------------------------------#
|
||||
|
||||
notifications:
|
||||
|
||||
- provider: Email
|
||||
to:
|
||||
- core-talk@aps.anl.gov
|
||||
on_build_success: false
|
||||
|
||||
- provider: GitHubPullRequest
|
||||
1
.ci
Submodule
1
.ci
Submodule
Submodule .ci added at e91a588370
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,6 +7,7 @@
|
||||
/include/
|
||||
/templates/
|
||||
/configure/*.local
|
||||
/.tests-failed
|
||||
O.*/
|
||||
/QtC-*
|
||||
*.orig
|
||||
|
||||
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[submodule ".ci"]
|
||||
path = .ci
|
||||
url = https://github.com/epics-base/ci-scripts
|
||||
branch = master
|
||||
105
.travis.yml
105
.travis.yml
@@ -1,32 +1,93 @@
|
||||
sudo: false
|
||||
dist: trusty
|
||||
language: c
|
||||
compiler:
|
||||
- gcc
|
||||
# .travis.yml for use with EPICS Base ci-scripts
|
||||
# (see: https://github.com/epics-base/ci-scripts)
|
||||
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
dist: xenial
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache
|
||||
|
||||
env:
|
||||
- CMPLR=gcc
|
||||
- CMPLR=gcc EXTRA=CMD_CXXFLAGS=-std=c++11
|
||||
- CMPLR=gcc STATIC=YES
|
||||
- CMPLR=clang
|
||||
- CMPLR=clang STATIC=YES
|
||||
- WINE=32 TEST=NO STATIC=YES
|
||||
- WINE=32 TEST=NO STATIC=NO
|
||||
- RTEMS=4.10 TEST=YES
|
||||
- RTEMS=4.9 TEST=YES
|
||||
global:
|
||||
- SETUP_PATH=.ci-local:.ci
|
||||
- BASE=SELF
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
# for all EPICS builds
|
||||
- libreadline6-dev
|
||||
- libncurses5-dev
|
||||
- perl
|
||||
# for clang compiler
|
||||
- clang
|
||||
# for mingw builds (32bit and 64bit)
|
||||
- g++-mingw-w64-i686
|
||||
- bison
|
||||
- flex
|
||||
- texinfo
|
||||
- install-info
|
||||
- g++-mingw-w64-x86-64
|
||||
# for RTEMS cross builds
|
||||
- qemu-system-x86
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache
|
||||
script: sh ci/travis-build.sh </dev/null
|
||||
homebrew:
|
||||
packages:
|
||||
# for all EPICS builds
|
||||
- bash
|
||||
update: true
|
||||
|
||||
install:
|
||||
- ./.ci/travis/prepare.sh
|
||||
|
||||
script:
|
||||
- ./.ci/travis/build.sh
|
||||
|
||||
# Define build jobs
|
||||
|
||||
jobs:
|
||||
include:
|
||||
|
||||
# Different configurations of default gcc and clang
|
||||
# (the DIST settings are just FYI on the travis-ci.org site)
|
||||
- dist: bionic
|
||||
env: DIST=bionic
|
||||
|
||||
- env: DIST=xenial
|
||||
|
||||
- dist: bionic
|
||||
env: DIST=bionic EXTRA="CMD_CXXFLAGS=-std=c++11"
|
||||
|
||||
- dist: trusty
|
||||
env: DIST=trusty STATIC=YES EXTRA="CMD_CXXFLAGS=-std=c++11"
|
||||
|
||||
- dist: bionic
|
||||
compiler: clang
|
||||
env: DIST=bionic
|
||||
|
||||
- compiler: clang
|
||||
env: DIST=xenial
|
||||
|
||||
- dist: trusty
|
||||
compiler: clang
|
||||
env: DIST=trusty STATIC=YES
|
||||
|
||||
# Cross-compilations to Windows using MinGW and WINE
|
||||
|
||||
- env: WINE=32 TEST=NO STATIC=YES
|
||||
compiler: mingw
|
||||
|
||||
- env: WINE=32 TEST=NO STATIC=NO
|
||||
compiler: mingw
|
||||
|
||||
# Cross-compilation to RTEMS
|
||||
|
||||
- env: RTEMS=4.10 TEST=NO
|
||||
|
||||
- env: RTEMS=4.9 TEST=NO
|
||||
|
||||
# MacOS build
|
||||
|
||||
- os: osx
|
||||
env:
|
||||
- EXTRA="CMD_CFLAGS=-mmacosx-version-min=10.7"
|
||||
- EXTRA1="CMD_CXXFLAGS=-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++"
|
||||
- EXTRA2="CMD_LDXFLAGS=-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++"
|
||||
compiler: clang
|
||||
|
||||
10
README
10
README
@@ -2,14 +2,14 @@
|
||||
EPICS Base - the central core of a control system toolkit
|
||||
---------------------------------------------------------
|
||||
|
||||
Copyright UChicago Argonne LLC, as Operator of Argonne
|
||||
National Laboratory.
|
||||
Copyright (c) 1991-2003 The University of Chicago, as Operator
|
||||
of Argonne National Laboratory.
|
||||
Copyright (c) 1991-2003 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 the file LICENSE that is included with
|
||||
this distribution.
|
||||
EPICS Base Versions 3.13.7 and higher are distributed
|
||||
subject to a Software License Agreement found in the
|
||||
file LICENSE that is included with this distribution.
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
|
||||
85
appveyor.yml
85
appveyor.yml
@@ -1,85 +0,0 @@
|
||||
# AppVeyor configuration for EPICS Base
|
||||
|
||||
# Ralph Lange <ralph.lange@gmx.de>
|
||||
# Copyright (c) 2016-2017 ITER Organization
|
||||
|
||||
# Version format
|
||||
version: base-{branch}-{build}
|
||||
|
||||
#---------------------------------#
|
||||
# repository cloning #
|
||||
#---------------------------------#
|
||||
|
||||
# Called at very beginning, before repo cloning
|
||||
init:
|
||||
# Set autocrlf to make batch files work
|
||||
- git config --global core.autocrlf true
|
||||
|
||||
# Set clone depth (do not fetch complete history)
|
||||
clone_depth: 2
|
||||
|
||||
# Skipping commits affecting only specific files
|
||||
skip_commits:
|
||||
files:
|
||||
- 'documentation/*'
|
||||
- 'templates/*'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
|
||||
#---------------------------------#
|
||||
# build matrix configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# Build Configurations: dll/static, regular/debug
|
||||
configuration:
|
||||
- dynamic
|
||||
- static
|
||||
- dynamic-debug
|
||||
- static-debug
|
||||
|
||||
# Environment variables: compiler toolchain
|
||||
environment:
|
||||
matrix:
|
||||
- TOOLCHAIN: 10.0
|
||||
- TOOLCHAIN: 11.0
|
||||
- TOOLCHAIN: 12.0
|
||||
- TOOLCHAIN: 14.0
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLCHAIN: 2017
|
||||
- TOOLCHAIN: cygwin
|
||||
- TOOLCHAIN: mingw
|
||||
|
||||
# Platform: architecture
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
|
||||
# Matrix configuration: allow specific failing jobs
|
||||
matrix:
|
||||
exclude:
|
||||
# VS Express installs don't have the 64 bit compiler
|
||||
- platform: x64
|
||||
TOOLCHAIN: 10.0
|
||||
|
||||
#---------------------------------#
|
||||
# building & testing #
|
||||
#---------------------------------#
|
||||
|
||||
install:
|
||||
- cmd: ci/appveyor-prepare.bat
|
||||
|
||||
build_script:
|
||||
- cmd: ci/appveyor-make.bat
|
||||
|
||||
test_script:
|
||||
- cmd: ci/appveyor-make.bat runtests
|
||||
|
||||
#---------------------------------#
|
||||
# notifications #
|
||||
#---------------------------------#
|
||||
|
||||
notifications:
|
||||
|
||||
- provider: Slack
|
||||
incoming_webhook:
|
||||
secure: RYOm3FIUYeZGjWKaeTVKwq+C3fzK54AKwbmAoECED45mex3lN+8HmrC845a6mg9xPUJ/ND51RopWVaKDD9/UzaM0SO195RQLKqUTIUafiuM=
|
||||
@@ -1,137 +0,0 @@
|
||||
:: Universal build script for AppVeyor (https://ci.appveyor.com/)
|
||||
:: Environment:
|
||||
:: TOOLCHAIN - toolchain version [10.0/11.0/12.0/14.0/2017/cygwin/mingw]
|
||||
:: CONFIGURATION - determines EPICS build [dynamic/static]
|
||||
:: PLATFORM - architecture [x86/x64]
|
||||
::
|
||||
:: All command line args are passed to make
|
||||
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
set "ST="
|
||||
if /i "%CONFIGURATION%"=="static" set ST=-static
|
||||
|
||||
set OS=64BIT
|
||||
if "%PLATFORM%"=="x86" set OS=32BIT
|
||||
|
||||
echo [INFO] Platform: %OS%
|
||||
|
||||
:: Use parallel make, except for 3.14
|
||||
set "MAKEARGS=-j2 -Otarget"
|
||||
if "%APPVEYOR_REPO_BRANCH%"=="3.14" set MAKEARGS=
|
||||
|
||||
if "%TOOLCHAIN%"=="cygwin" (
|
||||
set "MAKE=make"
|
||||
if "%OS%"=="64BIT" (
|
||||
set "EPICS_HOST_ARCH=cygwin-x86_64"
|
||||
set "INCLUDE=C:\cygwin64\include;%INCLUDE%"
|
||||
set "PATH=C:\cygwin64\bin;%PATH%"
|
||||
echo [INFO] Cygwin Toolchain 64bit
|
||||
) else (
|
||||
set "EPICS_HOST_ARCH=cygwin-x86"
|
||||
set "INCLUDE=C:\cygwin\include;%INCLUDE%"
|
||||
set "PATH=C:\cygwin\bin;%PATH%"
|
||||
echo [INFO] Cygwin Toolchain 32bit
|
||||
)
|
||||
echo [INFO] Compiler Version
|
||||
gcc -v
|
||||
goto Finish
|
||||
)
|
||||
|
||||
if "%TOOLCHAIN%"=="mingw" (
|
||||
set "MAKE=mingw32-make"
|
||||
if "%OS%"=="64BIT" (
|
||||
set "EPICS_HOST_ARCH=windows-x64-mingw"
|
||||
set "INCLUDE=C:\tools\mingw64\include;%INCLUDE%"
|
||||
set "PATH=C:\tools\mingw64\bin;%PATH%"
|
||||
echo [INFO] MinGW Toolchain 64bit
|
||||
) else (
|
||||
set "EPICS_HOST_ARCH=win32-x86-mingw"
|
||||
set "INCLUDE=C:\tools\mingw32\include;%INCLUDE%"
|
||||
set "PATH=C:\tools\mingw32\bin;%PATH%"
|
||||
echo [INFO] MinGW Toolchain 32bit
|
||||
)
|
||||
echo [INFO] Compiler Version
|
||||
gcc -v
|
||||
goto Finish
|
||||
)
|
||||
|
||||
set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN%"
|
||||
if not exist "%VSINSTALL%\" set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio\%TOOLCHAIN%\Community"
|
||||
if not exist "%VSINSTALL%\" goto MSMissing
|
||||
|
||||
set "MAKE=C:\tools\make"
|
||||
|
||||
echo [INFO] APPVEYOR_BUILD_WORKER_IMAGE=%APPVEYOR_BUILD_WORKER_IMAGE%
|
||||
|
||||
if "%OS%"=="64BIT" (
|
||||
set EPICS_HOST_ARCH=windows-x64%ST%
|
||||
:: VS 2017
|
||||
if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\vcvarsall.bat" (
|
||||
call "%VSINSTALL%\VC\vcvarsall.bat" amd64
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 (
|
||||
call "%VSINSTALL%\VC\vcvarsall.bat" x86_amd64
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
)
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\bin\amd64\vcvars64.bat" (
|
||||
call "%VSINSTALL%\VC\bin\amd64\vcvars64.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
) else (
|
||||
set EPICS_HOST_ARCH=win32-x86%ST%
|
||||
:: VS 2017
|
||||
if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat" (
|
||||
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\vcvarsall.bat" (
|
||||
call "%VSINSTALL%\VC\vcvarsall.bat" x86
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\bin\vcvars32.bat" (
|
||||
call "%VSINSTALL%\VC\bin\vcvars32.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\Common7\Tools\vsvars32.bat" (
|
||||
call "%VSINSTALL%\Common7\Tools\vsvars32.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
)
|
||||
|
||||
:MSMissing
|
||||
echo [INFO] Installation for MSVC Toolchain %TOOLCHAIN% / %OS% seems to be missing
|
||||
exit 1
|
||||
|
||||
:MSFound
|
||||
echo [INFO] Microsoft Visual Studio Toolchain %TOOLCHAIN%
|
||||
echo [INFO] Compiler Version
|
||||
cl
|
||||
|
||||
:Finish
|
||||
echo [INFO] EPICS_HOST_ARCH: %EPICS_HOST_ARCH%
|
||||
echo [INFO] Make version
|
||||
%MAKE% --version
|
||||
echo [INFO] Perl version
|
||||
perl --version
|
||||
|
||||
%MAKE% %MAKEARGS% %*
|
||||
@@ -1,70 +0,0 @@
|
||||
:: Build script for AppVeyor (https://ci.appveyor.com/)
|
||||
:: Environment:
|
||||
:: TOOLCHAIN - Toolchain Version [9.0/10.0/11.0/12.0/14.0/cygwin/mingw]
|
||||
:: CONFIGURATION - determines EPICS build [dynamic/static, -debug]
|
||||
:: PLATFORM - "x86" -> use 32bit architecture
|
||||
::
|
||||
:: Prepares an Appveyor build by excuting the following steps
|
||||
:: - Set up configure\CONFIG_SITE for static vs. dynamic build
|
||||
:: - Install Cygwin / Mingw (TOOLCHAIN setting) in the in the appropriate flavor
|
||||
:: - Download and install Make-4.1 from EPICS download page
|
||||
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
set OS=64BIT
|
||||
if "%PLATFORM%"=="x86" set OS=32BIT
|
||||
|
||||
echo [INFO] Platform: %OS%
|
||||
|
||||
if "%TOOLCHAIN%"=="cygwin" (
|
||||
echo.%CONFIGURATION% | findstr /C:"static">nul && (
|
||||
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
|
||||
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for static build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for dynamic build
|
||||
)
|
||||
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
|
||||
echo HOST_OPT=NO>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for debug build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for optimized build
|
||||
)
|
||||
if "%OS%"=="64BIT" (
|
||||
echo [INFO] Installing Cygwin 64bit and dependencies
|
||||
@powershell -Command "(new-object net.webclient).DownloadFile('http://www.cygwin.com/setup-x86_64.exe', 'C:\cygwin64\setup-x86_64.exe')"
|
||||
C:\cygwin64\setup-x86_64.exe -q -P "libreadline-devel,libncursesw-devel"
|
||||
) else (
|
||||
echo [INFO] Installing Cygwin 32bit and dependencies
|
||||
@powershell -Command "(new-object net.webclient).DownloadFile('http://www.cygwin.com/setup-x86.exe', 'C:\cygwin\setup-x86.exe')"
|
||||
C:\cygwin\setup-x86.exe -q -P "libreadline-devel,libncursesw-devel"
|
||||
)
|
||||
)
|
||||
|
||||
if "%TOOLCHAIN%"=="mingw" (
|
||||
echo.%CONFIGURATION% | findstr /C:"static">nul && (
|
||||
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
|
||||
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for static build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for dynamic build
|
||||
)
|
||||
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
|
||||
echo HOST_OPT=NO>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for debug build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for optimized build
|
||||
)
|
||||
if "%OS%"=="64BIT" (
|
||||
echo [INFO] Installing MinGW 64bit
|
||||
cinst mingw || cinst mingw
|
||||
) else (
|
||||
echo [INFO] Installing MinGW 32bit
|
||||
cinst mingw --x86 || cinst mingw --x86
|
||||
)
|
||||
)
|
||||
|
||||
echo [INFO] Installing Make 4.1
|
||||
curl -fsS --retry 3 -o C:\tools\make-4.1.zip https://epics.anl.gov/download/tools/make-4.1-win64.zip
|
||||
cd \tools
|
||||
"C:\Program Files\7-Zip\7z" e make-4.1.zip
|
||||
@@ -1,80 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e -x
|
||||
|
||||
die() {
|
||||
echo "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
CACHEKEY=1
|
||||
|
||||
EPICS_HOST_ARCH=`perl src/tools/EpicsHostArch.pl`
|
||||
|
||||
[ -e configure/os/CONFIG_SITE.Common.linux-x86 ] || die "Wrong location: $PWD"
|
||||
|
||||
case "$CMPLR" in
|
||||
clang)
|
||||
echo "Host compiler is clang"
|
||||
cat << EOF >> configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH
|
||||
GNU = NO
|
||||
CMPLR_CLASS = clang
|
||||
CC = clang
|
||||
CCC = clang++
|
||||
EOF
|
||||
;;
|
||||
*) echo "Host compiler is default";;
|
||||
esac
|
||||
|
||||
if [ "$STATIC" = "YES" ]
|
||||
then
|
||||
echo "Build static libraries/executables"
|
||||
cat << EOF >> configure/CONFIG_SITE
|
||||
SHARED_LIBRARIES=NO
|
||||
STATIC_BUILD=YES
|
||||
EOF
|
||||
fi
|
||||
|
||||
# requires wine and g++-mingw-w64-i686
|
||||
if [ "$WINE" = "32" ]
|
||||
then
|
||||
echo "Cross mingw32"
|
||||
sed -i -e '/CMPLR_PREFIX/d' configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
|
||||
cat << EOF >> configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
|
||||
CMPLR_PREFIX=i686-w64-mingw32-
|
||||
EOF
|
||||
cat << EOF >> configure/CONFIG_SITE
|
||||
CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw
|
||||
EOF
|
||||
fi
|
||||
|
||||
# set RTEMS to eg. "4.9" or "4.10"
|
||||
# requires qemu, bison, flex, texinfo, install-info
|
||||
if [ -n "$RTEMS" ]
|
||||
then
|
||||
echo "Cross RTEMS${RTEMS} for pc386"
|
||||
install -d /home/travis/.cache
|
||||
curl -L "https://github.com/mdavidsaver/rsb/releases/download/20171203-${RTEMS}/i386-rtems${RTEMS}-trusty-20171203-${RTEMS}.tar.bz2" \
|
||||
| tar -C / -xmj
|
||||
|
||||
sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' configure/os/CONFIG_SITE.Common.RTEMS
|
||||
cat << EOF >> configure/os/CONFIG_SITE.Common.RTEMS
|
||||
RTEMS_VERSION=$RTEMS
|
||||
RTEMS_BASE=/home/travis/.rtems
|
||||
EOF
|
||||
cat << EOF >> configure/CONFIG_SITE
|
||||
CROSS_COMPILER_TARGET_ARCHS += RTEMS-pc386-qemu
|
||||
CROSS_COMPILER_RUNTEST_ARCHS += RTEMS-pc386-qemu
|
||||
EOF
|
||||
|
||||
# find local qemu-system-i386
|
||||
echo -n "Using QEMU: "
|
||||
type qemu-system-i386 || echo "Missing qemu"
|
||||
fi
|
||||
|
||||
make -j2 $EXTRA
|
||||
|
||||
if [ "$TEST" != "NO" ]
|
||||
then
|
||||
make tapfiles
|
||||
make -s test-results
|
||||
fi
|
||||
@@ -3,12 +3,13 @@
|
||||
# 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
|
||||
# EPICS BASE Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# EPICS Base directories
|
||||
# Epics base directories
|
||||
|
||||
EPICS_BASE_HOST_BIN = $(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)
|
||||
EPICS_BASE_HOST_LIB = $(EPICS_BASE)/lib/$(EPICS_HOST_ARCH)
|
||||
@@ -18,12 +19,12 @@ ifdef T_A
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# EPICS Base Ioc libraries
|
||||
# Epics base Ioc libraries
|
||||
|
||||
EPICS_BASE_IOC_LIBS += dbRecStd dbCore ca Com
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# EPICS Base Host libraries
|
||||
# Epics base Host libraries
|
||||
|
||||
EPICS_BASE_HOST_LIBS += cas gdd
|
||||
EPICS_BASE_HOST_LIBS += ca Com
|
||||
@@ -36,16 +37,17 @@ ifdef BASE_TOP
|
||||
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
|
||||
# Windows only allows 2 levels of version numbering
|
||||
PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
|
||||
BASE_CPPFLAGS += -DUSE_TYPED_RSET
|
||||
endif # BASE_TOP
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Base c preprocessor flags
|
||||
|
||||
BASE_CPPFLAGS =
|
||||
|
||||
# osithread default stack
|
||||
OSITHREAD_USE_DEFAULT_STACK = NO
|
||||
OSITHREAD_DEFAULT_STACK_FLAGS_YES = -DOSITHREAD_USE_DEFAULT_STACK
|
||||
|
||||
OSITHREAD_DEFAULT_STACK_FLAGS_NO =
|
||||
BASE_CPPFLAGS += $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -57,7 +59,7 @@ TOOLS = $(abspath $(EPICS_BASE_HOST_BIN))
|
||||
FIND_TOOL = $(firstword $(wildcard $(TOOLS)/$(1) $(TOP)/src/tools/$(1)))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# EPICS Base build tools and tool flags
|
||||
# Epics base build tools and tool flags
|
||||
|
||||
MAKEBPT = $(TOOLS)/makeBpt$(HOSTEXE)
|
||||
DBEXPAND = $(PERL) $(TOOLS)/dbdExpand.pl
|
||||
@@ -66,12 +68,11 @@ DBTOMENUH = $(PERL) $(TOOLS)/dbdToMenuH.pl
|
||||
REGISTERRECORDDEVICEDRIVER = $(PERL) $(TOOLS)/registerRecordDeviceDriver.pl
|
||||
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
|
||||
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
|
||||
TAPTOJUNIT = $(PERL) $(TOOLS)/tap-to-junit-xml.pl
|
||||
GENVERSIONHEADER = $(PERL) $(TOOLS)/genVersionHeader.pl $(QUIET_FLAG) $(QUESTION_FLAG)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
#-------------------------------------------------------
|
||||
# tools for installing libraries and products
|
||||
INSTALL = $(PERL) $(TOOLS)/installEpics.pl $(QUIET_FLAG)
|
||||
INSTALL_QUIETLY := $(if $(findstring s,$(MFLAGS)),-q,)
|
||||
INSTALL = $(PERL) $(TOOLS)/installEpics.pl $(INSTALL_QUIETLY)
|
||||
INSTALL_PRODUCT = $(INSTALL)
|
||||
INSTALL_LIBRARY = $(INSTALL)
|
||||
|
||||
@@ -81,7 +82,16 @@ MKMF = $(PERL) $(TOOLS)/mkmf.pl
|
||||
REPLACEVAR = $(PERL) $(TOOLS)/replaceVAR.pl
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Our versions of lex (flex) and yacc (antelope)
|
||||
# Tools for testing
|
||||
TAPTOJUNIT = $(PERL) $(TOOLS)/tap-to-junit-xml.pl
|
||||
PROVE = $(PERL) $(TOOLS)/epicsProve.pl
|
||||
PROVE.tap = $(PROVE) --ext .tap --exec "$(CAT)"
|
||||
|
||||
TEST_FAILURE_FILE = $(TOP)/.tests-failed
|
||||
PROVE_FAILURE = echo $(abspath .)>> $(TEST_FAILURE_FILE)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# private versions of lex/yacc from EPICS
|
||||
EYACC = $(TOOLS)/antelope$(HOSTEXE)
|
||||
ELEX = $(TOOLS)/e_flex$(HOSTEXE) -S$(EPICS_BASE)/include/flex.skel.static
|
||||
|
||||
@@ -89,6 +99,28 @@ YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# The 3.15 version of msi supports new options
|
||||
# Our use of msi is incompatible with older versions
|
||||
|
||||
MSI3_15 = $(EPICS_BASE_HOST_BIN)/msi
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# External tools and tool flags - must be in path or defined in application
|
||||
|
||||
ADL2DL ?= adl2dl
|
||||
|
||||
# sch2edif compiler and flags
|
||||
SCH2EDIF = sch2edif
|
||||
SCH2EDIF_PATH =
|
||||
SCH2EDIF_SYSFLAGS = -n -ap -p.+..+$(SCH2EDIF_PATH)+$(CAPFAST_TEMPLATES)/sym+
|
||||
SCH2EDIF_FLAGS =
|
||||
|
||||
# e2db and flags
|
||||
# - again there is an assumption where edb.def is installed.
|
||||
E2DB ?= e2db
|
||||
E2DB_SYSFLAGS = -ate -d $(CAPFAST_TEMPLATES)/edb.def
|
||||
E2DB_FLAGS =
|
||||
|
||||
DBST ?= dbst
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,46 +15,31 @@
|
||||
# EPICS_SITE_VERSION is defined in CONFIG_SITE for sites that want a local
|
||||
# version number to be included in the reported version string.
|
||||
|
||||
# We define BASE_3_14 and BASE_3_15 as NO and BASE_3_16 as YES, so
|
||||
# ifdef BASE_3_14
|
||||
# true for 3.14 or later
|
||||
# ifdef BASE_3_15
|
||||
# true for 3.15 or later
|
||||
# ifeq ($(BASE_3_14),YES)
|
||||
# true for 3.14.x only
|
||||
# ifeq ($(BASE_3_15),YES)
|
||||
# true for 3.15 only
|
||||
# ifeq ($(BASE_3_16),YES)
|
||||
# true for 3.16 only.
|
||||
|
||||
# In 3.15 we still define BASE_3_14 so "ifdef BASE_3_14" means
|
||||
# 3.14 or later, but "ifeq ($(BASE_3_14),YES)" means 3.14 only.
|
||||
BASE_3_14 = NO
|
||||
BASE_3_15 = NO
|
||||
BASE_3_16 = YES
|
||||
BASE_3_15 = YES
|
||||
|
||||
# EPICS_VERSION must be a number >0 and <256
|
||||
EPICS_VERSION = 3
|
||||
|
||||
# EPICS_REVISION must be a number >=0 and <256
|
||||
EPICS_REVISION = 16
|
||||
EPICS_REVISION = 15
|
||||
|
||||
# EPICS_MODIFICATION must be a number >=0 and <256
|
||||
EPICS_MODIFICATION = 2
|
||||
EPICS_MODIFICATION = 8
|
||||
|
||||
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
|
||||
# Not included if zero
|
||||
EPICS_PATCH_LEVEL = 0
|
||||
|
||||
# This will end in -DEV between official releases
|
||||
EPICS_DEV_SNAPSHOT=-DEV
|
||||
#EPICS_DEV_SNAPSHOT=-DEV
|
||||
#EPICS_DEV_SNAPSHOT=-pre1
|
||||
#EPICS_DEV_SNAPSHOT=-pre1-DEV
|
||||
#EPICS_DEV_SNAPSHOT=-pre2
|
||||
#EPICS_DEV_SNAPSHOT=-pre2-DEV
|
||||
#EPICS_DEV_SNAPSHOT=-rc1
|
||||
#EPICS_DEV_SNAPSHOT=-rc1-DEV
|
||||
#EPICS_DEV_SNAPSHOT=-rc2
|
||||
#EPICS_DEV_SNAPSHOT=-rc2-DEV
|
||||
#EPICS_DEV_SNAPSHOT=
|
||||
EPICS_DEV_SNAPSHOT=
|
||||
|
||||
# No changes should be needed below here
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@ BUILD_ARCHS = $(EPICS_HOST_ARCH) $(CROSS1) $(CROSS2)
|
||||
# otherwise override this in os/CONFIG_SITE.<host_arch>.Common
|
||||
PERL = perl -CSD
|
||||
|
||||
#-------------------------------------------------------
|
||||
# dbst based database optimization default
|
||||
DB_OPT = NO
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Check configure/RELEASE file for consistency
|
||||
CHECK_RELEASE_YES = checkRelease
|
||||
@@ -76,14 +80,9 @@ COMMON_DIR = ../O.Common
|
||||
IOCS_APPL_TOP = $(shell $(FULLPATHNAME) $(INSTALL_LOCATION))
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Silencing the build - suppress messages during 'make -s'
|
||||
# Make echo output - suppress echoing if make's '-s' flag is set
|
||||
NOP = :
|
||||
ECHO = @$(if $(findstring s,$(MFLAGS)),$(NOP),echo)
|
||||
QUIET_FLAG := $(if $(findstring s,$(MFLAGS)),-q,)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Convert 'make -q' flag into '-i' for genVersionHeader.pl
|
||||
QUESTION_FLAG := $(if $(findstring q,$(MFLAGS)),-i,)
|
||||
|
||||
#-------------------------------------------------------
|
||||
ifdef T_A
|
||||
@@ -93,7 +92,7 @@ INSTALL_SHRLIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_TCLLIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_BIN = $(INSTALL_LOCATION_BIN)/$(T_A)
|
||||
|
||||
# Directories for libraries
|
||||
#Directories for libraries
|
||||
SHRLIB_SEARCH_DIRS = $(INSTALL_LIB)
|
||||
|
||||
#-------------------------------------------------------
|
||||
@@ -333,14 +332,6 @@ COMPILE.cpp = $(CCC) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES)
|
||||
# C preprocessor command
|
||||
PREPROCESS.cpp = $(CPP) $(CPPFLAGS) $(INCLUDES) $< > $@
|
||||
|
||||
#--------------------------------------------------
|
||||
# genVersion header defaults
|
||||
|
||||
# C macro name
|
||||
GENVERSIONMACRO = VCSVERSION
|
||||
# C macro default value (empty to use date+time)
|
||||
GENVERSIONDEFAULT =
|
||||
|
||||
#--------------------------------------------------
|
||||
# Header dependency file generation
|
||||
|
||||
|
||||
@@ -35,10 +35,8 @@ EPICS_CA_CONN_TMO=30.0
|
||||
EPICS_CA_REPEATER_PORT=5065
|
||||
EPICS_CA_SERVER_PORT=5064
|
||||
EPICS_CA_MAX_ARRAY_BYTES=16384
|
||||
EPICS_CA_AUTO_ARRAY_BYTES=YES
|
||||
EPICS_CA_BEACON_PERIOD=15.0
|
||||
EPICS_CA_MAX_SEARCH_PERIOD=300.0
|
||||
EPICS_CA_MCAST_TTL=1
|
||||
EPICS_CAS_BEACON_PERIOD=
|
||||
EPICS_CAS_BEACON_PORT=
|
||||
EPICS_CAS_AUTO_BEACON_ADDR_LIST=""
|
||||
|
||||
@@ -24,40 +24,41 @@
|
||||
|
||||
# Site-specific environment settings
|
||||
|
||||
# Time service:
|
||||
# EPICS_TIMEZONE
|
||||
# Local timezone info for vxWorks and RTEMS. The format is
|
||||
# <name>::<minutesWest>:<startDST>:<endDST>
|
||||
# where <name> is only used by strftime() for %Z conversions,
|
||||
# and <startDST> and <endDST> are mmddhh - that is month,day,hour
|
||||
# e.g. for ANL in 2018: EPICS_TIMEZONE=CUS::360:031102:110402
|
||||
# The future dates below assume the rules don't get changed;
|
||||
# see http://www.timeanddate.com/time/dst/2018.html to check.
|
||||
#
|
||||
# DST for 2018 US: Mar 11 - Nov 04
|
||||
# EU: Mar 25 - Oct 28
|
||||
EPICS_TIMEZONE = CUS::360:031102:110402
|
||||
#EPICS_TIMEZONE = MET::-60:032502:102803
|
||||
#
|
||||
# DST for 2019 US: Mar 10 - Nov 03
|
||||
# EU: Mar 31 - Oct 27
|
||||
#EPICS_TIMEZONE = CUS::360:031002:110302
|
||||
#EPICS_TIMEZONE = MET::-60:033102:102703
|
||||
#
|
||||
# DST for 2020 US: Mar 08 - Nov 01
|
||||
# EU: Mar 29 - Oct 25
|
||||
#EPICS_TIMEZONE = CUS::360:030802:110102
|
||||
#EPICS_TIMEZONE = MET::-60:032902:102503
|
||||
#
|
||||
# DST for 2021 US: Mar 14 - Nov 07
|
||||
# EU: Mar 28 - Oct 31
|
||||
#EPICS_TIMEZONE = CUS::360:031402:110702
|
||||
#EPICS_TIMEZONE = MET::-60:032802:103103
|
||||
#
|
||||
# DST for 2022 US: Mar 13 - Nov 06
|
||||
# EU: Mar 27 - Oct 30
|
||||
#EPICS_TIMEZONE = CUS::360:031302:110602
|
||||
#EPICS_TIMEZONE = MET::-60:032702:103003
|
||||
## Time service:
|
||||
# EPICS_TZ
|
||||
# Local timezone rules for vxWorks and RTEMS. The value follows the Posix
|
||||
# TZ environment variable's Mm.n.d/h format (see the IBM link below for
|
||||
# details). If TZ hasn't already been set when the osdTime timeRegister()
|
||||
# C++ static constructor runs, this parameter will be copied into the TZ
|
||||
# environment variable. Once the OS clock has been synchronized to NTP the
|
||||
# routine tz2timezone() will be run to convert TZ into the TIMEZONE
|
||||
# variable format that VxWorks needs.
|
||||
# https://developer.ibm.com/articles/au-aix-posix/
|
||||
|
||||
# Japan Standard Time, no DST:
|
||||
#EPICS_TZ = "JST-9"
|
||||
|
||||
# Central European (Summer) Time:
|
||||
#EPICS_TZ = "CET-1CEST,M3.5.0/2,M10.5.0/3"
|
||||
|
||||
# Greenwich Mean/British Summer Time:
|
||||
#EPICS_TZ = "GMT0BST,M3.5.0/1,M10.5.0/2"
|
||||
|
||||
# US Eastern Standard/Daylight Time:
|
||||
#EPICS_TZ = "EST5EDT,M3.2.0/2,M11.1.0/2"
|
||||
|
||||
# US Central Standard/Daylight Time:
|
||||
EPICS_TZ = "CST6CDT,M3.2.0/2,M11.1.0/2"
|
||||
|
||||
# US Mountain Standard/Daylight Time:
|
||||
#EPICS_TZ = "MST7MDT,M3.2.0/2,M11.1.0/2"
|
||||
|
||||
# US Pacific Standard/Daylight Time:
|
||||
#EPICS_TZ = "PST8PDT,M3.2.0/2,M11.1.0/2"
|
||||
|
||||
# US Hawaiian Standard Time, no DST:
|
||||
#EPICS_TZ = "HST10"
|
||||
|
||||
|
||||
# EPICS_TS_NTP_INET
|
||||
# NTP time server ip address for VxWorks and RTEMS.
|
||||
@@ -69,11 +70,8 @@ EPICS_TS_NTP_INET=
|
||||
# Prompt string
|
||||
# IOCSH_HISTSIZE
|
||||
# Number of lines of command history to keep.
|
||||
# IOCSH_HISTEDIT_DISABLE
|
||||
# Prevents use of readline or equivalent if defined.
|
||||
IOCSH_PS1="epics> "
|
||||
IOCSH_HISTSIZE=50
|
||||
IOCSH_HISTEDIT_DISABLE=
|
||||
|
||||
# Log Server:
|
||||
# EPICS_IOC_LOG_INET
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne
|
||||
# Copyright (c) 2002 The University of Chicago, 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 the file LICENSE that is included with this distribution.
|
||||
# EPICS BASE Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
ifndef T_A
|
||||
|
||||
@@ -4,17 +4,14 @@
|
||||
# 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 the file LICENSE that is included with this distribution.
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
#RULES.Db
|
||||
|
||||
# RULES.Db
|
||||
|
||||
# Set db substitutions and template file suffixes
|
||||
# Set db substitutions file suffix
|
||||
SUBST_SUFFIX ?= .substitutions
|
||||
TEMPL_SUFFIX ?= .template
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# vpath
|
||||
##################################################### vpath
|
||||
|
||||
vpath %.pm $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD))
|
||||
vpath %.pod $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD))
|
||||
@@ -22,13 +19,12 @@ vpath %.dbd $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD))
|
||||
vpath %.db $(USR_VPATH) $(SRC_DIRS) $(dir $(DB))
|
||||
vpath %.vdb $(USR_VPATH) $(SRC_DIRS) $(dir $(DB))
|
||||
vpath %$(SUBST_SUFFIX) $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
|
||||
vpath %$(TEMPL_SUFFIX) $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
|
||||
vpath %.template $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
|
||||
vpath bpt%.data $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
|
||||
vpath %.acf $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
|
||||
vpath %.acs $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# dbflags dbdflags
|
||||
##################################################### dbflags dbdflags
|
||||
|
||||
DBD_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DBD) $(RELEASE_DBD_DIRS)
|
||||
DB_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DB) $(RELEASE_DB_DIRS)
|
||||
@@ -37,15 +33,13 @@ DBDFLAGS = $(USR_DBDFLAGS) $(CMD_DBDFLAGS) $(addprefix -I,$(DBD_SEARCH_DIRS))
|
||||
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) $(CMD_DBFLAGS) $(addprefix -I,$(DB_SEARCH_DIRS))
|
||||
REGRDDFLAGS = $(DBDFLAGS) $($*_REGRDDFLAGS) $(USR_REGRDDFLAGS) $(CMD_REGRDDFLAGS)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Targets
|
||||
##################################################### Targets
|
||||
|
||||
# ---------------------------------------------------
|
||||
# To allow os specific dbd files AND have the -j option work properly,
|
||||
|
||||
CROSS_TARGET_OS_TYPES = $(sort $(foreach target, \
|
||||
$(EPICS_HOST_ARCH) $(CROSS_COMPILER_TARGET_ARCHS), \
|
||||
$(firstword $(subst -, ,$(target)))))
|
||||
CROSS_TARGET_OS_TYPES = $(sort $(foreach target, \
|
||||
$(EPICS_HOST_ARCH) $(CROSS_COMPILER_TARGET_ARCHS),$(firstword $(subst -, ,$(target)))))
|
||||
DBD += $(foreach type, $(CROSS_TARGET_OS_TYPES), $(DBD_$(type)))
|
||||
|
||||
# Users add os specific dbd files to a Makefile as follows
|
||||
@@ -92,28 +86,31 @@ SOURCE_DB_bbb = $(foreach dir, $(GENERIC_SRC_DIRS), $(SOURCE_DB_aaa) )
|
||||
SOURCE_DB_aaa = $(addsuffix /$(file), $(dir) )
|
||||
|
||||
COMMONS = $(COMMON_DIR)/*.dbd $(COMMON_DIR)/*.db $(COMMON_DIR)/*.h \
|
||||
$(COMMON_DIR)/*$(SUBST_SUFFIX) $(COMMON_DIR)/*$(TEMPL_SUFFIX)
|
||||
$(COMMON_DIR)/*$(SUBST_SUFFIX) $(COMMON_DIR)/*.template
|
||||
|
||||
# Remove trailing numbers (to 99) on stem
|
||||
TEMPLATE1 = $(patsubst %0,%,$(patsubst %1,%,$(patsubst %2,%,$(patsubst %3,%, \
|
||||
$(patsubst %4,%,$(patsubst %5,%,$(patsubst %6,%,$(patsubst %7,%, \
|
||||
$(patsubst %8,%,$(patsubst %9,%,$*))))))))))
|
||||
TEMPLATE2 = $(patsubst %0,%,$(patsubst %1,%,$(patsubst %2,%,$(patsubst %3,%, \
|
||||
$(patsubst %4,%,$(patsubst %5,%,$(patsubst %6,%,$(patsubst %7,%, \
|
||||
$(patsubst %8,%,$(patsubst %9,%,$(TEMPLATE1)))))))))))
|
||||
TEMPLATE3 = $(addsuffix $(TEMPL_SUFFIX),$(addprefix ../,$(TEMPLATE2)))
|
||||
TEMPLATE_FILENAME = $(firstword $(wildcard $($*_TEMPLATE) \
|
||||
$(addprefix ../,$($*_TEMPLATE)) ../$*$(TEMPL_SUFFIX) $(TEMPLATE3) \
|
||||
../template))
|
||||
TEMPLATE1=$(patsubst %0,%,$(patsubst %1,%,$(patsubst %2,%,$(patsubst %3,%,$(patsubst %4,%, \
|
||||
$(patsubst %5,%,$(patsubst %6,%,$(patsubst %7,%,$(patsubst %8,%,$(patsubst %9,%, \
|
||||
$*))))))))))
|
||||
TEMPLATE2=$(patsubst %0,%,$(patsubst %1,%,$(patsubst %2,%,$(patsubst %3,%,$(patsubst %4,%, \
|
||||
$(patsubst %5,%,$(patsubst %6,%,$(patsubst %7,%,$(patsubst %8,%,$(patsubst %9,%, \
|
||||
$(TEMPLATE1)))))))))))
|
||||
TEMPLATE3=$(addsuffix .template,$(addprefix ../,$(TEMPLATE2)))
|
||||
TEMPLATE_FILENAME=$(firstword $(wildcard $($*_TEMPLATE) $(addprefix ../,$($*_TEMPLATE)) ../$*.template $(TEMPLATE3) ../template))
|
||||
|
||||
# dbst based database optimization
|
||||
ifeq '$(DB_OPT)' 'YES'
|
||||
RAW=.raw
|
||||
DBS = $(filter %.db,$(DB)) $(addsuffix $(RAW),$(filter %.db,$(DB)))
|
||||
COMMON_DBS = $(addprefix $(COMMON_DIR)/,$(DBS))
|
||||
endif
|
||||
|
||||
INSTALL_DB_INSTALLS = $(addprefix $(INSTALL_DB)/,$(notdir $(DB_INSTALLS)))
|
||||
INSTALL_DBD_INSTALLS = $(addprefix $(INSTALL_DBD)/,$(notdir $(DBD_INSTALLS)))
|
||||
|
||||
COMMONDEP_TARGET = $(COMMON_DIR)/$(basename $@)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# acf files
|
||||
|
||||
##################################################### acf files
|
||||
# An access security configuration file, *.acf, can be created from
|
||||
# an *.acs file (has format of acf file plus #include "filename" lines)
|
||||
|
||||
@@ -126,8 +123,7 @@ ACF_INCLUDES = -I. $(TARGET_INCLUDES) $(USR_INCLUDES)\
|
||||
ACFDEPENDS_CMD = $(MKMF) -m $@ $(ACF_INCLUDES) $(COMMONDEP_TARGET) $<
|
||||
ACF_CMD = $(CPP) $(ACF_CPPFLAGS) $(ACF_INCLUDES) $< > $@
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# dependencies
|
||||
##################################################### dependancies
|
||||
|
||||
HINC += $(addsuffix .h,$(DBDINC_NAME))
|
||||
COMMON_DBDINC += $(addprefix $(COMMON_DIR)/,$(HINC))
|
||||
@@ -137,12 +133,12 @@ DBDDEPENDS_FILES += $(addsuffix $(DEP),$(HINC) \
|
||||
$(patsubst $(COMMON_DIR)/%,%, \
|
||||
$(filter-out $(COMMON_DIR)/bpt%.dbd,$(COMMON_DBDS))))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
#####################################################
|
||||
|
||||
ifndef T_A
|
||||
|
||||
DEP = .d
|
||||
TEMPLATE3 += $(addsuffix $(TEMPL_SUFFIX), $(TEMPLATE2))
|
||||
TEMPLATE3+=$(addsuffix .template, $(TEMPLATE2))
|
||||
|
||||
COMMON_DIR = .
|
||||
INSTALL_DBDS =
|
||||
@@ -157,13 +153,18 @@ ACTIONS += install
|
||||
ACTIONS += buildInstall
|
||||
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
|
||||
|
||||
actionArchTargets = $(foreach action, $(ACTIONS), \
|
||||
$(foreach arch, $(BUILD_ARCHS), $(action)$(DIVIDER)$(arch)))
|
||||
cleanArchTargets = $(foreach arch, $(BUILD_ARCHS), clean$(DIVIDER)$(arch))
|
||||
actionArchTargets = $(foreach x, $(ACTIONS),\ $(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
|
||||
|
||||
cleanArchTargets = $(foreach arch,$(BUILD_ARCHS), clean$(DIVIDER)$(arch))
|
||||
-include $(TOP)/configure/CONFIG_APP_INCLUDE
|
||||
|
||||
all: install
|
||||
ifeq ($(EPICS_HOST_ARCH),$T_A)
|
||||
host: install
|
||||
else
|
||||
# Do nothing
|
||||
host:
|
||||
endif
|
||||
|
||||
install: buildInstall
|
||||
|
||||
@@ -171,30 +172,20 @@ buildInstall : build
|
||||
|
||||
rebuild: clean install
|
||||
|
||||
.PHONY: all $(ACTIONS)
|
||||
.PHONY: all host $(ACTIONS)
|
||||
|
||||
$(actionArchTargets) $(BUILD_ARCHS): install
|
||||
$(cleanArchTargets): clean
|
||||
|
||||
.PHONY: $(BUILD_ARCHS) $(actionArchTargets) $(cleanArchTargets)
|
||||
|
||||
else
|
||||
# T_A is defined
|
||||
ifeq ($(EPICS_HOST_ARCH),$(T_A))
|
||||
host: install
|
||||
else
|
||||
host:
|
||||
endif
|
||||
|
||||
.PHONY: host
|
||||
endif # T_A
|
||||
endif # T_A defined
|
||||
|
||||
ifneq (,$(strip $(DBDDEPENDS_FILES)))
|
||||
-include $(DBDDEPENDS_FILES)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# build dependancies, clean rule
|
||||
##################################################### build dependancies, clean rule
|
||||
|
||||
inc : $(COMMON_INC) $(INSTALL_INC)
|
||||
|
||||
@@ -214,8 +205,7 @@ db_clean :
|
||||
|
||||
realclean: clean
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Dependency files
|
||||
##################################################### Dependency files
|
||||
|
||||
%Record.h$(DEP): $(COMMON_DIR)/%Record.dbd
|
||||
@$(RM) $@
|
||||
@@ -266,19 +256,19 @@ menu%.h$(DEP): ../menu%.dbd
|
||||
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $($*_DBD) > $@
|
||||
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
|
||||
|
||||
%.db$(DEP): %$(SUBST_SUFFIX)
|
||||
%.db$(RAW)$(DEP): %$(SUBST_SUFFIX)
|
||||
@$(RM) $@
|
||||
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
|
||||
|
||||
%.db$(DEP): ../%$(SUBST_SUFFIX)
|
||||
%.db$(RAW)$(DEP): ../%$(SUBST_SUFFIX)
|
||||
@$(RM) $@
|
||||
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
|
||||
|
||||
%.db$(DEP): %$(TEMPL_SUFFIX)
|
||||
%.db$(RAW)$(DEP): %.template
|
||||
@$(RM) $@
|
||||
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
|
||||
|
||||
%.db$(DEP): ../%$(TEMPL_SUFFIX)
|
||||
%.db$(RAW)$(DEP): ../%.template
|
||||
@$(RM) $@
|
||||
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
|
||||
|
||||
@@ -292,8 +282,14 @@ menu%.h$(DEP): ../menu%.dbd
|
||||
|
||||
.PRECIOUS: %$(DEP)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Substitution files
|
||||
##################################################### CapFast filter
|
||||
|
||||
$(COMMON_DIR)/%.edf: ../%.sch $(DEPSCHS)
|
||||
@$(RM) $@
|
||||
@if [ ! -f cad.rc -a -r ../cad.rc ] ; then ln -s ../cad.rc ; fi
|
||||
$(SCH2EDIF) $(SCH2EDIF_SYSFLAGS) $(SCH2EDIF_FLAGS) -o $@ $<
|
||||
|
||||
##################################################### Substitution files
|
||||
|
||||
# WARNING: CREATESUBSTITUTIONS script needs output dir on command line
|
||||
|
||||
@@ -314,21 +310,25 @@ $(INSTALL_DB)/%$(SUBST_SUFFIX): ../%$(SUBST_SUFFIX)
|
||||
|
||||
.PRECIOUS: $(COMMON_DIR)/%$(SUBST_SUFFIX)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Template files
|
||||
##################################################### Template files
|
||||
|
||||
$(INSTALL_DB)/%$(TEMPL_SUFFIX): %$(TEMPL_SUFFIX)
|
||||
$(COMMON_DIR)/%.template: $(COMMON_DIR)/%.edf
|
||||
@$(RM) $@
|
||||
$(E2DB) $(E2DB_SYSFLAGS) $(E2DB_FLAGS) -n $@.VAR $<
|
||||
@$(REPLACEVAR) < $@.VAR > $@
|
||||
@$(RM) $@.VAR
|
||||
|
||||
$(INSTALL_DB)/%.template: %.template
|
||||
$(ECHO) "Installing template file $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
|
||||
$(INSTALL_DB)/%$(TEMPL_SUFFIX): ../%$(TEMPL_SUFFIX)
|
||||
$(INSTALL_DB)/%.template: ../%.template
|
||||
$(ECHO) "Installing template file $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
|
||||
.PRECIOUS: $(COMMON_DIR)/%$(TEMPL_SUFFIX)
|
||||
.PRECIOUS: $(COMMON_DIR)/%.template
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# INC files
|
||||
##################################################### INC files
|
||||
|
||||
$(COMMON_DIR)/%Record.h: $(COMMON_DIR)/%Record.dbd
|
||||
@$(RM) $(notdir $@)
|
||||
@@ -362,8 +362,7 @@ $(COMMON_DIR)/menu%.h: ../menu%.dbd
|
||||
|
||||
.PRECIOUS: $(COMMON_DIR)/%.h
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# DBD files
|
||||
##################################################### DBD files
|
||||
|
||||
$(COMMON_DIR)/bpt%.dbd: bpt%.data
|
||||
@$(RM) $(notdir $@)
|
||||
@@ -426,8 +425,7 @@ $(foreach file, $(DBD_INSTALLS), $(eval $(call DBD_INSTALLS_template, $(file))))
|
||||
|
||||
.PRECIOUS: $(COMMON_DBDS) $(COMMON_DIR)/%.dbd
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# HTML files
|
||||
##################################################### HTML files
|
||||
|
||||
$(COMMON_DIR)/%.html: %.dbd.pod $(TOOLS)/dbdToHtml.pl
|
||||
@$(RM) $(notdir $@)
|
||||
@@ -446,44 +444,37 @@ $(COMMON_DIR)/%.html: %.pm $(TOOLS)/podToHtml.pl
|
||||
|
||||
$(COMMON_DIR)/%.html: ../%.pm $(TOOLS)/podToHtml.pl
|
||||
@$(RM) $(notdir $@)
|
||||
$(PERL) $(TOOLS)/podToHtml.pl -s -o $(notdir $@) $<
|
||||
@$(MKDIR) $(dir $@)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.html: ../%.pl $(TOOLS)/podToHtml.pl
|
||||
@$(RM) $(notdir $@)
|
||||
$(PERL) $(TOOLS)/podToHtml.pl -s -o $(notdir $@) $<
|
||||
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
.PRECIOUS: $(COMMON_DIR)/%.html %.html
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# DB files
|
||||
##################################################### DB files
|
||||
|
||||
$(COMMON_DIR)/%.db: $(COMMON_DIR)/%.edf
|
||||
$(COMMON_DIR)/%.db$(RAW): $(COMMON_DIR)/%.edf
|
||||
$(E2DB) $(E2DB_SYSFLAGS) $(E2DB_FLAGS) -n $*.VAR $<
|
||||
@$(REPLACEVAR) < $*.VAR > $@
|
||||
@$(RM) $*.VAR
|
||||
|
||||
$(COMMON_DIR)/%.db: %$(SUBST_SUFFIX)
|
||||
$(COMMON_DIR)/%.db$(RAW): %$(SUBST_SUFFIX)
|
||||
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
|
||||
@$(RM) $(notdir $@)
|
||||
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) -S$< $(TEMPLATE_FILENAME)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.db: ../%$(SUBST_SUFFIX)
|
||||
$(COMMON_DIR)/%.db$(RAW): ../%$(SUBST_SUFFIX)
|
||||
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
|
||||
@$(RM) $(notdir $@)
|
||||
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) -S$< $(TEMPLATE_FILENAME)
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.db: %$(TEMPL_SUFFIX)
|
||||
$(COMMON_DIR)/%.db$(RAW): %.template
|
||||
$(ECHO) "Inflating database from $<"
|
||||
@$(RM) $(notdir $@)
|
||||
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) $<
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.db: ../%$(TEMPL_SUFFIX)
|
||||
$(COMMON_DIR)/%.db$(RAW): ../%.template
|
||||
$(ECHO) "Inflating database from $<"
|
||||
@$(RM) $(notdir $@)
|
||||
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) $<
|
||||
@@ -501,6 +492,22 @@ $(COMMON_DIR)/%.acf: ../%.acs
|
||||
|
||||
.PRECIOUS: $(COMMON_DIR)/%.acf
|
||||
|
||||
# dbst based database optimization
|
||||
ifeq '$(DB_OPT)' 'YES'
|
||||
|
||||
$(COMMON_DIR)/%.db$(RAW): ../%.db
|
||||
@$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
$(COMMON_DIR)/%.db: $(COMMON_DIR)/%.db$(RAW)
|
||||
$(ECHO) "Optimizing database $@"
|
||||
@$(RM) $@
|
||||
$(DBST) . $< -d > $@
|
||||
|
||||
.PRECIOUS: $(COMMON_DIR)/%.db
|
||||
.PRECIOUS: $(DB:%=$(COMMON_DIR)/%$(RAW))
|
||||
else
|
||||
|
||||
$(INSTALL_DB)/%: %
|
||||
$(ECHO) "Installing $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
@@ -508,6 +515,7 @@ $(INSTALL_DB)/%: %
|
||||
$(INSTALL_DB)/%: ../%
|
||||
$(ECHO) "Installing $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
endif
|
||||
|
||||
$(INSTALL_DB)/%.db: $(COMMON_DIR)/%.db
|
||||
$(ECHO) "Installing created db file $@"
|
||||
@@ -523,8 +531,8 @@ $(foreach file, $(DB_INSTALLS), $(eval $(call DB_INSTALLS_template, $(file))))
|
||||
.PRECIOUS: $(COMMON_DIR)/%.edf
|
||||
.PRECIOUS: $(COMMON_DBS)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# register record,device,driver support
|
||||
##################################################### register record,device,driver support
|
||||
|
||||
|
||||
%_registerRecordDeviceDriver.cpp: $(COMMON_DIR)/%.dbd
|
||||
@$(RM) $@
|
||||
@@ -540,3 +548,4 @@ $(foreach file, $(DB_INSTALLS), $(eval $(call DB_INSTALLS_template, $(file))))
|
||||
|
||||
.PRECIOUS: %_registerRecordDeviceDriver.cpp
|
||||
|
||||
##################################################### END OF FILE
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
# 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 the file LICENSE that is included with this distribution.
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
# RULES.ioc
|
||||
#RULES.ioc
|
||||
|
||||
include $(CONFIG)/RULES_DIRS
|
||||
|
||||
|
||||
@@ -90,4 +90,6 @@ realclean:
|
||||
.PHONY : $(BUILD_ARCHS) rebuild archsCommonClean
|
||||
.PHONY : $(ACTIONS) clean realclean archclean host all
|
||||
|
||||
include $(CONFIG)/RULES_COMMON
|
||||
# User specific rules
|
||||
#
|
||||
-include $(HOME)/configure/RULES_USER
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
# RULES_BUILD
|
||||
|
||||
# Rules for making things specified in a Makefile
|
||||
#
|
||||
# CWD is O.$(T_A), but most sources are elsewhere
|
||||
# Rules for making things specified in Makefile
|
||||
#
|
||||
# we are in O.$(T_A), but most sources are elsewhere
|
||||
#
|
||||
|
||||
ifndef BASE_RULES_BUILD
|
||||
BASE_RULES_BUILD=1
|
||||
@@ -43,7 +42,6 @@ LOADABLE_LIBRARY += $(LOADABLE_LIBRARY_HOST)
|
||||
OBJS += $(OBJS_HOST)
|
||||
PROD += $(PROD_HOST)
|
||||
SCRIPTS += $(SCRIPTS_HOST)
|
||||
TARGETS += $(TARGETS_HOST)
|
||||
TESTLIBRARY += $(TESTLIBRARY_HOST)
|
||||
TESTSCRIPTS += $(TESTSCRIPTS_HOST)
|
||||
TESTPROD += $(TESTPROD_HOST)
|
||||
@@ -55,7 +53,6 @@ LOADABLE_LIBRARY += $(LOADABLE_LIBRARY_IOC)
|
||||
OBJS += $(OBJS_IOC)
|
||||
PROD += $(PROD_IOC)
|
||||
SCRIPTS += $(SCRIPTS_IOC)
|
||||
TARGETS += $(TARGETS_IOC)
|
||||
TESTLIBRARY += $(TESTLIBRARY_IOC)
|
||||
TESTSCRIPTS += $(TESTSCRIPTS_IOC)
|
||||
TESTPROD += $(TESTPROD_IOC)
|
||||
@@ -82,9 +79,9 @@ else
|
||||
host:
|
||||
endif
|
||||
|
||||
include $(CONFIG)/RULES_FILE_TYPE
|
||||
-include $(CONFIG)/RULES_FILE_TYPE
|
||||
|
||||
include $(CONFIG)/RULES.Db
|
||||
-include $(CONFIG)/RULES.Db
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Include defines and rules for prod, library and test* targets
|
||||
@@ -108,17 +105,17 @@ PRODTARGETS += $(PRODNAME) $(MUNCHNAME) $(CTDT_SRCS) $(CTDT_OBJS) $(NMS)
|
||||
TESTPRODTARGETS += $(TESTPRODNAME) $(TESTMUNCHNAME)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Test specifications and test result files
|
||||
# Test result files
|
||||
#
|
||||
ifneq (,$(strip $(TESTS)))
|
||||
TARGETS += testspec
|
||||
endif
|
||||
|
||||
# Enable testing if this host can run tests on the current target
|
||||
ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
|
||||
# Enable testing if this host can run tests for the current target
|
||||
ifneq (,$(filter $(T_A), $(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
|
||||
RUNTESTS_ENABLED = YES
|
||||
TAPFILES += $(TESTSCRIPTS:.t=.tap)
|
||||
JUNITFILES += $(TAPFILES:.tap=.xml)
|
||||
TESTSCRIPTS.t = $(filter %.t, $(TESTSCRIPTS))
|
||||
TAPFILES.t += $(TESTSCRIPTS.t:.t=.tap)
|
||||
JUNITFILES.t += $(TESTSCRIPTS.t:.t=.xml)
|
||||
TAPFILES += $(TAPFILES.t)
|
||||
JUNITFILES += $(JUNITFILES.t)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -188,7 +185,7 @@ endif
|
||||
|
||||
# RELEASE file consistency checking
|
||||
checkRelease:
|
||||
+$(CONVERTRELEASE) checkRelease
|
||||
$(CONVERTRELEASE) checkRelease
|
||||
warnRelease:
|
||||
-$(CONVERTRELEASE) checkRelease
|
||||
noCheckRelease:
|
||||
@@ -338,23 +335,22 @@ $(MODNAME): %$(MODEXT): %$(EXE)
|
||||
#---------------------------------------------------------------
|
||||
# Automated testing
|
||||
|
||||
runtests: $(TESTSCRIPTS)
|
||||
runtests: run-tap-tests
|
||||
run-tap-tests: $(TESTSCRIPTS.t)
|
||||
ifneq ($(TESTSCRIPTS.t),)
|
||||
ifdef RUNTESTS_ENABLED
|
||||
-$(PERL) -MTest::Harness -e 'runtests @ARGV if @ARGV;' $^
|
||||
$(PROVE) --failures --color $^ || $(PROVE_FAILURE)
|
||||
endif
|
||||
endif
|
||||
|
||||
testspec: $(TESTSCRIPTS)
|
||||
@$(RM) $@
|
||||
@echo OS-class: $(OS_CLASS) > $@
|
||||
@echo Target-arch: $(T_A) >> $@
|
||||
$(if $^, @echo Tests: $^ >> $@)
|
||||
$(if $(TESTFILES), @echo Files: $(TESTFILES) >> $@)
|
||||
$(if $(TESTSPEC_$(OS_CLASS)), @echo "Harness: $(TESTSPEC_$(OS_CLASS))" >> $@)
|
||||
tapfiles: $(TAPFILES)
|
||||
junitfiles: $(JUNITFILES)
|
||||
|
||||
test-results: tapfiles
|
||||
ifneq ($(TAPFILES),)
|
||||
test-results: tap-results
|
||||
tap-results: $(TAPFILES)
|
||||
ifneq ($(strip $(TAPFILES)),)
|
||||
ifdef RUNTESTS_ENABLED
|
||||
prove --failures --ext .tap --exec "$(CAT)" --color $(TAPFILES)
|
||||
$(PROVE.tap) --failures --color $^ || $(PROVE_FAILURE)
|
||||
endif
|
||||
|
||||
CURRENT_TAPFILES := $(wildcard $(TAPFILES))
|
||||
@@ -369,16 +365,13 @@ ifneq ($(CURRENT_JUNITFILES),)
|
||||
$(RM) $(CURRENT_JUNITFILES)
|
||||
endif
|
||||
|
||||
tapfiles: $(TESTSCRIPTS) $(TAPFILES)
|
||||
junitfiles: $(JUNITFILES)
|
||||
|
||||
# A .tap file is the output from running the associated test script
|
||||
%.tap: %.t
|
||||
$(TAPFILES.t): %.tap: %.t
|
||||
ifdef RUNTESTS_ENABLED
|
||||
-$(PERL) $< -tap > $@
|
||||
endif
|
||||
|
||||
%.xml: %.tap
|
||||
$(JUNITFILES.t): %.xml: %.tap
|
||||
$(TAPTOJUNIT) --puretap --output $@ --input $< $*
|
||||
|
||||
# If there's a perl test script (.plt) available, use it
|
||||
@@ -390,15 +383,7 @@ endif
|
||||
# Generate a perl program to exec the real test binary.
|
||||
%.t: %$(EXE) $(TOOLS)/makeTestfile.pl
|
||||
@$(RM) $@
|
||||
$(PERL) $(TOOLS)/makeTestfile.pl $(T_A) $(EPICS_HOST_ARCH) $@ $<
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Generate header with version number from VCS
|
||||
|
||||
ifneq ($(GENVERSION),)
|
||||
$(COMMON_DIR)/$(GENVERSION): FORCE
|
||||
$(GENVERSIONHEADER) -t $(TOP) -N $(GENVERSIONMACRO) -V "$(GENVERSIONDEFAULT)" $@
|
||||
endif
|
||||
$(PERL) $(TOOLS)/makeTestfile.pl $@ $<
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Install rules for BIN_INSTALLS and LIB_INSTALLS
|
||||
@@ -527,18 +512,14 @@ $(INSTALL_TEMPLATES_SUBDIR)/%: %
|
||||
$(ECHO) "Installing $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
|
||||
include $(CONFIG)/RULES_EXPAND
|
||||
-include $(CONFIG)/RULES_EXPAND
|
||||
|
||||
.PRECIOUS: %.i %.o %.c %.nm %.cpp %.cc
|
||||
.PRECIOUS: $(COMMON_INC)
|
||||
|
||||
.PHONY: all host inc build install clean rebuild buildInstall build_clean
|
||||
.PHONY: runtests tapfiles clean-tests test-results junitfiles
|
||||
.PHONY: checkRelease warnRelease noCheckRelease FORCE
|
||||
.PHONY: runtests run-tap-tests tapfiles junitfiles test-results tap-results
|
||||
.PHONY: clean-tests checkRelease warnRelease noCheckRelease
|
||||
|
||||
include $(CONFIG)/RULES_COMMON
|
||||
|
||||
else
|
||||
$(warning RULES_BUILD included more than once. \
|
||||
Use 'make show-makefiles' to work out why.)
|
||||
endif # BASE_RULES_BUILD
|
||||
# EOF RULES_BUILD
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2018 UChicago Argonne LLC, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
# These rules show the set of Makefiles, config files and
|
||||
# rules files loaded by GNUmake.
|
||||
|
||||
# Protect against filenames containing colons (Windows)
|
||||
SAFE_MAKEFILES = $(subst :,__colon__,$(MAKEFILE_LIST))
|
||||
SHOW_MAKEFILES = $(SAFE_MAKEFILES:%=show-makefile.%)
|
||||
show-makefiles: $(SHOW_MAKEFILES)
|
||||
|
||||
# The sort prevents warnings about duplicate targets:
|
||||
$(sort $(SHOW_MAKEFILES)): show-makefile.%:
|
||||
@echo " $(subst __colon__,:,$(@:show-makefile.%=%))"
|
||||
|
||||
.PHONY: show-makefiles show-makefile.%
|
||||
|
||||
# These rules support printing a Makefile variable values.
|
||||
# Many variables are only set inside an O.<arch> build directory.
|
||||
# make PRINT.T_A
|
||||
|
||||
PRINT_Var = $(@:PRINT.%=%)
|
||||
PRINT.%:
|
||||
@echo $(PRINT_Var) = '$($(PRINT_Var))'
|
||||
|
||||
.PHONY: PRINT PRINT.%
|
||||
|
||||
|
||||
# User specific rules
|
||||
#
|
||||
-include $(HOME)/configure/RULES_USER
|
||||
@@ -4,7 +4,7 @@
|
||||
# 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 the file LICENSE that is included with this distribution.
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
ARCHS += $(BUILD_ARCHS)
|
||||
@@ -54,7 +54,7 @@ $(foreach dir, $(DIRS), \
|
||||
|
||||
define DEP_template2
|
||||
$(1)$$(DIVIDER)$(2) : $$(foreach ddir, $$($(1)_DEPEND_DIRS), \
|
||||
$$(addsuffix $$(DIVIDER)$(2),$$(ddir)))
|
||||
$$(addsuffix $$(DIVIDER)$(2),$$(ddir))) | before-$(2)
|
||||
endef
|
||||
$(foreach action, $(ACTIONS), \
|
||||
$(foreach dir, $(DIRS), \
|
||||
@@ -79,17 +79,27 @@ $(foreach arch, $(ARCHS), \
|
||||
|
||||
dirPart = $(join $(dir $@), $(word 1, $(subst $(DIVIDER), ,$(notdir $@))))
|
||||
actionArchPart = $(join $(word 2, $(subst $(DIVIDER), ,$(notdir $@))), \
|
||||
$(addprefix $(DIVIDER),$(word 3, $(subst $(DIVIDER), ,$(notdir $@)))))
|
||||
$(DIRS) $(dirActionTargets) $(dirArchTargets) $(dirActionArchTargets) :
|
||||
$(addprefix $(DIVIDER),$(word 3, $(subst $(DIVIDER), ,$(notdir $@)))))
|
||||
|
||||
$(DIRS) $(dirActionTargets) $(dirArchTargets) $(dirActionArchTargets):
|
||||
$(MAKE) -C $(dirPart) $(actionArchPart)
|
||||
|
||||
# before-action rules are run once prior to recursing through the
|
||||
# list of subdirectories and running the action rule in each one.
|
||||
# See DEP_template2 above for how that rule ordering is achieved.
|
||||
beforeActions = $(addprefix before-,$(ACTIONS))
|
||||
$(beforeActions):
|
||||
|
||||
$(ARCHS) $(ACTIONS) $(actionArchTargets) :%: \
|
||||
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)%)
|
||||
|
||||
.PHONY : $(DIRS) all host rebuild
|
||||
.PHONY : $(ARCHS) $(ACTIONS)
|
||||
.PHONY : $(ARCHS) $(ACTIONS) $(beforeActions)
|
||||
.PHONY : $(dirActionTargets) $(dirArchTargets)
|
||||
.PHONY : $(dirActionArchTargets)
|
||||
.PHONY : $(actionArchTargets)
|
||||
|
||||
include $(CONFIG)/RULES_COMMON
|
||||
|
||||
# User specific rules
|
||||
#
|
||||
-include $(HOME)/configure/RULES_USER
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
#*************************************************************************
|
||||
# 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 is distributed subject to a Software License Agreement found
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
# RULES_EXPAND
|
||||
# <top>/configure/RULES_EXPAND
|
||||
|
||||
vpath %@ $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
|
||||
|
||||
@@ -7,11 +7,9 @@
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
# Include <top>/configure/RULES_BUILD from tops defined in RELEASE* files,
|
||||
# excluding EPICS_BASE
|
||||
# Include <top>/configure/RULES_BUILD from tops defined in RELEASE* files
|
||||
#
|
||||
RELEASE_RULES_BUILDS = $(foreach top, \
|
||||
$(filter-out EPICS_BASE, $(RELEASE_TOPS)), \
|
||||
RELEASE_RULES_BUILDS = $(foreach top, $(RELEASE_TOPS), \
|
||||
$(wildcard $($(top))/configure/RULES_BUILD))
|
||||
ifneq ($(RELEASE_RULES_BUILDS),)
|
||||
include $(RELEASE_RULES_BUILDS)
|
||||
@@ -25,7 +23,7 @@ ifneq ($(RELEASE_CFG_RULES),)
|
||||
include $(RELEASE_CFG_RULES)
|
||||
endif
|
||||
|
||||
# If this is not BASE then include <top>/configure/RULES_BUILD
|
||||
# If this is not BASE then include <TOP>/configure/RULES_BUILD
|
||||
#
|
||||
ifeq ($(wildcard $(TOP)/configure/CONFIG_BASE_VERSION),)
|
||||
TOP_RULES_BUILDS = $(wildcard $(TOP)/configure/RULES_BUILD)
|
||||
@@ -69,3 +67,7 @@ file_type_clean:
|
||||
@$(RM) $(foreach type, $(FILE_TYPE), $($(type)))
|
||||
|
||||
.PHONY : file_type_clean
|
||||
|
||||
# User specific rules
|
||||
#
|
||||
-include $(HOME)/configure/RULES_USER
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne
|
||||
# Copyright (c) 2002 The University of Chicago, 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 the file LICENSE that is included with this distribution.
|
||||
# EPICS BASE Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
# Octave definitions and rules
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
# Copyright (c) 2002 The University of Chicago, 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 the file LICENSE that is included with this distribution.
|
||||
# EPICS BASE Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
# RULES_TARGET
|
||||
#
|
||||
# RULES_TARGET
|
||||
#
|
||||
# This file is to be maintained by the community.
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
define TARGET_template
|
||||
$(1)_$(2) += $$(if $$(strip $$($(1)_$(2)_$$(OS_CLASS))), \
|
||||
|
||||
@@ -16,32 +16,30 @@ cvsclean:
|
||||
$(PERL) $(CVSCLEAN)
|
||||
|
||||
realuninstall: uninstallDirs
|
||||
$(RMDIR) $(INSTALL_LOCATION_BIN)
|
||||
$(RMDIR) $(INSTALL_LOCATION_LIB)
|
||||
$(RMDIR) $(INSTALL_LOCATION_BIN) $(INSTALL_LOCATION_LIB)
|
||||
|
||||
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC) \
|
||||
$(INSTALL_HTML) $(INSTALL_TEMPLATES) $(INSTALL_DB) $(DIRECTORY_TARGETS)
|
||||
uninstallDirs:
|
||||
$(RMDIR) $(UNINSTALL_DIRS)
|
||||
|
||||
EMPTY_INSTALL_DIRS = \
|
||||
$(if $(wildcard $(INSTALL_LOCATION_BIN)/*),,$(INSTALL_LOCATION_BIN)) \
|
||||
$(if $(wildcard $(INSTALL_LOCATION_LIB)/*),,$(INSTALL_LOCATION_LIB))
|
||||
uninstall: archuninstall uninstallDirs
|
||||
$(RMDIR) $(EMPTY_INSTALL_DIRS)
|
||||
|
||||
archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS)) | cleandirs
|
||||
archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
|
||||
|
||||
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
|
||||
uninstall$(DIVIDER)%:
|
||||
$(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart)
|
||||
$(RMDIR) $(INSTALL_LOCATION_LIB)/$(archPart)
|
||||
|
||||
cleandirs:
|
||||
@$(NOP)
|
||||
ifeq ($(wildcard $(INSTALL_LOCATION_BIN)/*),)
|
||||
$(RMDIR) $(INSTALL_LOCATION_BIN)
|
||||
endif
|
||||
ifeq ($(wildcard $(INSTALL_LOCATION_LIB)/*),)
|
||||
$(RMDIR) $(INSTALL_LOCATION_LIB)
|
||||
endif
|
||||
$(RMDIR) $(addsuffix /$(subst uninstall$(DIVIDER),,$@), \
|
||||
$(INSTALL_LOCATION_BIN) $(INSTALL_LOCATION_LIB))
|
||||
|
||||
before-runtests before-test-results: rm-failure-file
|
||||
rm-failure-file:
|
||||
@$(RM) $(TEST_FAILURE_FILE)
|
||||
runtests test-results:
|
||||
$(PERL) $(TOOLS)/testFailures.pl $(TEST_FAILURE_FILE)
|
||||
|
||||
help:
|
||||
@echo "Usage: gnumake [options] [target] ..."
|
||||
@@ -75,8 +73,8 @@ help:
|
||||
@echo "Indiv. object targets are supported by O.<arch> level Makefile .e.g"
|
||||
@echo " xxxRecord.o"
|
||||
|
||||
.PHONY: cleandirs distclean cvsclean realuninstall archuninstall uninstallDirs
|
||||
.PHONY: uninstall help
|
||||
.PHONY: distclean cvsclean realuninstall archuninstall uninstallDirs
|
||||
.PHONY: uninstall rm-failure-file help
|
||||
|
||||
# Include <top>/cfg/TOP_RULES* files from tops defined in RELEASE* files
|
||||
#
|
||||
|
||||
@@ -27,13 +27,9 @@ ifneq ($(CONFIG),$(TOP)/configure)
|
||||
-include $(TOP)/configure/CONFIG_SITE.Common.RTEMS
|
||||
endif
|
||||
|
||||
#--------------------------------------------------
|
||||
# Set RTEMS_BSP from T_A if not already done
|
||||
RTEMS_BSP ?= $(subst RTEMS-,,$(T_A))
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Pick up the RTEMS tool/path definitions from the RTEMS BSP directory.
|
||||
include $(RTEMS_BASE)/$(RTEMS_TARGET_CPU)-rtems$(RTEMS_VERSION)/$(RTEMS_BSP)/Makefile.inc
|
||||
include $(RTEMS_BASE)/$(RTEMS_TARGET_CPU)-rtems$(RTEMS_VERSION)/$(subst RTEMS-,,$(T_A))/Makefile.inc
|
||||
include $(RTEMS_CUSTOM)
|
||||
include $(CONFIG.CC)
|
||||
|
||||
|
||||
@@ -9,6 +9,5 @@
|
||||
#
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_BSP = at91rm9200ek
|
||||
RTEMS_TARGET_CPU = arm
|
||||
RTEMS_TARGET_CPU=arm
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
EXE = .elf
|
||||
RTEMS_BSP = beatnik
|
||||
RTEMS_TARGET_CPU = powerpc
|
||||
GNU_TARGET = powerpc-rtems
|
||||
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
#
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_BSP = gen68360
|
||||
RTEMS_TARGET_CPU = m68k
|
||||
RTEMS_TARGET_CPU=m68k
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
#
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_BSP = mcp750
|
||||
RTEMS_TARGET_CPU = ppc
|
||||
RTEMS_TARGET_CPU=ppc
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
#
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_BSP = mvme167
|
||||
RTEMS_TARGET_CPU = m68k
|
||||
RTEMS_TARGET_CPU=m68k
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
EXE = .elf
|
||||
RTEMS_BSP = mvme2100
|
||||
RTEMS_TARGET_CPU = powerpc
|
||||
GNU_TARGET = powerpc-rtems
|
||||
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#
|
||||
# Author: Matt Rippa
|
||||
#
|
||||
RTEMS_BSP = mvme2700
|
||||
RTEMS_TARGET_CPU = powerpc
|
||||
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
|
||||
ARCH_DEP_CFLAGS += -DHAVE_PPCBUG
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
EXE = .elf
|
||||
RTEMS_BSP = mvme3100
|
||||
RTEMS_TARGET_CPU = powerpc
|
||||
GNU_TARGET = powerpc-rtems
|
||||
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
EXE = .elf
|
||||
RTEMS_BSP = mvme5500
|
||||
RTEMS_TARGET_CPU = powerpc
|
||||
GNU_TARGET = powerpc-rtems
|
||||
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
|
||||
|
||||
@@ -5,15 +5,14 @@
|
||||
#
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_BSP = pc386
|
||||
RTEMS_TARGET_CPU = i386
|
||||
RTEMS_TARGET_CPU=i386
|
||||
|
||||
MUNCH_SUFFIX = .boot
|
||||
define MUNCH_CMD
|
||||
$(RM) $*.bin
|
||||
$(RTEMS_TOOLS)/bin/$(OBJCOPY_FOR_TARGET) -O binary -R .comment -S $< $*.bin
|
||||
$(RTEMS_TOOLS)/bin/$(OBJCOPY_FOR_TARGET) -O binary -R .comment -S $< temp.bin
|
||||
$(BIN2BOOT) $@ 0x00097E00 \
|
||||
$(PROJECT_RELEASE)/lib/start16.bin 0x00097C00 0 $*.bin 0x00100000 0
|
||||
$(PROJECT_RELEASE)/lib/start16.bin 0x00097C00 0 temp.bin 0x00100000 0
|
||||
rm -f temp.bin
|
||||
endef
|
||||
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# CONFIG.Common.RTEMS-pc386-qemu
|
||||
#
|
||||
# Definitions for the RTEMS-pc386-qemu target
|
||||
# Site-specific overrides go in CONFIG_SITE.Common.RTEMS-pc386-qemu
|
||||
#
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include definitions from RTEMS-pc386
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS-pc386
|
||||
|
||||
RTEMS_QEMU_FIXUPS = YES
|
||||
@@ -5,6 +5,5 @@
|
||||
#
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_BSP = psim
|
||||
RTEMS_TARGET_CPU = ppc
|
||||
RTEMS_TARGET_CPU=ppc
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_BSP = uC5282
|
||||
RTEMS_TARGET_CPU = m68k
|
||||
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# CONFIG.Common.vxWorksCommon
|
||||
#
|
||||
# Definitions for vxWorks target archs
|
||||
# Override these definitions in CONFIG_SITE.Common.vxWorksCommon
|
||||
# Sites may override these definitions in CONFIG_SITE.Common.vxWorksCommon
|
||||
# or CONFIG_SITE.<host>.vxWorksCommon
|
||||
#-------------------------------------------------------
|
||||
|
||||
@@ -63,6 +63,8 @@ VXWORKS_MAJOR_VERSION = $(basename $(basename $(VXWORKS_VERSION)))
|
||||
|
||||
# These are needed for vxWorks 6.x; the GNU toolset version number
|
||||
# is in the path to the compiler tools:
|
||||
VX_GNU_VERSION_5.4 = 2.95
|
||||
VX_GNU_VERSION_5.5 = 2.96
|
||||
VX_GNU_VERSION_6.0 = 3.3.2
|
||||
VX_GNU_VERSION_6.1 = 3.3.2
|
||||
VX_GNU_VERSION_6.2 = 3.3.2
|
||||
@@ -78,21 +80,30 @@ VX_GNU_VERSION = $(VX_GNU_VERSION_$(VXWORKS_VERSION))
|
||||
VX_GNU_MAJOR_VERSION = $(basename $(basename $(VX_GNU_VERSION)))
|
||||
|
||||
#--------------------------------------------------
|
||||
# Fix old Linux WIND_HOST_TYPE
|
||||
# Fix WIND_BASE for vxWorks 6.x on linux
|
||||
# NB: We know the value of WIND_HOST_TYPE here, but not VXWORKS_VERSION
|
||||
ifeq ($(WIND_HOST_TYPE),x86-linux)
|
||||
WIND_HOST_TYPE = x86-linux2
|
||||
WIND_HOST_TYPE_5 = x86-linux
|
||||
WIND_HOST_TYPE_6 = x86-linux2
|
||||
WIND_HOST_TYPE = $(WIND_HOST_TYPE_$(VXWORKS_MAJOR_VERSION))
|
||||
endif
|
||||
|
||||
#--------------------------------------------------
|
||||
# vxWorks directory definitions
|
||||
VX_DIR = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)
|
||||
VX_DIR_5 = $(WIND_BASE)
|
||||
VX_DIR_6 = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)
|
||||
VX_DIR = $(VX_DIR_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
GNU_TARGET_INCLUDE_DIR = $(VX_DIR)/target/h $(VX_DIR)/target/h/wrn/coreip
|
||||
VX_INCLUDE_DIRS_5 = $(VX_DIR)/target/h
|
||||
VX_INCLUDE_DIRS_6 = $(VX_DIR)/target/h $(VX_DIR)/target/h/wrn/coreip
|
||||
GNU_TARGET_INCLUDE_DIR = $(VX_INCLUDE_DIRS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
#--------------------------------------------------
|
||||
# vxWorks GNU directories
|
||||
|
||||
GNU_DIR = $(WIND_BASE)/gnu/$(VX_GNU_VERSION)-vxworks-$(VXWORKS_VERSION)/$(WIND_HOST_TYPE)
|
||||
GNU_DIR_5 = $(WIND_BASE)/host/$(WIND_HOST_TYPE)
|
||||
GNU_DIR_6 = $(WIND_BASE)/gnu/$(VX_GNU_VERSION)-vxworks-$(VXWORKS_VERSION)/$(WIND_HOST_TYPE)
|
||||
GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
#--------------------------------------------------
|
||||
# This finds nm on any supported VxWorks version
|
||||
@@ -102,7 +113,9 @@ NM = $(firstword $(wildcard $(WIND_BASE)/*/$(WIND_HOST_TYPE)/bin/$(NMPROG)))
|
||||
|
||||
#--------------------------------------------------
|
||||
# A linker script is essential for munching from vxWorks 6.6 onwards
|
||||
# (i.e. with versions that use gcc 4.1.2 or later).
|
||||
# (i.e. with versions that use gcc 4.1.2 or later). It can be used
|
||||
# with any vxWorks 5 or 6 version, but apparently should not be used
|
||||
# when compiling for 68K (which isn't supported in vxWorks 6 anyway)
|
||||
MUNCH_LDFLAGS_6 = -T $(VX_DIR)/target/h/tool/gnu/ldscripts/link.OUT
|
||||
MUNCH_LDFLAGS = $(MUNCH_LDFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
@@ -118,10 +131,11 @@ export TOOL_FAMILY = GNU
|
||||
OP_SYS_CPPFLAGS += -DvxWorks=vxWorks
|
||||
OP_SYS_CFLAGS += -fno-builtin
|
||||
|
||||
# Fix for vxWorks headers that use macros defined in vxWorks.h but
|
||||
# Fix for vxWorks 5 headers that use macros defined in vxWorks.h but
|
||||
# which don't actually include vxWorks.h themselves, for example the
|
||||
# target/h/sys/stat.h file which uses ULONG. This also stops dbDefs.h
|
||||
# from defining the OFFSET macro, which generates lots of warnings.
|
||||
# from defining the OFFSET macro, which generates lots of warnings in
|
||||
# both vxWorks 5 and 6.
|
||||
OP_SYS_INCLUDE_CPPFLAGS += -include $(VX_DIR)/target/h/vxWorks.h
|
||||
|
||||
#--------------------------------------------------
|
||||
@@ -134,6 +148,7 @@ OPT_CXXFLAGS_YES = -O2
|
||||
CODE_CFLAGS =
|
||||
#
|
||||
# For vxWorks versions before 6.3 we need this g++ compiler flag
|
||||
CODE_CXXFLAGS_5 = -fno-implicit-templates
|
||||
CODE_CXXFLAGS_6.0 = -fno-implicit-templates
|
||||
CODE_CXXFLAGS_6.1 = -fno-implicit-templates
|
||||
CODE_CXXFLAGS_6.2 = -fno-implicit-templates
|
||||
@@ -146,10 +161,8 @@ SHRLIB_CFLAGS =
|
||||
SHRLIB_LDFLAGS =
|
||||
|
||||
#--------------------------------------------------
|
||||
# Don't use gcc 2.x for dependency generation
|
||||
|
||||
HDEPENDS_METHOD_2 = MKMF
|
||||
HDEPENDS_METHOD = $(firstword $(HDEPENDS_METHOD_$(VX_GNU_MAJOR_VERSION)) COMP)
|
||||
# Earlier versions of gcc don't understand -MF
|
||||
HDEPENDS_COMPFLAGS = -MM > $@
|
||||
|
||||
#--------------------------------------------------
|
||||
# osithead use default stack, YES or NO override
|
||||
@@ -173,8 +186,10 @@ VXCPPFLAGS = $(filter-out $(OP_SYS_INCLUDE_CPPFLAGS),$(CPPFLAGS))
|
||||
PREPROCESS.cpp = $(CPP) $(VXCPPFLAGS) $(INCLUDES) $< > $@
|
||||
|
||||
#--------------------------------------------------
|
||||
# Use LEDLIB for command-line editing
|
||||
COMMANDLINE_LIBRARY = LEDLIB
|
||||
# Don't use gcc 2.x for dependency generation
|
||||
|
||||
HDEPENDS_METHOD_2 = MKMF
|
||||
HDEPENDS_METHOD = $(firstword $(HDEPENDS_METHOD_$(VX_GNU_MAJOR_VERSION)) COMP)
|
||||
|
||||
#--------------------------------------------------
|
||||
# Allow site overrides
|
||||
|
||||
@@ -30,7 +30,7 @@ ARCH_DEP_LDFLAGS += -m32
|
||||
# Compiler does not define __unix __unix__ unix
|
||||
|
||||
# Override for -DUNIX from CONFIG.Common.UnixCommon
|
||||
OP_SYS_CPPFLAGS = -D_MINGW
|
||||
OP_SYS_CPPFLAGS = -D_MINGW -D__USE_MINGW_ANSI_STDIO
|
||||
|
||||
EXE = .exe
|
||||
RES = .coff
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
CP = cp
|
||||
MV = mv
|
||||
RM = rm -f
|
||||
MKDIR = mkdir -p
|
||||
MKDIR = mkdir
|
||||
RMDIR = rm -rf
|
||||
CAT = cat
|
||||
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
#Include definitions common to unix hosts
|
||||
include $(CONFIG)/os/CONFIG.UnixCommon.Common
|
||||
|
||||
WIND_HOST_TYPE = x86-linux2
|
||||
WIND_HOST_TYPE = x86-linux
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
#Include definitions common to unix hosts
|
||||
include $(CONFIG)/os/CONFIG.UnixCommon.Common
|
||||
|
||||
WIND_HOST_TYPE = x86-linux2
|
||||
WIND_HOST_TYPE = x86-linux
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
#Include definitions common to unix hosts
|
||||
include $(CONFIG)/os/CONFIG.UnixCommon.Common
|
||||
|
||||
WIND_HOST_TYPE = x86-linux2
|
||||
WIND_HOST_TYPE = x86-linux
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
#Include definitions common to unix hosts
|
||||
include $(CONFIG)/os/CONFIG.UnixCommon.Common
|
||||
|
||||
WIND_HOST_TYPE = x86-linux2
|
||||
WIND_HOST_TYPE = x86-linux
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
#Include definitions common to unix hosts
|
||||
include $(CONFIG)/os/CONFIG.UnixCommon.Common
|
||||
|
||||
WIND_HOST_TYPE = x86-linux2
|
||||
WIND_HOST_TYPE = x86-linux
|
||||
|
||||
@@ -4,21 +4,5 @@
|
||||
# Override these definitions in CONFIG_SITE.linux-x86.windows-x64-mingw
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include common gnu compiler definitions
|
||||
include $(CONFIG)/CONFIG.gnuCommon
|
||||
|
||||
# Add resource compiler
|
||||
RCCMD = $(GNU_BIN)/$(CMPLR_PREFIX)windres$(CMPLR_SUFFIX) $(INCLUDES) $< $@
|
||||
|
||||
# Remove -fPIC flags, add out-implib
|
||||
SHRLIB_CFLAGS =
|
||||
SHRLIB_LDFLAGS = -shared \
|
||||
-Wl,--out-implib,$(DLLSTUB_PREFIX)$*$(DLLSTUB_SUFFIX)
|
||||
LOADABLE_SHRLIB_LDFLAGS = -shared \
|
||||
-Wl,--out-implib,$(DLLSTUB_PREFIX)$*$(DLLSTUB_SUFFIX)
|
||||
|
||||
# No need to explicitly link with gcc library
|
||||
GNU_LDLIBS_YES =
|
||||
|
||||
# Link with winsock2
|
||||
OP_SYS_LDLIBS = -lws2_32
|
||||
# Use the definitions from the win32-x86-mingw target
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.win32-x86-mingw
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
#Include definitions common to unix hosts
|
||||
include $(CONFIG)/os/CONFIG.UnixCommon.Common
|
||||
|
||||
WIND_HOST_TYPE = x86-linux2
|
||||
WIND_HOST_TYPE = x86-linux
|
||||
|
||||
@@ -141,13 +141,16 @@ STATIC_LDFLAGS=
|
||||
RANLIB=
|
||||
|
||||
#
|
||||
# option needed for parallel builds with Visual Studio 2015 onward
|
||||
#
|
||||
# option needed for parallel builds with Visual Studio 2013 onward
|
||||
# VS2012 and above have VisualStudioVersion, so just need to exclude 2012 (11.0)
|
||||
# -FS Force Synchronous PDB Writes
|
||||
#
|
||||
ifneq ($(VisualStudioVersion),)
|
||||
ifneq ($(VisualStudioVersion),11.0)
|
||||
OPT_CXXFLAGS_NO += -FS
|
||||
OPT_CFLAGS_NO += -FS
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
|
||||
3
configure/os/CONFIG_SITE.Common.RTEMS-pc386
Normal file
3
configure/os/CONFIG_SITE.Common.RTEMS-pc386
Normal file
@@ -0,0 +1,3 @@
|
||||
#
|
||||
# Site-specific overrides for RTEMS-pc386 target
|
||||
#
|
||||
@@ -1,9 +0,0 @@
|
||||
# CONFIG_SITE.Common.RTEMS-pc386-qemu
|
||||
#
|
||||
# Site-specific overrides for the RTEMS-pc386-qemu target
|
||||
#
|
||||
|
||||
# If you're building this architecture you _probably_ want to
|
||||
# run the tests for it under QEMU, but if not you can turn
|
||||
# them off here by commenting out this line:
|
||||
CROSS_COMPILER_RUNTEST_ARCHS += RTEMS-pc386-qemu
|
||||
@@ -1,39 +1,35 @@
|
||||
# CONFIG_SITE.Common.linux-arm
|
||||
#
|
||||
# Site Specific definitions for all linux-arm targets
|
||||
#-------------------------------------------------------
|
||||
# Site-specific settings for the linux-arm target
|
||||
|
||||
# NOTE for SHARED_LIBRARIES: In most cases if this is set to YES the
|
||||
# NOTE: In most cases if SHARED_LIBRARIES is set to YES the
|
||||
# shared libraries will be found automatically. However if the .so
|
||||
# files are installed at a different path to their compile-time path
|
||||
# then in order to be found at runtime do one of these:
|
||||
# a) LD_LIBRARY_PATH must include the full absolute pathname to
|
||||
# $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when invoking base
|
||||
# executables.
|
||||
# b) Add the runtime path to SHRLIB_DEPLIB_DIRS and PROD_DEPLIB_DIRS, which
|
||||
# b) Add the runtime path to SHRLIB_DEPLIB_DIRS and PROD_DEPLIB_DIRS, which
|
||||
# will add the named directory to the list contained in the executables.
|
||||
# c) Add the runtime path to /etc/ld.so.conf and run ldconfig
|
||||
# to inform the system of the shared library location.
|
||||
|
||||
# Depending on your version of Linux you'll want one of the following
|
||||
# lines to enable command-line editing and history in iocsh. If you're
|
||||
# not sure which, start with the top one and work downwards until the
|
||||
# build doesn't fail to link the readline library. If none of them work,
|
||||
# comment them all out to build without readline support.
|
||||
|
||||
# No other libraries needed (recent Fedora, Ubuntu etc.):
|
||||
#COMMANDLINE_LIBRARY = READLINE
|
||||
# Use GNU Readline if the header file is installed
|
||||
COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \
|
||||
$(firstword $(READLINE_DIR) $(GNU_DIR))/include/readline/readline.h), \
|
||||
READLINE, EPICS))
|
||||
|
||||
# Needs -lncurses (RHEL 5 etc.):
|
||||
# If libreadline needs additional libraries to be linked with it, try
|
||||
# uncommenting each of the lines below in turn, starting with the top
|
||||
# one and working downwards, until the build succeeds. Do a 'make rebuild'
|
||||
# from the top of the Base tree after changing this setting.
|
||||
|
||||
# Needs -lncurses:
|
||||
#COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
# Needs -lcurses (older versions)
|
||||
# Needs -lcurses:
|
||||
#COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
# Readline is broken or you don't want use it:
|
||||
#COMMANDLINE_LIBRARY = EPICS
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# CONFIG_SITE.Common.linux-cris
|
||||
#
|
||||
# Site Specific definitions for linux-cris target
|
||||
# Only the local epics system manager should modify this file
|
||||
# Site-specific settings for the linux-cris target
|
||||
|
||||
# NOTE for SHARED_LIBRARIES: In most cases if this is set to YES the
|
||||
# NOTE: In most cases if SHARED_LIBRARIES is set to YES the
|
||||
# shared libraries will be found automatically. However if the .so
|
||||
# files are installed at a different path to their compile-time path
|
||||
# then in order to be found at runtime do one of these:
|
||||
@@ -15,21 +14,21 @@
|
||||
# c) Add the runtime path to /etc/ld.so.conf and run ldconfig
|
||||
# to inform the system of the shared library location.
|
||||
|
||||
# Depending on your version of Linux you may want one of the following
|
||||
# lines to enable command-line editing and history in iocsh. If you're
|
||||
# not sure which, start with the top one and work downwards until the
|
||||
# build doesn't fail to link the readline library. If none of them work,
|
||||
# comment them all out to build without readline support.
|
||||
|
||||
# No other libraries needed (recent Fedora, Ubuntu etc.):
|
||||
#COMMANDLINE_LIBRARY = READLINE
|
||||
# Use GNU Readline if the header file is installed
|
||||
COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \
|
||||
$(GNU_DIR)/include/readline/readline.h), READLINE, EPICS))
|
||||
|
||||
# Needs -lncurses (RHEL 5 etc.):
|
||||
# If libreadline needs additional libraries to be linked with it, try
|
||||
# uncommenting each of the lines below in turn, starting with the top
|
||||
# one and working downwards, until the build succeeds. Do a 'make rebuild'
|
||||
# from the top of the Base tree after changing this setting.
|
||||
|
||||
# Needs -lncurses:
|
||||
#COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
# Needs -lcurses (older versions)
|
||||
# Needs -lcurses:
|
||||
#COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
|
||||
OP_SYS_CFLAGS += -g
|
||||
|
||||
# Readline is broken or you don't want use it:
|
||||
#COMMANDLINE_LIBRARY = EPICS
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# CONFIG_SITE.Common.linux-microblaze
|
||||
#
|
||||
# Site specific definitions for linux-microblaze target builds.
|
||||
#-------------------------------------------------------
|
||||
# Site-specific settings for the linux-microblaze target
|
||||
|
||||
# The gnu tools for cross compiling for MicroBlaze (little endian)
|
||||
# on Linux can be downloaded from the Xilinx git server:
|
||||
@@ -12,3 +11,21 @@
|
||||
|
||||
GNU_DIR = /usr/local/vw/microblaze-2.0/microblazeel-unknown-linux-gnu
|
||||
|
||||
|
||||
# Use GNU Readline if the header file is installed
|
||||
COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \
|
||||
$(GNU_DIR)/include/readline/readline.h), READLINE, EPICS))
|
||||
|
||||
# If libreadline needs additional libraries to be linked with it, try
|
||||
# uncommenting each of the lines below in turn, starting with the top
|
||||
# one and working downwards, until the build succeeds. Do a 'make rebuild'
|
||||
# from the top of the Base tree after changing this setting.
|
||||
|
||||
# Needs -lncurses:
|
||||
#COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
# Needs -lcurses:
|
||||
#COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
# Readline is broken or you don't want use it:
|
||||
#COMMANDLINE_LIBRARY = EPICS
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# CONFIG_SITE.Common.linux-x86
|
||||
#
|
||||
# Site Specific definitions for linux-x86 target
|
||||
# Only the local epics system manager should modify this file
|
||||
# Site-specific settings for the linux-x86 target
|
||||
|
||||
# NOTE for SHARED_LIBRARIES: In most cases if this is set to YES the
|
||||
# NOTE: In most cases if SHARED_LIBRARIES is set to YES the
|
||||
# shared libraries will be found automatically. However if the .so
|
||||
# files are installed at a different path to their compile-time path
|
||||
# then in order to be found at runtime do one of these:
|
||||
@@ -15,14 +14,15 @@
|
||||
# c) Add the runtime path to /etc/ld.so.conf and run ldconfig
|
||||
# to inform the system of the shared library location.
|
||||
|
||||
# Depending on your version of Linux you'll want one of the following
|
||||
# lines to enable command-line editing and history in iocsh. If you're
|
||||
# not sure which, start with the top one and work downwards until the
|
||||
# build doesn't fail to link the readline library. If none of them work,
|
||||
# comment them all out to build without readline support.
|
||||
|
||||
# No other libraries needed (recent Fedora, Ubuntu etc.):
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
# Use GNU Readline if the header file is installed
|
||||
COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \
|
||||
$(GNU_DIR)/include/readline/readline.h), READLINE, EPICS))
|
||||
|
||||
# If libreadline needs additional libraries to be linked with it, try
|
||||
# uncommenting each of the lines below in turn, starting with the top
|
||||
# one and working downwards, until the build succeeds. Do a 'make rebuild'
|
||||
# from the top of the Base tree after changing this setting.
|
||||
|
||||
# Needs -lncurses (RHEL 5 etc.):
|
||||
#COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
@@ -30,6 +30,9 @@ COMMANDLINE_LIBRARY = READLINE
|
||||
# Needs -lcurses (older versions)
|
||||
#COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
# Readline is broken or you don't want use it:
|
||||
#COMMANDLINE_LIBRARY = EPICS
|
||||
|
||||
|
||||
# Permit access to 64-bit file-systems
|
||||
OP_SYS_CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
@@ -43,14 +46,6 @@ OP_SYS_CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
#CCC = clang++
|
||||
|
||||
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
|
||||
|
||||
# Tune GNU compiler output for a specific 32-bit cpu-type
|
||||
# (e.g. generic, native, i386, i686, pentium2/3/4, prescott, k6, athlon etc.)
|
||||
GNU_TUNE_CFLAGS = -mtune=generic
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# CONFIG_SITE.Common.linux-x86_64
|
||||
#
|
||||
# Site Specific definitions for linux-x86_64 target
|
||||
# Only the local epics system manager should modify this file
|
||||
# Site-specific settings for the linux-x86_64 target
|
||||
|
||||
# NOTE for SHARED_LIBRARIES: In most cases if this is set to YES the
|
||||
# NOTE: In most cases if SHARED_LIBRARIES is set to YES the
|
||||
# shared libraries will be found automatically. However if the .so
|
||||
# files are installed at a different path to their compile-time path
|
||||
# then in order to be found at runtime do one of these:
|
||||
@@ -15,14 +14,15 @@
|
||||
# c) Add the runtime path to /etc/ld.so.conf and run ldconfig
|
||||
# to inform the system of the shared library location.
|
||||
|
||||
# Depending on your version of Linux you'll want one of the following
|
||||
# lines to enable command-line editing and history in iocsh. If you're
|
||||
# not sure which, start with the top one and work downwards until the
|
||||
# build doesn't fail to link the readline library. If none of them work,
|
||||
# comment them all out to build without readline support.
|
||||
|
||||
# No other libraries needed (recent Fedora, Ubuntu etc.):
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
# Use GNU Readline if the header file is installed
|
||||
COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \
|
||||
$(GNU_DIR)/include/readline/readline.h), READLINE, EPICS))
|
||||
|
||||
# If libreadline needs additional libraries to be linked with it, try
|
||||
# uncommenting each of the lines below in turn, starting with the top
|
||||
# one and working downwards, until the build succeeds. Do a 'make rebuild'
|
||||
# from the top of the Base tree after changing this setting.
|
||||
|
||||
# Needs -lncurses (RHEL 5 etc.):
|
||||
#COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
@@ -30,6 +30,9 @@ COMMANDLINE_LIBRARY = READLINE
|
||||
# Needs -lcurses (older versions)
|
||||
#COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
# Readline is broken or you don't want use it:
|
||||
#COMMANDLINE_LIBRARY = EPICS
|
||||
|
||||
|
||||
# Uncomment the followings lines to build with CLANG instead of GCC.
|
||||
#
|
||||
@@ -39,14 +42,6 @@ COMMANDLINE_LIBRARY = READLINE
|
||||
#CCC = clang++
|
||||
|
||||
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
|
||||
|
||||
# Tune GNU compiler output for a specific 64-bit cpu-type
|
||||
# (e.g. generic, native, core2, nocona, k8, opteron, athlon64, barcelona etc.)
|
||||
GNU_TUNE_CFLAGS = -mtune=generic
|
||||
|
||||
@@ -1,4 +1,23 @@
|
||||
# CONFIG_SITE.Common.linux-xscale_be
|
||||
#
|
||||
# Site specific definitions for all linux-xscale_be target builds.
|
||||
#-------------------------------------------------------
|
||||
# Site-specific settings for the linux-xscale_be target
|
||||
|
||||
|
||||
# Use GNU Readline if the header file is installed
|
||||
COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \
|
||||
$(firstword $(READLINE_DIR) $(GNU_DIR))/include/readline/readline.h), \
|
||||
READLINE, EPICS))
|
||||
|
||||
# If libreadline needs additional libraries to be linked with it, try
|
||||
# uncommenting each of the lines below in turn, starting with the top
|
||||
# one and working downwards, until the build succeeds. Do a 'make rebuild'
|
||||
# from the top of the Base tree after changing this setting.
|
||||
|
||||
# Needs -lncurses:
|
||||
#COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
# Needs -lcurses:
|
||||
#COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
# Readline is broken or you don't want use it:
|
||||
#COMMANDLINE_LIBRARY = EPICS
|
||||
|
||||
11
configure/os/CONFIG_SITE.Common.linuxCommon
Normal file
11
configure/os/CONFIG_SITE.Common.linuxCommon
Normal file
@@ -0,0 +1,11 @@
|
||||
# CONFIG_SITE.Common.linuxCommon
|
||||
#
|
||||
# Site-specific settings for all linux targets
|
||||
|
||||
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
@@ -1,13 +1,21 @@
|
||||
# CONFIG_SITE.Common.vxWorksCommon
|
||||
#
|
||||
# Site specific definitions for vxWorks target builds.
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Compiler options can vary with the vxWorks version number, so we
|
||||
# need to know that. Do not include any third-level digits.
|
||||
# need to know that. However don't include any third-level digits
|
||||
# (e.g. the .2 in 5.5.2) because we don't need them.
|
||||
|
||||
# Note: vxWorks 5.4.x and 5.5.x (Tornado 2.x) are not supported.
|
||||
# VxWorks 6.0 through 6.5 use older, untested versions of GCC.
|
||||
# Note: vxWorks 5.4.x (Tornado 2.0.x) is not supported
|
||||
|
||||
#VXWORKS_VERSION = 5.5
|
||||
#VXWORKS_VERSION = 6.0
|
||||
#VXWORKS_VERSION = 6.1
|
||||
#VXWORKS_VERSION = 6.2
|
||||
#VXWORKS_VERSION = 6.3
|
||||
#VXWORKS_VERSION = 6.4
|
||||
#VXWORKS_VERSION = 6.5
|
||||
#VXWORKS_VERSION = 6.6
|
||||
#VXWORKS_VERSION = 6.7
|
||||
#VXWORKS_VERSION = 6.8
|
||||
@@ -19,6 +27,7 @@ VXWORKS_VERSION = 6.9
|
||||
# CONFIG_SITE.$(EPICS_HOST_ARCH).vxWorksCommon file.
|
||||
|
||||
# WIND_BASE is where you installed the Wind River software.
|
||||
# Under vxWorks 6.x this is *not* the same as the old VX_DIR setting
|
||||
|
||||
#WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
|
||||
WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
#GNU_DIR = /usr/local
|
||||
|
||||
# Different distribution cross-build packages use different prefixes:
|
||||
# Ubuntu, RHEL7:
|
||||
CMPLR_PREFIX = i686-w64-mingw32-
|
||||
# RHEL6:
|
||||
#CMPLR_PREFIX = i686-pc-mingw32-
|
||||
# Ubuntu:
|
||||
#CMPLR_PREFIX = i686-w64-mingw32-
|
||||
# RHEL:
|
||||
CMPLR_PREFIX = i686-pc-mingw32-
|
||||
# Debian?
|
||||
#CMPLR_PREFIX = i586-mingw32msvc-
|
||||
|
||||
|
||||
@@ -4,37 +4,25 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>Known Problems in Base-3.16.1</title>
|
||||
<title>Known Problems in R3.15.8</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 style="text-align: center">EPICS Base R3.16.1: Known Problems</h1>
|
||||
<h1 style="text-align: center">EPICS Base R3.15.8: Known Problems</h1>
|
||||
|
||||
<p>Any patch files linked below should be applied at the root of the
|
||||
base-3.16.1 tree. Download them, then use the GNU Patch program as
|
||||
base-3.15.8 tree. Download them, then use the GNU Patch program as
|
||||
follows:</p>
|
||||
|
||||
<blockquote><pre>% <b>cd <i>/path/to/</i>base-3.16.1</b>
|
||||
<blockquote><pre>% <b>cd <i>/path/to/</i>base-3.15.8</b>
|
||||
% <b>patch -p1 < <i>/path/to/</i>file.patch</b></pre></blockquote>
|
||||
|
||||
<p>The following problems were known by the developers at the time of this
|
||||
release:</p>
|
||||
<p>The following significant problems have been reported with this
|
||||
version of EPICS Base:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<!-- Items added after release should be formatted thusly:
|
||||
<li>YYYY-MM-DD: Description of problem.
|
||||
<a href="fix.patch">This patch</a> fixes the problem.
|
||||
...</li>
|
||||
-->
|
||||
|
||||
<li>IOCs running on some versions of Cygwin may display warnings at iocInit
|
||||
about duplicate EPICS CA Address list entries. These warnings might be due
|
||||
to a bug in Cygwin; they are benign and can be ignored.</li>
|
||||
|
||||
<li>64-bit Windows builds of the CAS library may not work with some compilers.
|
||||
The code in <tt>src/legacy/gdd</tt> is incompatible with the LLP64 model
|
||||
that Windows uses for its 64-bit ABI.</li>
|
||||
<li>None known as yet.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -1,344 +0,0 @@
|
||||
Installation Instructions
|
||||
|
||||
EPICS Base Release 3.16.1
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
Table of Contents
|
||||
|
||||
* What is EPICS base?
|
||||
* What is new in this release?
|
||||
* Copyright
|
||||
* Supported platforms
|
||||
* Supported compilers
|
||||
* Software requirements
|
||||
* Host system storage requirements
|
||||
* Documentation
|
||||
* Directory Structure
|
||||
* Build related components
|
||||
* Building EPICS base (Unix and Win32)
|
||||
* Example application and extension
|
||||
* Multiple host platforms
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
What is EPICS base?
|
||||
|
||||
The Experimental Physics and Industrial Control Systems (EPICS) is an
|
||||
extensible set of software components and tools with which application
|
||||
developers can create a control system. This control system can be used
|
||||
to control accelerators, detectors, telescopes, or other scientific
|
||||
experimental equipment. EPICS base is the set of core software, i.e. the
|
||||
components of EPICS without which EPICS would not function. EPICS base
|
||||
allows an arbitrary number of target systems, IOCs (input/output
|
||||
controllers), and host systems, OPIs (operator interfaces) of various
|
||||
types.
|
||||
|
||||
What is new in this release?
|
||||
|
||||
Please check the RELEASE_NOTES file in the distribution for description
|
||||
of changes and release migration details.
|
||||
|
||||
Copyright
|
||||
|
||||
Please review the LICENSE file included in the distribution for legal
|
||||
terms of usage.
|
||||
|
||||
Supported platforms
|
||||
|
||||
The list of platforms supported by this version of EPICS base is given
|
||||
in the configure/CONFIG_SITE file. If you are trying to build EPICS Base
|
||||
on an unlisted host or for a different target machine you must have the
|
||||
proper host/target cross compiler and header files, and you will have to
|
||||
create and add the appropriate new configure files to the
|
||||
base/configure/os/directory. You can start by copying existing
|
||||
configuration files in the configure/os directory and then make changes
|
||||
for your new platforms.
|
||||
|
||||
Supported compilers
|
||||
|
||||
This version of EPICS base has been built and tested using the host
|
||||
vendor's C and C++ compilers, as well as the GNU gcc and g++ compilers.
|
||||
The GNU cross-compilers work for all cross-compiled targets. You may
|
||||
need the C and C++ compilers to be in your search path to do EPICS
|
||||
builds; check the definitions of CC and CCC in
|
||||
base/configure/os/CONFIG.<host>.<host> if you have problems.
|
||||
|
||||
Software requirements
|
||||
|
||||
GNU make
|
||||
You must use the GNU version of make for EPICS builds, and we now
|
||||
recommend version 4.1 or later (version 3.82 may work on Linux, but
|
||||
doesn't on Windows).
|
||||
|
||||
Perl
|
||||
You must have Perl version 5.8.1 or later installed. The EPICS
|
||||
configuration files do not specify the perl full pathname, so the perl
|
||||
executable must be found through your normal search path.
|
||||
|
||||
Unzip and tar (Winzip on WIN32 systems)
|
||||
You must have tools available to unzip and untar the EPICS base
|
||||
distribution file.
|
||||
|
||||
Target systems
|
||||
EPICS supports IOCs running on embedded platforms such as VxWorks and
|
||||
RTEMS built using a cross-compiler, and also supports soft IOCs running
|
||||
as processes on the host platform.
|
||||
|
||||
vxWorks
|
||||
You must have vxWorks 6 installed if any of your target systems are
|
||||
vxWorks systems; the C++ compilers for vxWorks 5.x are now too old to
|
||||
support. The vxWorks installation provides the cross-compiler and header
|
||||
files needed to build for these targets. The absolute path to and the
|
||||
version number of the vxWorks installation must be set in the
|
||||
base/configure/os/CONFIG_SITE.Common.vxWorksCommon file or in one of its
|
||||
target-specific overrides.
|
||||
|
||||
Consult the vxWorks 6.x EPICS web pages and the vxWorks documentation
|
||||
for information about configuring your vxWorks operating system for use
|
||||
with EPICS.
|
||||
|
||||
RTEMS
|
||||
For RTEMS targets, you need RTEMS core and toolset version 4.9.2 or
|
||||
4.10. The newer 4.11 or 5.x releases are not supported yet.
|
||||
|
||||
Command-line editing libraries
|
||||
GNU readline or other OS-specific libraries can be used by the IOC shell
|
||||
to provide command line editing and history recall. The default setting
|
||||
is different for each OS. On Linux the default is to use READLINE since
|
||||
most distributions include it. On MacOS the default is also READLINE
|
||||
since Apple provides a compatible library, although it isn't GNU. On
|
||||
RTEMS we support GNU readline and Tecla, although the default is to use
|
||||
neither since these have to be added to the RTEMS installation
|
||||
separately. On vxWorks we support the built-in ledLib library.
|
||||
|
||||
Host system storage requirements
|
||||
|
||||
The compressed tar file is approximately 1.6 MB in size. The
|
||||
distribution source tree takes up approximately 12 MB. Each host target
|
||||
will need around 40 MB for build files, and each cross-compiled target
|
||||
around 20 MB.
|
||||
|
||||
Documentation
|
||||
|
||||
EPICS documentation is available through the EPICS website at Argonne.
|
||||
|
||||
Release specific documentation can also be found in the
|
||||
base/documentation directory of the distribution.
|
||||
|
||||
Directory Structure
|
||||
|
||||
Distribution directory structure:
|
||||
|
||||
base Root directory of the base distribution
|
||||
base/configure Operating system independent build config files
|
||||
base/configure/os Operating system dependent build config files
|
||||
base/documentation Distribution documentation
|
||||
base/src Source code in various subdirectories
|
||||
base/startup Scripts for setting up path and environment
|
||||
|
||||
Install directories created by the build:
|
||||
|
||||
bin Installed scripts and executables in subdirs
|
||||
cfg Installed build configuration files
|
||||
db Installed data bases
|
||||
dbd Installed data base definitions
|
||||
doc Installed documentation files
|
||||
html Installed html documentation
|
||||
include Installed header files
|
||||
include/os Installed os specific header files in subdirs
|
||||
include/compiler Installed compiler-specific header files
|
||||
lib Installed libraries in arch subdirectories
|
||||
lib/perl Installed perl modules
|
||||
templates Installed templates
|
||||
|
||||
Build related components
|
||||
|
||||
base/documentation directory - contains setup, build, and install documents
|
||||
|
||||
README.1st Instructions for setup and building epics base
|
||||
README.html html version of README.1st
|
||||
README.darwin.html Installation notes for Mac OS X (Darwin)
|
||||
RELEASE_NOTES.html Notes on release changes
|
||||
KnownProblems.html List of known problems and workarounds
|
||||
|
||||
base/startup directory - contains scripts to set environment and path
|
||||
|
||||
EpicsHostArch Shell script to set EPICS_HOST_ARCH env variable
|
||||
unix.csh C shell script to set path and env variables
|
||||
unix.sh Bourne shell script to set path and env variables
|
||||
win32.bat Bat file example to configure win32-x86 target
|
||||
windows.bat Bat file example to configure windows-x64 target
|
||||
|
||||
base/configure directory - contains build definitions and rules
|
||||
|
||||
CONFIG Includes configure files and allows variable overrides
|
||||
CONFIG.CrossCommon Cross build definitions
|
||||
CONFIG.gnuCommon Gnu compiler build definitions for all archs
|
||||
CONFIG_ADDONS Definitions for <osclass> and DEFAULT options
|
||||
CONFIG_APP_INCLUDE
|
||||
CONFIG_BASE EPICS base tool and location definitions
|
||||
CONFIG_BASE_VERSION Definitions for EPICS base version number
|
||||
CONFIG_COMMON Definitions common to all builds
|
||||
CONFIG_ENV Definitions of EPICS environment variables
|
||||
CONFIG_FILE_TYPE
|
||||
CONFIG_SITE Site specific make definitions
|
||||
CONFIG_SITE_ENV Site defaults for EPICS environment variables
|
||||
MAKEFILE Installs CONFIG* RULES* creates
|
||||
RELEASE Location of external products
|
||||
RULES Includes appropriate rules file
|
||||
RULES.Db Rules for database and database definition files
|
||||
RULES.ioc Rules for application iocBoot/ioc* directory
|
||||
RULES_ARCHS Definitions and rules for building architectures
|
||||
RULES_BUILD Build and install rules and definitions
|
||||
RULES_DIRS Definitions and rules for building subdirectories
|
||||
RULES_EXPAND
|
||||
RULES_FILE_TYPE
|
||||
RULES_TARGET
|
||||
RULES_TOP Rules specific to a <top> dir (uninstall and tar)
|
||||
Sample.Makefile Sample makefile with comments
|
||||
|
||||
base/configure/os directory - contains os-arch specific definitions
|
||||
|
||||
CONFIG.<host>.<target> Specific host-target build definitions
|
||||
CONFIG.Common.<target> Specific target definitions for all hosts
|
||||
CONFIG.<host>.Common Specific host definitions for all targets
|
||||
CONFIG.UnixCommon.Common Definitions for Unix hosts and all targets
|
||||
CONFIG.Common.UnixCommon Definitions for Unix targets and all hosts
|
||||
CONFIG.Common.vxWorksCommon Specific host definitions for all vx targets
|
||||
CONFIG_SITE.<host>.<target> Site specific host-target definitions
|
||||
CONFIG_SITE.Common.<target> Site specific target defs for all hosts
|
||||
CONFIG_SITE.<host>.Common Site specific host defs for all targets
|
||||
|
||||
Building EPICS base (Unix and Win32)
|
||||
|
||||
Unpack file
|
||||
|
||||
Unzip and untar the distribution file. Use WinZip on Windows systems.
|
||||
|
||||
Set environment variables
|
||||
|
||||
Files in the base/startup directory have been provided to help set
|
||||
required path and other environment variables.
|
||||
|
||||
EPICS_HOST_ARCH
|
||||
Before you can build or use EPICS R3.15, the environment variable
|
||||
EPICS_HOST_ARCH must be defined. A perl script EpicsHostArch.pl in the
|
||||
base/startup directory has been provided to help set EPICS_HOST_ARCH.
|
||||
You should have EPICS_HOST_ARCH set to your host operating system
|
||||
followed by a dash and then your host architecture, e.g.
|
||||
solaris-sparc. If you are not using the OS vendor's c/c++ compiler for
|
||||
host builds, you will need another dash followed by the alternate
|
||||
compiler name (e.g. "-gnu" for GNU c/c++ compilers on a solaris host
|
||||
or "-mingw" for MinGW c/c++ compilers on a WIN32 host). See
|
||||
configure/CONFIG_SITE for a list of supported EPICS_HOST_ARCH values.
|
||||
|
||||
PERLLIB
|
||||
On WIN32, some versions of Perl require that the environment variable
|
||||
PERLLIB be set to <perl directory location>.
|
||||
|
||||
PATH
|
||||
As already mentioned, you must have the perl executable and you may
|
||||
need C and C++ compilers in your search path. For building base you
|
||||
also must have echo in your search path. For Unix host builds you also
|
||||
need ln, cpp, cp, rm, mv, and mkdir in your search path and /bin/chmod
|
||||
must exist. On some Unix systems you may also need ar and ranlib in
|
||||
your path, and the C compiler may require as and ld in your path. On
|
||||
solaris systems you need uname in your path.
|
||||
|
||||
LD_LIBRARY_PATH
|
||||
R3.15 shared libraries and executables normally contain the full path
|
||||
to any libraries they require. However, if you move the EPICS files or
|
||||
directories from their build-time location then in order for the
|
||||
shared libraries to be found at runtime LD_LIBRARY_PATH must include
|
||||
the full pathname to $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when
|
||||
invoking executables, or some equivalent OS-specific mechanism (such
|
||||
as /etc/ld.so.conf on Linux) must be used. Shared libraries are now
|
||||
built by default on all Unix type hosts.
|
||||
|
||||
Do site-specific build configuration
|
||||
|
||||
Site configuration
|
||||
To configure EPICS, you may want to modify the default definitions in
|
||||
the following files:
|
||||
|
||||
configure/CONFIG_SITE Build choices. Specify target archs.
|
||||
configure/CONFIG_SITE_ENV Environment variable defaults
|
||||
configure/RELEASE TORNADO2 full path location
|
||||
|
||||
Host configuration
|
||||
To configure each host system, you may override the default
|
||||
definitions by adding a new file in the configure/os directory with
|
||||
override definitions. The new file should have the same name as the
|
||||
distribution file to be overridden except with CONFIG in the name
|
||||
changed to CONFIG_SITE.
|
||||
|
||||
configure/os/CONFIG.<host>.<host> Host build settings
|
||||
configure/os/CONFIG.<host>.Common Host common build settings
|
||||
|
||||
Target configuration
|
||||
To configure each target system, you may override the default
|
||||
definitions by adding a new file in the configure/os directory with
|
||||
override definitions. The new file should have the same name as the
|
||||
distribution file to be overridden except with CONFIG in the name
|
||||
replaced by CONFIG_SITE. This step is necessary even if the host
|
||||
system is the only target system.
|
||||
|
||||
configure/os/CONFIG.Common.<target> Target common settings
|
||||
configure/os/CONFIG.<host>.<target> Host-target settings
|
||||
|
||||
Build EPICS base
|
||||
|
||||
After configuring the build you should be able to build EPICS base by
|
||||
issuing the following commands in the distribution's root directory
|
||||
(base):
|
||||
|
||||
gnumake clean uninstall
|
||||
gnumake
|
||||
|
||||
The command "gnumake clean uninstall" will remove all files and
|
||||
directories generated by a previous build. The command "gnumake" will
|
||||
build and install everything for the configured host and targets.
|
||||
|
||||
It is recommended that you do a "gnumake clean uninstall" at the root
|
||||
directory of an EPICS directory structure before each complete rebuild
|
||||
to ensure that all components will be rebuilt.
|
||||
|
||||
Example application and extension
|
||||
|
||||
A perl tool, makeBaseApp.pl is included in the distribution file. This
|
||||
script will create a sample application that can be built and then
|
||||
executed to try out this release of base.
|
||||
|
||||
Instructions for building and executing the 3.15 example application can
|
||||
be found in the section "Example Application" of Chapter 2, "Getting
|
||||
Started", in the "IOC Application Developer's Guide" for this release.
|
||||
The "Example IOC Application" section briefly explains how to create and
|
||||
build an example application in a user created <top> directory. It also
|
||||
explains how to run the example application on a vxWorks ioc or as a
|
||||
process on the host system. By running the example application as a
|
||||
host-based IOC, you will be able to quickly implement a complete EPICS
|
||||
system and be able to run channel access clients on the host system.
|
||||
|
||||
A perl script, makeBaseExt.pl, is included in the distribution file.
|
||||
This script will create a sample extension that can be built and
|
||||
executed. The makeBaseApp.pl and makeBaseExt.pl scripts are installed
|
||||
into the install location bin/<hostarch> directory during the base
|
||||
build.
|
||||
|
||||
Multiple host platforms
|
||||
|
||||
You can build using a single EPICS directory structure on multiple host
|
||||
systems and for multiple cross target systems. The intermediate and
|
||||
binary files generated by the build will be created in separate
|
||||
subdirectories and installed into the appropriate separate host/target
|
||||
install directories. EPICS executables and perl scripts are installed
|
||||
into the $(INSTALL_LOCATION)/bin/<arch> directories. Libraries are
|
||||
installed into $(INSTALL_LOCATION)/lib/<arch>. The default definition
|
||||
for $(INSTALL_LOCATION) is $(TOP) which is the root directory in the
|
||||
distribution directory structure, base. Created object files are stored
|
||||
in O.<arch> source subdirectories, This allows objects for multiple
|
||||
cross target architectures to be maintained at the same time. To build
|
||||
EPICS base for a specific host/target combination you must have the
|
||||
proper host/target C/C++ cross compiler and target header files and the
|
||||
base/configure/os directory must have the appropriate configure files.
|
||||
@@ -1,382 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- Generate the README.1st file from this file using:
|
||||
elinks -dump -no-numbering -no-references -dump-width 80 README.html
|
||||
-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>README - EPICS Base Installation Instructions</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<CENTER>
|
||||
<H1>Installation Instructions</H1>
|
||||
<H2>EPICS Base Release 3.16.1</H2><BR>
|
||||
</CENTER>
|
||||
<HR>
|
||||
<H3> Table of Contents</H3>
|
||||
<UL>
|
||||
<LI><A HREF="#0_0_1"> What is EPICS base?</A></LI>
|
||||
<LI><A HREF="#0_0_2"> What is new in this release?</A></LI>
|
||||
<LI><A HREF="#0_0_3"> Copyright</A></LI>
|
||||
<LI><A HREF="#0_0_4"> Supported platforms</A></LI>
|
||||
<LI><A HREF="#0_0_5"> Supported compilers</A></LI>
|
||||
<LI><A HREF="#0_0_6"> Software requirements</A></LI>
|
||||
<LI><A HREF="#0_0_7"> Host system storage requirements</A></LI>
|
||||
<LI><A HREF="#0_0_8"> Documentation</A></LI>
|
||||
<LI><A HREF="#0_0_10"> Directory Structure</A></LI>
|
||||
<LI><A HREF="#0_0_11"> Build related components</A></LI>
|
||||
<LI><A HREF="#0_0_12"> Building EPICS base (Unix and Win32)</A></LI>
|
||||
<LI><A HREF="#0_0_13"> Example application and extension</A></LI>
|
||||
<LI><A HREF="#0_0_14"> Multiple host platforms</A></LI>
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<H3><A NAME="0_0_1"> What is EPICS base?</A></H3>
|
||||
<BLOCKQUOTE>The Experimental Physics and Industrial Control Systems
|
||||
(EPICS) is an extensible set of software components and tools with
|
||||
which application developers can create a control system. This control
|
||||
system can be used to control accelerators, detectors, telescopes, or
|
||||
other scientific experimental equipment. EPICS base is the set of core
|
||||
software, i.e. the components of EPICS without which EPICS would not
|
||||
function. EPICS base allows an arbitrary number of target systems, IOCs
|
||||
(input/output controllers), and host systems, OPIs (operator
|
||||
interfaces) of various types.</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_2"> What is new in this release?</A></H3>
|
||||
<BLOCKQUOTE> Please check the RELEASE_NOTES file in the distribution for
|
||||
description of changes and release migration details.</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_3"> Copyright</A></H3>
|
||||
<BLOCKQUOTE>Please review the LICENSE file included in the
|
||||
distribution for legal terms of usage.</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_4"> Supported platforms</A></H3>
|
||||
|
||||
<BLOCKQUOTE>The list of platforms supported by this version of EPICS base
|
||||
is given in the configure/CONFIG_SITE file. If you are trying to build
|
||||
EPICS Base on an unlisted host or for a different target machine you
|
||||
must have the proper host/target cross compiler and header files, and
|
||||
you will have to create and add the appropriate new configure files to
|
||||
the base/configure/os/directory. You can start by copying existing
|
||||
configuration files in the configure/os directory and then make changes
|
||||
for your new platforms.</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_5"> Supported compilers</A></H3>
|
||||
|
||||
<BLOCKQUOTE>This version of EPICS base has been built and tested using the host
|
||||
vendor's C and C++ compilers, as well as the GNU gcc and g++ compilers. The GNU
|
||||
cross-compilers work for all cross-compiled targets. You may need the C and C++
|
||||
compilers to be in your search path to do EPICS builds; check the definitions
|
||||
of CC and CCC in base/configure/os/CONFIG.<host>.<host> if you have
|
||||
problems.</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_6"> Software requirements</A></H3>
|
||||
|
||||
<BLOCKQUOTE><B>GNU make</B><BR>
|
||||
You must use the GNU version of make for EPICS builds, and we now recommend
|
||||
version 4.1 or later (version 3.82 may work on Linux, but doesn't on Windows).
|
||||
|
||||
<P><B>Perl</B><BR>
|
||||
You must have Perl version 5.8.1 or later installed. The EPICS configuration
|
||||
files do not specify the perl full pathname, so the perl executable must
|
||||
be found through your normal search path.</P>
|
||||
|
||||
<P><B>Unzip and tar (Winzip on WIN32 systems)</B><BR>
|
||||
You must have tools available to unzip and untar the EPICS base
|
||||
distribution file.</P>
|
||||
|
||||
<P><B>Target systems</B><BR>
|
||||
EPICS supports IOCs running on embedded platforms such as VxWorks
|
||||
and RTEMS built using a cross-compiler, and also supports soft IOCs running
|
||||
as processes on the host platform.</P>
|
||||
|
||||
<P><B>vxWorks</B><BR>
|
||||
You must have vxWorks 6 installed if any of your target systems are vxWorks
|
||||
systems; the C++ compilers for vxWorks 5.x are now too old to support. The
|
||||
vxWorks installation provides the cross-compiler and header files needed to
|
||||
build for these targets. The absolute path to and the version number of the
|
||||
vxWorks installation must be set in the
|
||||
base/configure/os/CONFIG_SITE.Common.vxWorksCommon file or in one of its
|
||||
target-specific overrides.</P>
|
||||
|
||||
<P>Consult the <a href="https://epics.anl.gov/base/vxWorks6.php">vxWorks
|
||||
6.x</a> EPICS web pages and the vxWorks documentation for information
|
||||
about configuring your vxWorks operating system for use with EPICS.</P>
|
||||
|
||||
<P><B>RTEMS</B><BR>
|
||||
For RTEMS targets, you need RTEMS core and toolset version 4.9.2 or 4.10. The
|
||||
newer 4.11 or 5.x releases are not supported yet.</P>
|
||||
|
||||
<P><B>Command-line editing libraries</B><BR>
|
||||
|
||||
GNU readline or other OS-specific libraries can be used by the IOC shell to
|
||||
provide command line editing and history recall. The default setting is
|
||||
different for each OS. On Linux the default is to use READLINE since most
|
||||
distributions include it. On MacOS the default is also READLINE since Apple
|
||||
provides a compatible library, although it isn't GNU. On RTEMS we support GNU
|
||||
readline and Tecla, although the default is to use neither since these have to
|
||||
be added to the RTEMS installation separately. On vxWorks we support the
|
||||
built-in ledLib library.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_7"> Host system storage requirements</A></H3>
|
||||
|
||||
<BLOCKQUOTE>The compressed tar file is approximately 1.6 MB in size. The
|
||||
distribution source tree takes up approximately 12 MB. Each host target will
|
||||
need around 40 MB for build files, and each cross-compiled target around 20
|
||||
MB.</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_8"> Documentation</A></H3>
|
||||
<BLOCKQUOTE>EPICS documentation is available through the
|
||||
<a href="https://epics.anl.gov/">EPICS website</a> at Argonne.
|
||||
<P>Release specific documentation can also be found in the base/documentation
|
||||
directory of the distribution.</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_10"> Directory Structure</A></H3>
|
||||
<BLOCKQUOTE><H4>Distribution directory structure:</H4>
|
||||
|
||||
<PRE>
|
||||
base Root directory of the base distribution
|
||||
base/configure Operating system independent build config files
|
||||
base/configure/os Operating system dependent build config files
|
||||
base/documentation Distribution documentation
|
||||
base/src Source code in various subdirectories
|
||||
base/startup Scripts for setting up path and environment
|
||||
</PRE>
|
||||
|
||||
<H4>Install directories created by the build:</H4>
|
||||
<PRE>
|
||||
bin Installed scripts and executables in subdirs
|
||||
cfg Installed build configuration files
|
||||
db Installed data bases
|
||||
dbd Installed data base definitions
|
||||
doc Installed documentation files
|
||||
html Installed html documentation
|
||||
include Installed header files
|
||||
include/os Installed os specific header files in subdirs
|
||||
include/compiler Installed compiler-specific header files
|
||||
lib Installed libraries in arch subdirectories
|
||||
lib/perl Installed perl modules
|
||||
templates Installed templates
|
||||
</PRE>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_11"> Build related components</A></H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<H4>base/documentation directory - contains setup, build, and install
|
||||
documents</H4>
|
||||
<PRE>
|
||||
README.1st Instructions for setup and building epics base
|
||||
README.html html version of README.1st
|
||||
README.darwin.html Installation notes for Mac OS X (Darwin)
|
||||
RELEASE_NOTES.html Notes on release changes
|
||||
KnownProblems.html List of known problems and workarounds
|
||||
</PRE>
|
||||
|
||||
<H4>base/startup directory - contains scripts to set environment and path</H4>
|
||||
<PRE>
|
||||
EpicsHostArch Shell script to set EPICS_HOST_ARCH env variable
|
||||
unix.csh C shell script to set path and env variables
|
||||
unix.sh Bourne shell script to set path and env variables
|
||||
win32.bat Bat file example to configure win32-x86 target
|
||||
windows.bat Bat file example to configure windows-x64 target
|
||||
</PRE>
|
||||
|
||||
<H4>base/configure directory - contains build definitions and rules</H4>
|
||||
<PRE>
|
||||
CONFIG Includes configure files and allows variable overrides
|
||||
CONFIG.CrossCommon Cross build definitions
|
||||
CONFIG.gnuCommon Gnu compiler build definitions for all archs
|
||||
CONFIG_ADDONS Definitions for <osclass> and DEFAULT options
|
||||
CONFIG_APP_INCLUDE
|
||||
CONFIG_BASE EPICS base tool and location definitions
|
||||
CONFIG_BASE_VERSION Definitions for EPICS base version number
|
||||
CONFIG_COMMON Definitions common to all builds
|
||||
CONFIG_ENV Definitions of EPICS environment variables
|
||||
CONFIG_FILE_TYPE
|
||||
CONFIG_SITE Site specific make definitions
|
||||
CONFIG_SITE_ENV Site defaults for EPICS environment variables
|
||||
MAKEFILE Installs CONFIG* RULES* creates
|
||||
RELEASE Location of external products
|
||||
RULES Includes appropriate rules file
|
||||
RULES.Db Rules for database and database definition files
|
||||
RULES.ioc Rules for application iocBoot/ioc* directory
|
||||
RULES_ARCHS Definitions and rules for building architectures
|
||||
RULES_BUILD Build and install rules and definitions
|
||||
RULES_DIRS Definitions and rules for building subdirectories
|
||||
RULES_EXPAND
|
||||
RULES_FILE_TYPE
|
||||
RULES_TARGET
|
||||
RULES_TOP Rules specific to a <top> dir (uninstall and tar)
|
||||
Sample.Makefile Sample makefile with comments
|
||||
</PRE>
|
||||
|
||||
<H4>base/configure/os directory - contains os-arch specific definitions</H4>
|
||||
<PRE>
|
||||
CONFIG.<host>.<target> Specific host-target build definitions
|
||||
CONFIG.Common.<target> Specific target definitions for all hosts
|
||||
CONFIG.<host>.Common Specific host definitions for all targets
|
||||
CONFIG.UnixCommon.Common Definitions for Unix hosts and all targets
|
||||
CONFIG.Common.UnixCommon Definitions for Unix targets and all hosts
|
||||
CONFIG.Common.vxWorksCommon Specific host definitions for all vx targets
|
||||
CONFIG_SITE.<host>.<target> Site specific host-target definitions
|
||||
CONFIG_SITE.Common.<target> Site specific target defs for all hosts
|
||||
CONFIG_SITE.<host>.Common Site specific host defs for all targets
|
||||
</PRE>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_12"> Building EPICS base (Unix and Win32)</A></H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<H4> Unpack file</H4>
|
||||
<BLOCKQUOTE>
|
||||
Unzip and untar the distribution file. Use WinZip on Windows
|
||||
systems.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H4>Set environment variables</H4>
|
||||
<BLOCKQUOTE>
|
||||
Files in the base/startup directory have been provided to
|
||||
help set required path and other environment variables.
|
||||
|
||||
<P><B>EPICS_HOST_ARCH</B><BR>
|
||||
Before you can build or use EPICS R3.15, the environment variable
|
||||
EPICS_HOST_ARCH must be defined. A perl script EpicsHostArch.pl in the
|
||||
base/startup directory has been provided to help set EPICS_HOST_ARCH.
|
||||
You should have EPICS_HOST_ARCH set to your host operating system
|
||||
followed by a dash and then your host architecture, e.g. solaris-sparc.
|
||||
If you are not using the OS vendor's c/c++ compiler for host builds,
|
||||
you will need another dash followed by the alternate compiler name
|
||||
(e.g. "-gnu" for GNU c/c++ compilers on a solaris host or "-mingw"
|
||||
for MinGW c/c++ compilers on a WIN32 host). See configure/CONFIG_SITE
|
||||
for a list of supported EPICS_HOST_ARCH values.</P>
|
||||
|
||||
<P><B>PERLLIB</B><BR>
|
||||
On WIN32, some versions of Perl require that the environment
|
||||
variable PERLLIB be set to <perl directory location>.</P>
|
||||
|
||||
<P><B>PATH</B><BR>
|
||||
As already mentioned, you must have the perl executable and you may
|
||||
need C and C++ compilers in your search path. For building base you
|
||||
also must have echo in your search path. For Unix host builds you also
|
||||
need ln, cpp, cp, rm, mv, and mkdir in your search path and /bin/chmod
|
||||
must exist. On some Unix systems you may also need ar and ranlib in
|
||||
your path, and the C compiler may require as and ld in your path. On
|
||||
solaris systems you need uname in your path.</P>
|
||||
|
||||
<P><B>LD_LIBRARY_PATH</B><BR>
|
||||
|
||||
R3.15 shared libraries and executables normally contain the full path
|
||||
to any libraries they require.
|
||||
However, if you move the EPICS files or directories from their build-time
|
||||
location then in order for the shared libraries to be found at runtime
|
||||
LD_LIBRARY_PATH must include the full pathname to
|
||||
$(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when invoking executables, or
|
||||
some equivalent OS-specific mechanism (such as /etc/ld.so.conf on Linux)
|
||||
must be used.
|
||||
Shared libraries are now built by default on all Unix type hosts.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H4>Do site-specific build configuration</H4>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<B>Site configuration</B><BR>
|
||||
To configure EPICS, you may want to modify the default definitions
|
||||
in the following files:
|
||||
<PRE>
|
||||
configure/CONFIG_SITE Build choices. Specify target archs.
|
||||
configure/CONFIG_SITE_ENV Environment variable defaults
|
||||
configure/RELEASE TORNADO2 full path location
|
||||
</PRE>
|
||||
|
||||
<B> Host configuration</B><BR>
|
||||
To configure each host system, you may override the default
|
||||
definitions by adding a new file in the configure/os directory with
|
||||
override definitions. The new file should have the same name as the
|
||||
distribution file to be overridden except with CONFIG in the name
|
||||
changed to CONFIG_SITE.
|
||||
|
||||
<PRE>
|
||||
configure/os/CONFIG.<host>.<host> Host build settings
|
||||
configure/os/CONFIG.<host>.Common Host common build settings
|
||||
</PRE>
|
||||
|
||||
<B>Target configuration</B><BR>
|
||||
To configure each target system, you may override the default
|
||||
definitions by adding a new file in the configure/os directory with
|
||||
override definitions. The new file should have the same name as the
|
||||
distribution file to be overridden except with CONFIG in the name
|
||||
replaced by CONFIG_SITE. This step is necessary even if the host system
|
||||
is the only target system.
|
||||
<PRE>
|
||||
configure/os/CONFIG.Common.<target> Target common settings
|
||||
configure/os/CONFIG.<host>.<target> Host-target settings
|
||||
</PRE>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H4>Build EPICS base</H4>
|
||||
<BLOCKQUOTE>After configuring the build you should be able to build
|
||||
EPICS base by issuing the following commands in the distribution's root
|
||||
directory (base):
|
||||
<PRE>
|
||||
gnumake clean uninstall
|
||||
gnumake
|
||||
</PRE>
|
||||
|
||||
The command "gnumake clean uninstall"
|
||||
will remove all files and directories generated by a previous build.
|
||||
The command "gnumake" will build and install everything for the
|
||||
configured host and targets.
|
||||
|
||||
<P> It is recommended that you do a "gnumake clean uninstall" at the
|
||||
root directory of an EPICS directory structure before each complete
|
||||
rebuild to ensure that all components will be rebuilt.
|
||||
</BLOCKQUOTE>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_13"> Example application and extension</A></H3>
|
||||
<BLOCKQUOTE>A perl tool, makeBaseApp.pl is included in the distribution
|
||||
file. This script will create a sample application that can be built
|
||||
and then executed to try out this release of base.
|
||||
|
||||
<P>
|
||||
Instructions for building and executing the 3.15 example application
|
||||
can be found in the section "Example Application" of Chapter 2,
|
||||
"Getting Started", in the "IOC Application Developer's Guide" for this
|
||||
release. The "Example IOC Application" section briefly explains how to
|
||||
create and build an example application in a user created <top>
|
||||
directory. It also explains how to run the example application on a
|
||||
vxWorks ioc or as a process on the host system.
|
||||
By running the example application as a host-based IOC, you will be
|
||||
able to quickly implement a complete EPICS system and be able to run channel
|
||||
access clients on the host system.
|
||||
|
||||
<P>
|
||||
A perl script,
|
||||
makeBaseExt.pl, is included in the distribution file. This script will
|
||||
create a sample extension that can be built and executed. The
|
||||
makeBaseApp.pl and makeBaseExt.pl scripts are installed into the
|
||||
install location bin/<hostarch> directory during the base build.
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3><A NAME="0_0_14"> Multiple host platforms</A></H3>
|
||||
<BLOCKQUOTE>You can build using a single EPICS directory structure on
|
||||
multiple host systems and for multiple cross target systems. The
|
||||
intermediate and binary files generated by the build will be created in
|
||||
separate subdirectories and installed into the appropriate separate
|
||||
host/target install directories. EPICS executables and perl scripts are
|
||||
installed into the <TT>$(INSTALL_LOCATION)/bin/<arch></TT> directories.
|
||||
Libraries are installed into $<TT>(INSTALL_LOCATION)/lib/<arch></TT>.
|
||||
The default definition for <TT>$(INSTALL_LOCATION)</TT> is <TT>$(TOP)</TT>
|
||||
which is the root directory in the distribution directory structure,
|
||||
base. Created object files are stored in O.<arch> source
|
||||
subdirectories, This allows objects for multiple cross target
|
||||
architectures to be maintained at the same time. To build EPICS base
|
||||
for a specific host/target combination you must have the proper
|
||||
host/target C/C++ cross compiler and target header files and the
|
||||
base/configure/os directory must have the appropriate configure files.
|
||||
</BLOCKQUOTE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
373
documentation/README.md
Normal file
373
documentation/README.md
Normal file
@@ -0,0 +1,373 @@
|
||||
# Installation Instructions
|
||||
|
||||
## EPICS Base Release 3.15.8
|
||||
|
||||
-----
|
||||
|
||||
### Table of Contents
|
||||
|
||||
- [What is EPICS base?](#0_0_1)
|
||||
- [What is new in this release?](#0_0_2)
|
||||
- [Copyright](#0_0_3)
|
||||
- [Supported platforms](#0_0_4)
|
||||
- [Supported compilers](#0_0_5)
|
||||
- [Software requirements](#0_0_6)
|
||||
- [Host system storage requirements](#0_0_7)
|
||||
- [Documentation](#0_0_8)
|
||||
- [Directory Structure](#0_0_10)
|
||||
- [Build related components](#0_0_11)
|
||||
- [Building EPICS base (Unix and Win32)](#0_0_12)
|
||||
- [Example application and extension](#0_0_13)
|
||||
- [Multiple host platforms](#0_0_14)
|
||||
|
||||
-----
|
||||
|
||||
### <span id="0_0_1">What is EPICS base?</span>
|
||||
|
||||
The Experimental Physics and Industrial Control Systems (EPICS) is an
|
||||
extensible set of software components and tools with which application
|
||||
developers can create a control system. This control system can be
|
||||
used to control accelerators, detectors, telescopes, or other
|
||||
scientific experimental equipment. EPICS base is the set of core
|
||||
software, i.e. the components of EPICS without which EPICS would not
|
||||
function. EPICS base allows an arbitrary number of target systems,
|
||||
IOCs (input/output controllers), and host systems, OPIs (operator
|
||||
interfaces) of various types.
|
||||
|
||||
### <span id="0_0_2">What is new in this release?</span>
|
||||
|
||||
Please check the `RELEASE_NOTES` file in the distribution for
|
||||
description of changes and release migration details.
|
||||
|
||||
### <span id="0_0_3">Copyright</span>
|
||||
|
||||
Please review the LICENSE file included in the distribution for legal
|
||||
terms of usage.
|
||||
|
||||
### <span id="0_0_4">Supported platforms</span>
|
||||
|
||||
The list of platforms supported by this version of EPICS base is given
|
||||
in the `configure/CONFIG_SITE` file. If you are trying to build EPICS
|
||||
Base on an unlisted host or for a different target machine you must
|
||||
have the proper host/target cross compiler and header files, and you
|
||||
will have to create and add the appropriate new configure files to the
|
||||
base/configure/os/directory. You can start by copying existing
|
||||
configuration files in the configure/os directory and then make
|
||||
changes for your new platforms.
|
||||
|
||||
### <span id="0_0_5">Supported compilers</span>
|
||||
|
||||
This version of EPICS base has been built and tested using the host
|
||||
vendor's C and C++ compilers, as well as the GNU gcc and g++
|
||||
compilers. The GNU cross-compilers work for all cross-compiled
|
||||
targets. You may need the C and C++ compilers to be in your search
|
||||
path to do EPICS builds; check the definitions of CC and CCC in
|
||||
`base/configure/os/CONFIG.<host>.<host>` if you have problems.
|
||||
|
||||
### <span id="0_0_6">Software requirements</span>
|
||||
|
||||
**GNU make**
|
||||
You must use GNU make, gnumake, for any EPICS builds. Set your path so
|
||||
that a gnumake version 3.81 or later is available.
|
||||
|
||||
**Perl**
|
||||
You must have Perl version 5.8.1 or later installed. The EPICS
|
||||
configuration files do not specify the perl full pathname, so the perl
|
||||
executable must be found through your normal search path.
|
||||
|
||||
**Unzip and tar (Winzip on WIN32 systems)**
|
||||
You must have tools available to unzip and untar the EPICS base
|
||||
distribution file.
|
||||
|
||||
**Target systems**
|
||||
EPICS supports IOCs running on embedded platforms such as VxWorks and
|
||||
RTEMS built using a cross-compiler, and also supports soft IOCs
|
||||
running as processes on the host platform.
|
||||
|
||||
**vxWorks**
|
||||
You must have vxWorks 5.5.x or 6.x installed if any of your target
|
||||
systems are vxWorks systems; the C++ compiler for vxWorks 5.4 is now
|
||||
too old to support. The vxWorks installation provides the
|
||||
cross-compiler and header files needed to build for these targets. The
|
||||
absolute path to and the version number of the vxWorks installation
|
||||
must be set in the `base/configure/os/CONFIG_SITE.Common.vxWorksCommon`
|
||||
file or in one of its target-specific overrides.
|
||||
|
||||
Consult the [vxWorks 5.x](https://epics.anl.gov/base/tornado.php) or
|
||||
[vxWorks 6.x](https://epics.anl.gov/base/vxWorks6.php) EPICS web pages
|
||||
about and the vxWorks documentation for information about configuring
|
||||
your vxWorks operating system for use with EPICS.
|
||||
|
||||
**RTEMS**
|
||||
For RTEMS targets, you need RTEMS core and toolset version 4.9.2 or
|
||||
later.
|
||||
|
||||
**GNU readline or Tecla library**
|
||||
GNU readline and Tecla libraries can be used by the IOC shell to
|
||||
provide command line editing and command line history recall and edit.
|
||||
GNU readline (or Tecla library) must be installed on your target
|
||||
system when `COMMANDLINE_LIBRARY` is set to READLINE (or TECLA) for
|
||||
that target. EPICS (EPICS shell) is the default specified in
|
||||
`CONFIG_COMMON`. A READLINE override is defined for linux-x86 in the
|
||||
EPICS distribution. Comment out `COMMANDLINE_LIBRARY=READLINE` in
|
||||
`configure/os/CONFIG_SITE.Common.linux-x86` if readline is not
|
||||
installed on linux-x86. Command-line editing and history will then be
|
||||
those supplied by the os. On vxWorks the ledLib command-line input
|
||||
library is used instead.
|
||||
|
||||
### <span id="0_0_7">Host system storage requirements</span>
|
||||
|
||||
The compressed tar file is approximately 1.6 MB in size. The
|
||||
distribution source tree takes up approximately 12 MB. Each host
|
||||
target will need around 40 MB for build files, and each cross-compiled
|
||||
target around 20 MB.
|
||||
|
||||
### <span id="0_0_8">Documentation</span>
|
||||
|
||||
EPICS documentation is available through the [EPICS
|
||||
website](https://epics.anl.gov/) at Argonne.
|
||||
|
||||
Release specific documentation can also be found in the
|
||||
base/documentation directory of the distribution.
|
||||
|
||||
### <span id="0_0_10">Directory Structure</span>
|
||||
|
||||
#### Distribution directory structure:
|
||||
|
||||
```
|
||||
base Root directory of the base distribution
|
||||
base/configure Operating system independent build config files
|
||||
base/configure/os Operating system dependent build config files
|
||||
base/documentation Distribution documentation
|
||||
base/src Source code in various subdirectories
|
||||
base/startup Scripts for setting up path and environment
|
||||
```
|
||||
|
||||
#### Install directories created by the build:
|
||||
|
||||
```
|
||||
bin Installed scripts and executables in subdirs
|
||||
cfg Installed build configuration files
|
||||
db Installed data bases
|
||||
dbd Installed data base definitions
|
||||
doc Installed documentation files
|
||||
html Installed html documentation
|
||||
include Installed header files
|
||||
include/os Installed os specific header files in subdirs
|
||||
include/compiler Installed compiler-specific header files
|
||||
lib Installed libraries in arch subdirectories
|
||||
lib/perl Installed perl modules
|
||||
templates Installed templates
|
||||
```
|
||||
|
||||
### <span id="0_0_11">Build related components</span>
|
||||
|
||||
#### base/documentation directory - contains setup, build, and install documents
|
||||
|
||||
```
|
||||
README.md Instructions for setup and building epics base
|
||||
README.darwin.html Installation notes for Mac OS X (Darwin)
|
||||
RELEASE_NOTES.html Notes on release changes
|
||||
KnownProblems.html List of known problems and workarounds
|
||||
```
|
||||
|
||||
#### base/startup directory - contains scripts to set environment and path
|
||||
|
||||
```
|
||||
EpicsHostArch Shell script to set EPICS_HOST_ARCH env variable
|
||||
unix.csh C shell script to set path and env variables
|
||||
unix.sh Bourne shell script to set path and env variables
|
||||
win32.bat Bat file example to configure win32-x86 target
|
||||
windows.bat Bat file example to configure windows-x64 target
|
||||
```
|
||||
|
||||
#### base/configure directory - contains build definitions and rules
|
||||
|
||||
```
|
||||
CONFIG Includes configure files and allows variable overrides
|
||||
CONFIG.CrossCommon Cross build definitions
|
||||
CONFIG.gnuCommon Gnu compiler build definitions for all archs
|
||||
CONFIG_ADDONS Definitions for <osclass> and DEFAULT options
|
||||
CONFIG_APP_INCLUDE
|
||||
CONFIG_BASE EPICS base tool and location definitions
|
||||
CONFIG_BASE_VERSION Definitions for EPICS base version number
|
||||
CONFIG_COMMON Definitions common to all builds
|
||||
CONFIG_ENV Definitions of EPICS environment variables
|
||||
CONFIG_FILE_TYPE
|
||||
CONFIG_SITE Site specific make definitions
|
||||
CONFIG_SITE_ENV Site defaults for EPICS environment variables
|
||||
MAKEFILE Installs CONFIG* RULES* creates
|
||||
RELEASE Location of external products
|
||||
RULES Includes appropriate rules file
|
||||
RULES.Db Rules for database and database definition files
|
||||
RULES.ioc Rules for application iocBoot/ioc* directory
|
||||
RULES_ARCHS Definitions and rules for building architectures
|
||||
RULES_BUILD Build and install rules and definitions
|
||||
RULES_DIRS Definitions and rules for building subdirectories
|
||||
RULES_EXPAND
|
||||
RULES_FILE_TYPE
|
||||
RULES_TARGET
|
||||
RULES_TOP Rules specific to a <top> dir (uninstall and tar)
|
||||
Sample.Makefile Sample makefile with comments
|
||||
```
|
||||
|
||||
#### base/configure/os directory - contains os-arch specific definitions
|
||||
|
||||
```
|
||||
CONFIG.<host>.<target> Specific host-target build definitions
|
||||
CONFIG.Common.<target> Specific target definitions for all hosts
|
||||
CONFIG.<host>.Common Specific host definitions for all targets
|
||||
CONFIG.UnixCommon.Common Definitions for Unix hosts and all targets
|
||||
CONFIG.Common.UnixCommon Definitions for Unix targets and all hosts
|
||||
CONFIG.Common.vxWorksCommon Specific host definitions for all vx targets
|
||||
CONFIG_SITE.<host>.<target> Site specific host-target definitions
|
||||
CONFIG_SITE.Common.<target> Site specific target defs for all hosts
|
||||
CONFIG_SITE.<host>.Common Site specific host defs for all targets
|
||||
```
|
||||
|
||||
### <span id="0_0_12">Building EPICS base (Unix and Win32)</span>
|
||||
|
||||
#### Unpack file
|
||||
|
||||
Unzip and untar the distribution file. Use WinZip on Windows
|
||||
systems.
|
||||
|
||||
#### Set environment variables
|
||||
|
||||
Files in the base/startup directory have been provided to help set
|
||||
required path and other environment variables.
|
||||
|
||||
* `EPICS_HOST_ARCH`
|
||||
Before you can build or use EPICS R3.15, the environment variable
|
||||
`EPICS_HOST_ARCH` must be defined. A perl script EpicsHostArch.pl in
|
||||
the base/startup directory has been provided to help set
|
||||
`EPICS_HOST_ARCH.` You should have `EPICS_HOST_ARCH` set to your
|
||||
host operating system followed by a dash and then your host
|
||||
architecture, e.g. solaris-sparc. If you are not using the OS
|
||||
vendor's c/c++ compiler for host builds, you will need another dash
|
||||
followed by the alternate compiler name (e.g. "-gnu" for GNU c/c++
|
||||
compilers on a solaris host or "-mingw" for MinGW c/c++ compilers on
|
||||
a WIN32 host). See `configure/CONFIG_SITE` for a list of supported
|
||||
`EPICS_HOST_ARCH` values.
|
||||
|
||||
* `PERLLIB`
|
||||
On WIN32, some versions of Perl require that the environment
|
||||
variable PERLLIB be set to <perl directory location>.
|
||||
|
||||
* `PATH`
|
||||
As already mentioned, you must have the perl executable and you may
|
||||
need C and C++ compilers in your search path. For building base you
|
||||
also must have echo in your search path. For Unix host builds you
|
||||
also need ln, cpp, cp, rm, mv, and mkdir in your search path and
|
||||
/bin/chmod must exist. On some Unix systems you may also need ar and
|
||||
ranlib in your path, and the C compiler may require as and ld in
|
||||
your path. On solaris systems you need uname in your path.
|
||||
|
||||
* `LD_LIBRARY_PATH`
|
||||
R3.15 shared libraries and executables normally contain the full
|
||||
path to any libraries they require. However, if you move the EPICS
|
||||
files or directories from their build-time location then in order
|
||||
for the shared libraries to be found at runtime `LD_LIBRARY_PATH`
|
||||
must include the full pathname to
|
||||
`$(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH)` when invoking
|
||||
executables, or some equivalent OS-specific mechanism (such as
|
||||
/etc/ld.so.conf on Linux) must be used. Shared libraries are now
|
||||
built by default on all Unix type hosts.
|
||||
|
||||
#### Do site-specific build configuration
|
||||
|
||||
**Site configuration**
|
||||
To configure EPICS, you may want to modify the default definitions
|
||||
in the following files:
|
||||
|
||||
```
|
||||
configure/CONFIG_SITE Build choices. Specify target archs.
|
||||
configure/CONFIG_SITE_ENV Environment variable defaults
|
||||
configure/RELEASE TORNADO2 full path location
|
||||
```
|
||||
|
||||
**Host configuration**
|
||||
To configure each host system, you may override the default
|
||||
definitions by adding a new file in the configure/os directory with
|
||||
override definitions. The new file should have the same name as the
|
||||
distribution file to be overridden except with CONFIG in the name
|
||||
changed to `CONFIG_SITE`.
|
||||
|
||||
```
|
||||
configure/os/CONFIG.<host>.<host> Host build settings
|
||||
configure/os/CONFIG.<host>.Common Host common build settings
|
||||
```
|
||||
|
||||
**Target configuration**
|
||||
To configure each target system, you may override the default
|
||||
definitions by adding a new file in the configure/os directory with
|
||||
override definitions. The new file should have the same name as the
|
||||
distribution file to be overridden except with CONFIG in the name
|
||||
replaced by `CONFIG_SITE`. This step is necessary even if the host
|
||||
system is the only target system.
|
||||
|
||||
```
|
||||
configure/os/CONFIG.Common.<target> Target common settings
|
||||
configure/os/CONFIG.<host>.<target> Host-target settings
|
||||
```
|
||||
|
||||
#### Build EPICS base
|
||||
|
||||
After configuring the build you should be able to build EPICS base
|
||||
by issuing the following commands in the distribution's root
|
||||
directory (base):
|
||||
|
||||
```
|
||||
gnumake clean uninstall
|
||||
gnumake
|
||||
```
|
||||
|
||||
The command "gnumake clean uninstall" will remove all files and
|
||||
directories generated by a previous build. The command "gnumake"
|
||||
will build and install everything for the configured host and
|
||||
targets.
|
||||
|
||||
It is recommended that you do a "gnumake clean uninstall" at the
|
||||
root directory of an EPICS directory structure before each complete
|
||||
rebuild to ensure that all components will be rebuilt.
|
||||
|
||||
### <span id="0_0_13">Example application and extension</span>
|
||||
|
||||
A perl tool, makeBaseApp.pl is included in the distribution file. This
|
||||
script will create a sample application that can be built and then
|
||||
executed to try out this release of base.
|
||||
|
||||
Instructions for building and executing the 3.15 example application
|
||||
can be found in the section "Example Application" of Chapter 2,
|
||||
"Getting Started", in the "IOC Application Developer's Guide" for this
|
||||
release. The "Example IOC Application" section briefly explains how to
|
||||
create and build an example application in a user created <top>
|
||||
directory. It also explains how to run the example application on a
|
||||
vxWorks ioc or as a process on the host system. By running the example
|
||||
application as a host-based IOC, you will be able to quickly implement
|
||||
a complete EPICS system and be able to run channel access clients on
|
||||
the host system.
|
||||
|
||||
A perl script, makeBaseExt.pl, is included in the distribution file.
|
||||
This script will create a sample extension that can be built and
|
||||
executed. The makeBaseApp.pl and makeBaseExt.pl scripts are installed
|
||||
into the install location `bin/<hostarch>` directory during the base
|
||||
build.
|
||||
|
||||
### <span id="0_0_14">Multiple host platforms</span>
|
||||
|
||||
You can build using a single EPICS directory structure on multiple
|
||||
host systems and for multiple cross target systems. The intermediate
|
||||
and binary files generated by the build will be created in separate
|
||||
subdirectories and installed into the appropriate separate host/target
|
||||
install directories. EPICS executables and perl scripts are installed
|
||||
into the `$(INSTALL_LOCATION)/bin/<arch>` directories. Libraries are
|
||||
installed into $`(INSTALL_LOCATION)/lib/<arch>`. The default
|
||||
definition for `$(INSTALL_LOCATION)` is `$(TOP)` which is the root
|
||||
directory in the distribution directory structure, base. Created
|
||||
object files are stored in `O.<arch>` source subdirectories, This
|
||||
allows objects for multiple cross target architectures to be
|
||||
maintained at the same time. To build EPICS base for a specific
|
||||
host/target combination you must have the proper host/target C/C++
|
||||
cross compiler and target header files and the base/configure/os
|
||||
directory must have the appropriate configure files.
|
||||
File diff suppressed because it is too large
Load Diff
1806
documentation/RELEASE_NOTES.md
Normal file
1806
documentation/RELEASE_NOTES.md
Normal file
File diff suppressed because it is too large
Load Diff
65
documentation/RecordReference.md
Normal file
65
documentation/RecordReference.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# Record Reference Documentation
|
||||
|
||||
The following documentation for the record types and menus include with Base was
|
||||
converted from the old EPICS Wiki pages and updated. This list only includes the
|
||||
record types supplied with Base.
|
||||
|
||||
* [Fields Common to All Record Types](dbCommonRecord.html)
|
||||
* [Fields Common to Input Record Types](dbCommonInputs.html)
|
||||
* [Fields Common to Output Record Types](dbCommonOutputs.html)
|
||||
|
||||
## Record Types
|
||||
|
||||
* [Analog Array Input Record (aai)](aaiRecord.html)
|
||||
* [Analog Array Output Record (aao)](aaoRecord.html)
|
||||
* [Analog Input Record (ai)](aiRecord.html)
|
||||
* [Analog Output Record (ao)](aoRecord.html)
|
||||
* [Array Subroutine Record (aSub)](aSubRecord.html)
|
||||
* [Binary Input Record (bi)](biRecord.html)
|
||||
* [Binary Output Record (bo)](boRecord.html)
|
||||
* [Calculation Output Record (calcout)](calcoutRecord.html)
|
||||
* [Calculation Record (calc)](calcRecord.html)
|
||||
* [Compression Record (compress)](compressRecord.html)
|
||||
* [Data Fanout Record (dfanout)](dfanoutRecord.html)
|
||||
* [Event Record (event)](eventRecord.html)
|
||||
* [Fanout Record (fanout)](fanoutRecord.html)
|
||||
* [Histogram Record (histogram)](histogramRecord.html)
|
||||
* [Long Input Record (longin)](longinRecord.html)
|
||||
* [Long Output Record (longout)](longoutRecord.html)
|
||||
* [Long String Input Record (lsi)](lsiRecord.html)
|
||||
* [Long String Output Record (lso)](lsoRecord.html)
|
||||
* [Multi-Bit Binary Input Direct Record (mbbiDirect)](mbbiDirectRecord.html)
|
||||
* [Multi-Bit Binary Input Record (mbbi)](mbbiRecord.html)
|
||||
* [Multi-Bit Binary Output Direct Record (mbboDirect)](mbboDirectRecord.html)
|
||||
* [Multi-Bit Binary Output Record (mbbo)](mbboRecord.html)
|
||||
* [Permissive Record (permissive)](permissiveRecord.html)
|
||||
* [Printf Record (prinf)](printfRecord.html)
|
||||
* [Select Record (sel)](selRecord.html)
|
||||
* [Sequence Record (seq)](seqRecord.html)
|
||||
* [State Record (state)](stateRecord.html)
|
||||
* [String Input Record (stringin)](stringinRecord.html)
|
||||
* [String Output Record (stringout)](stringoutRecord.html)
|
||||
* [Sub-Array Record (subArray)](subArrayRecord.html)
|
||||
* [Subroutine Record (sub)](subRecord.html)
|
||||
* [Waveform Record (waveform)](waveformRecord.html)
|
||||
|
||||
## Menu Definitions
|
||||
|
||||
* [Alarm Severity Menu](menuAlarmSevr.html)
|
||||
* [Alarm Status Menu](menuAlarmStat.html)
|
||||
* [Analog Conversions Menu](menuConvert.html)
|
||||
* [Field Type Menu](menuFtype.html)
|
||||
* [Invalid Value Output Action Menu](menuIvoa.html)
|
||||
* [Output Mode Select Menu](menuOmsl.html)
|
||||
* [Scan Menu](menuScan.html)
|
||||
* [Simulation Mode Menu](menuSimm.html)
|
||||
* [Yes/No Menu](menuYesNo.html)
|
||||
|
||||
## Corrections and Updates
|
||||
|
||||
Corrections to these documents can be submitted as patch files to the EPICS core
|
||||
developers, or as merge requests or pull requests to the 3.15 branch of Base.
|
||||
The document sources can be found in the `src/std/rec` and `src/ioc/db`
|
||||
directories in files with extension `.dbd.pod`. The documentation source format
|
||||
is a combination of the EPICS DBD file format with an extended version of Perl's
|
||||
POD (plain old documentation); run `perldoc pod` for details of POD.
|
||||
@@ -33,27 +33,29 @@
|
||||
<h1>EPICS Base Release Procedures & Checklist</h1>
|
||||
|
||||
<p>This document describes the procedures and provides a checklist of tasks
|
||||
that should be performed when creating production releases of EPICS Base.</p>
|
||||
that should be performed when creating new releases of EPICS Base.</p>
|
||||
|
||||
<h3>The Release Process</h3>
|
||||
|
||||
<p>The version released on the Feature Freeze date is designated the first
|
||||
pre-release, <tt>-pre1</tt>. The first release candidate <tt>-rc1</tt> is the
|
||||
pre-release, <tt>-pre1</tt>. The first Release Candidate <tt>-rc1</tt> is the
|
||||
first version that has undergone widespread testing and which has no known
|
||||
problems in it that are slated to be fixed in this release. New versions should
|
||||
be made at about weekly intervals during the testing and debugging period, and
|
||||
will be designated as either pre-release or release candidate versions by the
|
||||
Release Manager. After a release candidate has been available to the whole
|
||||
be made at 2-weekly intervals during the testing and debugging period, and will
|
||||
be designated as either pre-release versions or Release Candidates by the
|
||||
Release Manager. After a Release Candidate has been available to the whole
|
||||
community for testing for at least a week without any additional problems being
|
||||
reported or significant changes being committed, the branch can be designated as
|
||||
the final release version.</p>
|
||||
|
||||
<h3>Roles</h3>
|
||||
|
||||
<p>The following roles are used below:</p>
|
||||
<p>The following roles are required. The individuals named here have have been
|
||||
responsible for these tasks in the past and are expected to continue in the
|
||||
relevent roles unless the Release Manager designates otherwise:</p>
|
||||
|
||||
<dl>
|
||||
<dt><strong>Release Manager</strong> ()</dt>
|
||||
<dt><strong>Release Manager</strong> (Ralph Lange)</dt>
|
||||
<dd>Responsible for managing and tagging the release</dd>
|
||||
<dt><strong>Platform Developers</strong> (optional)</dt>
|
||||
<dd>Responsible for individual operating system platforms</dd>
|
||||
@@ -134,37 +136,33 @@ the final release version.</p>
|
||||
<td>Tag the module in Git, using these tag conventions:
|
||||
<ul>
|
||||
<li>
|
||||
<tt>R3.16.1-pre<i>n</i></tt>
|
||||
<tt>R3.15.8-pre1</tt>
|
||||
— pre-release tag
|
||||
</li>
|
||||
<li>
|
||||
<tt>R3.16.1-rc<i>n</i></tt>
|
||||
<tt>R3.15.8-rc1</tt>
|
||||
— release candidate tag
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<blockquote><tt>
|
||||
cd base-3.16<br />
|
||||
git tag -m 'ANJ: Tagged for 3.16.1-rc1' R3.16.1-rc1
|
||||
cd base-3.15<br />
|
||||
git tag -m 'ANJ: Tagged for 3.15.8-rc1' R3.15.8-rc1
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>Release Manager</td>
|
||||
<td>Export the tagged version into a tarfile. This command generates a
|
||||
gzipped tarfile directly from the repository, excluding those files and
|
||||
directories needed only for continuous integration:
|
||||
<td>Export the tagged version into a tarfile. The <tt>make-tar.sh</tt>
|
||||
script generates a gzipped tarfile directly from the tag, excluding the
|
||||
files and directories that are only used for continuous integration:
|
||||
<blockquote><tt>
|
||||
cd base-3.16<br />
|
||||
git archive
|
||||
--prefix=base-3.16.1-rc1/
|
||||
--output=../base-3.16.1-rc1.tar.gz
|
||||
R3.16.1-rc1
|
||||
configure documentation LICENSE Makefile README src startup
|
||||
cd base-3.15<br />
|
||||
git archive --prefix=base-3.15.8-rc1/ --output=base-3.15.8-rc1.tar.gz R3.15.8-rc1 configure documentation LICENSE Makefile README src startup
|
||||
</tt></blockquote>
|
||||
Create a GPG signature file of the tarfile as follows:
|
||||
<blockquote><tt>
|
||||
gpg --armor --sign --detach-sig base-3.16.1-rc1.tar.gz
|
||||
gpg --armor --sign --detach-sig base-3.15.8-rc1.tar.gz
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -258,7 +256,7 @@ the final release version.</p>
|
||||
<td> </td>
|
||||
<td>Release Manager</td>
|
||||
<td>Obtain a positive <q>Ok to release</q> from all platform developers
|
||||
once a release candidate version has gone a whole week without any
|
||||
once a Release Candidate version has gone a whole week without any
|
||||
issues being reported.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -275,28 +273,23 @@ the final release version.</p>
|
||||
<td>Release Manager</td>
|
||||
<td>Tag the module in Git:
|
||||
<blockquote><tt>
|
||||
cd base-3.16<br />
|
||||
git tag -m 'ANJ: Tagged for 3.16.1' R3.16.1</i>
|
||||
cd base-3.15<br />
|
||||
git tag -m 'ANJ: Tagged for 3.15.8' R3.15.8
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>Release Manager</td>
|
||||
<td>Export the tagged version into a tarfile. This command generates a
|
||||
gzipped tarfile directly from the repository, excluding those files and
|
||||
directories needed only for continuous integration:
|
||||
<td>Export the tagged version into a tarfile. Note that this command
|
||||
generates a gzipped tarfile directly from the repository:
|
||||
<blockquote><tt>
|
||||
cd base-3.16<br />
|
||||
git archive
|
||||
--prefix=base-3.16.1/
|
||||
--output=../base-3.16.1.tar.gz
|
||||
R3.16.1
|
||||
configure documentation LICENSE Makefile README src startup
|
||||
cd base-3.15<br />
|
||||
git archive --prefix=base-3.15.8/ --output=base-3.15.8.tar.gz R3.15.8 configure documentation LICENSE Makefile README src startup
|
||||
</tt></blockquote>
|
||||
Create a GPG signature file of the tarfile as follows:
|
||||
<blockquote><tt>
|
||||
gpg --armor --sign --detach-sig base-3.16.1.tar.gz
|
||||
gpg --armor --sign --detach-sig base-3.15.8.tar.gz
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# 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 the file LICENSE that is included with this distribution.
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
TOP = ..
|
||||
@@ -72,11 +72,9 @@ std_DEPEND_DIRS = ioc libCom/RTEMS
|
||||
DIRS += std/filters/test
|
||||
std/filters/test_DEPEND_DIRS = std
|
||||
|
||||
DIRS += std/link/test
|
||||
std/link/test_DEPEND_DIRS = std
|
||||
|
||||
DIRS += std/rec/test
|
||||
std/rec/test_DEPEND_DIRS = std
|
||||
|
||||
|
||||
include $(TOP)/configure/RULES_DIRS
|
||||
|
||||
|
||||
@@ -314,21 +314,11 @@ is used.</p>
|
||||
<td>i >= 16384</td>
|
||||
<td>16384</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EPICS_CA_AUTO_ARRAY_BYTES</td>
|
||||
<td>{YES, NO}</td>
|
||||
<td>YES</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EPICS_CA_MAX_SEARCH_PERIOD</td>
|
||||
<td>r > 60 seconds</td>
|
||||
<td>300</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EPICS_CA_MCAST_TTL</td>
|
||||
<td>r > 1</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EPICS_TS_MIN_WEST</td>
|
||||
<td>-720 < i <720 minutes</td>
|
||||
@@ -756,12 +746,6 @@ in the variable EPICS_TS_MIN_WEST.</p>
|
||||
|
||||
<h3><a name="Configurin1">Configuring the Maximum Array Size</a></h3>
|
||||
|
||||
<p>From version R3.16.1, the default setting of EPICS_CA_AUTO_ARRAY_BYTES=YES
|
||||
will cause the software to ignore EPICS_CA_MAX_ARRAY_BYTES and attempt to
|
||||
allocate network buffer space as needed by the particular client connection
|
||||
using malloc. Setting EPICS_CA_AUTO_ARRAY_BYTES=NO will configure the software
|
||||
to respect the EPICS_CA_MAX_ARRAY_BYTES setting as described below instead.</p>
|
||||
|
||||
<p>Starting with version R3.14 the environment variable
|
||||
EPICS_CA_MAX_ARRAY_BYTES determines the size of the largest array that may pass
|
||||
through CA. Prior to this version only arrays smaller than 16k bytes could be
|
||||
@@ -784,7 +768,11 @@ array larger than EPICS_CA_MAX_ARRAY_BYTES it will return ECA_TOLARGE.</p>
|
||||
by multiplying the number of elements by the size of a single element, but
|
||||
neglect to add additional bytes for the compound data types (for example
|
||||
DBR_GR_DOUBLE) commonly used by the more sophisticated client side
|
||||
applications.</p>
|
||||
applications. <em>Based on this confusion, one could arrive at the conclusion
|
||||
that EPICS_CA_MAX_ARRAY_BYTES might have been better named
|
||||
EPICS_CA_MAX_DATUM_BYTES, or that the software should be changed internally to
|
||||
round the users request up by the size of the maximum scalar datum (nothing has
|
||||
been done to address this issue so far).</em></p>
|
||||
|
||||
<h3><a name="Configurin2">Configuring a CA Server</a></h3>
|
||||
|
||||
@@ -3149,7 +3137,8 @@ indicating the current state of the channel.</p>
|
||||
<dl>
|
||||
<dt><code>COUNT</code></dt>
|
||||
<dd>The element count to be read from the specified channel. A count of
|
||||
zero means use the current element count from the server.</dd>
|
||||
zero means use the current element count from the server, effectively
|
||||
resulting in a variable size array subscription.</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>CHID</code></dt>
|
||||
|
||||
@@ -69,6 +69,7 @@ LIBSRCS += comQueSend.cpp
|
||||
LIBSRCS += comBuf.cpp
|
||||
LIBSRCS += hostNameCache.cpp
|
||||
LIBSRCS += msgForMultiplyDefinedPV.cpp
|
||||
LIBSRCS_vxWorks += templateInstances.cpp
|
||||
|
||||
LIBRARY=ca
|
||||
|
||||
|
||||
94
src/ca/client/autoPtrDestroy.h
Normal file
94
src/ca/client/autoPtrDestroy.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, 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
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
* Copyright, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#ifndef autoPtrDestroyh
|
||||
#define autoPtrDestroyh
|
||||
|
||||
template < class T >
|
||||
class autoPtrDestroy {
|
||||
public:
|
||||
autoPtrDestroy ( T * );
|
||||
~autoPtrDestroy ();
|
||||
T & operator * () const;
|
||||
T * operator -> () const;
|
||||
autoPtrDestroy<T> & operator = ( T * );
|
||||
T * get () const;
|
||||
T * release ();
|
||||
private:
|
||||
T * p;
|
||||
// not implemented
|
||||
autoPtrDestroy<T> & operator = ( const autoPtrDestroy<T> & );
|
||||
autoPtrDestroy ( const autoPtrDestroy<T> & );
|
||||
};
|
||||
|
||||
template < class T >
|
||||
inline autoPtrDestroy<T>::autoPtrDestroy ( T *pIn ) :
|
||||
p ( pIn ) {}
|
||||
|
||||
template < class T >
|
||||
inline autoPtrDestroy<T>::~autoPtrDestroy ()
|
||||
{
|
||||
if ( this->p ) {
|
||||
this->p->destroy ();
|
||||
}
|
||||
}
|
||||
|
||||
template < class T >
|
||||
inline T & autoPtrDestroy<T>::operator * () const
|
||||
{
|
||||
return * this->p;
|
||||
}
|
||||
|
||||
template < class T >
|
||||
inline T * autoPtrDestroy<T>::operator -> () const
|
||||
{
|
||||
return this->p;
|
||||
}
|
||||
|
||||
template < class T >
|
||||
inline autoPtrDestroy<T> & autoPtrDestroy<T>::operator = ( T * pIn )
|
||||
{
|
||||
if ( this->p ) {
|
||||
this->p->destroy ();
|
||||
}
|
||||
this->p = pIn;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template < class T >
|
||||
inline T * autoPtrDestroy<T>::get () const
|
||||
{
|
||||
return this->p;
|
||||
}
|
||||
|
||||
template < class T >
|
||||
inline T * autoPtrDestroy<T>::release ()
|
||||
{
|
||||
T *pTmp = this->p;
|
||||
this->p = 0;
|
||||
return pTmp;
|
||||
}
|
||||
|
||||
#endif // #ifdef autoPtrDestroyh
|
||||
@@ -28,8 +28,7 @@
|
||||
#define CA_VERSION_STRING( MINOR_REVISION ) \
|
||||
( capStrOfX ( CA_MAJOR_PROTOCOL_REVISION ) "." capStrOfX ( MINOR_REVISION ) )
|
||||
#define CA_UKN_MINOR_VERSION 0u /* unknown minor version */
|
||||
#define CA_MINIMUM_SUPPORTED_VERSION 4u
|
||||
# define CA_VSUPPORTED(MINOR) ((MINOR)>=CA_MINIMUM_SUPPORTED_VERSION)
|
||||
#if CA_MAJOR_PROTOCOL_REVISION == 4u
|
||||
# define CA_V41(MINOR) ((MINOR)>=1u)
|
||||
# define CA_V42(MINOR) ((MINOR)>=2u)
|
||||
# define CA_V43(MINOR) ((MINOR)>=3u)
|
||||
@@ -43,6 +42,35 @@
|
||||
# define CA_V411(MINOR) ((MINOR)>=11u) /* sequence numbers in UDP version command */
|
||||
# define CA_V412(MINOR) ((MINOR)>=12u) /* TCP-based search requests */
|
||||
# define CA_V413(MINOR) ((MINOR)>=13u) /* Allow zero length in requests. */
|
||||
#elif CA_MAJOR_PROTOCOL_REVISION > 4u
|
||||
# define CA_V41(MINOR) ( 1u )
|
||||
# define CA_V42(MINOR) ( 1u )
|
||||
# define CA_V43(MINOR) ( 1u )
|
||||
# define CA_V44(MINOR) ( 1u )
|
||||
# define CA_V45(MINOR) ( 1u )
|
||||
# define CA_V46(MINOR) ( 1u )
|
||||
# define CA_V47(MINOR) ( 1u )
|
||||
# define CA_V48(MINOR) ( 1u )
|
||||
# define CA_V49(MINOR) ( 1u )
|
||||
# define CA_V410(MINOR) ( 1u )
|
||||
# define CA_V411(MINOR) ( 1u )
|
||||
# define CA_V412(MINOR) ( 1u )
|
||||
# define CA_V413(MINOR) ( 1u )
|
||||
#else
|
||||
# define CA_V41(MINOR) ( 0u )
|
||||
# define CA_V42(MINOR) ( 0u )
|
||||
# define CA_V43(MINOR) ( 0u )
|
||||
# define CA_V44(MINOR) ( 0u )
|
||||
# define CA_V45(MINOR) ( 0u )
|
||||
# define CA_V46(MINOR) ( 0u )
|
||||
# define CA_V47(MINOR) ( 0u )
|
||||
# define CA_V48(MINOR) ( 0u )
|
||||
# define CA_V49(MINOR) ( 0u )
|
||||
# define CA_V410(MINOR) ( 0u )
|
||||
# define CA_V411(MINOR) ( 0u )
|
||||
# define CA_V412(MINOR) ( 0u )
|
||||
# define CA_V413(MINOR) ( 0u )
|
||||
#endif
|
||||
|
||||
/*
|
||||
* These port numbers are only used if the CA repeater and
|
||||
|
||||
@@ -32,10 +32,12 @@
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
#include "epicsAssert.h"
|
||||
#include "osiUnistd.h"
|
||||
#include "udpiiu.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
chdir ( "/" );
|
||||
ca_repeater ();
|
||||
return ( 0 );
|
||||
}
|
||||
|
||||
@@ -45,20 +45,12 @@ static epicsThreadOnceId cacOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
const unsigned ca_client_context :: flushBlockThreshold = 0x58000;
|
||||
|
||||
extern "C" void cacExitHandler ( void *)
|
||||
{
|
||||
epicsThreadPrivateDelete ( caClientCallbackThreadId );
|
||||
caClientCallbackThreadId = 0;
|
||||
delete ca_client_context::pDefaultServiceInstallMutex;
|
||||
}
|
||||
|
||||
// runs once only for each process
|
||||
extern "C" void cacOnceFunc ( void * )
|
||||
{
|
||||
caClientCallbackThreadId = epicsThreadPrivateCreate ();
|
||||
assert ( caClientCallbackThreadId );
|
||||
ca_client_context::pDefaultServiceInstallMutex = newEpicsMutex;
|
||||
epicsAtExit ( cacExitHandler,0 );
|
||||
}
|
||||
|
||||
extern epicsThreadPrivateId caClientContextId;
|
||||
@@ -159,7 +151,7 @@ ca_client_context::ca_client_context ( bool enablePreemptiveCallback ) :
|
||||
this->localPort = htons ( tmpAddr.ia.sin_port );
|
||||
}
|
||||
|
||||
std::auto_ptr < CallbackGuard > pCBGuard;
|
||||
epics_auto_ptr < CallbackGuard > pCBGuard;
|
||||
if ( ! enablePreemptiveCallback ) {
|
||||
pCBGuard.reset ( new CallbackGuard ( this->cbMutex ) );
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "envDefs.h"
|
||||
#include "locationException.h"
|
||||
#include "errlog.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "addrList.h"
|
||||
@@ -219,15 +218,9 @@ cac::cac (
|
||||
throw std::bad_alloc ();
|
||||
}
|
||||
|
||||
int autoMaxBytes;
|
||||
if(envGetBoolConfigParam(&EPICS_CA_AUTO_ARRAY_BYTES, &autoMaxBytes))
|
||||
autoMaxBytes = 1;
|
||||
|
||||
if(!autoMaxBytes) {
|
||||
freeListInitPvt ( &this->tcpLargeRecvBufFreeList, this->maxRecvBytesTCP, 1 );
|
||||
if ( ! this->tcpLargeRecvBufFreeList ) {
|
||||
throw std::bad_alloc ();
|
||||
}
|
||||
freeListInitPvt ( &this->tcpLargeRecvBufFreeList, this->maxRecvBytesTCP, 1 );
|
||||
if ( ! this->tcpLargeRecvBufFreeList ) {
|
||||
throw std::bad_alloc ();
|
||||
}
|
||||
unsigned bufsPerArray = this->maxRecvBytesTCP / comBuf::capacityBytes ();
|
||||
if ( bufsPerArray > 1u ) {
|
||||
@@ -238,7 +231,9 @@ cac::cac (
|
||||
catch ( ... ) {
|
||||
osiSockRelease ();
|
||||
delete [] this->pUserName;
|
||||
freeListCleanup ( this->tcpSmallRecvBufFreeList );
|
||||
if ( this->tcpSmallRecvBufFreeList ) {
|
||||
freeListCleanup ( this->tcpSmallRecvBufFreeList );
|
||||
}
|
||||
if ( this->tcpLargeRecvBufFreeList ) {
|
||||
freeListCleanup ( this->tcpLargeRecvBufFreeList );
|
||||
}
|
||||
@@ -265,14 +260,9 @@ cac::cac (
|
||||
tcpiiu * piiu = NULL;
|
||||
SearchDestTCP * pdst = new SearchDestTCP ( *this, pNode->addr );
|
||||
this->registerSearchDest ( guard, * pdst );
|
||||
/* Initially assume that servers listed in EPICS_CA_NAME_SERVERS support at least minor
|
||||
* version 11. This causes tcpiiu to send the user and host name authentication
|
||||
* messages. When the actual Version message is received from the server it will
|
||||
* be overwrite this assumption.
|
||||
*/
|
||||
bool newIIU = findOrCreateVirtCircuit (
|
||||
guard, pNode->addr, cacChannel::priorityDefault,
|
||||
piiu, 11, pdst );
|
||||
piiu, CA_UKN_MINOR_VERSION, pdst );
|
||||
free ( pNode );
|
||||
if ( newIIU ) {
|
||||
piiu->start ( guard );
|
||||
@@ -328,9 +318,7 @@ cac::~cac ()
|
||||
}
|
||||
|
||||
freeListCleanup ( this->tcpSmallRecvBufFreeList );
|
||||
if ( this->tcpLargeRecvBufFreeList ) {
|
||||
freeListCleanup ( this->tcpLargeRecvBufFreeList );
|
||||
}
|
||||
freeListCleanup ( this->tcpLargeRecvBufFreeList );
|
||||
|
||||
delete [] this->pUserName;
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
class netWriteNotifyIO;
|
||||
class netReadNotifyIO;
|
||||
class netSubscription;
|
||||
class tcpiiu;
|
||||
|
||||
// used to control access to cac's recycle routines which
|
||||
// should only be indirectly invoked by CAC when its lock
|
||||
@@ -194,6 +193,12 @@ public:
|
||||
const char *pformat, va_list args ) const;
|
||||
double connectionTimeout ( epicsGuard < epicsMutex > & );
|
||||
|
||||
// buffer management
|
||||
char * allocateSmallBufferTCP ();
|
||||
void releaseSmallBufferTCP ( char * );
|
||||
unsigned largeBufferSizeTCP () const;
|
||||
char * allocateLargeBufferTCP ();
|
||||
void releaseLargeBufferTCP ( char * );
|
||||
unsigned maxContiguousFrames ( epicsGuard < epicsMutex > & ) const;
|
||||
|
||||
// misc
|
||||
@@ -350,8 +355,6 @@ private:
|
||||
|
||||
cac ( const cac & );
|
||||
cac & operator = ( const cac & );
|
||||
|
||||
friend class tcpiiu;
|
||||
};
|
||||
|
||||
inline const char * cac::userNamePointer () const
|
||||
@@ -382,6 +385,35 @@ inline void cac::attachToClientCtx ()
|
||||
this->notify.attachToClientCtx ();
|
||||
}
|
||||
|
||||
inline char * cac::allocateSmallBufferTCP ()
|
||||
{
|
||||
// this locks internally
|
||||
return ( char * ) freeListMalloc ( this->tcpSmallRecvBufFreeList );
|
||||
}
|
||||
|
||||
inline void cac::releaseSmallBufferTCP ( char *pBuf )
|
||||
{
|
||||
// this locks internally
|
||||
freeListFree ( this->tcpSmallRecvBufFreeList, pBuf );
|
||||
}
|
||||
|
||||
inline unsigned cac::largeBufferSizeTCP () const
|
||||
{
|
||||
return this->maxRecvBytesTCP;
|
||||
}
|
||||
|
||||
inline char * cac::allocateLargeBufferTCP ()
|
||||
{
|
||||
// this locks internally
|
||||
return ( char * ) freeListMalloc ( this->tcpLargeRecvBufFreeList );
|
||||
}
|
||||
|
||||
inline void cac::releaseLargeBufferTCP ( char *pBuf )
|
||||
{
|
||||
// this locks internally
|
||||
freeListFree ( this->tcpLargeRecvBufFreeList, pBuf );
|
||||
}
|
||||
|
||||
inline unsigned cac::beaconAnomaliesSinceProgramStart (
|
||||
epicsGuard < epicsMutex > & guard ) const
|
||||
{
|
||||
|
||||
@@ -58,7 +58,6 @@ protected:
|
||||
channelNode ();
|
||||
bool isInstalledInServer ( epicsGuard < epicsMutex > & ) const;
|
||||
bool isConnected ( epicsGuard < epicsMutex > & ) const;
|
||||
public:
|
||||
static unsigned getMaxSearchTimerCount ();
|
||||
private:
|
||||
enum channelState {
|
||||
|
||||
@@ -26,14 +26,13 @@
|
||||
#ifndef oldAccessh
|
||||
#define oldAccessh
|
||||
|
||||
#include <memory>
|
||||
|
||||
#ifdef epicsExportSharedSymbols
|
||||
# define oldAccessh_restore_epicsExportSharedSymbols
|
||||
# undef epicsExportSharedSymbols
|
||||
#endif
|
||||
|
||||
#include "tsFreeList.h"
|
||||
#include "epicsMemory.h"
|
||||
#include "compilerDependencies.h"
|
||||
#include "osiSock.h"
|
||||
|
||||
@@ -289,7 +288,6 @@ private:
|
||||
};
|
||||
|
||||
extern "C" void cacOnceFunc ( void * );
|
||||
extern "C" void cacExitHandler ( void *);
|
||||
|
||||
struct ca_client_context : public cacContextNotify
|
||||
{
|
||||
@@ -403,8 +401,8 @@ private:
|
||||
epicsEvent ioDone;
|
||||
epicsEvent callbackThreadActivityComplete;
|
||||
epicsThreadId createdByThread;
|
||||
std::auto_ptr < CallbackGuard > pCallbackGuard;
|
||||
std::auto_ptr < cacContext > pServiceContext;
|
||||
epics_auto_ptr < CallbackGuard > pCallbackGuard;
|
||||
epics_auto_ptr < cacContext > pServiceContext;
|
||||
caExceptionHandler * ca_exception_func;
|
||||
void * ca_exception_arg;
|
||||
caPrintfFunc * pVPrintfFunc;
|
||||
@@ -429,7 +427,6 @@ private:
|
||||
ca_client_context & operator = ( const ca_client_context & );
|
||||
|
||||
friend void cacOnceFunc ( void * );
|
||||
friend void cacExitHandler ( void *);
|
||||
static cacService * pDefaultService;
|
||||
static epicsMutex * pDefaultServiceInstallMutex;
|
||||
static const unsigned flushBlockThreshold;
|
||||
|
||||
@@ -8,6 +8,18 @@
|
||||
TOP=../../../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
ifdef T_A
|
||||
PERL_VERSION = $(shell $(PERL) ../perlConfig.pl version)
|
||||
PERL_ARCHNAME = $(shell $(PERL) ../perlConfig.pl archname)
|
||||
PERL_ARCHPATH := $(PERL_VERSION)/$(PERL_ARCHNAME)
|
||||
|
||||
PERL_ARCHLIB := $(shell $(PERL) ../perlConfig.pl archlib)
|
||||
PERL_h = $(PERL_ARCHLIB)/CORE/perl.h
|
||||
|
||||
EXTUTILS := $(shell $(PERL) ../perlConfig.pl privlib)/ExtUtils
|
||||
PERLBIN := $(shell $(PERL) ../perlConfig.pl bin)
|
||||
XSUBPP := $(firstword $(wildcard $(PERLBIN)/xsubpp $(EXTUTILS)/xsubpp))
|
||||
|
||||
# Special settings for Darwin:
|
||||
ifeq ($(OS_CLASS),Darwin)
|
||||
# Use hdepends command (not GNU compiler flags)
|
||||
@@ -18,22 +30,23 @@ ifeq ($(OS_CLASS),Darwin)
|
||||
# Perl loadable libraries on Darwin have funny names
|
||||
LOADABLE_SHRLIB_PREFIX =
|
||||
LOADABLE_SHRLIB_SUFFIX = .$(shell $(PERL) ../perlConfig.pl dlext)
|
||||
|
||||
ifeq ($(wildcard $(PERL_h)),)
|
||||
# Perl's headers moved in Mojave
|
||||
SDK_PATH := $(shell xcodebuild -version -sdk macosx Path)
|
||||
PERL_ARCHLIB := $(SDK_PATH)/$(PERL_ARCHLIB)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef T_A
|
||||
PERL_VERSION = $(shell $(PERL) ../perlConfig.pl version)
|
||||
PERL_ARCHNAME = $(shell $(PERL) ../perlConfig.pl archname)
|
||||
PERL_ARCHPATH := $(PERL_VERSION)/$(PERL_ARCHNAME)
|
||||
|
||||
EXTUTILS := $(shell $(PERL) ../perlConfig.pl privlib)/ExtUtils
|
||||
PERLBIN := $(shell $(PERL) ../perlConfig.pl bin)
|
||||
XSUBPP := $(firstword $(wildcard $(PERLBIN)/xsubpp $(EXTUTILS)/xsubpp))
|
||||
|
||||
ifeq ($(T_A),$(EPICS_HOST_ARCH)) # No cross-builds (wrong Perl!)
|
||||
ifeq ($(strip $(XSUBPP)),)
|
||||
$(warning Perl's xsubpp program was not found.)
|
||||
$(warning The Perl CA module will not be built.)
|
||||
else
|
||||
ifeq ($(T_A),$(EPICS_HOST_ARCH)) # No cross-builds (wrong Perl!)
|
||||
ifeq ($(wildcard $(PERL_h)),)
|
||||
$(warning Perl's C header files were not found.)
|
||||
$(warning The Perl CA module will not be built.)
|
||||
else
|
||||
ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),) # Doesn't build on WIN32
|
||||
LOADABLE_LIBRARY_HOST = Cap5
|
||||
|
||||
@@ -52,10 +65,11 @@ endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
Cap5_SRCS = Cap5.xs
|
||||
Cap5_LIBS = ca Com
|
||||
Cap5_INCLUDES = -I$(shell $(PERL) ../perlConfig.pl archlib)/CORE
|
||||
Cap5_INCLUDES = -I$(PERL_ARCHLIB)/CORE
|
||||
Cap5_CFLAGS = $(shell $(PERL) ../perlConfig.pl ccflags)
|
||||
|
||||
CLEANS += Cap5.c
|
||||
|
||||
@@ -66,8 +66,6 @@ void repeaterSubscribeTimer::shutdown (
|
||||
epicsTimerNotify::expireStatus repeaterSubscribeTimer::
|
||||
expire ( const epicsTime & /* currentTime */ )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->stateMutex );
|
||||
|
||||
static const unsigned nTriesToMsg = 50;
|
||||
if ( this->attempts > nTriesToMsg && ! this->once ) {
|
||||
callbackManager mgr ( this->ctxNotify, this->cbMutex );
|
||||
@@ -94,15 +92,12 @@ epicsTimerNotify::expireStatus repeaterSubscribeTimer::
|
||||
|
||||
void repeaterSubscribeTimer::show ( unsigned /* level */ ) const
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->stateMutex );
|
||||
|
||||
::printf ( "repeater subscribe timer: attempts=%u registered=%u once=%u\n",
|
||||
this->attempts, this->registered, this->once );
|
||||
}
|
||||
|
||||
void repeaterSubscribeTimer::confirmNotify ()
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->stateMutex );
|
||||
this->registered = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ private:
|
||||
repeaterTimerNotify & iiu;
|
||||
epicsMutex & cbMutex;
|
||||
cacContextNotify & ctxNotify;
|
||||
mutable epicsMutex stateMutex;
|
||||
unsigned attempts;
|
||||
bool registered;
|
||||
bool once;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
#include "tsMinMax.h"
|
||||
#include "envDefs.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
@@ -690,7 +687,7 @@ tcpiiu::tcpiiu (
|
||||
curDataBytes ( 0ul ),
|
||||
comBufMemMgr ( comBufMemMgrIn ),
|
||||
cacRef ( cac ),
|
||||
pCurData ( (char*) freeListMalloc(this->cacRef.tcpSmallRecvBufFreeList) ),
|
||||
pCurData ( cac.allocateSmallBufferTCP () ),
|
||||
pSearchDest ( pSearchDestIn ),
|
||||
mutex ( mutexIn ),
|
||||
cbMutex ( cbMutexIn ),
|
||||
@@ -714,12 +711,9 @@ tcpiiu::tcpiiu (
|
||||
socketHasBeenClosed ( false ),
|
||||
unresponsiveCircuit ( false )
|
||||
{
|
||||
if(!pCurData)
|
||||
throw std::bad_alloc();
|
||||
|
||||
this->sock = epicsSocketCreate ( AF_INET, SOCK_STREAM, IPPROTO_TCP );
|
||||
if ( this->sock == INVALID_SOCKET ) {
|
||||
freeListFree(this->cacRef.tcpSmallRecvBufFreeList, this->pCurData);
|
||||
cac.releaseSmallBufferTCP ( this->pCurData );
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString (
|
||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
@@ -1029,14 +1023,11 @@ tcpiiu :: ~tcpiiu ()
|
||||
|
||||
// free message body cache
|
||||
if ( this->pCurData ) {
|
||||
if ( this->curDataMax <= MAX_TCP ) {
|
||||
freeListFree(this->cacRef.tcpSmallRecvBufFreeList, this->pCurData);
|
||||
}
|
||||
else if ( this->cacRef.tcpLargeRecvBufFreeList ) {
|
||||
freeListFree(this->cacRef.tcpLargeRecvBufFreeList, this->pCurData);
|
||||
if ( this->curDataMax == MAX_TCP ) {
|
||||
this->cacRef.releaseSmallBufferTCP ( this->pCurData );
|
||||
}
|
||||
else {
|
||||
free ( this->pCurData );
|
||||
this->cacRef.releaseLargeBufferTCP ( this->pCurData );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1206,46 +1197,18 @@ bool tcpiiu::processIncoming (
|
||||
// make sure we have a large enough message body cache
|
||||
//
|
||||
if ( this->curMsg.m_postsize > this->curDataMax ) {
|
||||
assert (this->curMsg.m_postsize > MAX_TCP);
|
||||
|
||||
char * newbuf = NULL;
|
||||
arrayElementCount newsize;
|
||||
|
||||
if ( !this->cacRef.tcpLargeRecvBufFreeList ) {
|
||||
// round size up to multiple of 4K
|
||||
newsize = ((this->curMsg.m_postsize-1)|0xfff)+1;
|
||||
|
||||
if ( this->curDataMax <= MAX_TCP ) {
|
||||
// small -> large
|
||||
newbuf = (char*)malloc(newsize);
|
||||
|
||||
} else {
|
||||
// expand large to larger
|
||||
newbuf = (char*)realloc(this->pCurData, newsize);
|
||||
if ( this->curDataMax == MAX_TCP &&
|
||||
this->cacRef.largeBufferSizeTCP() >= this->curMsg.m_postsize ) {
|
||||
char * pBuf = this->cacRef.allocateLargeBufferTCP ();
|
||||
if ( pBuf ) {
|
||||
this->cacRef.releaseSmallBufferTCP ( this->pCurData );
|
||||
this->pCurData = pBuf;
|
||||
this->curDataMax = this->cacRef.largeBufferSizeTCP ();
|
||||
}
|
||||
|
||||
} else if ( this->curMsg.m_postsize <= this->cacRef.maxRecvBytesTCP ) {
|
||||
newbuf = (char*) freeListMalloc(this->cacRef.tcpLargeRecvBufFreeList);
|
||||
newsize = this->cacRef.maxRecvBytesTCP;
|
||||
|
||||
}
|
||||
|
||||
if ( newbuf) {
|
||||
if (this->curDataMax <= MAX_TCP) {
|
||||
freeListFree(this->cacRef.tcpSmallRecvBufFreeList, this->pCurData );
|
||||
|
||||
} else if (this->cacRef.tcpLargeRecvBufFreeList) {
|
||||
freeListFree(this->cacRef.tcpLargeRecvBufFreeList, this->pCurData );
|
||||
|
||||
} else {
|
||||
// called realloc()
|
||||
else {
|
||||
this->printFormated ( mgr.cbGuard,
|
||||
"CAC: not enough memory for message body cache (ignoring response message)\n");
|
||||
}
|
||||
this->pCurData = newbuf;
|
||||
this->curDataMax = newsize;
|
||||
|
||||
} else {
|
||||
this->printFormated ( mgr.cbGuard,
|
||||
"CAC: not enough memory for message body cache (ignoring response message)\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1463,7 +1426,7 @@ void tcpiiu::readNotifyRequest ( epicsGuard < epicsMutex > & guard,
|
||||
}
|
||||
arrayElementCount maxBytes;
|
||||
if ( CA_V49 ( this->minorProtocolVersion ) ) {
|
||||
maxBytes = 0xfffffff0;
|
||||
maxBytes = this->cacRef.largeBufferSizeTCP ();
|
||||
}
|
||||
else {
|
||||
maxBytes = MAX_TCP;
|
||||
@@ -1574,7 +1537,7 @@ void tcpiiu::subscriptionRequest (
|
||||
guard, CA_V413(this->minorProtocolVersion) );
|
||||
arrayElementCount maxBytes;
|
||||
if ( CA_V49 ( this->minorProtocolVersion ) ) {
|
||||
maxBytes = 0xfffffff0;
|
||||
maxBytes = this->cacRef.largeBufferSizeTCP ();
|
||||
}
|
||||
else {
|
||||
maxBytes = MAX_TCP;
|
||||
@@ -1621,7 +1584,7 @@ void tcpiiu::subscriptionUpdateRequest (
|
||||
guard, CA_V413(this->minorProtocolVersion) );
|
||||
arrayElementCount maxBytes;
|
||||
if ( CA_V49 ( this->minorProtocolVersion ) ) {
|
||||
maxBytes = 0xfffffff0;
|
||||
maxBytes = this->cacRef.largeBufferSizeTCP ();
|
||||
}
|
||||
else {
|
||||
maxBytes = MAX_TCP;
|
||||
|
||||
89
src/ca/client/templateInstances.cpp
Normal file
89
src/ca/client/templateInstances.cpp
Normal file
@@ -0,0 +1,89 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, 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
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "virtualCircuit.h"
|
||||
#include "bhe.h"
|
||||
#include "cac.h"
|
||||
#include "syncGroup.h"
|
||||
#include "nciu.h"
|
||||
#include "udpiiu.h"
|
||||
#include "oldAccess.h"
|
||||
#include "msgForMultiplyDefinedPV.h"
|
||||
#include "repeaterClient.h"
|
||||
#include "hostNameCache.h"
|
||||
#include "comBuf.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning ( push )
|
||||
# pragma warning ( disable:4660 )
|
||||
#endif
|
||||
|
||||
template class resTable < nciu, chronIntId >;
|
||||
template class chronIntIdResTable < nciu >;
|
||||
template class resTable < baseNMIU, chronIntId >;
|
||||
template class chronIntIdResTable < baseNMIU >;
|
||||
template class resTable < CASG, chronIntId >;
|
||||
template class chronIntIdResTable < CASG >;
|
||||
template class resTable < bhe, inetAddrID >;
|
||||
template class resTable < tcpiiu, caServerID >;
|
||||
template class tsFreeList < bhe, 0x100 >;
|
||||
template class tsFreeList < tcpiiu, 32, epicsMutexNOOP >;
|
||||
template class tsFreeList < netReadNotifyIO, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < netWriteNotifyIO, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < netSubscription, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < CASG, 128, epicsMutexNOOP >;
|
||||
template class tsFreeList < syncGroupReadNotify, 128, epicsMutexNOOP >;
|
||||
template class tsFreeList < syncGroupWriteNotify, 128, epicsMutexNOOP >;
|
||||
template class tsFreeList < comBuf, 0x20 >;
|
||||
template class tsFreeList < getCallback, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < getCopy, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < msgForMultiplyDefinedPV, 16 >;
|
||||
template class tsFreeList < nciu, 1024, epicsMutexNOOP>;
|
||||
template class tsFreeList < oldChannelNotify, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < oldSubscription, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < putCallback, 1024, epicsMutexNOOP >;
|
||||
template class tsFreeList < repeaterClient, 0x20 >;
|
||||
template class epicsSingleton < localHostName >;
|
||||
template class epics_auto_ptr < epics_auto_ptr < class searchTimer >, eapt_array >;
|
||||
template unsigned comBuf :: push ( const double * pValue, unsigned nElem );
|
||||
template unsigned comBuf :: push ( const float * pValue, unsigned nElem );
|
||||
template unsigned comBuf :: push ( const int * pValue, unsigned nElem );
|
||||
template unsigned comBuf :: push ( const short * pValue, unsigned nElem );
|
||||
template comBuf :: popStatus comBuf :: pop ( unsigned int & returnVal );
|
||||
template comBuf :: popStatus comBuf :: pop ( unsigned short & returnVal );
|
||||
template comBuf :: popStatus comBuf :: pop ( unsigned char & returnVal );
|
||||
template void WireSet ( float const &, unsigned char * );
|
||||
template void WireSet ( int const &, unsigned char * );
|
||||
template void WireSet ( short const &, unsigned char * );
|
||||
template void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO
|
||||
(epicsGuard < epicsMutex > &, syncGroupWriteNotify & );
|
||||
template void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO
|
||||
( epicsGuard < epicsMutex > &, syncGroupReadNotify & );
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning ( pop )
|
||||
#endif
|
||||
@@ -138,7 +138,14 @@ static void connection_handler ( struct connection_handler_args args )
|
||||
pv *ppv = ( pv * ) ca_puser ( args.chid );
|
||||
if ( args.op == CA_OP_CONN_UP ) {
|
||||
nConn++;
|
||||
if (!ppv->onceConnected) {
|
||||
|
||||
if (ppv->onceConnected && ppv->dbfType != ca_field_type(ppv->chid)) {
|
||||
/* Data type has changed. Rebuild connection with new type. */
|
||||
ca_clear_subscription(ppv->evid);
|
||||
ppv->evid = NULL;
|
||||
}
|
||||
|
||||
if (!ppv->evid) {
|
||||
ppv->onceConnected = 1;
|
||||
/* Set up pv structure */
|
||||
/* ------------------- */
|
||||
@@ -169,7 +176,7 @@ static void connection_handler ( struct connection_handler_args args )
|
||||
eventMask,
|
||||
event_handler,
|
||||
(void*)ppv,
|
||||
NULL);
|
||||
&ppv->evid);
|
||||
}
|
||||
}
|
||||
else if ( args.op == CA_OP_CONN_DOWN ) {
|
||||
|
||||
@@ -78,6 +78,7 @@ typedef struct
|
||||
epicsTimeStamp tsPreviousS;
|
||||
char firstStampPrinted;
|
||||
char onceConnected;
|
||||
evid evid;
|
||||
} pv;
|
||||
|
||||
|
||||
|
||||
@@ -64,52 +64,6 @@ const udpiiu::pProtoStubUDP udpiiu::udpJumpTableCAC [] =
|
||||
&udpiiu::repeaterAckAction,
|
||||
};
|
||||
|
||||
|
||||
static
|
||||
double getMaxPeriod()
|
||||
{
|
||||
double maxPeriod = maxSearchPeriodDefault;
|
||||
|
||||
if ( envGetConfigParamPtr ( & EPICS_CA_MAX_SEARCH_PERIOD ) ) {
|
||||
long longStatus = envGetDoubleConfigParam (
|
||||
& EPICS_CA_MAX_SEARCH_PERIOD, & maxPeriod );
|
||||
if ( ! longStatus ) {
|
||||
if ( maxPeriod < maxSearchPeriodLowerLimit ) {
|
||||
epicsPrintf ( "\"%s\" out of range (low)\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name );
|
||||
maxPeriod = maxSearchPeriodLowerLimit;
|
||||
epicsPrintf ( "Setting \"%s\" = %f seconds\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name, maxPeriod );
|
||||
}
|
||||
}
|
||||
else {
|
||||
epicsPrintf ( "EPICS \"%s\" wasnt a real number\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name );
|
||||
epicsPrintf ( "Setting \"%s\" = %f seconds\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name, maxPeriod );
|
||||
}
|
||||
}
|
||||
|
||||
return maxPeriod;
|
||||
}
|
||||
|
||||
static
|
||||
unsigned getNTimers(double maxPeriod)
|
||||
{
|
||||
unsigned nTimers = static_cast < unsigned > ( 1.0 + log ( maxPeriod / minRoundTripEstimate ) / log ( 2.0 ) );
|
||||
|
||||
if ( nTimers > channelNode::getMaxSearchTimerCount () ) {
|
||||
nTimers = channelNode::getMaxSearchTimerCount ();
|
||||
epicsPrintf ( "\"%s\" out of range (high)\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name );
|
||||
epicsPrintf ( "Setting \"%s\" = %f seconds\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name,
|
||||
(1<<(nTimers-1)) * minRoundTripEstimate );
|
||||
}
|
||||
|
||||
return nTimers;
|
||||
}
|
||||
|
||||
//
|
||||
// udpiiu::udpiiu ()
|
||||
//
|
||||
@@ -131,15 +85,14 @@ udpiiu::udpiiu (
|
||||
repeaterSubscribeTmr (
|
||||
m_repeaterTimerNotify, timerQueue, cbMutexIn, ctxNotifyIn ),
|
||||
govTmr ( *this, timerQueue, cacMutexIn ),
|
||||
maxPeriod ( getMaxPeriod() ),
|
||||
maxPeriod ( maxSearchPeriodDefault ),
|
||||
rtteMean ( minRoundTripEstimate ),
|
||||
rtteMeanDev ( 0 ),
|
||||
cacRef ( cac ),
|
||||
cbMutex ( cbMutexIn ),
|
||||
cacMutex ( cacMutexIn ),
|
||||
nTimers ( getNTimers(maxPeriod) ),
|
||||
ppSearchTmr ( nTimers ),
|
||||
nBytesInXmitBuf ( 0 ),
|
||||
nTimers ( 0 ),
|
||||
beaconAnomalyTimerIndex ( 0 ),
|
||||
sequenceNumber ( 0 ),
|
||||
lastReceivedSeqNo ( 0 ),
|
||||
@@ -151,13 +104,45 @@ udpiiu::udpiiu (
|
||||
lastReceivedSeqNoIsValid ( false )
|
||||
{
|
||||
cacGuard.assertIdenticalMutex ( cacMutex );
|
||||
|
||||
if ( envGetConfigParamPtr ( & EPICS_CA_MAX_SEARCH_PERIOD ) ) {
|
||||
long longStatus = envGetDoubleConfigParam (
|
||||
& EPICS_CA_MAX_SEARCH_PERIOD, & this->maxPeriod );
|
||||
if ( ! longStatus ) {
|
||||
if ( this->maxPeriod < maxSearchPeriodLowerLimit ) {
|
||||
epicsPrintf ( "\"%s\" out of range (low)\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name );
|
||||
this->maxPeriod = maxSearchPeriodLowerLimit;
|
||||
epicsPrintf ( "Setting \"%s\" = %f seconds\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name, this->maxPeriod );
|
||||
}
|
||||
}
|
||||
else {
|
||||
epicsPrintf ( "EPICS \"%s\" wasnt a real number\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name );
|
||||
epicsPrintf ( "Setting \"%s\" = %f seconds\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name, this->maxPeriod );
|
||||
}
|
||||
}
|
||||
|
||||
double powerOfTwo = log ( beaconAnomalySearchPeriod / minRoundTripEstimate ) / log ( 2.0 );
|
||||
double powerOfTwo = log ( this->maxPeriod / minRoundTripEstimate ) / log ( 2.0 );
|
||||
this->nTimers = static_cast < unsigned > ( powerOfTwo + 1.0 );
|
||||
if ( this->nTimers > channelNode::getMaxSearchTimerCount () ) {
|
||||
this->nTimers = channelNode::getMaxSearchTimerCount ();
|
||||
epicsPrintf ( "\"%s\" out of range (high)\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name );
|
||||
epicsPrintf ( "Setting \"%s\" = %f seconds\n",
|
||||
EPICS_CA_MAX_SEARCH_PERIOD.name,
|
||||
(1<<(this->nTimers-1)) * minRoundTripEstimate );
|
||||
}
|
||||
|
||||
powerOfTwo = log ( beaconAnomalySearchPeriod / minRoundTripEstimate ) / log ( 2.0 );
|
||||
this->beaconAnomalyTimerIndex = static_cast < unsigned > ( powerOfTwo + 1.0 );
|
||||
if ( this->beaconAnomalyTimerIndex >= this->nTimers ) {
|
||||
this->beaconAnomalyTimerIndex = this->nTimers - 1;
|
||||
}
|
||||
|
||||
this->ppSearchTmr.reset ( new epics_auto_ptr < class searchTimer > [ this->nTimers ] );
|
||||
for ( unsigned i = 0; i < this->nTimers; i++ ) {
|
||||
this->ppSearchTmr[i].reset (
|
||||
new searchTimer ( *this, timerQueue, i, cacMutexIn,
|
||||
@@ -191,22 +176,6 @@ udpiiu::udpiiu (
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef IP_MULTICAST_TTL
|
||||
{
|
||||
osiSockOptMcastTTL_t ttl;
|
||||
long val;
|
||||
if(envGetLongConfigParam(&EPICS_CA_MCAST_TTL, &val))
|
||||
val =1;
|
||||
ttl = val;
|
||||
if ( setsockopt(this->sock, IPPROTO_IP, IP_MULTICAST_TTL, (char*)&ttl, sizeof(ttl))) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString (
|
||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
errlogPrintf("CAC: failed to set mcast ttl %d\n", ttl);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int boolValue = true;
|
||||
int status = setsockopt ( this->sock, SOL_SOCKET, SO_BROADCAST,
|
||||
(char *) &boolValue, sizeof ( boolValue ) );
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#ifndef udpiiuh
|
||||
#define udpiiuh
|
||||
|
||||
#include <memory>
|
||||
|
||||
#ifdef epicsExportSharedSymbols
|
||||
# define udpiiuh_accessh_epicsExportSharedSymbols
|
||||
# undef epicsExportSharedSymbols
|
||||
@@ -34,7 +32,9 @@
|
||||
|
||||
#include "osiSock.h"
|
||||
#include "epicsThread.h"
|
||||
#include "epicsMemory.h"
|
||||
#include "epicsTime.h"
|
||||
#include "tsMinMax.h"
|
||||
#include "tsDLList.h"
|
||||
|
||||
#ifdef udpiiuh_accessh_epicsExportSharedSymbols
|
||||
@@ -160,24 +160,15 @@ private:
|
||||
repeaterSubscribeTimer repeaterSubscribeTmr;
|
||||
disconnectGovernorTimer govTmr;
|
||||
tsDLList < SearchDest > _searchDestList;
|
||||
const double maxPeriod;
|
||||
double maxPeriod;
|
||||
double rtteMean;
|
||||
double rtteMeanDev;
|
||||
cac & cacRef;
|
||||
epicsMutex & cbMutex;
|
||||
epicsMutex & cacMutex;
|
||||
const unsigned nTimers;
|
||||
struct SearchArray {
|
||||
typedef std::auto_ptr <searchTimer> value_type;
|
||||
value_type *arr;
|
||||
SearchArray(size_t n) : arr(new value_type[n]) {}
|
||||
~SearchArray() { delete[] arr; }
|
||||
value_type& operator[](size_t i) const { return arr[i]; }
|
||||
private:
|
||||
SearchArray(const SearchArray&);
|
||||
SearchArray& operator=(const SearchArray&);
|
||||
} ppSearchTmr;
|
||||
epics_auto_ptr < epics_auto_ptr < class searchTimer >, eapt_array > ppSearchTmr;
|
||||
unsigned nBytesInXmitBuf;
|
||||
unsigned nTimers;
|
||||
unsigned beaconAnomalyTimerIndex;
|
||||
ca_uint32_t sequenceNumber;
|
||||
ca_uint32_t lastReceivedSeqNo;
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
#ifndef virtualCircuith
|
||||
#define virtualCircuith
|
||||
|
||||
#include "epicsMemory.h"
|
||||
#include "tsDLList.h"
|
||||
#include "tsMinMax.h"
|
||||
|
||||
#include "comBuf.h"
|
||||
#include "caServerID.h"
|
||||
|
||||
@@ -68,7 +68,6 @@ CLEANS += $(COMMON_DIR)/aitConvertGenerated.cc
|
||||
|
||||
USR_CXXFLAGS_Linux = -fno-strict-aliasing
|
||||
USR_CXXFLAGS_RTEMS = -fno-strict-aliasing
|
||||
USR_CXXFLAGS_vxWorks = -fno-strict-aliasing
|
||||
|
||||
ifeq ($(T_A),$(EPICS_HOST_ARCH))
|
||||
# genApps and aitGen are needed to finish libgdd
|
||||
|
||||
@@ -53,6 +53,7 @@ LIBSRCS += outBuf.cc
|
||||
LIBSRCS += casCtx.cc
|
||||
LIBSRCS += casEventMask.cc
|
||||
LIBSRCS += ioBlocked.cc
|
||||
LIBSRCS += casBufferFactory.cc
|
||||
LIBSRCS += pvExistReturn.cc
|
||||
LIBSRCS += pvAttachReturn.cc
|
||||
LIBSRCS += caNetAddr.cc
|
||||
@@ -72,16 +73,14 @@ LIBSRCS += casDGIntfIO.cc
|
||||
LIBSRCS += casStreamIO.cc
|
||||
LIBSRCS += ipIgnoreEntry.cc
|
||||
|
||||
USR_CXXFLAGS_Linux = -fno-strict-aliasing
|
||||
USR_CXXFLAGS_RTEMS = -fno-strict-aliasing
|
||||
USR_CXXFLAGS_vxWorks = -fno-strict-aliasing
|
||||
|
||||
# There is a bug in some vxWorks compilers that these work around:
|
||||
ifeq ($(VXWORKS_VERSION)$(filter -mcpu=604,$(ARCH_DEP_CFLAGS)), 6.6-mcpu=604)
|
||||
casDGIntfOS_CXXFLAGS = -fno-inline
|
||||
casStreamOS_CXXFLAGS = -fno-inline
|
||||
endif
|
||||
|
||||
LIBSRCS_vxWorks += templateInstances.cpp
|
||||
|
||||
LIBRARY = cas
|
||||
cas_LIBS = ca gdd Com
|
||||
cas_SYS_LIBS_WIN32 = ws2_32
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
//
|
||||
|
||||
#include "directoryServer.h"
|
||||
#include "epicsAlgorithm.h"
|
||||
#include "tsMinMax.h"
|
||||
|
||||
const pvInfo *pvInfo::pFirst;
|
||||
|
||||
@@ -128,7 +128,7 @@ pvExistReturn directoryServer::pvExistTest
|
||||
}
|
||||
else {
|
||||
size_t diff = pLastStr-pPVName;
|
||||
diff = epicsMin (diff, sizeof(pvNameBuf)-1);
|
||||
diff = tsMin (diff, sizeof(pvNameBuf)-1);
|
||||
memcpy (pvNameBuf, pPVName, diff);
|
||||
pvNameBuf[diff] = '\0';
|
||||
pLastStr = pvNameBuf;
|
||||
|
||||
104
src/ca/legacy/pcas/generic/casBufferFactory.cpp
Normal file
104
src/ca/legacy/pcas/generic/casBufferFactory.cpp
Normal file
@@ -0,0 +1,104 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, 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
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#include <new>
|
||||
|
||||
#include "envDefs.h"
|
||||
#include "freeList.h"
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "clientBufMemoryManager.h"
|
||||
#include "caProto.h"
|
||||
|
||||
casBufferFactory::casBufferFactory () :
|
||||
smallBufFreeList ( 0 ), largeBufFreeList ( 0 ), largeBufferSizePriv ( 0u )
|
||||
{
|
||||
long maxBytesAsALong;
|
||||
long status = envGetLongConfigParam ( & EPICS_CA_MAX_ARRAY_BYTES, & maxBytesAsALong );
|
||||
if ( status || maxBytesAsALong < 0 ) {
|
||||
errlogPrintf ( "cas: EPICS_CA_MAX_ARRAY_BYTES was not a positive integer\n" );
|
||||
this->largeBufferSizePriv = MAX_TCP;
|
||||
}
|
||||
else {
|
||||
/* allow room for the protocol header so that they get the array size they requested */
|
||||
static const unsigned headerSize = sizeof ( caHdr ) + 2 * sizeof ( ca_uint32_t );
|
||||
ca_uint32_t maxBytes = ( unsigned ) maxBytesAsALong;
|
||||
if ( maxBytes < 0xffffffff - headerSize ) {
|
||||
maxBytes += headerSize;
|
||||
}
|
||||
else {
|
||||
maxBytes = 0xffffffff;
|
||||
}
|
||||
if ( maxBytes < MAX_TCP ) {
|
||||
errlogPrintf ( "cas: EPICS_CA_MAX_ARRAY_BYTES was rounded up to %u\n", MAX_TCP );
|
||||
this->largeBufferSizePriv = MAX_TCP;
|
||||
}
|
||||
else {
|
||||
this->largeBufferSizePriv = maxBytes;
|
||||
}
|
||||
}
|
||||
|
||||
freeListInitPvt ( & this->smallBufFreeList, MAX_MSG_SIZE, 8 );
|
||||
freeListInitPvt ( & this->largeBufFreeList, this->largeBufferSizePriv, 1 );
|
||||
}
|
||||
|
||||
casBufferFactory::~casBufferFactory ()
|
||||
{
|
||||
freeListCleanup ( this->smallBufFreeList );
|
||||
freeListCleanup ( this->largeBufFreeList );
|
||||
}
|
||||
|
||||
unsigned casBufferFactory::smallBufferSize () const
|
||||
{
|
||||
return MAX_MSG_SIZE;
|
||||
}
|
||||
|
||||
char * casBufferFactory::newSmallBuffer ()
|
||||
{
|
||||
void * pBuf = freeListCalloc ( this->smallBufFreeList );
|
||||
if ( ! pBuf ) {
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
return static_cast < char * > ( pBuf );
|
||||
}
|
||||
|
||||
void casBufferFactory::destroySmallBuffer ( char * pBuf )
|
||||
{
|
||||
if ( pBuf ) {
|
||||
freeListFree ( this->smallBufFreeList, pBuf );
|
||||
}
|
||||
}
|
||||
|
||||
unsigned casBufferFactory::largeBufferSize () const
|
||||
{
|
||||
return this->largeBufferSizePriv;
|
||||
}
|
||||
|
||||
char * casBufferFactory::newLargeBuffer ()
|
||||
{
|
||||
void * pBuf = freeListCalloc ( this->largeBufFreeList );
|
||||
if ( ! pBuf ) {
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
return static_cast < char * > ( pBuf );
|
||||
}
|
||||
|
||||
void casBufferFactory::destroyLargeBuffer ( char * pBuf )
|
||||
{
|
||||
if ( pBuf ) {
|
||||
freeListFree ( this->largeBufFreeList, pBuf );
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* Author Jeffrey O. Hill
|
||||
@@ -30,9 +30,9 @@ casDGClient::pCASMsgHandler const casDGClient::msgHandlers[] =
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::searchAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::searchAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
|
||||
@@ -51,7 +51,7 @@ casDGClient::pCASMsgHandler const casDGClient::msgHandlers[] =
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
& casDGClient::echoAction,
|
||||
& casDGClient::uknownMessageAction,
|
||||
|
||||
& casDGClient::uknownMessageAction,
|
||||
@@ -64,9 +64,9 @@ casDGClient::pCASMsgHandler const casDGClient::msgHandlers[] =
|
||||
//
|
||||
casDGClient::casDGClient ( caServerI & serverIn, clientBufMemoryManager & mgrIn ) :
|
||||
casCoreClient ( serverIn ),
|
||||
in ( *this, mgrIn, MAX_UDP_RECV + sizeof ( cadg ) ),
|
||||
in ( *this, mgrIn, MAX_UDP_RECV + sizeof ( cadg ) ),
|
||||
out ( *this, mgrIn ),
|
||||
seqNoOfReq ( 0 ),
|
||||
seqNoOfReq ( 0 ),
|
||||
minor_version_number ( 0 )
|
||||
{
|
||||
}
|
||||
@@ -92,12 +92,12 @@ void casDGClient::destroy()
|
||||
//
|
||||
void casDGClient::show (unsigned level) const
|
||||
{
|
||||
printf ( "casDGClient at %p\n",
|
||||
static_cast <const void *> ( this ) );
|
||||
printf ( "casDGClient at %p\n",
|
||||
static_cast <const void *> ( this ) );
|
||||
if (level>=1u) {
|
||||
char buf[64];
|
||||
this->hostName (buf, sizeof(buf));
|
||||
printf ("Client Host=%s\n", buf);
|
||||
printf ("Client Host=%s\n", buf);
|
||||
this->casCoreClient::show ( level - 1u );
|
||||
this->in.show ( level - 1u );
|
||||
this->out.show ( level - 1u );
|
||||
@@ -111,13 +111,11 @@ caStatus casDGClient::uknownMessageAction ()
|
||||
{
|
||||
const caHdrLargeArray * mp = this->ctx.getMsg();
|
||||
|
||||
if ( this->getCAS().getDebugLevel() > 3u ) {
|
||||
char pHostName[64u];
|
||||
this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) );
|
||||
char pHostName[64u];
|
||||
this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) );
|
||||
|
||||
caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(),
|
||||
"bad request code=%u in DG\n", mp->m_cmmd );
|
||||
}
|
||||
caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(),
|
||||
"bad request code=%u in DG\n", mp->m_cmmd );
|
||||
|
||||
return S_cas_badProtocol;
|
||||
}
|
||||
@@ -131,23 +129,13 @@ caStatus casDGClient::searchAction()
|
||||
const char *pChanName = static_cast <char * > ( this->ctx.getData() );
|
||||
caStatus status;
|
||||
|
||||
if (!CA_VSUPPORTED(mp->m_count)) {
|
||||
if ( this->getCAS().getDebugLevel() > 3u ) {
|
||||
char pHostName[64u];
|
||||
this->hostName ( pHostName, sizeof ( pHostName ) );
|
||||
printf ( "\"%s\" is searching for \"%s\" but is too old\n",
|
||||
pHostName, pChanName );
|
||||
}
|
||||
return S_cas_badProtocol;
|
||||
}
|
||||
|
||||
//
|
||||
// check the sanity of the message
|
||||
//
|
||||
if ( mp->m_postsize <= 1 ) {
|
||||
char pHostName[64u];
|
||||
this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) );
|
||||
caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(),
|
||||
caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(),
|
||||
"empty PV name extension in UDP search request?\n" );
|
||||
return S_cas_success;
|
||||
}
|
||||
@@ -155,19 +143,19 @@ caStatus casDGClient::searchAction()
|
||||
if ( pChanName[0] == '\0' ) {
|
||||
char pHostName[64u];
|
||||
this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) );
|
||||
caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(),
|
||||
caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(),
|
||||
"zero length PV name in UDP search request?\n" );
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
// check for an unterminated string before calling server tool
|
||||
// by searching backwards through the string (some early versions
|
||||
// by searching backwards through the string (some early versions
|
||||
// of the client library might not be setting the pad bytes to nill)
|
||||
for ( unsigned i = mp->m_postsize-1; pChanName[i] != '\0'; i-- ) {
|
||||
if ( i <= 1 ) {
|
||||
char pHostName[64u];
|
||||
this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) );
|
||||
caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(),
|
||||
caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(),
|
||||
"unterminated PV name in UDP search request?\n" );
|
||||
return S_cas_success;
|
||||
}
|
||||
@@ -176,7 +164,7 @@ caStatus casDGClient::searchAction()
|
||||
if ( this->getCAS().getDebugLevel() > 6u ) {
|
||||
char pHostName[64u];
|
||||
this->hostName ( pHostName, sizeof ( pHostName ) );
|
||||
printf ( "\"%s\" is searching for \"%s\"\n",
|
||||
printf ( "\"%s\" is searching for \"%s\"\n",
|
||||
pHostName, pChanName );
|
||||
}
|
||||
|
||||
@@ -195,7 +183,7 @@ caStatus casDGClient::searchAction()
|
||||
// ask the server tool if this PV exists
|
||||
//
|
||||
this->userStartedAsyncIO = false;
|
||||
pvExistReturn pver =
|
||||
pvExistReturn pver =
|
||||
this->getCAS()->pvExistTest ( this->ctx, this->lastRecvAddr, pChanName );
|
||||
|
||||
//
|
||||
@@ -205,7 +193,7 @@ caStatus casDGClient::searchAction()
|
||||
//
|
||||
if ( this->userStartedAsyncIO ) {
|
||||
if ( pver.getStatus() != pverAsyncCompletion ) {
|
||||
errMessage (S_cas_badParameter,
|
||||
errMessage (S_cas_badParameter,
|
||||
"- assuming asynch IO status from caServer::pvExistTest()");
|
||||
}
|
||||
status = S_cas_success;
|
||||
@@ -224,13 +212,13 @@ caStatus casDGClient::searchAction()
|
||||
break;
|
||||
|
||||
case pverAsyncCompletion:
|
||||
errMessage (S_cas_badParameter,
|
||||
errMessage (S_cas_badParameter,
|
||||
"- unexpected asynch IO status from caServer::pvExistTest() ignored");
|
||||
status = S_cas_success;
|
||||
break;
|
||||
|
||||
default:
|
||||
errMessage (S_cas_badParameter,
|
||||
errMessage (S_cas_badParameter,
|
||||
"- invalid return from caServer::pvExistTest() ignored");
|
||||
status = S_cas_success;
|
||||
break;
|
||||
@@ -242,18 +230,18 @@ caStatus casDGClient::searchAction()
|
||||
//
|
||||
// caStatus casDGClient::searchResponse()
|
||||
//
|
||||
caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg,
|
||||
caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg,
|
||||
const pvExistReturn & retVal )
|
||||
{
|
||||
caStatus status;
|
||||
|
||||
|
||||
if ( retVal.getStatus() != pverExistsHere ) {
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// starting with V4.1 the count field is used (abused)
|
||||
// by the client to store the minor version number of
|
||||
// by the client to store the minor version number of
|
||||
// the client.
|
||||
//
|
||||
// Old versions expect alloc of channel in response
|
||||
@@ -262,8 +250,8 @@ caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg,
|
||||
if ( !CA_V44(msg.m_count) ) {
|
||||
char pName[64u];
|
||||
this->hostName (pName, sizeof (pName));
|
||||
errlogPrintf (
|
||||
"client \"%s\" using EPICS R3.11 CA connect protocol was ignored\n",
|
||||
errlogPrintf (
|
||||
"client \"%s\" using EPICS R3.11 CA connect protocol was ignored\n",
|
||||
pName);
|
||||
//
|
||||
// old connect protocol was dropped when the
|
||||
@@ -276,19 +264,19 @@ caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg,
|
||||
}
|
||||
|
||||
//
|
||||
// cid field is abused to carry the IP
|
||||
// cid field is abused to carry the IP
|
||||
// address in CA_V48 or higher
|
||||
// (this allows a CA servers to serve
|
||||
// as a directory service)
|
||||
//
|
||||
// data type field is abused to carry the IP
|
||||
// data type field is abused to carry the IP
|
||||
// port number here CA_V44 or higher
|
||||
// (this allows multiple CA servers on one
|
||||
// host)
|
||||
//
|
||||
ca_uint32_t serverAddr;
|
||||
ca_uint16_t serverPort;
|
||||
if ( CA_V48( msg.m_count ) ) {
|
||||
if ( CA_V48( msg.m_count ) ) {
|
||||
struct sockaddr_in ina;
|
||||
if ( retVal.addrIsValid() ) {
|
||||
caNetAddr addr = retVal.getAddr();
|
||||
@@ -308,7 +296,7 @@ caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg,
|
||||
ina = addr.getSockIP();
|
||||
//
|
||||
// We dont fill in the servers address here
|
||||
// because the server was not bound to a particular
|
||||
// because the server was not bound to a particular
|
||||
// interface, and we would need to waste CPU performing
|
||||
// the following steps to determine the interface that
|
||||
// will be used:
|
||||
@@ -330,24 +318,24 @@ caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg,
|
||||
serverAddr = ~0U;
|
||||
serverPort = ntohs ( inetAddr.sin_port );
|
||||
}
|
||||
|
||||
|
||||
ca_uint16_t * pMinorVersion;
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
status = this->out.copyInHeader ( CA_PROTO_SEARCH,
|
||||
sizeof ( *pMinorVersion ), serverPort, 0,
|
||||
serverAddr, msg.m_available,
|
||||
status = this->out.copyInHeader ( CA_PROTO_SEARCH,
|
||||
sizeof ( *pMinorVersion ), serverPort, 0,
|
||||
serverAddr, msg.m_available,
|
||||
reinterpret_cast <void **> ( &pMinorVersion ) );
|
||||
//
|
||||
// Starting with CA V4.1 the minor version number
|
||||
// is appended to the end of each search reply.
|
||||
// This value is ignored by earlier clients.
|
||||
// This value is ignored by earlier clients.
|
||||
//
|
||||
if ( status == S_cas_success ) {
|
||||
AlignedWireRef < epicsUInt16 > tmp ( *pMinorVersion );
|
||||
tmp = CA_MINOR_PROTOCOL_REVISION;
|
||||
this->out.commitMsg ();
|
||||
}
|
||||
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -374,15 +362,6 @@ caStatus casDGClient::versionAction ()
|
||||
{
|
||||
const caHdrLargeArray * mp = this->ctx.getMsg();
|
||||
|
||||
if (!CA_VSUPPORTED(mp->m_count)) {
|
||||
if ( this->getCAS().getDebugLevel() > 3u ) {
|
||||
char pHostName[64u];
|
||||
this->hostName ( pHostName, sizeof ( pHostName ) );
|
||||
printf ( "\"%s\" is too old\n",
|
||||
pHostName );
|
||||
}
|
||||
return S_cas_badProtocol;
|
||||
}
|
||||
if ( mp->m_count != 0 ) {
|
||||
this->minor_version_number = static_cast <ca_uint16_t> ( mp->m_count );
|
||||
if ( CA_V411 ( mp->m_count ) ) {
|
||||
@@ -425,8 +404,8 @@ void casDGClient::sendBeacon ( ca_uint32_t beaconNumber )
|
||||
//
|
||||
// casDGClient::xSend()
|
||||
//
|
||||
outBufClient::flushCondition casDGClient::xSend ( char *pBufIn,
|
||||
bufSizeT nBytesToSend, bufSizeT & nBytesSent )
|
||||
outBufClient::flushCondition casDGClient::xSend ( char *pBufIn,
|
||||
bufSizeT nBytesToSend, bufSizeT & nBytesSent )
|
||||
{
|
||||
bufSizeT totalBytes = 0;
|
||||
while ( totalBytes < nBytesToSend ) {
|
||||
@@ -439,7 +418,7 @@ outBufClient::flushCondition casDGClient::xSend ( char *pBufIn,
|
||||
unsigned sizeDG = pHdr->cadg_nBytes - sizeof ( *pHdr );
|
||||
|
||||
if ( pHdr->cadg_addr.isValid() ) {
|
||||
outBufClient::flushCondition stat =
|
||||
outBufClient::flushCondition stat =
|
||||
this->osdSend ( pDG, sizeDG, pHdr->cadg_addr );
|
||||
if ( stat != outBufClient::flushProgress ) {
|
||||
break;
|
||||
@@ -476,7 +455,7 @@ inBufClient::fillCondition casDGClient::xRecv (char *pBufIn, bufSizeT nBytesToRe
|
||||
|
||||
while (pAfter-pCurBuf >= static_cast<int>(MAX_UDP_RECV+sizeof(cadg))) {
|
||||
pHdr = reinterpret_cast < cadg * > ( pCurBuf );
|
||||
stat = this->osdRecv ( reinterpret_cast < char * > ( pHdr + 1 ),
|
||||
stat = this->osdRecv ( reinterpret_cast < char * > ( pHdr + 1 ),
|
||||
MAX_UDP_RECV, parm, nDGBytesRecv, pHdr->cadg_addr);
|
||||
if (stat==casFillProgress) {
|
||||
pHdr->cadg_nBytes = nDGBytesRecv + sizeof(*pHdr);
|
||||
@@ -508,9 +487,9 @@ inBufClient::fillCondition casDGClient::xRecv (char *pBufIn, bufSizeT nBytesToRe
|
||||
// this results in many small UDP frames which unfortunately
|
||||
// isnt particularly efficient
|
||||
//
|
||||
caStatus casDGClient::asyncSearchResponse (
|
||||
caStatus casDGClient::asyncSearchResponse (
|
||||
epicsGuard < casClientMutex > &, const caNetAddr & outAddr,
|
||||
const caHdrLargeArray & msg, const pvExistReturn & retVal,
|
||||
const caHdrLargeArray & msg, const pvExistReturn & retVal,
|
||||
ca_uint16_t protocolRevision, ca_uint32_t sequenceNumber )
|
||||
{
|
||||
if ( retVal.getStatus() != pverExistsHere ) {
|
||||
@@ -518,7 +497,7 @@ caStatus casDGClient::asyncSearchResponse (
|
||||
}
|
||||
|
||||
void * pRaw;
|
||||
const outBufCtx outctx = this->out.pushCtx
|
||||
const outBufCtx outctx = this->out.pushCtx
|
||||
( sizeof(cadg), MAX_UDP_SEND, pRaw );
|
||||
if ( outctx.pushResult() != outBufCtx::pushCtxSuccess ) {
|
||||
return S_cas_sendBlocked;
|
||||
@@ -554,8 +533,8 @@ caStatus casDGClient::processDG ()
|
||||
{
|
||||
bufSizeT bytesLeft;
|
||||
caStatus status;
|
||||
|
||||
status = S_cas_success;
|
||||
|
||||
status = S_cas_success;
|
||||
while ( ( bytesLeft = this->in.bytesPresent() ) ) {
|
||||
bufSizeT dgInBytesConsumed;
|
||||
const cadg * pReqHdr = reinterpret_cast < cadg * > ( this->in.msgPtr () );
|
||||
@@ -582,9 +561,9 @@ caStatus casDGClient::processDG ()
|
||||
|
||||
// insert version header at the start of the reply message
|
||||
this->sendVersion ();
|
||||
|
||||
|
||||
cadg * pRespHdr = static_cast < cadg * > ( pRaw );
|
||||
|
||||
|
||||
//
|
||||
// select the next DG in the input stream and start processing it
|
||||
//
|
||||
@@ -614,7 +593,7 @@ caStatus casDGClient::processDG ()
|
||||
// a) it used all of the incoming DG or
|
||||
// b) it used all of the outgoing DG
|
||||
//
|
||||
// In either case commit the DG to the protocol stream and
|
||||
// In either case commit the DG to the protocol stream and
|
||||
// release the send lock
|
||||
//
|
||||
// if there are not additional messages passed the version header
|
||||
@@ -710,7 +689,7 @@ void casDGClient::hostName ( char *pBufIn, unsigned bufSizeIn ) const
|
||||
void casDGClient::sendVersion ()
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
caStatus status = this->out.copyInHeader ( CA_PROTO_VERSION, 0,
|
||||
caStatus status = this->out.copyInHeader ( CA_PROTO_VERSION, 0,
|
||||
0, CA_MINOR_PROTOCOL_REVISION, 0, 0, 0 );
|
||||
if ( ! status ) {
|
||||
this->out.commitMsg ();
|
||||
@@ -805,8 +784,8 @@ caStatus casDGClient::processMsg ()
|
||||
msgTmp.m_available = AlignedWireRef < epicsUInt32 > ( smallHdr.m_available );
|
||||
|
||||
if ( payloadSize & 0x7 ) {
|
||||
status = this->sendErr (
|
||||
& msgTmp, invalidResID, ECA_INTERNAL,
|
||||
status = this->sendErr (
|
||||
& msgTmp, invalidResID, ECA_INTERNAL,
|
||||
"CAS: Datagram request wasn't 8 byte aligned" );
|
||||
this->in.removeMsg ( bytesLeft );
|
||||
break;
|
||||
@@ -815,7 +794,7 @@ caStatus casDGClient::processMsg ()
|
||||
msgSize = hdrSize + payloadSize;
|
||||
if ( bytesLeft < msgSize ) {
|
||||
if ( msgSize > this->in.bufferSize() ) {
|
||||
status = this->sendErr ( & msgTmp, invalidResID, ECA_TOLARGE,
|
||||
status = this->sendErr ( & msgTmp, invalidResID, ECA_TOLARGE,
|
||||
"client's request didnt fit within the CA server's message buffer" );
|
||||
this->in.removeMsg ( bytesLeft );
|
||||
}
|
||||
@@ -827,7 +806,7 @@ caStatus casDGClient::processMsg ()
|
||||
if ( this->getCAS().getDebugLevel() > 5u ) {
|
||||
char pHostName[64u];
|
||||
this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) );
|
||||
caServerI::dumpMsg ( pHostName, "?",
|
||||
caServerI::dumpMsg ( pHostName, "?",
|
||||
& msgTmp, rawMP + hdrSize, 0 );
|
||||
}
|
||||
|
||||
@@ -835,7 +814,7 @@ caStatus casDGClient::processMsg ()
|
||||
|
||||
//
|
||||
// Reset the context to the default
|
||||
// (guarantees that previous message does not get mixed
|
||||
// (guarantees that previous message does not get mixed
|
||||
// up with the current message)
|
||||
//
|
||||
this->ctx.setChannel ( NULL );
|
||||
@@ -862,16 +841,16 @@ caStatus casDGClient::processMsg ()
|
||||
}
|
||||
catch ( std::exception & except ) {
|
||||
this->in.removeMsg ( this->in.bytesPresent() );
|
||||
this->sendErr (
|
||||
this->ctx.getMsg(), invalidResID, ECA_INTERNAL,
|
||||
this->sendErr (
|
||||
this->ctx.getMsg(), invalidResID, ECA_INTERNAL,
|
||||
"C++ exception \"%s\" in CA circuit server",
|
||||
except.what () );
|
||||
status = S_cas_internal;
|
||||
}
|
||||
catch (...) {
|
||||
this->in.removeMsg ( this->in.bytesPresent() );
|
||||
this->sendErr (
|
||||
this->ctx.getMsg(), invalidResID, ECA_INTERNAL,
|
||||
this->sendErr (
|
||||
this->ctx.getMsg(), invalidResID, ECA_INTERNAL,
|
||||
"unexpected C++ exception in CA datagram server" );
|
||||
status = S_cas_internal;
|
||||
}
|
||||
@@ -880,9 +859,9 @@ caStatus casDGClient::processMsg ()
|
||||
}
|
||||
|
||||
//
|
||||
// casDGClient::sendErr()
|
||||
// casDGClient::sendErr()
|
||||
//
|
||||
caStatus casDGClient::sendErr ( const caHdrLargeArray *curp,
|
||||
caStatus casDGClient::sendErr ( const caHdrLargeArray *curp,
|
||||
ca_uint32_t cid, const int reportedStatus, const char *pformat, ... )
|
||||
{
|
||||
unsigned stringSize;
|
||||
@@ -906,14 +885,14 @@ caStatus casDGClient::sendErr ( const caHdrLargeArray *curp,
|
||||
}
|
||||
|
||||
unsigned hdrSize = sizeof ( caHdr );
|
||||
if ( ( curp->m_postsize >= 0xffff || curp->m_count >= 0xffff ) &&
|
||||
if ( ( curp->m_postsize >= 0xffff || curp->m_count >= 0xffff ) &&
|
||||
CA_V49( this->minor_version_number ) ) {
|
||||
hdrSize += 2 * sizeof ( ca_uint32_t );
|
||||
}
|
||||
|
||||
caHdr * pReqOut;
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
caStatus status = this->out.copyInHeader ( CA_PROTO_ERROR,
|
||||
caStatus status = this->out.copyInHeader ( CA_PROTO_ERROR,
|
||||
hdrSize + stringSize, 0, 0, cid, reportedStatus,
|
||||
reinterpret_cast <void **> ( & pReqOut ) );
|
||||
if ( ! status ) {
|
||||
@@ -923,7 +902,7 @@ caStatus casDGClient::sendErr ( const caHdrLargeArray *curp,
|
||||
* copy back the request protocol
|
||||
* (in network byte order)
|
||||
*/
|
||||
if ( ( curp->m_postsize >= 0xffff || curp->m_count >= 0xffff ) &&
|
||||
if ( ( curp->m_postsize >= 0xffff || curp->m_count >= 0xffff ) &&
|
||||
CA_V49( this->minor_version_number ) ) {
|
||||
ca_uint32_t *pLW = ( ca_uint32_t * ) ( pReqOut + 1 );
|
||||
pReqOut->m_cmmd = htons ( curp->m_cmmd );
|
||||
@@ -968,7 +947,7 @@ caStatus casDGClient::echoAction ()
|
||||
void * pPayloadOut;
|
||||
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
caStatus status = this->out.copyInHeader ( mp->m_cmmd, mp->m_postsize,
|
||||
caStatus status = this->out.copyInHeader ( mp->m_cmmd, mp->m_postsize,
|
||||
mp->m_dataType, mp->m_count, mp->m_cid, mp->m_available,
|
||||
& pPayloadOut );
|
||||
if ( ! status ) {
|
||||
|
||||
@@ -205,7 +205,7 @@ caStatus casStrmClient :: processMsg ()
|
||||
if ( bytesLeft < msgSize ) {
|
||||
status = S_cas_success;
|
||||
if ( msgSize > this->in.bufferSize() ) {
|
||||
this->in.expandBuffer (msgSize);
|
||||
this->in.expandBuffer ();
|
||||
// msg to large - set up message drain
|
||||
if ( msgSize > this->in.bufferSize() ) {
|
||||
caServerI::dumpMsg ( this->pHostName, this->pUserName, & msgTmp, 0,
|
||||
@@ -338,16 +338,6 @@ caStatus casStrmClient::versionAction ( epicsGuard < casClientMutex > & )
|
||||
return S_cas_badProtocol;
|
||||
}
|
||||
|
||||
if (!CA_VSUPPORTED(mp->m_count)) {
|
||||
if ( this->getCAS().getDebugLevel() > 3u ) {
|
||||
char pHostName[64u];
|
||||
this->hostName ( pHostName, sizeof ( pHostName ) );
|
||||
printf ( "\"%s\" is too old\n",
|
||||
pHostName );
|
||||
}
|
||||
return S_cas_badProtocol;
|
||||
}
|
||||
|
||||
double tmp = mp->m_dataType - CA_PROTO_PRIORITY_MIN;
|
||||
tmp *= epicsThreadPriorityCAServerHigh - epicsThreadPriorityCAServerLow;
|
||||
tmp /= CA_PROTO_PRIORITY_MAX - CA_PROTO_PRIORITY_MIN;
|
||||
@@ -1277,14 +1267,6 @@ caStatus casStrmClient :: searchResponse (
|
||||
const pvExistReturn & retVal )
|
||||
{
|
||||
if ( retVal.getStatus() != pverExistsHere ) {
|
||||
if (msg.m_dataType == DOREPLY ) {
|
||||
long status = this->out.copyInHeader ( CA_PROTO_NOT_FOUND, 0,
|
||||
msg.m_dataType, msg.m_count, msg.m_cid, msg.m_available, 0 );
|
||||
|
||||
if ( status == S_cas_success ) {
|
||||
this->out.commitMsg ();
|
||||
}
|
||||
}
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
@@ -1380,16 +1362,6 @@ caStatus casStrmClient :: searchAction ( epicsGuard < casClientMutex > & guard )
|
||||
const char *pChanName = static_cast <char * > ( this->ctx.getData() );
|
||||
caStatus status;
|
||||
|
||||
if (!CA_VSUPPORTED(mp->m_count)) {
|
||||
if ( this->getCAS().getDebugLevel() > 3u ) {
|
||||
char pHostName[64u];
|
||||
this->hostName ( pHostName, sizeof ( pHostName ) );
|
||||
printf ( "\"%s\" is searching for \"%s\" but is too old\n",
|
||||
pHostName, pChanName );
|
||||
}
|
||||
return S_cas_badProtocol;
|
||||
}
|
||||
|
||||
//
|
||||
// check the sanity of the message
|
||||
//
|
||||
@@ -1459,10 +1431,13 @@ caStatus casStrmClient :: searchAction ( epicsGuard < casClientMutex > & guard )
|
||||
//
|
||||
switch ( pver.getStatus() ) {
|
||||
case pverExistsHere:
|
||||
case pverDoesNotExistHere:
|
||||
status = this->searchResponse ( guard, *mp, pver );
|
||||
break;
|
||||
|
||||
case pverDoesNotExistHere:
|
||||
status = S_cas_success;
|
||||
break;
|
||||
|
||||
case pverAsyncCompletion:
|
||||
errMessage ( S_cas_badParameter,
|
||||
"- unexpected asynch IO status from "
|
||||
|
||||
@@ -13,54 +13,42 @@
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "epicsAssert.h"
|
||||
#include "freeList.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "clientBufMemoryManager.h"
|
||||
#include "caProto.h"
|
||||
|
||||
clientBufMemoryManager::clientBufMemoryManager()
|
||||
:smallBufFreeList ( 0 )
|
||||
bufSizeT clientBufMemoryManager::maxSize () const
|
||||
{
|
||||
freeListInitPvt ( & this->smallBufFreeList, MAX_MSG_SIZE, 8 );
|
||||
}
|
||||
|
||||
clientBufMemoryManager::~clientBufMemoryManager()
|
||||
{
|
||||
freeListCleanup ( this->smallBufFreeList );
|
||||
return bufferFactory.largeBufferSize ();
|
||||
}
|
||||
|
||||
casBufferParm clientBufMemoryManager::allocate ( bufSizeT newMinSize )
|
||||
{
|
||||
casBufferParm parm;
|
||||
if ( newMinSize <= MAX_MSG_SIZE ) {
|
||||
parm.pBuf = (char*)freeListMalloc(this->smallBufFreeList);
|
||||
parm.bufSize = MAX_MSG_SIZE;
|
||||
if ( newMinSize <= bufferFactory.smallBufferSize () ) {
|
||||
parm.pBuf = bufferFactory.newSmallBuffer ();
|
||||
parm.bufSize = bufferFactory.smallBufferSize ();
|
||||
}
|
||||
else if ( newMinSize <= bufferFactory.largeBufferSize () ) {
|
||||
parm.pBuf = bufferFactory.newLargeBuffer ();
|
||||
parm.bufSize = bufferFactory.largeBufferSize ();
|
||||
}
|
||||
else {
|
||||
// round size up to multiple of 4K
|
||||
newMinSize = ((newMinSize-1)|0xfff)+1;
|
||||
parm.pBuf = (char*)malloc(newMinSize);
|
||||
parm.pBuf = static_cast < char * > ( ::operator new ( newMinSize ) );
|
||||
parm.bufSize = newMinSize;
|
||||
}
|
||||
if(!parm.pBuf)
|
||||
throw std::bad_alloc();
|
||||
return parm;
|
||||
}
|
||||
|
||||
void clientBufMemoryManager::release ( char * pBuf, bufSizeT bufSize )
|
||||
{
|
||||
assert(pBuf);
|
||||
if (bufSize <= MAX_MSG_SIZE) {
|
||||
freeListFree(this->smallBufFreeList, pBuf);
|
||||
if ( bufSize == bufferFactory.smallBufferSize () ) {
|
||||
bufferFactory.destroySmallBuffer ( pBuf );
|
||||
}
|
||||
else if ( bufSize == bufferFactory.largeBufferSize () ) {
|
||||
bufferFactory.destroyLargeBuffer ( pBuf );
|
||||
}
|
||||
else {
|
||||
free(pBuf);
|
||||
::operator delete ( pBuf );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user