Compare commits

...

78 Commits

Author SHA1 Message Date
Andrew Johnson
dc61957963 Set SNAPSHOT for R3.14.12.5 2015-03-24 09:57:35 -05:00
Janet Anderson
583108e42a Set version number to R3.14.12.5. 2015-03-24 08:50:39 -05:00
Andrew Johnson
9470830091 catools: Fix printing -ve DBF_LONG values on 64-bit 2015-03-23 15:59:11 -05:00
Andrew Johnson
e84e7b930f Release notes for ao-convert changes 2015-03-20 17:05:16 -05:00
Andrew Johnson
f498b36438 Prevent overflows in ao value conversion.
Also makes ROFF fields unsigned, needed for ROFF=0x80000000
2015-03-20 16:34:14 -05:00
Andrew Johnson
d927afe257 Make including cfg/CONFIG* files unconditional 2015-03-19 10:18:23 -05:00
Andrew Johnson
f994944531 libCom/posix: Remove pthread_setcanceltype() 2015-03-18 11:36:06 -05:00
Andrew Johnson
5ffda58351 ca: Fix missing guard argument 2015-03-13 11:08:05 -05:00
Andrew Johnson
f6373093a5 Fix Windows linkage warning in alarmString.h 2015-03-13 10:56:03 -05:00
Andrew Johnson
8215244a28 Fix Windows time discontinuity report 2015-03-13 10:06:23 -05:00
Andrew Johnson
de298da94c Fix Jenkins instability on Windows 2015-03-11 10:53:37 -05:00
Andrew Johnson
753bfcc579 Check sender threads are starting 2015-03-10 18:14:11 -05:00
Andrew Johnson
4568cd3616 Chasing Jenkins instability on Windows 2015-03-10 14:17:28 -05:00
Andrew Johnson
e75ec5f85b Set snapshot to -rc1-DEV 2015-03-09 14:33:17 -05:00
Andrew Johnson
657f726527 Fix FIND_TOOL 2015-03-09 14:24:44 -05:00
Janet Anderson
0f0a8cbbe5 Set version to 3.14.12.5-rc1 2015-03-09 12:34:42 -05:00
Andrew Johnson
84e74d0924 Fix 'Can't find convertRelease.pl' problem 2015-03-09 11:33:50 -05:00
Andrew Johnson
2a6714fd03 configure: Cosmetic changes only, comments & spacing. 2015-03-06 18:14:59 -06:00
Andrew Johnson
5610b07068 configure: Support for cfg/TOP_RULES* and cfg/DIR_RULES*
Idea and initial implementation from Benjamin Franksen,
I added the DIR_RULES and ACTIONS support.
Reverses the order in which cfg/CONFIG* files are included.
2015-03-06 17:43:26 -06:00
Andrew Johnson
d26654674c Fix the RTEMS override of the ECHO variable 2015-03-03 11:53:23 -06:00
Benjamin Franksen
5f638805dd Improved "Installing ..." messages in RULES.Db 2015-03-03 11:47:37 -06:00
Benjamin Franksen
bc52c8e374 Fixed RELEASE_PERL_MODULE_DIRS 2015-03-03 11:45:23 -06:00
Andrew Johnson
fb1a0c2b1e Clean up g++ warnings in repeater.cpp 2015-02-28 20:20:56 -06:00
Andrew Johnson
2378d465d1 Update supported targets lists in CONFIG_SITE 2015-02-27 16:07:07 -06:00
Janet Anderson
2799f1cf3f Fixed incorrect comment lines 2015-02-26 13:26:56 -06:00
Janet Anderson
91c8ba592d Added directory change comment for Older Xcode 2015-02-26 13:24:29 -06:00
Andrew Johnson
004e7237c3 Snapshot to -pre1-DEV 2015-02-25 16:24:28 -06:00
Andrew Johnson
d53521f160 Set version to 3.14.12.5-pre1 2015-02-25 16:23:05 -06:00
Andrew Johnson
12793d3313 Cosmetic changes in configure/os 2015-02-25 12:02:34 -06:00
Andrew Johnson
65d39fcbc8 Moved linux-arm cross-build link-time settings 2015-02-24 16:51:59 -06:00
Andrew Johnson
b7baa2504e Only build Cap5.so for the host architecture 2015-02-24 16:23:14 -06:00
Andrew Johnson
4a0880003c Support MinGW cross-builds on linux-x86 and x86_64 2015-02-24 14:30:42 -06:00
Andrew Johnson
d06b1a178a Applied Added-configure-files-for-linux-arm-debug.patch 2015-02-23 14:12:39 -06:00
Andrew Johnson
2bae36845e Adjust a few CONFIG_SITE files, mostly comments 2015-02-23 13:30:45 -06:00
Andrew Johnson
2d7a8a4aee Pull blockingSockTest.cpp from 3.15 2015-02-20 16:35:47 -06:00
Andrew Johnson
3601a73b77 Applied rtems-use-macro-for-BIN2BOOT.patch 2015-02-20 15:42:14 -06:00
Andrew Johnson
335cba0049 Applied rtems-mvme5500-needs-libbspExt.patch 2015-02-20 15:35:59 -06:00
Andrew Johnson
0f2d6eac9b Applied rtems-build-gesys-loadable-objects.patch 2015-02-20 15:34:57 -06:00
Andrew Johnson
88314d0374 Release notes for CMD_ variables 2015-02-20 15:24:29 -06:00
Andrew Johnson
4658a88584 Allow compiler flags from command line
The following variables are reserved for use from the
GNUmake command line:
  CMD_INCLUDES
  CMD_CPPFLAGS
  CMD_CFLAGS
  CMD_CXXFLAGS
  CMD_LDFLAGS
  CMD_DBFLAGS
  CMD_DBDFLAGS
  CMD_ARFLAGS

For example:
  make CMD_INCLUDES=/opt/local/include CMD_LDFLAGS=-L/opt/local/lib
2015-02-20 14:48:05 -06:00
Andrew Johnson
4cf3613ace Applied missing-header.patch 2015-02-20 12:38:26 -06:00
Andrew Johnson
0fa8702842 Applied test-epicsTimerQueue-reference-counter.patch 2015-02-20 12:34:53 -06:00
Andrew Johnson
a437768c9c Applied linux-runtime-disable-RT-priorities-if-not-supported.patch 2015-02-20 12:25:28 -06:00
Andrew Johnson
a6af0daae9 Applied linux-use-RT-thread-priorities.patch 2015-02-20 12:21:45 -06:00
Andrew Johnson
3e6597be90 Applied record-support-santity-check.patch 2015-02-20 12:13:05 -06:00
Michael Davidsaver
c0cf25eeee dbCa: dbCaPutLinkCallback initialize entire array
CA links will write the full target array size.
Ensure that uninitialized elements are zeroed.
2015-02-19 19:18:27 -05:00
Michael Davidsaver
3501fda48d dbCa: dbCaPutLinkCallback prevent out of bounds write
The internal buffer of the caLink is sized based on the
number of elements of the destination PV.
2015-02-19 19:18:16 -05:00
Andrew Johnson
e822d8d8c4 Suppress corrupt error output from dbStatic parser
The yyerror() routine gets called twice in some cases.
Don't print the yytext or input file location the second
time through -- yytext has already been freed, and the
user doesn't need to see the location twice.

Fixes lp:1422803
2015-02-19 17:33:27 -06:00
Andrew Johnson
9813fa6474 db: Allow link fields to return a DOUBLE value
A dbCa link does a ca_get with type DBR_CTRL_DOUBLE
to populate its list of attribute values immediately
after connecting. If the target is a DBF_*LINK field
it used to return an error, preventing the link from
properly connecting. This change makes dbGetField()
return a single NAN value instead of rejecting the
request.

Fixes: lp:545358
2015-02-19 15:55:48 -06:00
Andrew Johnson
b1e99f6f1a Merged Lewis Muir's readme-fixes branch 2015-02-18 17:11:51 -06:00
J. Lewis Muir
836d81f0b7 doc: HTML: fix typos and list of files in documentation directory 2015-02-18 16:55:09 -06:00
Andrew Johnson
804aeafaa7 Fix dbVerify()'s postfix buffer size 2015-02-18 16:44:07 -06:00
Andrew Johnson
dda4eb3a58 Fix more MS idiocy
Windows has signed characters, but if you pass a negative
value (i.e. a character with value >= 0x80) into the debug
version of its isprint() runtime library function it asserts.
2015-02-18 16:36:42 -06:00
J. Lewis Muir
b041041518 doc: fix typos and list of files in documentation directory 2015-02-18 15:46:05 -06:00
Andrew Johnson
d2a216b28e More MS Windows-x64 test fixes 2015-02-17 16:21:13 -06:00
Andrew Johnson
7e36a58f1e Back-ported dbLoadRecordsHook from the 3.15 branch 2015-02-17 14:29:20 -06:00
Andrew Johnson
f16bdb0c83 Merged trap-write-data branch 2015-02-17 14:02:15 -06:00
Andrew Johnson
681a996bf0 Unifying rsrv error messages 2015-02-17 13:59:13 -06:00
Michael Davidsaver
276ea54ee4 don't destroy locked mutex 2015-02-17 11:03:06 -05:00
Michael Davidsaver
2623c2f46f dbStaticLib.c: clean pdbbase after free 2015-02-17 11:01:49 -05:00
Michael Davidsaver
b996e63beb dbReadTest.c: flush errlog on exit as per lp:1419879 2015-02-17 10:57:05 -05:00
Michael Davidsaver
2f0e9172a4 tool_lib.c: ensure output string is always set
Ensure that val2str always writes to its output buffer,
which is static and shared between all PVs.
Should make bugs like lp:1418526 more obvious.
2015-02-17 10:45:30 -05:00
Andrew Johnson
c5ded30684 Extended asTrapWrite to provide put data
Backwards-compatible enhancement to the asTrapWrite API to provide
listener routines with the data being put by the client.
The asTrapWriteMessage structure is extended with 3 new fields
for data type, element count and a pointer to the source buffer.

Tim Mooney requested this enhancement for his caPutRecorder code,
which doesn't work if the record overwrites the new value within
its process() routine, e.g. when jogging a motor record.
2015-02-16 16:30:52 -06:00
Andrew Johnson
2e4d8b31ff Mark windows-x64 Math failures as TODO 2015-02-13 15:56:50 -06:00
Andrew Johnson
26d60bc516 Attempt to fix Windows test failures
epicsMessageQueue test wasn't printing the last test result.
2015-02-13 15:29:08 -06:00
Andrew Johnson
f874913cf7 Fix epicsExceptionTest on darwin
Clang's optimizer seems to elide the new (nothrow) if we don't
actually observe the value of p...
2015-02-13 12:17:24 -06:00
Andrew Johnson
26ab431c0a Back-ported the tapfiles build target from 3.15
This is the version that works on Windows.
2015-02-13 11:16:24 -06:00
Andrew Johnson
02aa7e2f73 Stop bogus error messages from CA Repeater on Windows
Required adding a new API to osiSock.h and the 2
implementations of epicsSocketConvertErrnoToString.
2015-02-10 18:10:33 -06:00
Andrew Johnson
727a3af59d Merged Richard Fearn's caget-lb-zero-fix branch
... after some modification.
2015-02-05 11:19:30 -06:00
Richard Fearn
1a094f5971 catools: make caget -lb output '0' instead of empty string for zero value 2015-02-05 11:53:33 +01:00
Andrew Johnson
4b0a4ffee2 Build configuration for iOS 2015-02-04 10:11:14 -06:00
Andrew Johnson
c91725d3a4 Linux flag changes to remove glibc 2.20 warnings
Replace _BSD_SOURCE and other flags with _GNU_SOURCE and _DEFAULT_SOURCE
2015-01-30 16:12:42 -06:00
Ralph Lange
6a9eccdec1 gdd: fix issue when copying from an emtpy array
if the source array is empty, the index of the first element to copy (0) being equal
   to the source array size (0) does not constitute an out-of-bounds condition
2015-01-29 14:36:55 +01:00
Andrew Johnson
2b950754c4 Fix FLNK-over-CA error message 2014-12-23 10:35:09 -06:00
Andrew Johnson
846d55dac5 Build support for 64-bit iPhone Simulator
From Tom Palaia.
2014-12-04 14:05:44 -06:00
Ralph Lange
db0fbf9f73 .bzrignore: add wildcard for suppressing QtCreator project files 2014-12-03 15:11:30 +01:00
Andrew Johnson
c1d33e614c Fix non-OS Perl xsubpp issue
This should be the right fix.
Also cleaned up compile warnings from Clang in the cap5 build.
2014-12-02 11:03:16 -06:00
Andrew Johnson
69eaaa17ba Fix xsubpp for RHEL 7 and derivatives.
It got moved. This might not be the final fix for those using an
add-on version of Perl though...
2014-12-01 12:12:09 -06:00
119 changed files with 1259 additions and 584 deletions

View File

@@ -6,3 +6,4 @@
./include
./templates
**/O.*
./QtC-*

View File

@@ -14,17 +14,17 @@
#
ifneq ($(wildcard $(TOP)/configure/CONFIG_BASE_VERSION),)
EPICS_BASE = $(INSTALL_LOCATION)
CONFIG = $(TOP)/configure
BASE_TOP=YES
EPICS_BASE = $(INSTALL_LOCATION)
CONFIG = $(TOP)/configure
BASE_TOP=YES
else
CONFIG ?= $(EPICS_BASE)/configure
CONFIG ?= $(EPICS_BASE)/configure
endif
# Provide a default if the user hasn't set EPICS_HOST_ARCH
ifeq ($(origin EPICS_HOST_ARCH), undefined)
# NB: Must use a simply expanded variable here for performance:
EPICS_HOST_ARCH := $(shell $(CONFIG)/../startup/EpicsHostArch.pl)
# NB: We use a simply expanded variable here for performance:
EPICS_HOST_ARCH := $(shell $(CONFIG)/../startup/EpicsHostArch.pl)
endif
#
@@ -34,8 +34,8 @@ endif
-include $(CONFIG)/RELEASE.$(EPICS_HOST_ARCH)
-include $(CONFIG)/RELEASE.$(EPICS_HOST_ARCH).Common
ifdef T_A
-include $(CONFIG)/RELEASE.Common.$(T_A)
-include $(CONFIG)/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
-include $(CONFIG)/RELEASE.Common.$(T_A)
-include $(CONFIG)/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
endif
include $(CONFIG)/CONFIG_COMMON
@@ -58,58 +58,64 @@ include $(CONFIG)/CONFIG_BASE_VERSION
include $(CONFIG)/os/CONFIG.$(EPICS_HOST_ARCH).Common
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
RELEASE_TOPS := $(shell $(CONVERTRELEASE) -T $(TOP) releaseTops)
ifdef T_A
# Cross compile specific definitions
#
ifneq ($(EPICS_HOST_ARCH),$(T_A))
include $(CONFIG)/CONFIG.CrossCommon
endif
# Cross compile specific definitions
#
ifneq ($(EPICS_HOST_ARCH),$(T_A))
include $(CONFIG)/CONFIG.CrossCommon
endif
# Target architecture specific definitions
#
-include $(CONFIG)/os/CONFIG.Common.$(T_A)
# Target architecture specific definitions
#
-include $(CONFIG)/os/CONFIG.Common.$(T_A)
# Host-Target architecture specific definitions
#
-include $(CONFIG)/os/CONFIG.$(EPICS_HOST_ARCH).$(T_A)
# Host-Target architecture specific definitions
#
-include $(CONFIG)/os/CONFIG.$(EPICS_HOST_ARCH).$(T_A)
# RELEASE file specific definitions
#
ifneq ($(CONFIG),$(TOP)/configure)
-include $(CONFIG)/CONFIG_APP_INCLUDE
endif
# RELEASE file specific definitions
#
ifneq ($(CONFIG),$(TOP)/configure)
-include $(CONFIG)/CONFIG_APP_INCLUDE
endif
# Site specific target and host-target definitions
#
-include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A)
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
endif # ifdef T_A
# Site specific target and host-target definitions
#
-include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A)
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
# Include <top>/cfg/CONFIG* definitions from tops defined in RELEASE* files
#
ifneq ($(CONFIG),$(TOP)/configure)
RELEASE_TOPS := $(shell $(CONVERTRELEASE) -T $(TOP) releaseTops)
RELEASE_CFG_CONFIGS = $(foreach top, $(RELEASE_TOPS), $(wildcard $($(top))/cfg/CONFIG*))
ifneq ($(RELEASE_CFG_CONFIGS),)
include $(RELEASE_CFG_CONFIGS)
endif
RELEASE_TOPS_REVERSE := $(shell \
$(PERL) -e '$$,=" ";print reverse @ARGV' $(RELEASE_TOPS))
RELEASE_CFG_CONFIGS = $(foreach top, $(RELEASE_TOPS_REVERSE), \
$(wildcard $($(top))/cfg/CONFIG*))
ifneq ($(RELEASE_CFG_CONFIGS),)
include $(RELEASE_CFG_CONFIGS)
endif
endif
# Include $(INSTALL_CFG)/CONFIG* definitions
#
TOP_CFG_CONFIGS = $(wildcard $(INSTALL_CFG)/CONFIG*)
ifneq ($(TOP_CFG_CONFIGS),)
include $(TOP_CFG_CONFIGS)
include $(TOP_CFG_CONFIGS)
endif
endif # ifdef T_A
# User specific definitions
#
-include $(HOME)/configure/CONFIG_USER
-include $(HOME)/configure/CONFIG_USER.$(EPICS_HOST_ARCH)
ifdef T_A
-include $(HOME)/configure/CONFIG_USER.Common.$(T_A)
-include $(HOME)/configure/CONFIG_USER.$(EPICS_HOST_ARCH).$(T_A)
-include $(HOME)/configure/CONFIG_USER.Common.$(T_A)
-include $(HOME)/configure/CONFIG_USER.$(EPICS_HOST_ARCH).$(T_A)
endif

View File

@@ -26,7 +26,6 @@
# USR_CFLAGS C flags
# USR_CXXFLAGS C++ flags
# USR_CPPFLAGS c preprocesser flags
# INC include-files to install
# SRCS source files for building libraries and prods
# USR_SRCS source files for building libraries and prods
# PROD_SRCS source files for building prods

View File

@@ -1,24 +1,34 @@
export TOP
export IOCAPPS
#*************************************************************************
# Copyright (c) 2013 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.
#*************************************************************************
#
# $Revision-Id$
#
RELEASE_TOPS := $(shell $(CONVERTRELEASE) -T $(TOP) releaseTops)
export TOP
ifneq ($(RELEASE_TOPS),)
define RELEASE_FLAGS_template
export $(1)
$(1)_HOST_BIN = $$(strip $$($(1)))/bin/$$(EPICS_HOST_ARCH)
$(1)_HOST_LIB = $$(strip $$($(1)))/lib/$$(EPICS_HOST_ARCH)
$(1)_BIN = $$(wildcard $$(strip $$($(1)))/bin/$$(T_A))
$(1)_LIB = $$(wildcard $$(strip $$($(1)))/lib/$$(T_A))
$(1)_HOST_BIN = $$(strip $$($(1)))/bin/$(EPICS_HOST_ARCH)
$(1)_HOST_LIB = $$(strip $$($(1)))/lib/$(EPICS_HOST_ARCH)
$(1)_BIN = $$(wildcard $$(strip $$($(1)))/bin/$(T_A))
$(1)_LIB = $$(wildcard $$(strip $$($(1)))/lib/$(T_A))
SHRLIB_SEARCH_DIRS += $$($(1)_LIB)
RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include/os/$$(OS_CLASS)))
RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include/os/$(OS_CLASS)))
RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include))
RELEASE_DBD_DIRS += $$(wildcard $$(strip $$($(1)))/dbd)
RELEASE_DB_DIRS += $$(wildcard $$(strip $$($(1)))/db)
RELEASE_PERL_MODULE_DIRS += $$(wildcard $$($(1)_LIB)/perl)
RELEASE_PERL_MODULE_DIRS += $$(wildcard $$(strip $$($(1)))/lib/perl)
endef
$(foreach top, $(RELEASE_TOPS), $(eval $(call RELEASE_FLAGS_template,$(top)) ))
$(foreach top, $(RELEASE_TOPS), \
$(eval $(call RELEASE_FLAGS_template,$(top))))
endif

View File

@@ -54,6 +54,7 @@ BASE_CPPFLAGS += $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK))
# Where to find the installed build tools
TOOLS = $(EPICS_BASE_HOST_BIN)
FIND_TOOL = $(firstword $(wildcard $(TOOLS)/$(1) $(TOP)/src/tools/$(1)))
#---------------------------------------------------------------
# Epics base build tools and tool flags
@@ -63,7 +64,7 @@ DBEXPAND = $(call PATH_FILTER, $(TOOLS)/dbExpand$(HOSTEXE))
DBTORECORDTYPEH = $(call PATH_FILTER, $(TOOLS)/dbToRecordtypeH$(HOSTEXE))
DBTOMENUH = $(call PATH_FILTER, $(TOOLS)/dbToMenuH$(HOSTEXE))
REGISTERRECORDDEVICEDRIVER = $(PERL) $(TOOLS)/registerRecordDeviceDriver.pl
CONVERTRELEASE = $(PERL) $(TOOLS)/convertRelease.pl
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
#-------------------------------------------------------

View File

@@ -30,10 +30,10 @@ EPICS_MODIFICATION = 12
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# Not included if zero
EPICS_PATCH_LEVEL = 4
EPICS_PATCH_LEVEL = 5
# 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
@@ -42,7 +42,7 @@ EPICS_DEV_SNAPSHOT=-DEV
#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

View File

@@ -209,6 +209,16 @@ USR_CPPFLAGS =
USR_DBDFLAGS =
USR_ARFLAGS =
# Variables to be set only on the command-line:
# CMD_INCLUDES =
# CMD_CFLAGS =
# CMD_CXXFLAGS =
# CMD_LDFLAGS =
# CMD_CPPFLAGS =
# CMD_DBFLAGS =
# CMD_DBDFLAGS =
# CMD_ARFLAGS =
# Debug specific options
DEBUG_CPPFLAGS =
DEBUG_CFLAGS =
@@ -267,32 +277,35 @@ RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(COMMANDLINE_LIBRARY))
# Flags
INCLUDES = -I. $(SRC_INCLUDES) $(INSTALL_INCLUDES) $(RELEASE_INCLUDES)\
$(TARGET_INCLUDES) $(USR_INCLUDES) $(OP_SYS_INCLUDES) $($(BUILD_CLASS)_INCLUDES)
$(TARGET_INCLUDES) $(USR_INCLUDES) $(CMD_INCLUDES) $(OP_SYS_INCLUDES)\
$($(BUILD_CLASS)_INCLUDES)
CFLAGS = $($(BUILD_CLASS)_CFLAGS) $(POSIX_CFLAGS) $(OPT_CFLAGS) $(DEBUG_CFLAGS)\
$(PIPE_CFLAGS) $(WARN_CFLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS)\
$(CODE_CFLAGS) $(STATIC_CFLAGS) $(OP_SYS_CFLAGS) $(LIBRARY_SRC_CFLAGS) $(HDEPENDS_CFLAGS)
CFLAGS = $($(BUILD_CLASS)_CFLAGS) $(POSIX_CFLAGS) $(OPT_CFLAGS)\
$(DEBUG_CFLAGS) $(PIPE_CFLAGS) $(WARN_CFLAGS) $(TARGET_CFLAGS)\
$(USR_CFLAGS) $(CMD_CFLAGS) $(ARCH_DEP_CFLAGS) $(CODE_CFLAGS)\
$(STATIC_CFLAGS) $(OP_SYS_CFLAGS) $(LIBRARY_SRC_CFLAGS) $(HDEPENDS_CFLAGS)
CXXFLAGS = $($(BUILD_CLASS)_CXXFLAGS) $(POSIX_CXXFLAGS) $(OPT_CXXFLAGS) $(DEBUG_CXXFLAGS)\
$(PIPE_CFLAGS) $(WARN_CXXFLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS)\
$(CODE_CXXFLAGS) $(STATIC_CXXCFLAGS) $(OP_SYS_CXXFLAGS) $(LIBRARY_SRC_CFLAGS) $(HDEPENDS_CFLAGS)
CXXFLAGS = $($(BUILD_CLASS)_CXXFLAGS) $(POSIX_CXXFLAGS) $(OPT_CXXFLAGS)\
$(DEBUG_CXXFLAGS) $(PIPE_CFLAGS) $(WARN_CXXFLAGS) $(TARGET_CXXFLAGS)\
$(USR_CXXFLAGS) $(CMD_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(CODE_CXXFLAGS)\
$(STATIC_CXXCFLAGS) $(OP_SYS_CXXFLAGS) $(LIBRARY_SRC_CFLAGS) $(HDEPENDS_CFLAGS)
LDFLAGS = $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(POSIX_LDFLAGS) \
$(ARCH_DEP_LDFLAGS) $(DEBUG_LDFLAGS) $(OP_SYS_LDFLAGS) $($(BUILD_CLASS)_LDFLAGS)\
$(RUNTIME_LDFLAGS) $(CODE_LDFLAGS)
LDFLAGS = $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(CMD_LDFLAGS)\
$(POSIX_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(DEBUG_LDFLAGS) $(OP_SYS_LDFLAGS)\
$($(BUILD_CLASS)_LDFLAGS) $(RUNTIME_LDFLAGS) $(CODE_LDFLAGS)
LDLIBS = \
$(POSIX_LDLIBS) $(ARCH_DEP_LDLIBS) $(DEBUG_LDLIBS) $(OP_SYS_LDLIBS) $(GNU_LDLIBS_$(GNU))
LDLIBS = $(POSIX_LDLIBS) $(ARCH_DEP_LDLIBS) $(DEBUG_LDLIBS) $(OP_SYS_LDLIBS)\
$(GNU_LDLIBS_$(GNU))
CPPFLAGS += $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS)\
$(OPT_CPPFLAGS) $(DEBUG_CPPFLAGS) $(WARN_CPPFLAGS)\
$(BASE_CPPFLAGS) $(TARGET_CPPFLAGS) $(USR_CPPFLAGS) $(ARCH_DEP_CPPFLAGS)\
$(OP_SYS_CPPFLAGS) $(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS)
CPPFLAGS = $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS) $(OPT_CPPFLAGS)\
$(DEBUG_CPPFLAGS) $(WARN_CPPFLAGS) $(BASE_CPPFLAGS) $(TARGET_CPPFLAGS)\
$(USR_CPPFLAGS) $(CMD_CPPFLAGS) $(ARCH_DEP_CPPFLAGS) $(OP_SYS_CPPFLAGS)\
$(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS)
#--------------------------------------------------
# ar definition default
ARFLAGS =
ARCMD = $(AR) $(ARFLAGS) $(USR_ARFLAGS) $@ $(LIBRARY_LD_OBJS)
ARCMD = $(AR) $(ARFLAGS) $(USR_ARFLAGS) $(CMD_ARFLAGS) $@ $(LIBRARY_LD_OBJS)
#--------------------------------------------------
# 'Munch' link-edit

View File

@@ -25,6 +25,7 @@
# darwin-x86 (Intel based Apple running OSX)
# freebsd-x86 (GNU compiler used for host builds)
# freebsd-x86_64 (GNU compiler used for host builds)
# linux-arm (GNU compiler used for host builds)
# linux-ppc (GNU compiler used for host builds)
# linux-ppc64 (GNU compiler used for host builds)
# linux-x86 (GNU compiler used for host builds)
@@ -41,10 +42,13 @@
# win32-x86 (MS Visual C++ compiler used for host builds)
# win32-x86-cygwin (WIN32 API with cygwin GNU compiler used for host builds)
# win32-x86-mingw (MinGW compiler used for host builds)
# win32-x86-static (MS Visual C++ compiler used for host builds)
# windows-x64 (MS Visual C++ compiler used for host builds)
# windows-x64-mingw (MinGW compiler used for host builds)
# windows-x64-static (MS Visual C++ compiler used for host builds)
# Debugging builds
# Debugging builds:
# linux-arm-debug (GNU compiler used for host builds)
# linux-x86-debug (GNU compiler with -g option for host builds)
# linux-x86_64-debug (GNU compiler with -g option for host builds)
# solaris-sparc-debug (sun compiler no optimization,-g for debugging info)
@@ -61,13 +65,13 @@
#
# Currently Supporting:
# ios-arm
# ios-386
# ios-arm (darwin-x86 host)
# ios-386 (darwin-x86 host)
# linux-386 (linux-x86 host)
# linux-486 (linux-x86 host)
# linux-586 (linux-x86 host)
# linux-686 (linux-x86 host)
# linux-arm (linux-x86 host)
# linux-arm (linux-x86 or -x86_64 host)
# linux-arm_eb (linux-x86 host)
# linux-arm_el (linux-x86 host)
# linux-athlon (linux-x86 host)
@@ -102,6 +106,7 @@
# RTEMS-pc386
# RTEMS-psim
# RTEMS-uC5282
# win32-x86-mingw (linux-x86 or -x86_64 host)
#
# Definitions of CROSS_COMPILER_TARGET_ARCHS in
@@ -176,7 +181,7 @@ COMPAT_313=NO
#INSTALL_LOCATION=<fullpathname>
# Use POSIX thread priority scheduling (YES or NO)
USE_POSIX_THREAD_PRIORITY_SCHEDULING = NO
USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES
# Site version number, if set will append '-' and this string to the
# EPICS version number string that is reported by many tools

View File

@@ -24,8 +24,8 @@ vpath %.acs $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
DBD_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DBD) $(RELEASE_DBD_DIRS)
DB_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DB) $(RELEASE_DB_DIRS)
DBDFLAGS = $(USR_DBDFLAGS) $(addprefix -I,$(DBD_SEARCH_DIRS))
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) $(addprefix -I,$(DB_SEARCH_DIRS))
DBDFLAGS = $(USR_DBDFLAGS) $(CMD_DBDFLAGS) $(addprefix -I,$(DBD_SEARCH_DIRS))
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) $(CMD_DBFLAGS) $(addprefix -I,$(DB_SEARCH_DIRS))
#####################################################
# To allow os specific dbd files AND have the -j option work properly,
@@ -134,7 +134,7 @@ ACTIONS += build
ACTIONS += install
ACTIONS += buildInstall
ACTIONS += browse
ACTIONS += runtests
ACTIONS += runtests tapfiles
actionArchTargets = $(foreach x, $(ACTIONS),\ $(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
@@ -199,7 +199,7 @@ $(COMMON_DIR)/%.substitutions:
endif
$(INSTALL_DB)/%.substitutions: %.substitutions
$(ECHO) "Installing db file $@"
$(ECHO) "Installing substitution file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
.PRECIOUS: $(COMMON_DIR)/%.substitutions
@@ -213,7 +213,7 @@ $(COMMON_DIR)/%.template: $(COMMON_DIR)/%.edf
@$(RM) $@.VAR
$(INSTALL_DB)/%.template: %.template
$(ECHO) "Installing db file $@"
$(ECHO) "Installing template file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
.PRECIOUS: $(COMMON_DIR)/%.template
@@ -351,7 +351,7 @@ $(COMMON_DIR)/%.db: $(COMMON_DIR)/%.db$(RAW)
else
$(INSTALL_DB)/%: %
$(ECHO) "Installing db file $@"
$(ECHO) "Installing $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
endif

View File

@@ -17,41 +17,40 @@ ACTIONS += build
ACTIONS += install
ACTIONS += buildInstall
ACTIONS += browse
ACTIONS += runtests
ACTIONS += runtests tapfiles
#ACTIONS += rebuild
actionPart = $(word 1, $(subst $(DIVIDER), ,$@))
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
actionArchTargets = $(foreach action, $(ACTIONS), \
$(foreach arch, $(BUILD_ARCHS), \
$(action)$(DIVIDER)$(arch)))
actionArchTargets = $(foreach x, $(ACTIONS),\
$(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
cleanArchTargets = $(foreach arch,$(BUILD_ARCHS), clean$(DIVIDER)$(arch))
cleanArchTargets = $(foreach arch, $(BUILD_ARCHS), \
clean$(DIVIDER)$(arch))
buildDirs = $(addprefix O.,$(BUILD_ARCHS))
#*************************************************************************
# Create epics_host_arch dependancies for GNU make -j option
# Only works with GNU make 3.81 or later (uses eval function)
# Include <top>/cfg/DIR_RULES* files from tops defined in RELEASE* files
# Do this here so they can add ACTIONS
#
RELEASE_CFG_DIR_RULES = $(foreach top, $(RELEASE_TOPS), \
$(wildcard $($(top))/cfg/DIR_RULES*))
ifneq ($(RELEASE_CFG_DIR_RULES),)
include $(RELEASE_CFG_DIR_RULES)
endif
# Create EPICS_HOST_ARCH dependancies for GNU make -j option.
# Needed in dirs where EPICS_HOST_ARCH build creates a tool used in
# cross arch builds
CROSS_ARCHS += $(CROSS1) $(CROSS2)
# j is NOT found in MAKEFLAGS when using make 3.81
# Hope to uncomment this for GNU make 3.82
#ifeq ($(findstring j,$(MAKEFLAGS)),j)
define DEP_template
$(2): $$(EPICS_HOST_ARCH)
$(1)$$(DIVIDER)$(2): $(1)$$(DIVIDER)$$(EPICS_HOST_ARCH) O.$(2)
endef
$(foreach action, $(ACTIONS), $(foreach arch,\
$(CROSS_ARCHS),$(eval $(call DEP_template,$(action),$(arch)))))
#endif
#*************************************************************************
$(foreach action, $(ACTIONS), \
$(foreach arch, $(CROSS_ARCHS), \
$(eval $(call DEP_template,$(action),$(arch)))))
# Allows rebuild to work with parallel builds option, -j.
ifeq (rebuild,$(filter rebuild,$(MAKECMDGOALS)))
@@ -59,8 +58,11 @@ $(buildDirs) O.Common : clean
rebuild: install
endif
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
actionPart = $(word 1, $(subst $(DIVIDER), ,$@))
$(actionArchTargets) : $(buildDirs) O.Common
$(MAKE) -C O.$(archPart) -f ../Makefile TOP=$(TOP)/.. T_A=$(archPart) $(actionPart)
$(MAKE) -C O.$(archPart) -f ../Makefile TOP=$(TOP)/.. \
T_A=$(archPart) $(actionPart)
$(BUILD_ARCHS) : % : O.% O.Common
$(MAKE) -C O.$@ -f ../Makefile TOP=$(TOP)/.. T_A=$@
@@ -73,8 +75,7 @@ $(buildDirs):
O.Common:
$(MKDIR) O.Common
#
# special clean rule
# Clean rules
#
clean ::
$(RMDIR) $(addprefix O.,$(BUILD_ARCHS)) O.Common
@@ -92,3 +93,7 @@ realclean ::
.PHONY : $(cleanArchTargets)
.PHONY : $(BUILD_ARCHS) rebuild
.PHONY : $(ACTIONS) clean realclean archclean all
# User specific rules
#
-include $(HOME)/configure/RULES_USER

View File

@@ -96,6 +96,8 @@ ifneq (,$(strip $(TESTS)))
TARGETS += testspec
endif
TAPFILES += $(TESTSCRIPTS:.t=.tap)
#---------------------------------------------------------------
# Libraries
#
@@ -142,7 +144,8 @@ clean::
@$(RM) *.i *$(OBJ) *.a $(TESTPRODNAME) $(LIBNAME) $(SHRLIBNAME) \
$(INC) $(TARGETS) $(DLL_LINK_LIBNAME) $(TDS) \
*.out MakefileInclude $(LOADABLE_SHRLIBNAME) *.manifest *.exp \
$(COMMON_INC) $(HDEPENDS_FILES) $(PRODTARGETS) $(TESTSCRIPTS)
$(COMMON_INC) $(HDEPENDS_FILES) $(PRODTARGETS) \
$(TESTSCRIPTS) $(TAPFILES)
ifdef RES
@$(RM) *$(RES)
endif
@@ -328,6 +331,12 @@ $(OBJLIB_MUNCHNAME):%.munch : %_ctdt$(OBJ) %$(OBJ)
@$(RM) $@
$(MUNCH_CMD)
# GeSys modules for RTEMS
$(MODNAME): %$(MODEXT): %$(EXE)
@echo "Building module $@"
@$(RM) $@
$(LINK.mod)
runtests: $(TESTSCRIPTS)
-$(PERL) -MTest::Harness -e 'runtests @ARGV if @ARGV;' $^
@@ -338,16 +347,22 @@ testspec: $(TESTSCRIPTS)
$(if $^, @echo Tests: $^ >> $@)
$(if $(TESTSPEC_$(OS_CLASS)), @echo "Harness: $(TESTSPEC_$(OS_CLASS))" >> $@)
tapfiles: $(TESTSCRIPTS) $(TAPFILES)
# A .tap file is the output from running the associated test script
%.tap: %.t
-$(PERL) $< -tap > $@
# If there's a perl test script (.plt) available, use it
%.t: ../%.plt
@$(RM) $@
@$(CP) $< $@
$(CP) $< $@
# Some versions of Test::Harness expect test programs in perl only.
# Test programs (.t files) must be written in Perl.
# Generate a perl program to exec the real test binary.
%.t: %$(EXE)
%.t: %$(EXE) $(TOOLS)/makeTestfile.pl
@$(RM) $@
@$(PERL) $(TOOLS)/makeTestfile.pl $@ $<
$(PERL) $(TOOLS)/makeTestfile.pl $@ $<
#---------------------------------------------------------------
## Install rules for BIN_INSTALLS and LIB_INSTALLS

View File

@@ -12,28 +12,33 @@
ARCHS += $(BUILD_ARCHS)
ACTIONS += inc build install buildInstall clean realclean archclean runtests
dirPart = $(join $(dir $@), $(word 1, $(subst $(DIVIDER), ,$(notdir $@))))
actionArchPart = $(join $(word 2, $(subst $(DIVIDER), ,$(notdir $@))), \
$(addprefix $(DIVIDER),$(word 3, $(subst $(DIVIDER), ,$(notdir $@)))))
ACTIONS += inc build install buildInstall clean realclean archclean
ACTIONS += runtests tapfiles
dirActionArchTargets = $(foreach dir, $(DIRS), \
$(foreach action, $(ACTIONS),\
$(foreach arch, $(ARCHS), \
$(dir)$(DIVIDER)$(action)$(DIVIDER)$(arch))))
$(foreach action, $(ACTIONS), \
$(foreach arch, $(ARCHS), \
$(dir)$(DIVIDER)$(action)$(DIVIDER)$(arch))))
dirArchTargets += $(foreach dir, $(DIRS), \
$(foreach arch, $(ARCHS),\
$(dir)$(DIVIDER)$(arch)))
$(foreach arch, $(ARCHS), \
$(dir)$(DIVIDER)$(arch)))
dirActionTargets += $(foreach dir, $(DIRS), \
$(foreach action, $(ACTIONS),\
$(dir)$(DIVIDER)$(action)))
actionArchTargets = $(foreach action, $(ACTIONS),\
$(foreach arch, $(ARCHS), \
$(action)$(DIVIDER)$(arch)))
$(foreach action, $(ACTIONS), \
$(dir)$(DIVIDER)$(action)))
actionArchTargets = $(foreach action, $(ACTIONS), \
$(foreach arch, $(ARCHS), \
$(action)$(DIVIDER)$(arch)))
all : install
all: install
# Include <top>/cfg/DIR_RULES* files from tops defined in RELEASE* files
# Do this here so they can add ACTIONS
#
RELEASE_CFG_DIR_RULES = $(foreach top, $(RELEASE_TOPS), \
$(wildcard $($(top))/cfg/DIR_RULES*))
ifneq ($(RELEASE_CFG_DIR_RULES),)
include $(RELEASE_CFG_DIR_RULES)
endif
# Allows rebuild to work with parallel builds option, -j.
ifeq (rebuild,$(filter rebuild,$(MAKECMDGOALS)))
@@ -47,30 +52,42 @@ endif
define DEP_template1
$(1): $$($(1)_DEPEND_DIRS)
endef
$(foreach dir, $(DIRS),$(eval $(call DEP_template1,$(dir))))
$(foreach dir, $(DIRS), \
$(eval $(call DEP_template1,$(dir))))
define DEP_template2
$(1)$$(DIVIDER)$(2) : $$(foreach ddir, $$($(1)_DEPEND_DIRS),$$(addsuffix $$(DIVIDER)$(2),$$(ddir)))
$(1)$$(DIVIDER)$(2) : $$(foreach ddir, $$($(1)_DEPEND_DIRS), \
$$(addsuffix $$(DIVIDER)$(2),$$(ddir)))
endef
$(foreach action, $(ACTIONS), $(foreach dir, $(DIRS),$(eval $(call DEP_template2,$(dir),$(action)))))
$(foreach action, $(ACTIONS), \
$(foreach dir, $(DIRS), \
$(eval $(call DEP_template2,$(dir),$(action)))))
define DEP_template3
$(1)$$(DIVIDER)$(2) : $$(foreach ddir, $$($(1)_DEPEND_DIRS),$$(addsuffix $$(DIVIDER)$(2),$$(ddir)))
$(1)$$(DIVIDER)$(2) : $$(foreach ddir, $$($(1)_DEPEND_DIRS), \
$$(addsuffix $$(DIVIDER)$(2),$$(ddir)))
endef
$(foreach arch, $(ARCHS), $(foreach dir, $(DIRS),$(eval $(call DEP_template3,$(dir),$(arch)))))
$(foreach arch, $(ARCHS), \
$(foreach dir, $(DIRS), \
$(eval $(call DEP_template3,$(dir),$(arch)))))
define DEP_template4
$(1)$$(DIVIDER)$(2)$$(DIVIDER)$(3) : $$(foreach ddir, $$($(1)_DEPEND_DIRS),$$(addsuffix $$(DIVIDER)$(2)$$(DIVIDER)$(3),$$(ddir)))
$(1)$$(DIVIDER)$(2)$$(DIVIDER)$(3) : $$(foreach ddir, $$($(1)_DEPEND_DIRS), \
$$(addsuffix $$(DIVIDER)$(2)$$(DIVIDER)$(3),$$(ddir)))
endef
$(foreach arch, $(ARCHS), $(foreach action, $(ACTIONS), $(foreach dir, $(DIRS), \
$(eval $(call DEP_template4,$(dir),$(action),$(arch))))))
$(foreach arch, $(ARCHS), \
$(foreach action, $(ACTIONS), \
$(foreach dir, $(DIRS), \
$(eval $(call DEP_template4,$(dir),$(action),$(arch))))))
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) :
$(MAKE) -C $(dirPart) $(actionArchPart)
$(ARCHS) $(ACTIONS) $(actionArchTargets) :%: \
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)%)
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)%)
.PHONY : $(DIRS) all rebuild
.PHONY : $(ARCHS) $(ACTIONS)
@@ -78,3 +95,7 @@ $(ARCHS) $(ACTIONS) $(actionArchTargets) :%: \
.PHONY : $(dirActionArchTargets)
.PHONY : $(actionArchTargets)
# User specific rules
#
-include $(HOME)/configure/RULES_USER

View File

@@ -6,27 +6,27 @@
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
#
# $Revision-Id$
#
#---------------------------------------------------------------
# Include <top>/configure/RULES_BUILD definitions from tops defined in RELEASE* files
# Include <top>/configure/RULES_BUILD from tops defined in RELEASE* files
#
RELEASE_RULES_BUILDS = $(foreach top, $(RELEASE_TOPS), $(wildcard $($(top))/configure/RULES_BUILD))
RELEASE_RULES_BUILDS = $(foreach top, $(RELEASE_TOPS), \
$(wildcard $($(top))/configure/RULES_BUILD))
ifneq ($(RELEASE_RULES_BUILDS),)
include $(RELEASE_RULES_BUILDS)
endif
#---------------------------------------------------------------
# Include <top>/cfg/RULES* definitions from tops defined in RELEASE* files
# Include <top>/cfg/RULES* files from tops defined in RELEASE* files
#
RELEASE_CFG_RULES = $(foreach top, $(RELEASE_TOPS), $(wildcard $($(top))/cfg/RULES*))
RELEASE_CFG_RULES = $(foreach top, $(RELEASE_TOPS), \
$(wildcard $($(top))/cfg/RULES*))
ifneq ($(RELEASE_CFG_RULES),)
include $(RELEASE_CFG_RULES)
endif
#---------------------------------------------------------------
# If this is not BASE then include TOP/configure/RULES_BUILD definitions
# 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)
@@ -35,37 +35,38 @@ ifneq ($(TOP_RULES_BUILDS),)
endif
endif
#---------------------------------------------
# Include our own $(INSTALL_CFG)/RULES* definitions
# Include our own $(INSTALL_CFG)/RULES* files
#
TOP_CFG_RULES = $(wildcard $(INSTALL_CFG)/RULES*)
ifneq ($(TOP_CFG_RULES),)
include $(TOP_CFG_RULES)
endif
#---------------------------------------------------------------
# Rules to install each FILE_TYPE
#
define FILE_TYPE_template
$(1) += $$(if $$(strip $$($(1)_$$(OS_CLASS))),$$(subst -nil-,,$$($(1)_$$(OS_CLASS))), $$($(1)_DEFAULT))
$(1) += $$(if $$(strip $$($(1)_$(OS_CLASS))), \
$$(subst -nil-,,$$($(1)_$(OS_CLASS))), \
$$($(1)_DEFAULT))
INSTALLS_$(1) = $$($(1):%=$$(INSTALL_$(1))/%)
$$(INSTALL_$(1))/%: ../%
$(ECHO) "Installing $(1) file $$@"
@$$(INSTALL) -d -m $$(INSTALL_PERMISSIONS) $$< $$(dir $$@)
$$(INSTALL_$(1))/%: %
$(ECHO) "Installing $(1) file $$@"
@$$(INSTALL) -d -m $$(INSTALL_PERMISSIONS) $$< $$(dir $$@)
buildInstall : $$(INSTALLS_$(1))
buildInstall: $$(INSTALLS_$(1))
endef
$(foreach type, $(FILE_TYPE), \
$(eval $(call FILE_TYPE_template,$(strip $(type)))))
$(foreach type, $(FILE_TYPE),$(eval $(call FILE_TYPE_template,$(strip $(type)))))
#---------------------------------------------
# Cleaning FILE_TYPE files
#
clean::
@$(RM) $(foreach type, $(FILE_TYPE), $($(type)))
# User specific rules
#
-include $(HOME)/configure/RULES_USER

View File

@@ -4,17 +4,17 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
#
# $Revision-Id$
# $Revision-Id$
#
include $(CONFIG)/RULES_DIRS
distclean: realclean cvsclean realuninstall
CVSCLEAN=$(firstword $(wildcard $(TOOLS)/cvsclean.pl $(TOP)/src/tools/cvsclean.pl))
CVSCLEAN = $(call FIND_TOOL,cvsclean.pl)
cvsclean:
$(PERL) $(CVSCLEAN)
@@ -22,17 +22,15 @@ realuninstall: uninstallDirs
$(RMDIR) $(INSTALL_LOCATION_BIN)
$(RMDIR) $(INSTALL_LOCATION_LIB)
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC)\
$(INSTALL_HTML) $(INSTALL_JAVA) $(INSTALL_TEMPLATES) \
$(INSTALL_DB)
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC) \
$(INSTALL_HTML) $(INSTALL_JAVA) $(INSTALL_TEMPLATES) $(INSTALL_DB)
UNINSTALL_DIRS += $(DIRECTORY_TARGETS)
uninstallDirs:
$(RMDIR) $(UNINSTALL_DIRS)
uninstall: archuninstall uninstallDirs
archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
@$(MAKE) -f Makefile cleandirs
archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS)) | cleandirs
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
uninstall$(DIVIDER)%:
@@ -40,14 +38,14 @@ uninstall$(DIVIDER)%:
$(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
@echo
# The echo above stops a "nothing to be done for cleandirs" message
help:
@echo "Usage: gnumake [options] [target] ..."
@@ -82,3 +80,10 @@ help:
.PHONY: cleandirs distclean cvsclean realuninstall archuninstall uninstallDirs
.PHONY: uninstall help
# Include <top>/cfg/TOP_RULES* files from tops defined in RELEASE* files
#
RELEASE_CFG_TOP_RULES = $(foreach top, $(RELEASE_TOPS), \
$(wildcard $($(top))/cfg/TOP_RULES*))
ifneq ($(RELEASE_CFG_TOP_RULES),)
include $(RELEASE_CFG_TOP_RULES)
endif

View File

@@ -49,28 +49,31 @@ RANLIB := $(RTEMS_TOOLS)/bin/$(RANLIB)
VALID_BUILDS = Ioc
#--------------------------------------------------
# The RTEMS Makefiles redefine several macros, so we have to go
# through the following contortions to get the EPICS flags back.
CFLAGS = $(CROSS_CFLAGS) $(OPT_CFLAGS) $(DEBUG_CFLAGS)\
$(WARN_CFLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS)\
$(CODE_CFLAGS) $(STATIC_CFLAGS) $(OP_SYS_CFLAGS) $(LIBRARY_SRC_CFLAGS)\
$(HDEPENDS_CFLAGS)
# The RTEMS Makefiles redefine several macros, so we have to
# reset them to the proper EPICS values, from CONFIG_COMMON
CFLAGS = $($(BUILD_CLASS)_CFLAGS) $(POSIX_CFLAGS) $(OPT_CFLAGS)\
$(DEBUG_CFLAGS) $(PIPE_CFLAGS) $(WARN_CFLAGS) $(TARGET_CFLAGS)\
$(USR_CFLAGS) $(CMD_CFLAGS) $(ARCH_DEP_CFLAGS) $(CODE_CFLAGS)\
$(STATIC_CFLAGS) $(OP_SYS_CFLAGS) $(LIBRARY_SRC_CFLAGS) $(HDEPENDS_CFLAGS)
CXXFLAGS = $(CROSS_CXXFLAGS) $(OPT_CXXFLAGS)\
$(DEBUG_CXXFLAGS) $(WARN_CXXFLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS)\
$(ARCH_DEP_CXXFLAGS) $(CODE_CXXFLAGS) $(STATIC_CXXCFLAGS) $(OP_SYS_CXXFLAGS)\
$(LIBRARY_SRC_CFLAGS) $(HDEPENDS_CFLAGS)
CXXFLAGS = $($(BUILD_CLASS)_CXXFLAGS) $(POSIX_CXXFLAGS) $(OPT_CXXFLAGS)\
$(DEBUG_CXXFLAGS) $(PIPE_CFLAGS) $(WARN_CXXFLAGS) $(TARGET_CXXFLAGS)\
$(USR_CXXFLAGS) $(CMD_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(CODE_CXXFLAGS)\
$(STATIC_CXXCFLAGS) $(OP_SYS_CXXFLAGS) $(LIBRARY_SRC_CFLAGS) $(HDEPENDS_CFLAGS)
LDFLAGS = $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) \
$(ARCH_DEP_LDFLAGS) $(DEBUG_LDFLAGS) $(OP_SYS_LDFLAGS) $(CROSS_LDFLAGS)\
$(RUNTIME_LDFLAGS) $(CODE_LDFLAGS)
LDFLAGS = $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(CMD_LDFLAGS)\
$(POSIX_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(DEBUG_LDFLAGS) $(OP_SYS_LDFLAGS)\
$($(BUILD_CLASS)_LDFLAGS) $(RUNTIME_LDFLAGS) $(CODE_LDFLAGS)
LDLIBS = \
$(POSIX_LDLIBS) $(ARCH_DEP_LDLIBS) $(DEBUG_LDLIBS) $(OP_SYS_LDLIBS)
LDLIBS = $(POSIX_LDLIBS) $(ARCH_DEP_LDLIBS) $(DEBUG_LDLIBS) $(OP_SYS_LDLIBS)\
$(GNU_LDLIBS_$(GNU))
CPPFLAGS += $(CROSS_CPPFLAGS) $(POSIX_CPPFLAGS)\
$(BASE_CPPFLAGS) $(TARGET_CPPFLAGS) $(USR_CPPFLAGS) $(ARCH_DEP_CPPFLAGS)\
$(OP_SYS_CPPFLAGS) $(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS)
CPPFLAGS += $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS) $(OPT_CPPFLAGS)\
$(DEBUG_CPPFLAGS) $(WARN_CPPFLAGS) $(BASE_CPPFLAGS) $(TARGET_CPPFLAGS)\
$(USR_CPPFLAGS) $(CMD_CPPFLAGS) $(ARCH_DEP_CPPFLAGS) $(OP_SYS_CPPFLAGS)\
$(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS)
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(NOP),echo)
#--------------------------------------------------
# Although RTEMS uses gcc, it wants to use gcc its own way
@@ -82,6 +85,8 @@ OPT_CXXFLAGS_YES = $(CFLAGS_OPTIMIZE_V)
OPT_CFLAGS_NO = $(CFLAGS_DEBUG_V)
OPT_CXXFLAGS_NO = $(CFLAGS_DEBUG_V)
MODEXT=.obj
#--------------------------------------------------
# operating system class (include/os/<os_class>)
OS_CLASS = RTEMS
@@ -96,6 +101,42 @@ OP_SYS_LDFLAGS += $(CPU_CFLAGS) -u Init \
$(PROJECT_RELEASE)/lib/no-signal.rel \
$(PROJECT_RELEASE)/lib/no-rtmon.rel
MOD_SYS_LDFLAGS += $(CPU_CFLAGS) -Wl,-r -nostdlib
# Do not link against libraries which are part of the Generic Image
GESYS_LIBS += -lgcc
GESYS_LIBS += -lc -lm -lrtemscpu -lrtemsbsp -lrtems++ -lbspExt
GESYS_LIBS += -lcexp -ltecla_r -lspencer_regexp -lpmelf -lpmbfd
GESYS_LIBS += -lnfs -ltelnetd -lrtems-gdb-stub
# While not part of the Generic Image it provides symbols which
# would conflict.
GESYS_LIBS += -lrtemsCom
#--------------------------------------------------
# Options for building GeSys loadable objects
MODNAME_YES = $(PRODNAME:%$(EXE)=%$(MODEXT))
MODNAME += $(MODNAME_$(USE_GESYS))
PRODTARGETS += $(MODNAME)
BIN_INSTALLS += $(MODNAME)
# changes to LDFLAGS in CONFIG_COMMON and LINK.cpp in CONFIG.Common.UnixCommon
# should be reflected here with the following exceptions
#
# replace OP_SYS_LDFLAGS with MOD_SYS_LDFLAGS
# replace PROD_LDLIBS with MOD_LDLIBS
# remove STATIC_LDFLAGS
MOD_LDLIBS = $(filter-out $(GESYS_LIBS),$(PROD_LDLIBS))
MOD_LDFLAGS = $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(POSIX_LDFLAGS) \
$(ARCH_DEP_LDFLAGS) $(DEBUG_LDFLAGS) $(MOD_SYS_LDFLAGS) $($(BUILD_CLASS)_LDFLAGS)\
$(RUNTIME_LDFLAGS) $(CODE_LDFLAGS)
LINK.mod = $(CCC) -o $@ $(PRODDIR_LDFLAGS) $(MOD_LDFLAGS)
LINK.mod += $(PROD_LDFLAGS) $(PROD_LD_OBJS) $(PROD_LD_RESS) $(MOD_LDLIBS)
#--------------------------------------------------
# RTEMS has neither shared libraries nor dynamic loading
STATIC_BUILD=YES

View File

@@ -1,5 +1,5 @@
#
# CONFIG.Common.RTEMS-mvme3100
# CONFIG.Common.RTEMS-mvme2100
# $Revision-Id$
# Author: W. Eric Norum <wenorum@lbl.gov>
#

View File

@@ -22,4 +22,6 @@ define MUNCH_CMD
$(RTEMS_TOOLS)/bin/$(OBJCOPY_FOR_TARGET) -O binary $< $@
endef
OP_SYS_LDLIBS += -lbspExt
include $(CONFIG)/os/CONFIG.Common.RTEMS

View File

@@ -12,7 +12,7 @@ MUNCH_SUFFIX = .boot
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
define MUNCH_CMD
$(RTEMS_TOOLS)/bin/$(OBJCOPY_FOR_TARGET) -O binary -R .comment -S $< temp.bin
$(PROJECT_RELEASE)/build-tools/bin2boot $@ 0x00097E00 \
$(BIN2BOOT) $@ 0x00097E00 \
$(PROJECT_RELEASE)/lib/start16.bin 0x00097C00 0 temp.bin 0x00100000 0
rm -f temp.bin
endef

View File

@@ -13,10 +13,5 @@ IOS_PLATFORM = iPhoneSimulator
OP_SYS_CFLAGS += -mios-simulator-version-min=$(IOS_DEPLOYMENT_TARGET)
OP_SYS_LDFLAGS += -mios-simulator-version-min=$(IOS_DEPLOYMENT_TARGET)
#
# Architecture-specific information
#
ARCH_CLASS = i386
# Include definitions common to all iOS targets
include $(CONFIG)/os/CONFIG.Common.iosCommon

View File

@@ -25,7 +25,7 @@ OS_CLASS = iOS
#--------------------------------------------------
# GNU and SDK directories
GNU_DIR = $(PLATFORM_DIR)/Developer/usr
SDK_DIR = $(PLATFORM_DIR)/Developer/SDKs/$(IOS_PLATFORM)$(IOS_VERSION).sdk
SDK_DIR = $(PLATFORM_DIR)/Developer/SDKs/$(IOS_PLATFORM).sdk
#-------------------------------------------------------
# Build architecture flags

View File

@@ -1,9 +1,7 @@
# CONFIG.Common.linux-arm
#
# This file is maintained by the build community.
#
# Definitions for linux-arm target builds
# Sites may override these definitions in CONFIG_SITE.Common.linux-arm
# Override these settings in CONFIG_SITE.Common.linux-arm
#-------------------------------------------------------
# Include definitions common to all Linux targets
@@ -11,26 +9,3 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = arm
ifeq ($(BUILD_CLASS),CROSS)
VALID_BUILDS = Ioc
GNU_TARGET = arm-linux
# prefix of compiler tools
CMPLR_SUFFIX =
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
# Provide a link-time path for shared libraries
SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Provide a link-time path for products
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Provide a link-time path for readline
RUNTIME_LDFLAGS_READLINE_YES = -Wl,-rpath-link,$(GNU_DIR)/lib
RUNTIME_LDFLAGS_READLINE = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS_READLINE_CURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS_READLINE_NCURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
endif

View File

@@ -0,0 +1,13 @@
# CONFIG.Common.linux-arm-debug
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for linux-arm with debug compiler flags
# Override these settings in CONFIG_SITE.Common.linux-arm-debug
#-------------------------------------------------------
# Include definitions common to all linux-arm target archs
include $(CONFIG)/os/CONFIG.Common.linux-arm
HOST_OPT=NO

View File

@@ -12,13 +12,10 @@ include $(CONFIG)/os/CONFIG.Common.UnixCommon
OS_CLASS = Linux
CODE_CPPFLAGS = -D_REENTRANT
POSIX_CPPFLAGS = -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500
# Define _GNU_SOURCE and _DEFAULT_SOURCE for maximum portability
POSIX_CPPFLAGS = -D_GNU_SOURCE -D_DEFAULT_SOURCE
POSIX_LDLIBS = -lpthread
# -D_BSD_SOURCE for gethostname() in unistd.h as needed by cacChannelIO.cpp.
OP_SYS_CPPFLAGS += -D_BSD_SOURCE
OP_SYS_CPPFLAGS += -Dlinux
OP_SYS_LDLIBS += -lrt -ldl

View File

@@ -4,7 +4,7 @@
# This file is maintained by the build community.
#
# Definitions for cygwin-x86 target builds
# Sites may override these definitions in CONFIG_SITE.Common.cygwin-x86
# Sites may override these definitions in CONFIG_SITE.Common.win32-x86-cygwin
#-------------------------------------------------------
# Include definitions common to all Unix targets

View File

@@ -34,7 +34,8 @@ ARCH_DEP_LDFLAGS += -m32
# Override for -DUNIX from CONFIG.Common.UnixCommon
OP_SYS_CPPFLAGS = -D_MINGW
EXE=.exe
EXE = .exe
RES = .coff
VISC_DLL_NO = -DEPICS_DLL_NO
VISC_DLL_YES =

View File

@@ -0,0 +1,12 @@
# CONFIG.linux-arm-debug.Common
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for linux-arm-debug host builds
# Override these settings in CONFIG_SITE.linux-arm-debug.Common
#-------------------------------------------------------
#Include definitions common to linux-arm hosts
include $(CONFIG)/os/CONFIG.linux-arm.Common

View File

@@ -0,0 +1,14 @@
# CONFIG.linux-arm-debug.linux-arm-debug
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for linux-arm-debug host and target build
# Override these settings in CONFIG_SITE.linux-arm-debug.linux-arm-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.linux-arm.linux-arm
# Removes -O optimization and adds -g compile option
HOST_OPT=NO

View File

@@ -0,0 +1,15 @@
# CONFIG.linux-arm.linux-arm-debug
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for linux-arm host - linux-arm-debug target build
# Override these settings in CONFIG_SITE.linux-arm.linux-arm-debug
#-------------------------------------------------------
-include $(CONFIG)/os/CONFIG.linux-arm.linux-arm
-include $(CONFIG)/os/CONFIG_SITE.Common.linux-arm
-include $(CONFIG)/os/CONFIG_SITE.linux-arm.linux-arm
BUILD_CLASS=HOST
HOST_OPT=NO

View File

@@ -1,10 +1,31 @@
# CONFIG.linux-x86.linux-arm
#
# Definitions for linux-x86 host - linux-arm target builds
# Sites may override these definitions in CONFIG_SITE.linux-x86.linux-arm
# Override these settings in CONFIG_SITE.linux-x86.linux-arm
#-------------------------------------------------------
# Copied from x86.x86
VALID_BUILDS = Ioc
GNU_TARGET = arm-linux
# prefix of compiler tools
CMPLR_SUFFIX =
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
# Provide a link-time path for shared libraries
SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Provide a link-time path for products
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Provide a link-time path for readline
RUNTIME_LDFLAGS_READLINE_YES = -Wl,-rpath-link,$(GNU_DIR)/lib
RUNTIME_LDFLAGS_READLINE = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS_READLINE_CURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS_READLINE_NCURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
# Library flags
STATIC_LDFLAGS_YES= -Wl,-Bstatic
STATIC_LDFLAGS_NO=
STATIC_LDLIBS_YES= -Wl,-Bdynamic

View File

@@ -0,0 +1,9 @@
# CONFIG.linux-x86.linux-arm-debug
#
# Definitions for linux-x86 host - linux-arm-debug target builds
# Override these settings in CONFIG_SITE.linux-x86.linux-arm-debug
#-------------------------------------------------------
# Include definitions for linux-arm targets
include $(CONFIG)/os/CONFIG.linux-x86.linux-arm

View File

@@ -0,0 +1,22 @@
# CONFIG.linux-x86.win32-x86-mingw
#
# Definitions for linux-x86 host win32-x86-mingw target builds
# Override these definitions in CONFIG_SITE.linux-x86.win32-x86-mingw
#-------------------------------------------------------
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon
# Add resource compiler
RCCMD = $(CMPLR_PREFIX)windres$(CMPLR_SUFFIX) $(INCLUDES) $< $@
# Remove -fPIC flags, add out-implib
SHRLIB_CFLAGS =
SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
LOADABLE_SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
# Don't link with gcc library
GNU_LDLIBS_YES =
# Link with winsock2
OP_SYS_LDLIBS = -lws2_32

View File

@@ -0,0 +1,8 @@
# CONFIG.linux-x86_64.linux-arm
#
# Definitions for linux-x86_64 host - linux-arm target builds
# Sites may override these definitions in CONFIG_SITE.linux-x86_64.linux-arm
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.linux-x86.linux-arm

View File

@@ -0,0 +1,8 @@
# CONFIG.linux-x86_64.linux-arm-debug
#
# Definitions for linux-x86_64 host - linux-arm-debug target builds
# Override these settings in CONFIG_SITE.linux-x86_64.linux-arm-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.linux-x86.linux-arm

View File

@@ -0,0 +1,9 @@
# CONFIG.linux-x86_64.win32-x86-mingw
#
# Definitions for linux-x86_64 host win32-x86-mingw target builds
# Override these definitions in CONFIG_SITE.linux-x86_64.win32-x86-mingw
#-------------------------------------------------------
# Settings as for the linux-x86 host architecture
include $(CONFIG)/os/CONFIG.linux-x86.win32-x86-mingw

View File

@@ -3,7 +3,7 @@
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for solaris-sparc Sun compiler host builds
# Definitions for solaris-sparc64 Sun compiler host builds
# Sites may override these definitions in CONFIG_SITE.solaris-sparc64.Common
#-------------------------------------------------------

View File

@@ -3,7 +3,7 @@
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for solaris-sparc Sun compiler host - solaris-sparc Sun compiler target builds
# Definitions for solaris-sparc64 compiler host - solaris-sparc64 compiler target builds
# Sites may override these definitions in CONFIG_SITE.solaris-sparc64.solaris-sparc64
#-------------------------------------------------------

View File

@@ -3,8 +3,8 @@
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for solaris-sparc host - solaris-sparc target build
# Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc
# Definitions for solaris host - solaris target build
# Sites may override these definitions in CONFIG_SITE.solarisCommon.solarisCommon
#-------------------------------------------------------
GNU = NO

View File

@@ -4,7 +4,7 @@
# This file is maintained by the build community.
#
# Definitions for win32-x86-cygwin host archs
# Sites may override these definitions in CONFIG_SITE.win32-x86-cygwin.Common
# Sites may override these definitions in CONFIG_SITE.win32-x86-mingw.Common
#-------------------------------------------------------
#Include definitions common to unix hosts

View File

@@ -9,22 +9,27 @@
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon
# Undo various things set by CONFIG.gnuCommon
CMPLR_PREFIX =
# Remove $(GNU_BIN)/ path
CC = $(CMPLR_PREFIX)gcc
CCC = $(CMPLR_PREFIX)g++
AR = $(CMPLR_PREFIX)ar -rc
LD = $(CMPLR_PREFIX)ld -r
RANLIB = $(CMPLR_PREFIX)ranlib
RES = .coff
# Add resource compiler
RCCMD = $(CMPLR_PREFIX)windres $(INCLUDES) $< $@
# No -fPIC avoids "-fPIC ignored for target (all code is position independent)"
# Remove -fPIC flags, add out-implib
SHRLIB_CFLAGS =
SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
LOADABLE_SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
# Override linking with gcc library from CONFIG.gnuCommon
# Don't link with gcc library
GNU_LDLIBS_YES =
# Link with winsock2
OP_SYS_LDLIBS = -lws2_32

View File

@@ -189,7 +189,8 @@ OP_SYS_CXXFLAGS = $(COMPILER_CXXFLAGS)
# '-entry:_DllMainCRTStartup$(DLLENTRY)'
DLLENTRY = @12
WIN32_DLLFLAGS = /subsystem:windows /dll $(OPT_LDFLAGS) $(USR_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS)
WIN32_DLLFLAGS = /subsystem:windows /dll $(OPT_LDFLAGS) \
$(USR_LDFLAGS) $(CMD_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS)
#
# specify dll .def file only if it exists

View File

@@ -13,7 +13,7 @@
ARCH_DEP_CPPFLAGS += /favor:blend
#ARCH_DEP_CPPFLAGS += /Wp64
# /favor:blend both AMD64 and INTEL64
# /favor:blend both AMD64 and INTEL64 This is the default
# /favor:AMD64
# /favor:INTEL64 (new value)
# /favor:EN64T (old value)

View File

@@ -1,17 +1,26 @@
# CONFIG_SITE.Common.RTEMS
#
# $Revision-Id$
#
# Site-specific information for all RTEMS targets
#
#-------------------------------------------------------
# Where to find RTEMS
#
# APS:
RTEMS_VERSION = 4.10.2
RTEMS_BASE = /usr/local/rtems/rtems-$(RTEMS_VERSION)
RTEMS_BASE = /usr/local/vw/rtems/rtems-$(RTEMS_VERSION)
# Cross-compile toolchain in $(RTEMS_TOOLS)/bin
#
RTEMS_TOOLS = $(RTEMS_BASE)
# Link Generic System loadable objects instead of full executable.
#
# A GeSys object is similar to a shared library. It can be (un)loaded
# at runtime by the Generic System loader which is available as a
# patch against RTEMS.
USE_GESYS = NO
# If you're using neither BOOTP/DHCP nor FLASH to pick up your IOC
# network configuration you must uncomment and specify your Internet

View File

@@ -16,11 +16,12 @@
#
# Xcode 4.5 dropped support for the ARMv6.
#
# ARMv8 (arm64) devices: iPhone 5S
# ARMv7s devices: iPhone 5 and 5C, iPad Gen 4
# ARMv7 devices: iPhone 3GS, 4 and 4S, iPod Touch Gen 3 to 5
# iPad Gen 1 to 3, iPad Mini, Apple TV Gen 2 and 3
# ARMv6 devices: iPhone 1 and 3G, iPod Touch Gen 1 and 2
# arm64 devices: iPhone 5S, 6 and 6 Plus, iPad Air Gen 1 and 2,
# iPad Mini Gen 2 and 3
# armv7s devices: iPhone 5 and 5C, iPad Gen 4
# armv7 devices: iPhone 3GS, 4 and 4S, iPod Touch Gen 3 to 5
# iPad Gen 1 to 3, iPad Mini, Apple TV Gen 2 and 3
# armv6 devices: iPhone 1 and 3G, iPod Touch Gen 1 and 2
#ARCH_CLASS = arm64
#ARCH_CLASS = armv7s arm64

View File

@@ -0,0 +1,18 @@
# CONFIG_SITE.Common.ios-x86
#
# $Revision-Id$
#
# Site-specific settings for ios-x86 target builds
#-------------------------------------------------------
# Which x86 instruction set(s) to generate code for:
# The iPhone Simulator now supports both 32-bit and 64-bit
# instruction sets since the iPhone 6 uses a 64-bit CPU.
#
# Apple's compilers can build for multiple architectures,
# generating a Universal binary. This is larger and takes
# longer to compile, but runs efficiently on all devices.
#ARCH_CLASS = i386
ARCH_CLASS = i386 x86_64
#ARCH_CLASS = x86_64

View File

@@ -5,16 +5,6 @@
# Site-specific settings for Apple iOS builds
#-------------------------------------------------------
# iOS SDK Version number (not the XCode version).
# We haven't tested our current build rules on the older
# versions of either XCode or the iOS SDK, be warned!
#IOS_VERSION = 5.0
#IOS_VERSION = 5.1
#IOS_VERSION = 6.0
#IOS_VERSION = 6.1
IOS_VERSION = 7.0
# Minimum version of iOS the executables must run on.
# Earlier versions may work, if XCode supports them.
@@ -22,7 +12,13 @@ IOS_VERSION = 7.0
#IOS_DEPLOYMENT_TARGET = 5.1
#IOS_DEPLOYMENT_TARGET = 6.0
#IOS_DEPLOYMENT_TARGET = 6.1
IOS_DEPLOYMENT_TARGET = 7.0
#IOS_DEPLOYMENT_TARGET = 7.0
#IOS_DEPLOYMENT_TARGET = 7.1
IOS_DEPLOYMENT_TARGET = 8.0
#IOS_DEPLOYMENT_TARGET = 8.1
# Older versions of Xcode may require this SDK_DIR definition
#SDK_DIR = $(PLATFORM_DIR)/Developer/SDKs/$(IOS_PLATFORM)$(IOS_DEPLOYMENT_TARGET).sdk
# Which compiler to use:

View File

@@ -0,0 +1,41 @@
# CONFIG_SITE.Common.linux-arm
#
# $Revision-Id$
#
# Site Specific definitions for all linux-arm targets
#-------------------------------------------------------
# NOTE for SHARED_LIBRARIES: In most cases if this 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
# 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
# Needs -lncurses (RHEL 5 etc.):
#COMMANDLINE_LIBRARY = READLINE_NCURSES
# Needs -lcurses (older versions)
#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

View File

@@ -1,9 +1,12 @@
# CONFIG_SITE.Common.linux-xscale_be
#
# $Revision-Id$
#
# Site specific definitions for linux-xscale_be target builds.
#-------------------------------------------------------
# Set GNU_DIR to point to directory containing the tool-chain
GNU_DIR = /usr/local/xscale_be
# APS:
GNU_DIR = /usr/local/vw/xscale_be

View File

@@ -2,6 +2,6 @@
#
# $Revision-Id$
#
# Site Specific definitions for cygwin-x86 target
# Site Specific definitions for win32-x86-cygwin target
# Only the local epics system manager should modify this file

View File

@@ -1,11 +1,9 @@
# CONFIG_SITE.win32-x86-mingw.Common
# CONFIG_SITE.Common.win32-x86-mingw
#
# $Revision-Id$
#
# Site Specific definitions for cygwin-x86 target
# Only the local epics system manager should modify this file
# Site Specific definitions for win32-x86-mingw target
# If readline is not installed comment the following line
# to omit command-line editing and history support
# If readline is available uncomment the following line
# to enable command-line editing and history support
#COMMANDLINE_LIBRARY = READLINE

View File

@@ -0,0 +1,13 @@
# CONFIG_SITE.linux-arm-debug.linux-arm-debug
#
# $Revision-Id$
#
# Site specific overrides for linux-arm-debug host and target builds
#-------------------------------------------------------
#Prepares the object code to collect data for profiling with prof.
#PROFILE=YES
#Compiles for profiling with the gprof profiler.
#GPROF=YES

View File

@@ -1,3 +1,9 @@
# CONFIG_SITE.linux-x86-debug.linux-x86-debug
#
# $Revision-Id$
#
# Site specific overrides for linux-x86-debug host and target builds
#-------------------------------------------------------
#Prepares the object code to collect data for profiling with prof.
#PROFILE=YES

View File

@@ -1,4 +1,4 @@
# CONFIG_SITE.linux-x86.linux-arm
# CONFIG_SITE.linux-x86.linux-arm
#
# $Revision-Id$
#
@@ -8,7 +8,8 @@
# Tools install path
#GNU_DIR = /home/targetOS/linux-arm/host/x86-linux/gcc_3.3.3
GNU_DIR = /net/phoebus/vw/zynq-2011.09
# APS:
GNU_DIR = /usr/local/vw/zynq-2011.09
# GNU crosscompiler target name
GNU_TARGET = arm-xilinx-linux-gnueabi

View File

@@ -0,0 +1,9 @@
# CONFIG_SITE.linux-x86.linux-arm-debug
#
# $Revision-Id$
#
# Site specific settings for linux-x86 host - linux-arm-debug target builds
#-------------------------------------------------------
# Inherit settings from linux-arm
include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-arm

View File

@@ -0,0 +1,23 @@
# CONFIG_SITE.linux-x86.win32-x86-mingw
#
# Configuration for linux-x86 host win32-x86-mingw target builds
#-------------------------------------------------------
# Early versions of the MinGW cross-build tools can only build
# static (non-DLL) libraries. Fedora's cross-build of gcc 4.4.6
# needs these uncommented, other distributions have not been
# tested with this release of Base:
SHARED_LIBRARIES = NO
STATIC_BUILD = YES
# The cross-build tools are in $(GNU_DIR)/bin
# Default is /usr
#GNU_DIR = /usr/local
# Different distribution cross-build packages use different prefixes:
# Ubuntu:
#CMPLR_PREFIX = i686-w64-mingw32-
# RHEL:
CMPLR_PREFIX = i686-pc-mingw32-
# Debian?
#CMPLR_PREFIX = i586-mingw32msvc-

View File

@@ -2,10 +2,8 @@
#
# $Revision-Id$
#
# Site specific override definitions for solaris-sparc host builds
# Only the local epics system manager should modify this file
# Site specific overrides for linux-x86_64 host and target builds
#-------------------------------------------------------
#Prepares the object code to collect data for profiling with prof.
#PROFILE=YES

View File

@@ -0,0 +1,9 @@
# CONFIG_SITE.linux-x86_64.linux-arm
#
# $Revision-Id$
#
# Site specific settings for linux-x86_64 host - linux-arm target builds
#-------------------------------------------------------
# Inherit setting from linux-x86
include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-arm

View File

@@ -0,0 +1,9 @@
# CONFIG_SITE.linux-x86_64.linux-arm-debug
#
# $Revision-Id$
#
# Site specific settings for linux-x86_64 host - linux-arm-debug target builds
#-------------------------------------------------------
# Inherit settings from linux-arm
include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-arm

View File

@@ -0,0 +1,8 @@
# CONFIG_SITE.linux-x86_64.win32-x86-mingw
#
# Configuration for linux-x86_64 host win32-x86-mingw target builds
#-------------------------------------------------------
# Inherit from the linux-x86 host architecture
include $(CONFIG)/os/CONFIG_SITE.linux-x86.win32-x86-mingw

View File

@@ -3,15 +3,9 @@
# $Revision-Id$
#
# Site Specific definitions for win32-x86-mingw target
# Only the local epics system manager should modify this file
# The MinGW bin directory must be in your path.
# Uncomment the following settings for MinGW_w32 releases
# <MinGW directory>/bin should be in your path
#CMPLR_PREFIX=i686-w64-mingw32-
#CC = $(CMPLR_PREFIX)gcc
#CCC = $(CMPLR_PREFIX)g++
#AR = $(CMPLR_PREFIX)ar -rc
#LD = $(CMPLR_PREFIX)ld -r
#RANLIB = $(CMPLR_PREFIX)ranlib
# Set the compiler prefix for your MinGW installation
#CMPLR_PREFIX = i686-w64-mingw32-
#CMPLR_PREFIX = i586-mingw32msvc-

View File

@@ -100,7 +100,7 @@
later.
GNU readline or Tecla library
GNU readline and Tecla librararies can be used by the IOC shell to
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.
@@ -124,7 +124,7 @@
EPICS documentation is available through the [3]EPICS website at
Argonne.
Release specific documenataion can also be found in the
Release specific documentation can also be found in the
base/documentation directory of the distribution.
Directory Structure
@@ -137,7 +137,7 @@
base/configure Operating system independent build config files
base/configure/os Operating system dependent build config files
base/configure/tools Perl and shell scripts used in the build
base/documentation Distributation documentation
base/documentation Distribution documentation
base/src All epics base source code in subdirectories
base/src/RTEMS Code to configure RTEMS for EPICS
base/src/as Access security
@@ -170,7 +170,7 @@
base/src/libCom/macLib Macro substitution handler
base/src/libCom/misc Miscellaneous utilities
base/src/libCom/osi Operating system independent API
base/src/libCom/osi/os Operating system dependant code in subdirectories
base/src/libCom/osi/os Operating system dependent code in subdirectories
base/src/libCom/ring Methods for creating and using ring buffers
base/src/libCom/taskwd Task watchdog
base/src/libCom/test Test tools (timer, semBinary, semMutex,fdmgr, ...)
@@ -206,14 +206,14 @@
Build related components
base/documentation/README* files
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.WIN32 Microsoft WIN32 specific instructions
README.cxxTemplates Information about C++ templates in EPICS base
README.MS_Windows Microsoft Windows specific instructions
README.cris Axis CRIS specific instructions
README.darwin.html Installation notes for OS X (Darwin)
README.niCpu030 NI cpu030 specific instructions
README.darwin Installation notes for Mac OS X (Darwin)
RELEASE_NOTES.html Notes on release changes
KnownProblems.html List of known problems and workarounds
Converting*To*.html Release specific conversion instructions
@@ -240,7 +240,7 @@
CONFIG_BASE_VERSION Definitions for EPICS base version number
CONFIG_COMMON Definitions common to all builds
CONFIG_ENV Definitions of EPICS environment variables
CONFIG_SITE Site specific make defintions
CONFIG_SITE Site specific make definitions
CONFIG_SITE_ENV Site defaults for EPICS environment variables
MAKEFILE Installs CONFIG* RULES* creates
CONFIG_APP_INCLUDE
@@ -271,7 +271,7 @@
base/src/tools directory - contains Perl scripts used for the build
Makefile Makefile for installing the scripts into cfg dir
convertRelease.pl Performs consistancy checks on RELEASE files
convertRelease.pl Performs consistency checks on RELEASE files
cvsclean.pl Remove all .#* files in directory tree
dos2unix.pl Converts text file from DOS CR/LF to unix ISO
expandvars.pl Tool to expand @VAR@ variables while copying a file

View File

@@ -1,4 +1,7 @@
<!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>
@@ -102,7 +105,7 @@
For RTEMS targets, you need RTEMS core and toolset version 4.9.2 or later.</P>
<P><B>GNU readline or Tecla library</B><BR>
GNU readline and Tecla librararies can be used by the IOC shell to
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.
@@ -124,7 +127,7 @@
<H3><A NAME="0_0_8"> Documentation</A></H3>
<BLOCKQUOTE>EPICS documentation is available through the
<a href="http://www.aps.anl.gov/epics/">EPICS website</a> at Argonne.
<P>Release specific documenataion can also be found in the base/documentation
<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>
@@ -137,7 +140,7 @@
base/configure Operating system independent build config files
base/configure/os Operating system dependent build config files
base/configure/tools Perl and shell scripts used in the build
base/documentation Distributation documentation
base/documentation Distribution documentation
base/src All epics base source code in subdirectories
base/src/RTEMS Code to configure RTEMS for EPICS
base/src/as Access security
@@ -170,7 +173,7 @@
base/src/libCom/macLib Macro substitution handler
base/src/libCom/misc Miscellaneous utilities
base/src/libCom/osi Operating system independent API
base/src/libCom/osi/os Operating system dependant code in subdirectories
base/src/libCom/osi/os Operating system dependent code in subdirectories
base/src/libCom/ring Methods for creating and using ring buffers
base/src/libCom/taskwd Task watchdog
base/src/libCom/test Test tools (timer, semBinary, semMutex,fdmgr, ...)
@@ -210,14 +213,15 @@
<H3><A NAME="0_0_11"> Build related components</A></H3>
<BLOCKQUOTE>
<H4>base/documentation/README* files</H4>
<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.WIN32 Microsoft WIN32 specific instructions
README.cxxTemplates Information about C++ templates in EPICS base
README.MS_Windows Microsoft Windows specific instructions
README.cris Axis CRIS specific instructions
README.darwin.html Installation notes for OS X (Darwin)
README.niCpu030 NI cpu030 specific instructions
README.darwin Installation notes for Mac OS X (Darwin)
RELEASE_NOTES.html Notes on release changes
KnownProblems.html List of known problems and workarounds
Converting*To*.html Release specific conversion instructions
@@ -246,7 +250,7 @@
CONFIG_BASE_VERSION Definitions for EPICS base version number
CONFIG_COMMON Definitions common to all builds
CONFIG_ENV Definitions of EPICS environment variables
CONFIG_SITE Site specific make defintions
CONFIG_SITE Site specific make definitions
CONFIG_SITE_ENV Site defaults for EPICS environment variables
MAKEFILE Installs CONFIG* RULES* creates
CONFIG_APP_INCLUDE
@@ -279,7 +283,7 @@
<H4>base/src/tools directory - contains Perl scripts used for the build</H4>
<PRE>
Makefile Makefile for installing the scripts into cfg dir
convertRelease.pl Performs consistancy checks on RELEASE files
convertRelease.pl Performs consistency checks on RELEASE files
cvsclean.pl Remove all .#* files in directory tree
dos2unix.pl Converts text file from DOS CR/LF to unix ISO
expandvars.pl Tool to expand @VAR@ variables while copying a file

View File

@@ -13,6 +13,116 @@
<!-- Insert new items immediately below here ... -->
<h3>aoRecord raw conversion overflows</h3>
<p>The ao record type now checks converted raw values and limits them to the
32-bit integer range before writing them to the RVAL field. Previously value
overflows relied on Undefined Behaviour which could give different results on
different platforms. The ROFF fields of the ao and ai record types are now
DBF_ULONG to allow an ROFF setting of 0x80000000 to work properly.</p>
<h3>Changes to &lt;top&gt;/cfg/* files</h3>
<p>The order in which cfg/CONFIG* and cfg/RULES* files are included from support
applications listed in the configure/RELEASE* files has been changed. Previously
these files were included in the order in which the top areas are listed in the
RELEASE file, but it makes more sense to load them in reverse order since later
entries override earlier ones in Makefiles but the release file order is
supposed to allow earlier entries to take precedence over later ones. The same
change has been made to the inclusion of the &lt;top&gt;/configure/RULES_BUILD
files.</p>
<p>Two new file types can also be provided in a module's cfg directory. Files
named TOP_RULES* will be included by the top-level Makefile of other modules
that refer to this module; files name DIR_RULES* will be included by all
Makefiles that merely descend into lower-level directories. The cfg/RULES* files
are only included when make is building code inside the O.&lt;arch&gt;
directories.</p>
<p>The new cfg/DIR_RULES* file inclusion was designed to permit new recursive
make actions to be implemented by appending the name of the new action to the
ACTIONS variable. There must be a matching rule in one of the cfg/RULES* files
when doing this. Similar rules may also be defined in the cfg/TOP_RULES* and/or
cfg/DIR_RULES* files, but these should only state prerequisites and not directly
provide commands to be executed.</p>
<h3>MinGW Cross-builds from Linux</h3>
<p>Build configuration files have been back-ported from the 3.15 branch that
allows cross-building of the win32-x86-mingw target from either linux-x86 or
linux-x86_64 hosts. Many Linux distributions now package the necessary MinGW
cross-build tools and libraries to support this. Adjust the settings in
configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw and add win32-x86-mingw to
the CROSS_COMPILER_TARGET_ARCHS variable in configure/CONFIG_SITE or in
configure/os/CONFIG_SITE.linux-x86.Common.</p>
<h3>Build rules for RTEMS GESYS modules</h3>
<p>RTEMS target builds can now be configured to make GESYS modules by changing
the <CODE>USE_GESYS=NO</code> setting in the file
configure/os/CONFIG_SITE.Common.RTEMS to <code>YES</code>.</p>
<h3>Added Make variables for command-line use</h3>
<p>The following variables are now used during the build process, reserved for
setting on the command-line only (Makefiles should continue to use the
<code>USR_</code> equivalents):</p>
<ul>
<li>CMD_INCLUDES</li>
<li>CMD_CPPFLAGS</li>
<li>CMD_CFLAGS</li>
<li>CMD_CXXFLAGS</li>
<li>CMD_LDFLAGS</li>
<li>CMD_DBFLAGS</li>
<li>CMD_DBDFLAGS</li>
<li>CMD_ARFLAGS</li>
</ul>
<p>For example:</p>
<blockquote><pre>
make CMD_INCLUDES=/opt/local/include CMD_LDFLAGS=-L/opt/local/lib
</pre></blockquote>
<h3>Back-ported dbLoadRecordsHook from the 3.15 branch</h3>
<p>See the Release Notes from the Base 3.15.1 release for details.</p>
<h3>Enhanced API for asTrapWrite listeners</h3>
<p>External software such as the CA Put Logging module that registers a listener
with the asTrapWrite subsystem was not previously given access to the actual
data being sent by the CA client. In most cases this was not a problem as the
listener can look at the field being modified both before and after the
operation, but if the put processes the record which immediately overwrites the
new value, the client's value cannot be observed.</p>
<p>This release adds three fields to the asTrapWriteMessage structure that is
passed to the listener routines. These new fields provide the CA data type, the
number of array elements, and a pointer to the source data buffer. This change
is completely backwards compatible with listener code written against the
original API. The new API can be detected at compile-time as follows:</p>
<blockquote><pre>
#include "asLib.h"
/* ... */
#ifdef asTrapWriteWithData
/* Enhanced API */
#endif
</pre></blockquote>
<h3>Back-ported the <q>tapfiles</q> build target from 3.15</h3>
<p>This GNUmake target runs the same tests as the <q>runtests</q> target, but
instead of summarizing or displaying the output for each test script it creates
a <q>.tap</q> file inside the architecture build directory which contains the
detailed test output. The output file can be parsed by continuous integration
packages such as <a href="http://www.jenkins-ci.org/">Jenkins</a> to show the
test results.</p>
<h3>Fix buffer overflow in epicsStrnRawFromEscaped()</h3>
<p>Launchpad <a href="https://bugs.launchpad.net/bugs/1388313">bug

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -30,25 +30,38 @@ typedef enum{
} asClientStatus;
typedef void (*ASCLIENTCALLBACK) (ASCLIENTPVT,asClientStatus);
/* The following routines are macros with the following syntax
long asCheckGet(ASCLIENTPVT asClientPvt);
long asCheckPut(ASCLIENTPVT asClientPvt);
*/
#define asCheckGet(asClientPvt)\
(asActive \
? ((asClientPvt)->access>=asREAD ? TRUE : FALSE)\
: TRUE)
#define asCheckPut(asClientPvt)\
(asActive \
? ((asClientPvt)->access>=asWRITE ? TRUE : FALSE)\
: TRUE)
#define asTrapWriteBefore(asClientPvt,user,host,addr) \
(((asActive) && (asClientPvt)->trapMask) \
? asTrapWriteBeforeWrite((user),(host),(addr)) \
: 0)
#define asCheckGet(asClientPvt) \
(!asActive || ((asClientPvt)->access >= asREAD))
#define asCheckPut(asClientPvt) \
(!asActive || ((asClientPvt)->access >= asWRITE))
/* More convenience macros
void *asTrapWriteWithData(ASCLIENTPVT asClientPvt,
const char *userid, const char *hostid, void *addr,
int dbrType, int no_elements, void *data);
void asTrapWriteAfter(ASCLIENTPVT asClientPvt);
*/
#define asTrapWriteWithData(asClientPvt, user, host, addr, type, count, data) \
((asActive && (asClientPvt)->trapMask) \
? asTrapWriteBeforeWithData((user), (host), (addr), (type), (count), (data)) \
: 0)
#define asTrapWriteAfter(pvt) \
if (pvt) asTrapWriteAfterWrite(pvt)
/* This macro is for backwards compatibility, upgrade any code
calling it to use asTrapWriteWithData() instead ASAP:
void *asTrapWriteBefore(ASCLIENTPVT asClientPvt,
const char *userid, const char *hostid, void *addr);
*/
#define asTrapWriteBefore(asClientPvt, user, host, addr) \
asTrapWriteWithData(asClientPvt, user, host, addr, 0, 0, NULL)
#define asTrapWriteAfter(pvt) if((pvt)) asTrapWriteAfterWrite((pvt))
epicsShareFunc long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction);
epicsShareFunc long epicsShareAPI asInitFile(
const char *filename,const char *substitutions);
@@ -100,8 +113,9 @@ epicsShareFunc int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname,
epicsShareFunc int epicsShareAPI asDumpHash(void);
epicsShareFunc int epicsShareAPI asDumpHashFP(FILE *fp);
epicsShareFunc void * epicsShareAPI asTrapWriteBeforeWrite(
const char *userid,const char *hostid,void *addr);
epicsShareFunc void * epicsShareAPI asTrapWriteBeforeWithData(
const char *userid, const char *hostid, void *addr,
int dbrType, int no_elements, void *data);
epicsShareFunc void epicsShareAPI asTrapWriteAfterWrite(void *pvt);

View File

@@ -3,8 +3,7 @@
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*asTrapWrite.c */
@@ -100,47 +99,53 @@ void epicsShareAPI asTrapWriteUnregisterListener(asTrapWriteId id)
= (listenerPvt *)ellNext(&plistenerPvt->node);
if(plistenerPvt->plistener == plistener) {
ellDelete(&pwriteMessage->listenerPvtList,&plistenerPvt->node);
freeListFree(pasTrapWritePvt->freeListListenerPvt,(void *)plistenerPvt);
freeListFree(pasTrapWritePvt->freeListListenerPvt, plistenerPvt);
}
plistenerPvt = pnext;
}
pwriteMessage = (writeMessage *)ellNext(&pwriteMessage->node);
}
ellDelete(&pasTrapWritePvt->listenerList,&plistener->node);
free((void *)plistener);
free(plistener);
epicsMutexUnlock(pasTrapWritePvt->lock);
}
void * epicsShareAPI asTrapWriteBeforeWrite(
const char *userid,const char *hostid,void *addr)
void * epicsShareAPI asTrapWriteBeforeWithData(
const char *userid, const char *hostid, void *addr,
int dbrType, int no_elements, void *data)
{
writeMessage *pwriteMessage;
listener *plistener;
listenerPvt *plistenerPvt;
if(pasTrapWritePvt==0) return(0);
if(ellCount(&pasTrapWritePvt->listenerList)<=0) return 0;
if (pasTrapWritePvt == 0 ||
ellCount(&pasTrapWritePvt->listenerList) <= 0) return 0;
pwriteMessage = (writeMessage *)freeListCalloc(
pasTrapWritePvt->freeListWriteMessage);
pwriteMessage->message.userid = userid;
pwriteMessage->message.hostid = hostid;
pwriteMessage->message.serverSpecific = addr;
pwriteMessage->message.dbrType = dbrType;
pwriteMessage->message.no_elements = no_elements;
pwriteMessage->message.data = data;
ellInit(&pwriteMessage->listenerPvtList);
epicsMutexMustLock(pasTrapWritePvt->lock);
ellAdd(&pasTrapWritePvt->writeMessageList,&pwriteMessage->node);
ellAdd(&pasTrapWritePvt->writeMessageList, &pwriteMessage->node);
plistener = (listener *)ellFirst(&pasTrapWritePvt->listenerList);
while(plistener) {
plistenerPvt = (listenerPvt *)freeListCalloc(
while (plistener) {
listenerPvt *plistenerPvt = (listenerPvt *)freeListCalloc(
pasTrapWritePvt->freeListListenerPvt);
plistenerPvt->plistener = plistener;
pwriteMessage->message.userPvt = 0;
(*plistener->func)(&pwriteMessage->message,0);
plistener->func(&pwriteMessage->message, 0);
plistenerPvt->userPvt = pwriteMessage->message.userPvt;
ellAdd(&pwriteMessage->listenerPvtList,&plistenerPvt->node);
ellAdd(&pwriteMessage->listenerPvtList, &plistenerPvt->node);
plistener = (listener *)ellNext(&plistener->node);
}
epicsMutexUnlock(pasTrapWritePvt->lock);
return((void *)pwriteMessage);
return pwriteMessage;
}
void epicsShareAPI asTrapWriteAfterWrite(void *pvt)
@@ -148,20 +153,22 @@ void epicsShareAPI asTrapWriteAfterWrite(void *pvt)
writeMessage *pwriteMessage = (writeMessage *)pvt;
listenerPvt *plistenerPvt;
if(pwriteMessage==0 || pasTrapWritePvt==0) return;
if (pwriteMessage == 0 ||
pasTrapWritePvt == 0) return;
epicsMutexMustLock(pasTrapWritePvt->lock);
plistenerPvt = (listenerPvt *)ellFirst(&pwriteMessage->listenerPvtList);
while(plistenerPvt) {
while (plistenerPvt) {
listenerPvt *pnext = (listenerPvt *)ellNext(&plistenerPvt->node);
listener *plistener;
plistener = plistenerPvt->plistener;
listener *plistener = plistenerPvt->plistener;
pwriteMessage->message.userPvt = plistenerPvt->userPvt;
(*plistener->func)(&pwriteMessage->message,1);
ellDelete(&pwriteMessage->listenerPvtList,&plistenerPvt->node);
freeListFree(pasTrapWritePvt->freeListListenerPvt,(void *)plistenerPvt);
plistener->func(&pwriteMessage->message, 1);
ellDelete(&pwriteMessage->listenerPvtList, &plistenerPvt->node);
freeListFree(pasTrapWritePvt->freeListListenerPvt, plistenerPvt);
plistenerPvt = pnext;
}
ellDelete(&pasTrapWritePvt->writeMessageList,&pwriteMessage->node);
freeListFree(pasTrapWritePvt->freeListWriteMessage,(void *)pwriteMessage);
ellDelete(&pasTrapWritePvt->writeMessageList, &pwriteMessage->node);
freeListFree(pasTrapWritePvt->freeListWriteMessage, pwriteMessage);
epicsMutexUnlock(pasTrapWritePvt->lock);
}

View File

@@ -3,9 +3,8 @@
* 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.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*asTrapWrite.h*/
/* Author: Marty Kraimer Date: 07NOV2000 */
@@ -24,6 +23,9 @@ typedef struct asTrapWriteMessage {
const char *hostid;
void *serverSpecific;
void *userPvt;
int dbrType; /* Data type from ca/db_access.h, NOT dbFldTypes.h */
int no_elements;
void *data; /* Might be NULL if no data is available */
} asTrapWriteMessage;

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -591,7 +591,7 @@ void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO (
}
else {
// dont reverse the lock hierarchy
epicsGuardRelease < epicsMutex > guardRelease ();
epicsGuardRelease < epicsMutex > guardRelease ( guard );
{
//
// we will definately stall out here if all of the

View File

@@ -3,8 +3,7 @@
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
@@ -16,26 +15,6 @@
* Author: Jeff Hill
* Date: 3-27-90
*
* Control System Software for the GTA Project
*
* Copyright 1988, 1989, the Regents of the University of California.
*
* This software was produced under a U.S. Government contract
* (W-7405-ENG-36) at the Los Alamos National Laboratory, which is
* operated by the University of California for the U.S. Department
* of Energy.
*
* Developed by the Controls and Automation Group (AT-8)
* Accelerator Technology Division
* Los Alamos National Laboratory
*
* Direct inqueries to:
* Jeff HIll, AT-8, Mail Stop H820
* Los Alamos National Laboratory
* Los Alamos, New Mexico 87545
* Phone: (505) 665-1831
* E-mail: johill@lanl.gov
*
* PURPOSE:
* Broadcasts fan out over the LAN, but old IP kernels do not allow
* two processes on the same machine to get the same broadcast
@@ -108,23 +87,24 @@ static const unsigned short PORT_ANY = 0u;
/*
* makeSocket()
*/
static bool makeSocket ( unsigned short port, bool reuseAddr, SOCKET * pSock )
static int makeSocket ( unsigned short port, bool reuseAddr, SOCKET * pSock )
{
int status;
union {
struct sockaddr_in ia;
struct sockaddr sa;
} bd;
SOCKET sock = epicsSocketCreate ( AF_INET, SOCK_DGRAM, 0 );
if ( sock == INVALID_SOCKET ) {
return false;
*pSock = sock;
return SOCKERRNO;
}
/*
* no need to bind if unconstrained
*/
if ( port != PORT_ANY ) {
int status;
union {
struct sockaddr_in ia;
struct sockaddr sa;
} bd;
memset ( (char *) &bd, 0, sizeof (bd) );
bd.ia.sin_family = AF_INET;
@@ -132,15 +112,16 @@ static bool makeSocket ( unsigned short port, bool reuseAddr, SOCKET * pSock )
bd.ia.sin_port = htons ( port );
status = bind ( sock, &bd.sa, (int) sizeof(bd) );
if ( status < 0 ) {
status = SOCKERRNO;
epicsSocketDestroy ( sock );
return false;
return status;
}
if ( reuseAddr ) {
epicsSocketEnableAddressReuseDuringTimeWaitState ( sock );
}
}
*pSock = sock;
return true;
return 0;
}
repeaterClient::repeaterClient ( const osiSockAddr &fromIn ) :
@@ -156,10 +137,10 @@ bool repeaterClient::connect ()
{
int status;
if ( ! makeSocket ( PORT_ANY, false, & this->sock ) ) {
if ( int sockerrno = makeSocket ( PORT_ANY, false, & this->sock ) ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
epicsSocketConvertErrorToString (
sockErrBuf, sizeof ( sockErrBuf ), sockerrno );
fprintf ( stderr, "%s: no client sock because \"%s\"\n",
__FILE__, sockErrBuf );
return false;
@@ -300,20 +281,25 @@ inline bool repeaterClient::identicalPort ( const osiSockAddr &fromIn )
bool repeaterClient::verify ()
{
SOCKET tmpSock;
bool success = makeSocket ( this->port (), false, & tmpSock );
if ( success ) {
int sockerrno = makeSocket ( this->port (), false, & tmpSock );
if ( sockerrno == SOCK_EADDRINUSE ) {
// Normal result, client using port
return true;
}
if ( sockerrno == 0 ) {
// Client went away, released port
epicsSocketDestroy ( tmpSock );
}
else {
if ( SOCKERRNO != SOCK_EADDRINUSE ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
fprintf ( stderr, "CA Repeater: bind test err was \"%s\"\n",
sockErrBuf );
}
char sockErrBuf[64];
epicsSocketConvertErrorToString (
sockErrBuf, sizeof ( sockErrBuf ), sockerrno );
fprintf ( stderr, "CA Repeater: Bind test error \"%s\"\n",
sockErrBuf );
}
return ! success;
return false;
}
@@ -387,10 +373,10 @@ static void register_new_client ( osiSockAddr & from,
if ( ! init ) {
SOCKET sock;
if ( ! makeSocket ( PORT_ANY, true, & sock ) ) {
if ( int sockerrno = makeSocket ( PORT_ANY, true, & sock ) ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
epicsSocketConvertErrorToString (
sockErrBuf, sizeof ( sockErrBuf ), sockerrno );
fprintf ( stderr, "%s: Unable to create repeater bind test socket because \"%s\"\n",
__FILE__, sockErrBuf );
}
@@ -511,18 +497,18 @@ void ca_repeater ()
port = envGetInetPortConfigParam ( & EPICS_CA_REPEATER_PORT,
static_cast <unsigned short> (CA_REPEATER_PORT) );
if ( ! makeSocket ( port, true, & sock ) ) {
if ( int sockerrno = makeSocket ( port, true, & sock ) ) {
/*
* test for server was already started
*/
if ( SOCKERRNO == SOCK_EADDRINUSE ) {
if ( sockerrno == SOCK_EADDRINUSE ) {
osiSockRelease ();
debugPrintf ( ( "CA Repeater: exiting because a repeater is already running\n" ) );
return;
}
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
epicsSocketConvertErrorToString (
sockErrBuf, sizeof ( sockErrBuf ), sockerrno );
fprintf ( stderr, "%s: Unable to create repeater socket because \"%s\" - fatal\n",
__FILE__, sockErrBuf );
osiSockRelease ();

View File

@@ -462,7 +462,7 @@ SV * CA_new(const char *class, const char *name, ...) {
SvREFCNT_dec(ca_ref);
if (pch->conn_sub)
SvREFCNT_dec(pch->conn_sub);
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
return ca_ref;
@@ -491,7 +491,7 @@ void CA_DESTROY(SV *ca_ref) {
Safefree(pch);
if (status != ECA_NORMAL)
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
@@ -516,7 +516,7 @@ void CA_change_connection_event(SV *ca_ref, SV *sub) {
status = ca_change_connection_event(pch->chan, handler);
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -600,7 +600,7 @@ void CA_put(SV *ca_ref, SV *val, ...) {
Safefree(p.dbr);
}
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
XSRETURN(0);
}
@@ -695,7 +695,7 @@ void CA_put_callback(SV *ca_ref, SV *sub, SV *val, ...) {
}
if (status != ECA_NORMAL) {
SvREFCNT_dec(put_sub);
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
XSRETURN(0);
}
@@ -736,7 +736,7 @@ void CA_put_acks(SV *ca_ref, SV *sevr, ...) {
status = ca_put(DBR_PUT_ACKS, pch->chan, &acks);
if (status != ECA_NORMAL)
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
XSRETURN(0);
}
@@ -760,7 +760,7 @@ void CA_put_ackt(SV *ca_ref, int ack, ...) {
status = ca_put(DBR_PUT_ACKS, pch->chan, &ackt);
if (status != ECA_NORMAL)
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
XSRETURN(0);
}
@@ -788,7 +788,7 @@ void CA_get(SV *ca_ref) {
status = ca_get(best_type(pch), pch->chan, &pch->data);
}
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -869,7 +869,7 @@ void CA_get_callback(SV *ca_ref, SV *sub, ...) {
exit_croak:
SvREFCNT_dec(get_sub);
croak(croak_msg);
croak("%s", croak_msg);
}
@@ -953,7 +953,7 @@ SV * CA_create_subscription(SV *ca_ref, const char *mask_str, SV *sub, ...) {
exit_croak:
SvREFCNT_dec(mon_ref);
SvREFCNT_dec(mon_sub);
croak(croak_msg);
croak("%s", croak_msg);
}
@@ -970,7 +970,7 @@ void CA_clear_subscription(const char *class, SV *mon_ref) {
status = ca_clear_subscription(event);
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -980,7 +980,7 @@ void CA_clear_subscription(const char *class, SV *mon_ref) {
void CA_pend_io(const char *class, double timeout) {
int status = ca_pend_io(timeout);
if (status != ECA_NORMAL) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -995,7 +995,7 @@ int CA_test_io(const char *class) {
void CA_pend_event(const char *class, double timeout) {
int status = ca_pend_event(timeout);
if (status != ECA_TIMEOUT) {
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -1089,7 +1089,7 @@ void CA_add_exception_event(const char *class, SV *sub) {
if (status != ECA_NORMAL) {
SvREFCNT_dec(exception_sub);
exception_sub = NULL;
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}
@@ -1147,7 +1147,7 @@ void CA_replace_printf_handler(const char *class, SV *sub) {
if (status != ECA_NORMAL) {
SvREFCNT_dec(printf_sub);
printf_sub = NULL;
croak(get_error_msg(status));
croak("%s", get_error_msg(status));
}
}

View File

@@ -25,9 +25,8 @@ PERL_VERSION = $(shell $(PERL) ../perlConfig.pl version)
PERL_ARCHNAME = $(shell $(PERL) ../perlConfig.pl archname)
PERL_ARCHPATH = $(PERL_VERSION)/$(PERL_ARCHNAME)
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),)
# Doesn't build on WIN32
ifeq ($(T_A),$(EPICS_HOST_ARCH)) # No cross-builds (wrong Perl!)
ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),) # Doesn't build on WIN32
LOADABLE_LIBRARY_HOST = Cap5
PERL_SCRIPTS += cainfo.pl
@@ -53,10 +52,12 @@ include $(TOP)/configure/RULES
ifdef T_A
EXTUTILS = $(shell $(PERL) ../perlConfig.pl privlib)/ExtUtils
PERLBIN = $(shell $(PERL) ../perlConfig.pl bin)
XSUBPP = $(firstword $(wildcard $(PERLBIN)/xsubpp $(EXTUTILS)/xsubpp))
%.c: ../%.xs
$(RM) $@ $@_new
$(PERL) $(EXTUTILS)/xsubpp -typemap $(EXTUTILS)/typemap $< > $@_new && $(MV) $@_new $@
$(PERL) $(XSUBPP) -typemap $(EXTUTILS)/typemap $< > $@_new && $(MV) $@_new $@
%.html: ../%.pm
$(RM) $@

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -61,28 +61,34 @@ capri caPriority = DEFAULT_CA_PRIORITY; /* CA Priority */
void sprint_long (char *ret, long val, IntFormatT outType)
static void sprint_long (char *ret, dbr_long_t val, IntFormatT outType)
{
long i, bit, skip=-1L; /* used only for printing bits */
switch (outType) {
case hex: sprintf(ret, "0x%lX", val); break;
case oct: sprintf(ret, "0o%lo", val); break;
case bin:
for (i=31; i>=0 ; i--)
{
bit = (val>>i) & 0x1L;
if (skip<0 && bit)
{
if (outType == bin && val != 0) {
/* sprintf doesn't do binary; this code doesn't handle 0 */
int i, skip = -1;
for (i = 31; i >= 0; i--) {
int bit = (val >> i) & 1;
if (skip < 0 && bit) {
skip = 31 - i; /* skip leading 0's */
ret[i+1] = '\0';
}
if (skip >= 0)
{
ret[31-i-skip] = (bit) ? '1' : '0';
if (skip >= 0) {
ret[31-i-skip] = '0' + bit;
}
}
break;
default: sprintf(ret, "%ld", val); /* decimal */
}
else {
const char *fmt[4] = { /* Order must match the enum IntFormatT */
"%ld" /* dec */,
"0" /* bin, val is 0 */,
"0o%lo" /* oct */,
"0x%lX" /* hex */
};
/* Formats have long modifier, pass value as a long */
sprintf(ret, fmt[outType], (long) val);
}
}
@@ -115,6 +121,7 @@ char *val2str (const void *v, unsigned type, int index)
strcpy (str, "*** invalid type");
return str;
}
strcpy (str, "!!!");
base_type = type % (LAST_TYPE+1);

View File

@@ -61,6 +61,10 @@
epicsShareDef struct dbBase *pdbbase = 0;
epicsShareDef volatile int interruptAccept=FALSE;
/* Hook Routines */
epicsShareDef DB_LOAD_RECORDS_HOOK_ROUTINE dbLoadRecordsHook = NULL;
static short mapDBFToDBR[DBF_NTYPES] = {
/* DBF_STRING => */ DBR_STRING,
/* DBF_CHAR => */ DBR_CHAR,
@@ -817,7 +821,11 @@ int epicsShareAPI dbLoadDatabase(const char *file, const char *path, const char
int epicsShareAPI dbLoadRecords(const char* file, const char* subs)
{
return dbReadDatabase(&pdbbase, file, 0, subs);
int status = dbReadDatabase(&pdbbase, file, 0, subs);
if (!status && dbLoadRecordsHook)
dbLoadRecordsHook(file, subs);
return status;
}
@@ -961,6 +969,11 @@ long epicsShareAPI dbGetField(DBADDR *paddr,short dbrType,
if (nRequest && *nRequest > 1) *nRequest = 1;
break;
case DBR_DOUBLE: /* Needed for dbCa links */
if (nRequest && *nRequest) *nRequest = 1;
*(double *)pbuffer = epicsNAN;
goto done;
case DBR_CHAR:
case DBR_UCHAR:
if (nRequest && *nRequest > 0) {

View File

@@ -276,9 +276,14 @@ epicsShareFunc long epicsShareAPI dbBufferSize(
short dbrType,long options,long nRequest);
epicsShareFunc long epicsShareAPI dbValueSize(short dbrType);
/* Hook Routine */
typedef void (*DB_LOAD_RECORDS_HOOK_ROUTINE)(const char* filename,
const char* substitutions);
epicsShareExtern DB_LOAD_RECORDS_HOOK_ROUTINE dbLoadRecordsHook;
epicsShareFunc int epicsShareAPI dbLoadDatabase(
const char *filename, const char *path, const char *substitutions);
epicsShareFunc int epicsShareAPI dbLoadRecords(
const char* filename, const char* substitutions);

View File

@@ -367,7 +367,7 @@ long dbCaPutLinkCallback(struct link *plink,short dbrType,
plink->value.pv_link.pvlMask |= pvlOptOutNative;
*/
}
if (nRequest == 1){
if (nRequest == 1 && pca->nelements==1){
long (*fConvert)(const void *from, void *to, struct dbAddr *paddr);
fConvert = dbFastPutConvertRoutine[dbrType][newType];
@@ -381,7 +381,13 @@ long dbCaPutLinkCallback(struct link *plink,short dbrType,
dbAddr.pfield = pca->pputNative;
/*Following only used for DBF_STRING*/
dbAddr.field_size = MAX_STRING_SIZE;
if(nRequest>pca->nelements)
nRequest = pca->nelements;
status = aConvert(&dbAddr, pbuffer, nRequest, pca->nelements, 0);
if(nRequest<pca->nelements) {
long elemsize = dbr_value_size[ca_field_type(pca->chid)];
memset(nRequest*elemsize+(char*)pca->pputNative, 0, (pca->nelements-nRequest)*elemsize);
}
}
link_action |= CA_WRITE_NATIVE;
pca->gotOutNative = TRUE;

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -43,7 +43,7 @@ typedef enum {
#define INVALID_ALARM epicsSevInvalid
#define lastEpicsAlarmSev epicsSevInvalid
epicsShareExtern const char *epicsAlarmSeverityStrings [ALARM_NSEV];
extern const char *epicsAlarmSeverityStrings [ALARM_NSEV];
/* ALARM STATUS - must match menuAlarmStat.dbd */
@@ -98,7 +98,7 @@ typedef enum {
#define WRITE_ACCESS_ALARM epicsAlarmWriteAccess
#define lastEpicsAlarmCond epicsAlarmWriteAccess
epicsShareExtern const char *epicsAlarmConditionStrings [ALARM_NSTATUS];
extern const char *epicsAlarmConditionStrings [ALARM_NSTATUS];
#ifdef __cplusplus
}

View File

@@ -181,6 +181,7 @@ void dbPvdFreeMem(dbBase *pdbbase)
ellDelete(&pbucket->list, (ELLNODE *)ppvdNode);
free(ppvdNode);
}
epicsMutexUnlock(pbucket->lock);
epicsMutexDestroy(pbucket->lock);
free(pbucket);
}

View File

@@ -86,5 +86,6 @@ int main(int argc,char **argv)
dbReportDeviceConfig(pdbbase,stdout);
*/
dbFreeBase(pdbbase);
errlogFlush();
return(0);
}

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -45,7 +45,7 @@
int dbStaticDebug = 0;
static char *pNullString = "";
#define messagesize 100
#define RPCL_LEN 184
#define RPCL_LEN INFIX_TO_POSTFIX_SIZE(80)
static char *ppstring[5]={"NPP","PP","CA","CP","CPP"};
static char *msstring[4]={"NMS","MS","MSI","MSS"};
@@ -727,6 +727,7 @@ void epicsShareAPI dbFreeBase(dbBase *pdbbase)
dbPvdFreeMem(pdbbase);
dbFreePath(pdbbase);
free((void *)pdbbase);
pdbbase = NULL;
return;
}

View File

@@ -228,12 +228,14 @@ int main(int argc,char **argv)
fprintf(outFile,"#ifdef __cplusplus\n");
fprintf(outFile,"extern \"C\" {\n");
fprintf(outFile,"#endif\n");
fprintf(outFile,"#include <epicsAssert.h>\n");
fprintf(outFile,"#include <epicsExport.h>\n");
pdbRecordType = (dbRecordType *)ellFirst(&pdbbase->recordTypeList);
while(pdbRecordType) {
fprintf(outFile,"static int %sRecordSizeOffset(dbRecordType *pdbRecordType)\n{\n",
pdbRecordType->name);
fprintf(outFile," %sRecord *prec = 0;\n",pdbRecordType->name);
fprintf(outFile," assert(pdbRecordType->no_fields==%u);\n", pdbRecordType->no_fields);
for(i=0; i<pdbRecordType->no_fields; i++) {
char name[256];
int j;

View File

@@ -266,12 +266,14 @@ alias: tokenALIAS '(' tokenSTRING ',' tokenSTRING ')'
static int yyerror(char *str)
{
if (str)
epicsPrintf("Error: %s\n ", str);
epicsPrintf("Error: %s\n", str);
else
epicsPrintf("Error");
epicsPrintf(" at or before \"%s\"", yytext);
dbIncludePrint();
yyFailed = TRUE;
if (!yyFailed) { /* Only print this stuff once */
epicsPrintf(" at or before \"%s\"", yytext);
dbIncludePrint();
yyFailed = TRUE;
}
return(0);
}
static long pvt_yy_parse(void)

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -1353,7 +1353,7 @@ gddStatus gdd::put ( const gdd * dd )
// clip to upper limit of source
aitUint32 srcCopySize;
const aitUint32 unusedSrcBelow = srcCopyFirst - srcFirst;
if ( srcElemCount <= unusedSrcBelow ) {
if ( srcElemCount && srcElemCount <= unusedSrcBelow ) {
return gddErrorOutOfBounds;
}

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -1,4 +1,4 @@
#include <Winver.h>
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO

View File

@@ -19,6 +19,7 @@
#define epicsSingleton_h
#include <new>
#include <cstddef>
#include "shareLib.h"
#include "epicsAssert.h"

View File

@@ -88,7 +88,7 @@ int epicsStrnRawFromEscaped(char *to, size_t outsize, const char *from,
pfrom++; /*skip the x*/
for (i=0; i<2; i++) {
if (!isxdigit((int)*pfrom)) break;
if (!isxdigit(0xff & (int)*pfrom)) break;
strval[i] = *pfrom++; nfrom++;
}
sscanf(strval,"%x",&ival);
@@ -131,7 +131,7 @@ int epicsStrnEscapedFromRaw(char *outbuf, size_t outsize, const char *inbuf,
case '\'': len = epicsSnprintf(outpos, maxout, "\\'"); break;
case '\"': len = epicsSnprintf(outpos, maxout, "\\\""); break;
default:
if (isprint((int)c))
if (isprint(0xff & (int)c))
len = epicsSnprintf(outpos, maxout, "%c", c);
else
len = epicsSnprintf(outpos, maxout, "\\%03o",
@@ -166,7 +166,7 @@ size_t epicsStrnEscapedFromRawSize(const char *inbuf, size_t inlen)
nout++;
break;
default:
if (!isprint((int)c))
if (!isprint(0xff & (int)c))
nout += 3;
}
}
@@ -230,7 +230,7 @@ int epicsStrPrintEscaped(FILE *fp, const char *s, size_t len)
case '\'': nout += fprintf(fp, "\\'"); break;
case '\"': nout += fprintf(fp, "\\\""); break;
default:
if (isprint((int)c))
if (isprint(0xff & (int)c))
nout += fprintf(fp, "%c", c);
else
nout += fprintf(fp, "\\%03o", (unsigned char)c);

View File

@@ -1,11 +1,9 @@
/*************************************************************************\
* 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
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
@@ -20,28 +18,36 @@
#include "epicsStdio.h"
/*
* epicsSocketConvertErrnoToString ()
* epicsSocketConvertErrorToString ()
*/
void epicsSocketConvertErrnoToString (
char * pBuf, unsigned bufSize )
void epicsSocketConvertErrorToString (
char * pBuf, unsigned bufSize, int theSockError )
{
if ( bufSize ) {
/*
* this does not work on systems prior to W2K
*/
int theSockError = SOCKERRNO;
DWORD success = FormatMessage (
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_MAX_WIDTH_MASK,
NULL, theSockError,
MAKELANGID ( LANG_NEUTRAL, SUBLANG_DEFAULT ), /* Default language */
pBuf, bufSize, NULL );
if ( ! success ) {
/*
* this does not work on systems prior to W2K
*/
DWORD success = FormatMessage (
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_MAX_WIDTH_MASK,
NULL, theSockError,
MAKELANGID ( LANG_NEUTRAL, SUBLANG_DEFAULT ), /* Default language */
pBuf, bufSize, NULL );
if ( ! success ) {
int status = epicsSnprintf (
pBuf, bufSize, "WINSOCK Error %d", theSockError );
if ( status <= 0 ) {
strncpy ( pBuf, "WINSOCK Error", bufSize );
pBuf [bufSize - 0] = '\0';
}
}
}
}
}
/*
* epicsSocketConvertErrnoToString ()
*/
void epicsSocketConvertErrnoToString (
char * pBuf, unsigned bufSize )
{
epicsSocketConvertErrorToString ( pBuf, bufSize, SOCKERRNO );
}

View File

@@ -366,7 +366,7 @@ void currentTime::getCurrentTime ( epicsTimeStamp & dest )
LONGLONG epicsTimeCurrent = this->epicsTimeLast + offset;
if ( this->epicsTimeLast > epicsTimeCurrent ) {
double diff = static_cast < double >
( this->epicsTimeLast - epicsTimeCurrent );
( this->epicsTimeLast - epicsTimeCurrent ) / EPICS_TIME_TICKS_PER_SEC;
errlogPrintf (
"currentTime::getCurrentTime(): %f sec "
"time discontinuity detected\n",

View File

@@ -1,11 +1,9 @@
/*************************************************************************\
* 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
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* osdSock.c */
@@ -22,14 +20,22 @@
#include "osiSock.h"
/*
* epicsSocketConvertErrnoToString()
* epicsSocketConvertErrorToString()
*/
void epicsSocketConvertErrnoToString (
char * pBuf, unsigned bufSize )
void epicsSocketConvertErrorToString (
char * pBuf, unsigned bufSize, int theSockError )
{
if ( bufSize ) {
strncpy ( pBuf, strerror ( SOCKERRNO ), bufSize );
strncpy ( pBuf, strerror ( theSockError ), bufSize );
pBuf[bufSize-1] = '\0';
}
}
/*
* epicsSocketConvertErrnoToString()
*/
void epicsSocketConvertErrnoToString (
char * pBuf, unsigned bufSize )
{
epicsSocketConvertErrorToString ( pBuf, bufSize, SOCKERRNO );
}

View File

@@ -57,6 +57,7 @@ typedef struct commonAttr{
int maxPriority;
int minPriority;
int schedPolicy;
int usePolicy;
} commonAttr;
typedef struct epicsThreadOSD {
@@ -79,6 +80,7 @@ typedef struct epicsThreadOSD {
typedef struct {
int min_pri, max_pri;
int policy;
int ok;
} priAvailable;
#endif
@@ -138,6 +140,8 @@ static void setSchedulingPolicy(epicsThreadOSD *pthreadInfo,int policy)
#if defined (_POSIX_THREAD_PRIORITY_SCHEDULING)
int status;
if(!pcommonAttr->usePolicy) return;
status = pthread_attr_getschedparam(
&pthreadInfo->attr,&pthreadInfo->schedParam);
checkStatusOnce(status,"pthread_attr_getschedparam");
@@ -278,6 +282,7 @@ int low, try;
prm->min_pri = min;
prm->max_pri = try_pri(max, prm->policy) ? max-1 : max;
prm->ok = 1;
return 0;
}
@@ -290,6 +295,7 @@ void *dummy;
int status;
arg.policy = a_p->schedPolicy;
arg.ok = 0;
status = pthread_create(&id, 0, find_pri_range, &arg);
checkStatusQuit(status, "pthread_create","epicsThreadInit");
@@ -299,6 +305,7 @@ int status;
a_p->minPriority = arg.min_pri;
a_p->maxPriority = arg.max_pri;
a_p->usePolicy = arg.ok;
}
#endif
@@ -361,20 +368,17 @@ static void once(void)
checkStatusOnce(status,"atexit");
epicsThreadOnceCalled = 1;
}
static void * start_routine(void *arg)
{
epicsThreadOSD *pthreadInfo = (epicsThreadOSD *)arg;
int status;
int oldtype;
sigset_t blockAllSig;
sigfillset(&blockAllSig);
pthread_sigmask(SIG_SETMASK,&blockAllSig,NULL);
status = pthread_setspecific(getpthreadInfo,arg);
checkStatusQuit(status,"pthread_setspecific","start_routine");
status = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,&oldtype);
checkStatusQuit(status,"pthread_setcanceltype","start_routine");
status = mutexLock(&listLock);
checkStatusQuit(status,"pthread_mutex_lock","start_routine");
ellAdd(&pthreadList,&pthreadInfo->node);
@@ -608,6 +612,7 @@ epicsShareFunc void epicsShareAPI epicsThreadSetPriority(epicsThreadId pthreadIn
pthreadInfo->osiPriority = priority;
if(!pthreadInfo->isFifoScheduled) return;
#if defined (_POSIX_THREAD_PRIORITY_SCHEDULING)
if(!pcommonAttr->usePolicy) return;
pthreadInfo->schedParam.sched_priority = getOssPriorityValue(pthreadInfo);
status = pthread_attr_setschedparam(
&pthreadInfo->attr,&pthreadInfo->schedParam);

View File

@@ -140,9 +140,11 @@ epicsShareFunc int epicsShareAPI osiSockAttach (void); /* returns T if success,
epicsShareFunc void epicsShareAPI osiSockRelease (void);
/*
* convert socket error number to a string
* convert socket error numbers to a string
*/
epicsShareFunc void epicsSocketConvertErrnoToString (
epicsShareFunc void epicsSocketConvertErrorToString (
char * pBuf, unsigned bufSize, int error );
epicsShareFunc void epicsSocketConvertErrnoToString (
char * pBuf, unsigned bufSize );
typedef union osiSockAddr {

View File

@@ -60,7 +60,9 @@ public:
void start ();
void daemon ();
void stop ();
address addr () const;
protected:
address srvaddr;
SOCKET sock;
epicsThreadId id;
bool exit;
@@ -156,18 +158,20 @@ extern "C" void serverDaemon ( void * pParam ) {
}
server::server ( const address & addrIn ) :
srvaddr ( addrIn ),
sock ( epicsSocketCreate ( AF_INET, SOCK_STREAM, IPPROTO_TCP ) ),
id ( 0 ), exit ( false )
{
testOk ( this->sock != INVALID_SOCKET, "Server socket valid" );
// setup server side
address tmpAddr = addrIn;
int status = bind ( this->sock,
& tmpAddr.sa, sizeof ( tmpAddr ) );
osiSocklen_t slen = sizeof ( this->srvaddr );
int status = bind ( this->sock, & this->srvaddr.sa, slen );
if ( status ) {
testDiag ( "bind to server socket failed, status = %d", status );
testAbort ( "Stop all CA servers before running this test." );
}
if ( getsockname(this->sock, & this->srvaddr.sa, & slen) != 0 ) {
testAbort ( "Failed to read socket address" );
}
status = listen ( this->sock, 10 );
testOk ( status == 0, "Server socket listening" );
@@ -182,7 +186,7 @@ void server::start ()
testOk ( this->id != 0, "Server thread created" );
}
void server::daemon ()
void server::daemon ()
{
while ( ! this->exit ) {
// accept client side
@@ -204,13 +208,18 @@ void server::stop ()
epicsSocketDestroy ( this->sock );
}
address server::addr () const
{
return this->srvaddr;
}
serverCircuit::serverCircuit ( SOCKET sockIn ) :
circuit ( sockIn )
{
circuit * pCir = this;
epicsThreadId threadId = epicsThreadCreate (
"server circuit", epicsThreadPriorityMedium,
epicsThreadGetStackSize(epicsThreadStackMedium),
epicsThreadId threadId = epicsThreadCreate (
"server circuit", epicsThreadPriorityMedium,
epicsThreadGetStackSize(epicsThreadStackMedium),
socketRecvTest, pCir );
testOk ( threadId != 0, "Server circuit thread created" );
}
@@ -231,7 +240,7 @@ static const char *mechName(int mech)
{esscimqi_socketBothShutdownRequired, "esscimqi_socketBothShutdownRequired" },
{esscimqi_socketSigAlarmRequired, "esscimqi_socketSigAlarmRequired" }
};
for (unsigned i=0; i < (sizeof(mechs) / sizeof(mechs[0])); ++i) {
if (mech == mechs[i].mech)
return mechs[i].name;
@@ -248,10 +257,11 @@ MAIN(blockingSockTest)
memset ( (char *) & addr, 0, sizeof ( addr ) );
addr.ia.sin_family = AF_INET;
addr.ia.sin_addr.s_addr = htonl ( INADDR_LOOPBACK );
addr.ia.sin_port = htons ( 5064 ); // CA
addr.ia.sin_port = 0;
server srv ( addr );
srv.start ();
addr = srv.addr ();
clientCircuit client ( addr );
epicsThreadSleep ( 1.0 );

Some files were not shown because too many files have changed in this diff Show More