Compare commits

...

278 Commits

Author SHA1 Message Date
Ralph Lange
42a67524e0 Update CONFIG_BASE_VERSION for 3.15.3, remove "not released" from RELEASE_NOTES 2015-11-22 17:54:12 +01:00
Ralph Lange
d4ed70154b doc: add reference to LP bug #1466129 to known problems page 2015-11-22 17:33:58 +01:00
Andrew Johnson
f776f6b422 Set Base version to -rc1-DEV 2015-10-26 14:31:25 -05:00
Ralph Lange
cd746a339f configure: update CONFIG_BASE_VERSION for 3.15.3-rc1 2015-10-26 17:22:37 +01:00
Ralph Lange
6438750615 tools: change builtin _USER_ macro name to avoid clashes with makeBaseApp 2015-10-26 13:41:46 +01:00
Andrew Johnson
2ec5c80652 Fix internal anchor in filters.pod 2015-10-13 18:39:50 -05:00
Andrew Johnson
e1039bacfc Merged DB file parser fix from 3.14, revno 12605 2015-10-13 14:41:39 -05:00
Andrew Johnson
54381b7bf9 Fix DB file parser crashes 2015-10-13 12:03:32 -05:00
Andrew Johnson
69d3c94328 Set Base version to -pre1-DEV 2015-10-12 10:38:00 -05:00
Ralph Lange
a02860728e configure: update CONFIG_BASE_VERSION for 3.15.3-pre1 2015-10-12 10:35:30 +02:00
Ralph Lange
440ccc3c4a Merged Andrew's ntptime-on-vxworks branch 2015-10-11 12:04:16 +02:00
Ralph Lange
3d19f19d81 Merge Ralph's config-from-snippets branch 2015-10-11 09:59:39 +02:00
Andrew Johnson
214edd42d1 Minor RULES_EXPAND changes
Added support for a _PATTERN variable which calls $(wildcard) and
prepends .. and the other SRC_DIRS automatically.
Use $(ECHO) instead of @echo so make -s works silently.
Added another meta-rule to create .d files when make needs one.
2015-10-11 00:50:50 -05:00
Ralph Lange
f8b0b2f5f0 tools: add new builtin macros to assemblies 2015-10-10 19:12:11 +02:00
Ralph Lange
8596dc41f2 configure: add assemblies to RULES_EXPAND 2015-10-10 18:55:17 +02:00
Ralph Lange
88cb33a04d tools: fix in assembleSnippets script and test for Windows (getpwuid() not implemented) 2015-10-10 18:54:20 +02:00
Ralph Lange
5af0663058 Back out 12706 (assembly integration in build system) 2015-10-10 18:17:35 +02:00
Ralph Lange
830704021d Add creating config files from snippets to build system. 2015-10-09 17:28:46 +02:00
Ralph Lange
96ee2cd00c tools: install assembleSnippets.pl 2015-10-09 15:28:40 +02:00
Ralph Lange
c2d2f671bb tools: add -M option to assembleSnippets.pl (creates dependency file) 2015-10-09 14:15:26 +02:00
Ralph Lange
4b9958304d tools: add assembleSnippets.pl and test 2015-10-09 11:25:45 +02:00
Andrew Johnson
d0875f4f12 Make the NTPTime provider optional on VxWorks 2015-10-05 17:44:26 -05:00
Andrew Johnson
c74eb27474 Merged changes from 3.14 branch, to revno 12604 2015-09-18 11:51:51 -05:00
Ralph Lange
5aa145920d rec: fix promptgroups for biRecord 2015-09-16 13:56:52 +02:00
Andrew Johnson
bc3cbd990f Applied Ambroz Bizjak's freeListItemsAvail.patch 2015-08-31 12:11:30 -05:00
Andrew Johnson
53bf7cd994 Applied Ambroz Bizjak's epicsSingletonMutex.patch 2015-08-31 11:54:04 -05:00
Andrew Johnson
a9c4d59537 Applied Ambroz Bizjak's timerQueueActive.patch 2015-08-31 11:52:32 -05:00
Robert Soliday
d32332d545 libCom/test: Fix for MSVS 2015 2015-08-27 11:34:41 -05:00
Andrew Johnson
88864e949b Merge changes from 3.14 branch, to revno 12599 2015-08-20 11:14:01 -05:00
Andrew Johnson
fe4f607e63 libCom/errlog: Don't store stderr in pvtData.console
Some VxWorks BSPs close the stderr stream that the shell running
the startup script created and open a new one for the interactive
shell. This change makes pvtData.console==NULL mean use stderr
instead of storing the stderr value in pvtData.console at init.
2015-08-13 10:44:52 -05:00
Andrew Johnson
9e82a96700 dbTest: Remove special ENUM handling from dbpf()
This was preventing the value check in cvt_st_menu() from working.
2015-08-10 15:04:11 -05:00
Andrew Johnson
ef7399159c dbAccess: Make dbPut() always do special processing after put
If the value gets rejected by a put to SCAN, we must still call
dbPutSpecial() to add the record back onto its old scan thread.
2015-08-10 15:03:48 -05:00
Andrew Johnson
d7b3293ba3 libCom: Use MSVC's struct timespec when available 2015-08-07 09:41:48 -05:00
Andrew Johnson
9014ca899d dbStatic: Fix invalid memory read 2015-07-30 11:57:50 -05:00
Andrew Johnson
c5130468cd Let dbdToHtml work with wrong newlines 2015-07-24 10:42:09 -05:00
Andrew Johnson
7dd067e887 Merged dbCa bug-fix from 3.14 branch, revno 12595 2015-07-23 18:02:54 -05:00
Andrew Johnson
c56091978c db: Fixed obscure dbCa bug
This could be triggered if dbCaRemoveLink() is called on a link for
which there is an outstanding dbCaPutCallback().

Normally a dbCaPutCallback() callback routine is passed the associated
userPvt pointer as an argument, but in the event that dbCaRemoveLink()
gets used on the same link between the put and its completion callback,
the callback routine was being called with the link pointer as the
argument instead.

For all the existing Asyn Soft Channel device supports this is not a
problem as they all pass the link pointer as their userPvt argument, but
that won't necessarily always be the case.

Also updated the comments describing the process of removing links.
2015-07-23 17:57:30 -05:00
Andrew Johnson
2f8e6bf17e Fix smoothing for Nan/Inf values in devAiSoftCallback 2015-07-23 13:05:38 -05:00
Andrew Johnson
144281e0a3 Removed extraneous .db file 2015-07-23 12:34:05 -05:00
Andrew Johnson
83c2414ad0 Merged changes from 3.14 branch to revno 12594 2015-07-23 10:13:07 -05:00
Michael Davidsaver
504665bf09 iocInit: move dbCaShutdown earlier
Switch dbCaShutdown from an exit hook to
be called from iocShutdown.  Place it
after callback shutdown.
2015-07-21 19:08:07 -04:00
Michael Davidsaver
1411522a11 dbCa: only add dbCaExit once 2015-07-21 15:53:37 -04:00
Andrew Johnson
ae3d3904d9 Fix minor locking issue in dbEvent.c 2015-07-17 18:09:14 -05:00
Andrew Johnson
002bafdf07 Add testHarnessDone 2015-07-17 18:06:58 -05:00
Michael Davidsaver
8bfa40d858 dbScan: avoid race on shutdown 2015-07-16 17:05:41 -04:00
Michael Davidsaver
138e2f1ad5 callback: fix race on shutdown
epicsEventDestory() in the main thread could be called
before epicsEventTrigger() completes in the worker.
2015-07-16 17:05:41 -04:00
Michael Davidsaver
fefe6fd1fc Fix shutdown issues with scan and callback.
The main reason for this merge proposal is the change to "public" API functions.

Use atomic counter to resolve data race on threadsRunning in callback.

Split up callbackShutdown() and scanShutdown() into two phases *Stop() and
*Cleanup(). The *Stop() functions signal worker threads, and wait for them to
exit. The *Cleanup() functions actually reclaim global resources.

These two mechanisms have couplings which are quite complex. I/O Intr scans
involve both scan lists and callbacks.
2015-07-16 11:48:29 -05:00
Andrew Johnson
5eb49ebaf0 Merged changes from 3.14 branch to revno 12590 2015-07-13 13:05:33 -05:00
Andrew Johnson
625172419e libCom: Make epicsReadline behave the same on Darwin 2015-07-01 12:00:42 -05:00
Andrew Johnson
80343363a4 configure: Include RULES_FILE_TYPE earlier
From Benjamin Franksen:

There is one remaining problem with the order of includes in the build
rules for 3.14.12.5: configure/RULES_BUILD includes RULES_FILE_TYPE
(which in turn includes the cfg/RULES* from modules in the RELEASE file)
*after* including RULES.Db and RULES_JAVA. This makes it impossible to
override (pattern) rules in one of these files. Instead,
$(CONFIG)/RULES_FILE_TYPE should be included first.
2015-07-01 11:30:02 -05:00
Andrew Johnson
444b89f557 libCom: Make readline support clean up on epicsExit() 2015-06-30 14:08:32 -05:00
Andrew Johnson
fa1ddeeb1b Removed the last vestiges of RSET::get_value() 2015-06-23 18:04:33 -05:00
Andrew Johnson
ca46bf70b7 Fixes to attribute handling in dbStaticLib
From Peter Leban of i-tech (Libera)
2015-06-23 17:06:54 -05:00
Andrew Johnson
c0e2a44365 Register dbPutAttribute with iocsh 2015-06-23 17:04:37 -05:00
Andrew Johnson
84c3ec7c64 db: Correct DBF_CHAR range in recGbl.c
Seems invisible, but spotted by Lawrence T. Prevatte III.
2015-06-23 15:51:00 -05:00
Andrew Johnson
65e781d58a db: Fix off-by-one error in initHookName()
Thanks to Lawrence T. Prevatte III for noticing that.
2015-06-23 14:46:29 -05:00
Andrew Johnson
a613a96ad3 libCom: Fix routine name in error message 2015-06-18 10:56:43 -05:00
Ralph Lange
fbd2d4dd31 dbStatic: fix buffer overrun in printing functions by extending the local buffer accordingly 2015-06-05 11:10:10 +02:00
Andrew Johnson
2c28d4b69e Merged Lewis Muir's CAref ToC update
Also added some entries for a couple of missing ca_sg routines.
2015-05-15 10:41:19 -05:00
Andrew Johnson
9946681f72 Update version numbers in documentation for 3.15.3 2015-05-15 10:06:06 -05:00
Ralph Lange
196baac7da documentation: put back red "not released yet" header to RELEASE_NOTES 2015-05-15 14:05:59 +02:00
Ralph Lange
ce93142fe1 configure: set version snapshot back to -DEV 2015-05-15 13:50:14 +02:00
Ralph Lange
e7b20537b9 configure: update CONFIG_BASE_VERSION for 3.15.2 (2nd time for tag move) 2015-05-15 13:47:33 +02:00
Ralph Lange
42a8e61832 documentation: remove red "not released yet" header from RELEASE_NOTES 2015-05-15 13:36:42 +02:00
J. Lewis Muir
5d61a512d1 doc: add ca_put_callback to CA ref man func call interface index
The ca_put_callback function is not listed in the CA Reference Manual's
function call interface index; add it.
2015-05-14 16:23:23 -05:00
Ralph Lange
37e1feac12 configure: set version snapshot back to -DEV 2015-05-14 14:16:53 +02:00
Ralph Lange
3090561b5e configure: update CONFIG_BASE_VERSION for 3.15.2 2015-05-14 14:09:28 +02:00
Ralph Lange
1849b9f4ab Update KnownProblems to new version, add Windows parallel build issue 2015-05-14 14:08:18 +02:00
Ralph Lange
2bf58d3187 Update ReleaseChecklist to new version. 2015-05-14 14:06:47 +02:00
Andrew Johnson
2f6fad0cc3 Fixing and/or investigating Cygwin issues 2015-05-01 11:38:54 -05:00
Andrew Johnson
f384232864 Merged Cygwin fix from 3.14 branch, revno 12584 2015-04-29 14:21:40 -05:00
Andrew Johnson
33b9fba00b Fix for latest Cygwin 2015-04-29 14:01:07 -05:00
Ralph Lange
b7b9e2a79b configure: set version snapshot to -rc1-DEV 2015-04-29 14:20:18 +02:00
Ralph Lange
6de155e97a configure: update CONFIG_BASE_VERSION for 3.15.2-rc1 2015-04-29 13:58:56 +02:00
Andrew Johnson
1f73716d5c Adjust linux-x86 & -x86_64 flags
Moved -m64 from ARCH_DEP_*FLAGS to OP_SYS_*FLAGS where it is on -x86.
Added GNU_TUNE_CFLAGS to -x86_64, adjust related comments
Added -D_FILE_OFFSET_BITS=64 to -x86 builds
2015-04-28 11:27:06 -05:00
Andrew Johnson
2774b4c4af Fix type problem with local CA channels
This commit fixes a problem introduced in Bazaar commit 12658.
Local CA channels were seeing the data type of a channel as an
IOC-specific (dbFldTypes.h) type value instead of the CA type
value from db_access.h.

We introduce a pair of dbChannel*CAType() macros which convert
the dbChannel's dbr_field_type and final_type values into the
CA equivalent type values, and use these macros whenever the
CA encoded field type value is needed. This ensures that the
meaning of the dbChannel member fields never changes (in 3.14
the addr.dbr_field_type was overwritten with the converted
value when connected to by rsrv).
2015-04-22 16:51:31 -05:00
Ralph Lange
bcf47ac663 gdd: fix 64 bit warnings using explicit casts for strlen() results 2015-04-16 14:05:33 +02:00
Ralph Lange
da93312b79 configure: fix Windows builds - don't use static link to create DLL stub 2015-04-16 10:55:14 +02:00
Andrew Johnson
874087f454 Update some version numbers in documentation 2015-04-14 17:58:33 -05:00
Andrew Johnson
a6d3c4f792 Document -D option to msi 2015-04-14 17:57:10 -05:00
Ralph Lange
f168a0f612 configure: set version snapshot to -pre1-DEV 2015-04-14 11:04:27 +02:00
Ralph Lange
5c3032059c configure: update CONFIG_BASE_VERSION for 3.15.2-pre1 2015-04-14 10:14:29 +02:00
Andrew Johnson
76205e5c58 Add podRemove.pl script
Use this to generate .dbd files from .dbd.pod files
so installed *Record.dbd files don't have the
dbdCommon.dbd file expanded out.

Fixes lp:1417428
2015-04-13 10:36:13 -05:00
Ralph Lange
09fab352b0 dbstatic: raise link field length limit to 256 by bumping internal buffer size 2015-04-13 17:13:09 +02:00
Andrew Johnson
2a0356c84f Merged fix to ReadNotifyCache buffer size issue from 3.14 branch 2015-04-09 15:53:16 -05:00
Michael Davidsaver
b082e7d1e8 dbContextReadNotify: Improper handling of array size changes
Issue diagnosed and reported by Ambroz Bizjak.

The dbContextReadNotifyCacheAllocator allocator clears
its cache of free buffers on an array size change.
But doesn't consider buffer already in use, which
will later be free'd.  Such buffers were being
returned to the cache, then reused in allocations
for which they are too short.

Track the size of buffers which are in use.
Only return buffers with the present length
to the cache.  Others are free'd immediately.
2015-04-09 14:39:24 -04:00
Andrew Johnson
198dedba93 Move section divider comment in RULES_BUILD 2015-03-30 11:19:07 -05:00
Andrew Johnson
ffcbd4ca8b Merge changes from 3.14.12.5 (revno 12582) 2015-03-25 12:53:13 -05:00
Andrew Johnson
0a1cf17681 Trivial spacing changes in RELEASE_NOTES 2015-03-25 11:25:09 -05:00
Andrew Johnson
22768b2bb3 Set SNAPSHOT back to -DEV 2015-03-24 10:08:56 -05:00
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
490540b005 Merged from 3.14 branch up to revno 12575 2015-03-19 10:22:15 -05:00
Andrew Johnson
d927afe257 Make including cfg/CONFIG* files unconditional 2015-03-19 10:18:23 -05:00
Andrew Johnson
eaef9aabdf Fix export type of .LINK$ fields, add tests 2015-03-18 16:48:07 -05:00
Andrew Johnson
1fd91f52e2 dbStatic: Add field type lookup routines 2015-03-18 16:34:07 -05:00
Andrew Johnson
f994944531 libCom/posix: Remove pthread_setcanceltype() 2015-03-18 11:36:06 -05:00
Andrew Johnson
e1b2a0c5a3 Merged changes from 3.14 branch up to revno 12573 2015-03-13 11:50:26 -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
99f1dbb75e Merged changes from 3.14 branch up to revno 12570 2015-03-11 16:26:15 -05:00
Andrew Johnson
9577615bba Merged changes from 3.14 branch up to revno 12564 2015-03-11 16:08:29 -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
1cacb8ef72 Make TOP an absolute path when running test programs
If the test starts an IOC, the registerRecordDeviceDriver
routine will compare the absolute path of TOP at build time
against the environment variable value (normally relative)
and print a warning if they differ.
This change cleans up the .tap output from such tests.
2015-03-10 13:04:15 -05:00
Michael Davidsaver
fb7273046c epicsAtomic: also prevent vxWorks from using posix/epicsAtomicOSD.cpp 2015-03-10 10:39:37 -04:00
Michael Davidsaver
5bbd954ec8 epicsAtomic: fix noop OSDs
Ensure that all are epicsAtomicOSD.cpp and use
no-op to prevent RTEMS from using the posix
implementation.
2015-03-09 21:27:49 -04:00
Michael Davidsaver
6bf3f5554f epicsAtomic: fix function def. order
epicsAtomicMemoryBarrierFallback used before definition
2015-03-09 19:48:30 -04:00
Andrew Johnson
e0f97a9215 Set testPlan in dbCaStatsTest.c 2015-03-09 18:07:13 -05:00
Andrew Johnson
a3793c368a Merged changes from 3.14 branch up to revno 12561 2015-03-09 17:59:08 -05:00
Andrew Johnson
dad5b1cc94 Merged Michael's fixatomiclinkage branch 2015-03-09 17:43:44 -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
74c6e81752 Fixed HDEPENDS_MKMFFLAGS 2015-03-08 15:26:07 -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
20155602fc Renamed the record test harness routine
Now named epicsRunRecordTests and as such it
matches the other test harness routines.
2015-03-05 14:50:42 -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
f6067a3949 Merged changes from 3.14 branch up to revno 12557 2015-03-03 11:35:46 -06:00
Andrew Johnson
8a85cea75e Merged revno 12549 from 3.14 branch 2015-03-03 11:21:09 -06:00
Andrew Johnson
c3cef8b295 Merged changes from 3.14 branch up to revno 12548 2015-03-02 17:55:15 -06:00
Andrew Johnson
573d06d71d Merged revno 12546 from 3.14 branch (no changes) 2015-03-02 17:53:17 -06:00
Andrew Johnson
0f6cce2bd1 Merged changes from 3.14 branch up to revno 12545 2015-03-02 17:52:15 -06:00
Andrew Johnson
61438b4e7e Fix Windows builds 2015-03-02 15:04:09 -06:00
Andrew Johnson
d432fb3115 Fix Darwin build 2015-03-02 14:22:25 -06:00
Andrew Johnson
02a105e5ab Merged changes from 3.14 branch up to revno 12540 2015-03-02 11:43:20 -06:00
Andrew Johnson
e8c9783e06 Merged changes from 3.14 branch up to revno 12530 2015-03-02 10:35:35 -06:00
Andrew Johnson
510e477087 Merged revno 12527 from 3.14 branch (no changes) 2015-03-02 10:06:48 -06:00
Andrew Johnson
fb1a0c2b1e Clean up g++ warnings in repeater.cpp 2015-02-28 20:20:56 -06:00
Andrew Johnson
92b4d8e48d Merged changes from 3.14 branch up to revno 12526 2015-02-27 18:11:37 -06:00
Andrew Johnson
b8da39d46b Merged revno 12517 from 3.14 branch (no changes) 2015-02-27 17:52:07 -06:00
Andrew Johnson
b745dbff10 Merged changes from 3.14 branch up to revno 12516 2015-02-27 17:47:55 -06:00
Michael Davidsaver
89596fc308 Fix typo in epicsAtomicTest.cpp testClassify() 2015-02-27 17:29:11 -05:00
Michael Davidsaver
73dcc2745f Fix for Solaris C++ compiler 2015-02-27 17:29:11 -05:00
Michael Davidsaver
332fd550ad epicsAtomic: RTEMS ISR safe impl. for epicsAtomicLock() 2015-02-27 17:29:11 -05:00
Michael Davidsaver
214c9003a9 epicsAtomicTest: include some information about build conditions
Give some idea which implementations are being used
2015-02-27 17:29:11 -05:00
Michael Davidsaver
0d4519eb54 epicsAtomic: fix C linkage
With gcc -std=gnu99 (present default) functions qualified
with plain 'inline' emit strong public symbols (nm says 'T')
in every compilation unit the definition appears.
This causes linking to fail in all cases where executable
are statically linked, and many where dynamic linking is used.
2015-02-27 17:29:11 -05:00
Michael Davidsaver
84e9ff3bc5 libCom/test: Add epicsInlineTest 2015-02-27 17:29:10 -05:00
Michael Davidsaver
b3bfac3f16 add EPICS_ALWAYS_INLINE 2015-02-27 17:29:10 -05: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
7fe5f2f3a3 Another order-only prerequisite 2015-02-06 10:22:55 -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
971a819446 Use order-only prerequisites for include files
This prevents unnecessary recompilations when an include
file gets regenerated.
2015-02-04 16:28:23 -06:00
Andrew Johnson
9316233ba2 Merged changes from 3.14 branch, revno 12514 2015-02-04 11:43:23 -06:00
Andrew Johnson
d9060d85eb Make .t files depend on /makeTestfile.pl 2015-02-04 11:39:26 -06:00
Andrew Johnson
fb960e5fc4 Fix "make tapfiles" on Windows 2015-02-04 11:04:40 -06: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
8705a42a39 Merged fixes from 3.14 branch.
Added new link_field_name() function to dbLink.c, needed to
be able to print the link field name.
2014-12-23 12:01:35 -06:00
Andrew Johnson
2b950754c4 Fix FLNK-over-CA error message 2014-12-23 10:35:09 -06:00
Andrew Johnson
07c8b67549 Add missing DLLSTUB dependency rules 2014-12-11 14:56:31 -06:00
Andrew Johnson
36850cf677 Remove trailing ; from dbGetSevr macro 2014-12-11 13:56:15 -06:00
Andrew Johnson
5b6dce2681 Fix Windows builds
The windows shell doesn't like commands that start ../
Those commands are all found using TOOLS, so by making that
an absolute path we fix that problem.
However GNUmake doesn't recognize targets with relative paths
as being the same as their absolute path, so we have to fix up
some places that were using TOOLS in dependencies.
2014-12-10 17:40:40 -06:00
Andrew Johnson
e886022343 Deprecate and remove all uses of PATH_FILTER 2014-12-10 13:35:15 -06:00
Andrew Johnson
d1481b23d9 Use msi for dependency rules generation
Added -D command, modified RULES.Db to use it.
2014-12-10 12:09:34 -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
24d39ae79d Merge perlbin fix from 3.14. 2014-12-02 11:16:18 -06: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
73c40f052e Set version snapshot back to -DEV 2014-12-01 15:13:48 -06:00
Andrew Johnson
ed37ace27e R3.15.1 2014-12-01 15:07:38 -06:00
Andrew Johnson
bc15875bfb Merge changes from 3.14 branch, revno 12507 2014-12-01 12:29:30 -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
Andrew Johnson
30b789aa49 Fix epicsStrnEscapedFromRaw() and epicsStrnRawFromEscaped()
Major rewrites; the original epicsStrnRawFromEscaped() could read
beyond the end of the input buffer if the input count ended in the
middle of an octal or hex escape sequence. Zero termination did not
always match the return count, and hex escapes were always 2 digits,
contrary to the C standard.

New versions don't use epicsSnprintf() or sscanf() for hex and octal
conversions, so should be slightly faster.

Added 81 new tests to check the above issues.
2014-12-01 11:34:58 -06:00
Ralph Lange
1a94ea1045 libCom/osi: fix - do not set the main thread's Linux name to _main_ (linux) 2014-12-01 13:48:10 +01:00
Andrew Johnson
f1dec35c5c Update KnownProblems list 2014-11-19 16:00:31 -06:00
Andrew Johnson
6e8a3fcd6d Set version snapshot to -rc1-DEV 2014-11-19 15:35:12 -06:00
Andrew Johnson
ec35ef7136 Update version numbers for 3.15.1-rc1 2014-11-19 15:34:02 -06:00
Andrew Johnson
fce8377156 Merge change from 3.14 branch
Up to revno 12506
2014-11-19 15:18:11 -06:00
Andrew Johnson
5c4def1632 Build issues for iOS 2014-11-19 13:57:55 -06:00
Andrew Johnson
bdc57ecb2b Build issues for MinWG 2014-11-19 13:16:56 -06:00
Andrew Johnson
fd3bf215c5 Added missing tests to epicsRunDbTests.c 2014-11-19 10:22:39 -06:00
Ralph Lange
ba922d2bfa ioc/db: fix segfault in dbcaStats when disconnected CA links are present 2014-11-19 15:11:36 +01:00
Ralph Lange
cd8e08651b ioc/db/test: add a test for dbcaStats (detects bug lp:1394212) 2014-11-19 15:08:48 +01:00
Ralph Lange
0627aa5712 std/rec/test: extend arrayOpTest to cover an array of size 1 (detects bug lp:1389298) 2014-11-19 09:59:34 +01:00
Andrew Johnson
adc6219c2a scanIoTest: Extend time for callback threads to run.
Needed for VxWorks 5.5.2 on 68K
2014-11-18 18:10:19 -06:00
Andrew Johnson
a99f1d238e Cleaned up VxWorks 6.9 symLib warnings
VxWorks 6.9 deprecated several symFindBy...() routines, which
result in warning messages at build-time. I rewrote the code
that uses these to use the newer API on VxWorks 6.9.

Also deprecated the two epicsDynLink.h symFindByNameEPICS()
and symFindByNameAndTypeEPICS() routines; epicsFindSymbol() in
epicsFindSymbol.h is now available on most platforms instead.
2014-11-18 17:46:41 -06:00
Andrew Johnson
09797ee7ca Fix ringPointerTest thread priority issue on VxWorks
Picked a priority somewhere in the middle and switch to
that for the two test subroutines that care.
2014-11-18 17:30:43 -06:00
Andrew Johnson
01c0275876 Build stability fixes
Change menuGlobal.dbd and stdRecords.dbd to be generated
as a list of unexpanded include statements, not expanded
out as they have been recently on this branch. This means
any .dbd.pod files in those lists don't have to have been
filtered to remove the POD statements which significantly
simplifies the dependency graph. I had experienced build
loops at times, which this change should prevent.
2014-11-18 14:01:46 -06:00
Michael Davidsaver
d7269f9d80 Revert "dbBkpt: atexit" 2014-11-18 14:56:45 -05:00
Michael Davidsaver
58cd1d0a71 errlog: Don't free globals.
Since the pvtData.atExit flag doesn't prevent all
concurrent use of the pvtData struct we can't safely
free it.
2014-11-18 14:48:15 -05:00
Michael Davidsaver
e4954ba26a dbLock: remove dbLockExit()
No benefit to freeing global locks in unittests,
and this could cause problems with normal IOC
shutdown.
2014-11-18 14:48:15 -05:00
Andrew Johnson
60a5c476b3 Fix single-element array problem
An array field with a maximum size of 1 element would not be
treated as an array, so the record's rset::get_array_info()
routine wasn't being called. Fixed in dbAccess for both
dbGet() and dbPut() operations, and in dbEvent for monitors.

Fixes lp:1389298
2014-11-18 11:10:01 -06:00
Michael Davidsaver
9e63a51707 pcas: avoid reinterpret_cast with sockaddr
Avoid warning about breaking aliasing rules
2014-11-18 11:48:53 -05:00
Michael Davidsaver
93149071b7 dbNotify: shutdown with exitDatabase
Can't cleanup dbNotify while rsrv or scan tasks
are running as there may be operations in progress.
2014-11-18 11:25:15 -05:00
Michael Davidsaver
9c2a62ea96 dbChannel: shutdown from exitDatabase()
Can't cleanup dbChannel while rsrv or scan tasks
remain running.
2014-11-18 11:25:15 -05:00
Andrew Johnson
ae7b8c7aa3 configure: Windows-x64 architecture fixes
* Removed /favor:blend from ARCH_DEP_CPPFLAGS
  It is the default anyway, and including it stops the
  MS Express compilers from building 64-bit executables.
* Added a CONFIG_SITE.Common.windows-x64-static file.
  The MSVS 2010 linker crashes when when generating code
  for this target with HOST_OPT = YES, so make it NO.
2014-11-18 09:51:28 -06:00
Ralph Lange
ac2ff29abb libCom/log: make iocLog client unregister its listener from errlog on shutdown 2014-11-18 15:23:14 +01:00
Michael Davidsaver
f9d0fd351d libCom/test: fix ringPointerTest compile issues on vxWorks and MSVC
Remove C GNU-isms
1) mixing code/variable defs
2) arithmetic on void*
2014-11-17 18:55:47 -05:00
Michael Davidsaver
66fbbbb19a libCom/test: re-write ringPointerTest 2014-11-17 16:51:57 -05:00
Andrew Johnson
89777707c4 cap5: Minor build change on Darwin 2014-11-17 10:56:28 -06:00
Andrew Johnson
4c66f7f2d9 configure: Removed obselete 3.13 compatibility build rule 2014-11-13 17:02:10 -06:00
Michael Davidsaver
924350b362 epicsExit: add epicsExitLater() to trigger process exit without blocking 2014-11-13 11:58:35 -05:00
Michael Davidsaver
d35780888a iocInit: only teardown from iocBuildIsolated()
iocShutdown() should only stop threads and cleanup
if the IOC was started with iocBuildIsolated().
If iocBuild() is used then only close CA links
as was done previously.

This is needed as some device support calls epicsExit()
(while holding a record lock).  This make it impossible
to run the full iocShutdown without deadlocking
in scan/callback shutdown, or segfaulting
in doFreeRecord() or dbLockCleanupRecords()
2014-11-13 11:58:35 -05:00
Andrew Johnson
f7cc0e2d09 Various build system issues
* Removed broken Windows source browser rules and 'browse' targets
* Fixed parallel build issue for Make > 3.81
* Other tidying-up in RULES_ARCHS
* Fix the RTEMS override of the ECHO variable
2014-11-12 16:36:39 -06:00
Andrew Johnson
5554dfd66d Make shared library version numbers use 3 components 2014-11-11 12:57:00 -06:00
Andrew Johnson
69daab81d5 Fix tests after menuScan changes 2014-11-10 17:27:38 -06:00
Andrew Johnson
3aa5d2adee ioc/db menu fixes
* Move including menuScan.dbd from menuGlobal.dbd to base.dbd.
  Menus included in menuGlobal.dbd can't be overridden at build
  time since it gets fully expanded before installation.
* Convert .dbd.pod files before generating menuGlobal.dbd.d
* Remove menuCompress.dbd, nothing in Base uses it any more.
  The compress record has its own compressALG menu
2014-11-10 16:15:52 -06:00
Andrew Johnson
574bac67b4 CAref reformatting/prettification from 3.14 2014-11-08 10:22:03 -06:00
Andrew Johnson
3d03822043 CAref reformatting/prettification 2014-11-08 10:19:59 -06:00
Andrew Johnson
6f7fc7bf8e Merged changes from 3.14 branch
Up to revno 12504.
2014-11-07 15:57:13 -06:00
Andrew Johnson
702edbf4af Merged Lewis Muir's CAref typo fixes 2014-11-07 15:35:30 -06:00
J. Lewis Muir
0d0ac88242 doc: Fix typos in CA reference manual 2014-11-07 14:56:41 -06:00
Andrew Johnson
2ab2470317 Fix epicsStrtod() implementation to detect overflow
The VxWorks version of strtod() that we use returns Inf
instead of setting errno on overflow.
2014-11-07 13:25:16 -06:00
Andrew Johnson
53d9a07f64 Fix buffer overflow in epicsStrnRawFromEscaped
lp:1388313
2014-11-05 10:06:02 -06:00
Andrew Johnson
eae4f60e57 cap5: Fix replace_access_rights_event() channel method 2014-11-04 15:10:50 -06:00
Andrew Johnson
a05856375a Update EPICS_TIMEZONE data in CONFIG_SITE_ENV 2014-11-04 14:55:25 -06:00
Andrew Johnson
05d3bb63aa configure: Added missing menu%.h.d rule
Janet had to remove '..' from the vpaths because it was letting
the build look into the TOP/.. directory, which was causing
major issues. She added back rules for COMMON_DIR and .. but
missed this one.
2014-11-03 17:02:42 -06:00
Andrew Johnson
743e3bd387 cap5: Add replace_access_rights_event() channel method 2014-11-02 23:11:44 -06:00
Andrew Johnson
79b70d651c Flag epicsBoolean with EPICS_DEPRECATED 2014-10-31 17:26:48 -05:00
Andrew Johnson
9d5bffca94 libCom/flex: Default skeleton should be filename only 2014-10-31 16:58:03 -05:00
Andrew Johnson
64bf84169c dbStatic: Added hook routine for dbLoadRecords()
Requested by Tim Mooney for use by Autosave.
See the Release Notes for documentation.

This commit also corrects the decorations for recGblAlarmHook.
2014-10-31 16:18:25 -05:00
Andrew Johnson
647bd334ae iocsh: Protect echo and cd from NULL arguments 2014-10-31 12:19:09 -05:00
Andrew Johnson
09ff608ca9 libCom: Fix use-after-free bug in macCore.c 2014-10-30 17:55:12 -05:00
Andrew Johnson
6c14dc194c Replace the epicsBoolean type in epicsTypes.h 2014-10-30 14:40:19 -05:00
Andrew Johnson
9f163ef8d9 Merged J Lewis Muir's typo-fix branch 2014-10-28 16:20:51 -05:00
J. Lewis Muir
f0156119be cap5: Fix doc typos 2014-10-22 11:03:40 -05:00
Andrew Johnson
f808e4309d cap5 Fixes
1. Support subscribing for DBR_GR_ENUM or DBR_CTRL_ENUM
2. Fix doc example on how to combine timestamp parts
2014-10-17 15:19:00 -05:00
Andrew Johnson
f59123bd3c Added Windows-x64-debug cross-build config file 2014-10-17 11:48:18 -05:00
Ralph Lange
49a9d64946 catools: better out-of-bounds handling when printing enums as DBR_GR/DBR_CTRL 2014-10-09 14:12:39 +02:00
Andrew Johnson
c5740c0dd0 Add relPaths.sh target to convertRelease.pl
This is a /bin/sh syntax version of the dllPath.bat file,
needed to run IOCs under Cygwin when SHARED_LIBRARIES=YES.
2014-10-08 14:18:08 -05:00
Andrew Johnson
3eb6a66f3c Fix build warnings 2014-10-07 15:59:20 -05:00
Andrew Johnson
986f7abb08 Set version snapshot back to -DEV 2014-10-07 01:50:24 -05:00
251 changed files with 4334 additions and 2116 deletions

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
#
@@ -32,8 +32,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
@@ -56,58 +56,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,25 +1,35 @@
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/compiler/$$(CMPLR_CLASS)))
RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include/os/$$(OS_CLASS)))
RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include/compiler/$(CMPLR_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

@@ -14,8 +14,8 @@
EPICS_BASE_HOST_BIN = $(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)
EPICS_BASE_HOST_LIB = $(EPICS_BASE)/lib/$(EPICS_HOST_ARCH)
ifdef T_A
EPICS_BASE_LIB = $(EPICS_BASE)/lib/$(T_A)
EPICS_BASE_BIN = $(EPICS_BASE)/bin/$(T_A)
EPICS_BASE_LIB = $(EPICS_BASE)/lib/$(T_A)
EPICS_BASE_BIN = $(EPICS_BASE)/bin/$(T_A)
endif
#---------------------------------------------------------------
@@ -33,8 +33,10 @@ EPICS_BASE_HOST_LIBS += ca Com
# Version number for base shared libraries (and win32 products)
ifdef BASE_TOP
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
# Unix lib.so.<v.r.m> Darwin lib.<v.r.m>.dylib
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
# Windows only allows 2 levels of version numbering
PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
endif # BASE_TOP
#---------------------------------------------------------------
@@ -50,18 +52,21 @@ BASE_CPPFLAGS += $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK))
#---------------------------------------------------------------
# Where to find the installed build tools
# Windows does not like commands with relative paths starting ../
# but the Perl scripts in TOP/src/tools are OK
TOOLS = $(EPICS_BASE_HOST_BIN)
TOOLS = $(abspath $(EPICS_BASE_HOST_BIN))
FIND_TOOL = $(firstword $(wildcard $(TOOLS)/$(1) $(TOP)/src/tools/$(1)))
#---------------------------------------------------------------
# Epics base build tools and tool flags
MAKEBPT = $(call PATH_FILTER, $(TOOLS)/makeBpt$(HOSTEXE))
MAKEBPT = $(TOOLS)/makeBpt$(HOSTEXE)
DBEXPAND = $(PERL) $(TOOLS)/dbdExpand.pl
DBTORECORDTYPEH = $(PERL) $(TOOLS)/dbdToRecordtypeH.pl
DBTOMENUH = $(PERL) $(TOOLS)/dbdToMenuH.pl
REGISTERRECORDDEVICEDRIVER = $(PERL) $(TOOLS)/registerRecordDeviceDriver.pl
CONVERTRELEASE = $(PERL) $(TOOLS)/convertRelease.pl
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
#-------------------------------------------------------
@@ -78,18 +83,21 @@ REPLACEVAR = $(PERL) $(TOOLS)/replaceVAR.pl
#---------------------------------------------------------------
# private versions of lex/yacc from EPICS
EYACC = $(call PATH_FILTER, $(TOOLS)/antelope$(HOSTEXE))
ELEX = $(call PATH_FILTER, $(TOOLS)/e_flex$(HOSTEXE)) -S$(EPICS_BASE)/include/flex.skel.static
EYACC = $(TOOLS)/antelope$(HOSTEXE)
ELEX = $(TOOLS)/e_flex$(HOSTEXE) -S$(EPICS_BASE)/include/flex.skel.static
YACC = $(EYACC)
LEX = $(ELEX)
#---------------------------------------------------------------
# Our use of msi is incompatible with older versions
MSI3_15 = $(EPICS_BASE_HOST_BIN)/msi
#---------------------------------------------------------------
# External tools and tool flags - must be in path or defined in application
ifndef ADL2DL
ADL2DL = adl2dl
endif
ADL2DL ?= adl2dl
# sch2edif compiler and flags
SCH2EDIF = sch2edif
@@ -99,18 +107,11 @@ SCH2EDIF_FLAGS =
# e2db and flags
# - again there is an assumption where edb.def is installed.
ifndef E2DB
E2DB = e2db
endif
E2DB ?= e2db
E2DB_SYSFLAGS = -ate -d $(CAPFAST_TEMPLATES)/edb.def
E2DB_FLAGS =
ifndef DBST
DBST = dbst
endif
ifndef MSI
MSI = $(EPICS_BASE_HOST_BIN)/msi
endif
DBST ?= dbst

View File

@@ -29,11 +29,11 @@ EPICS_VERSION = 3
EPICS_REVISION = 15
# EPICS_MODIFICATION must be a number >=0 and <256
EPICS_MODIFICATION = 0
EPICS_MODIFICATION = 3
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# Not included if zero
EPICS_PATCH_LEVEL = 2
EPICS_PATCH_LEVEL = 0
# This will end in -DEV between official releases
#EPICS_DEV_SNAPSHOT=-DEV

View File

@@ -177,7 +177,7 @@ LIBRARY_OBJS = $(addsuffix $(OBJ),$(basename $(SRCS) $(USR_SRCS) $(LIB_SRCS) $(L
LIBRARY_LD_OBJS = $(USR_OBJLIBS) $(LIB_OBJLIBS) $(TARGET_OBJS) $(LIBRARY_OBJS)
#--------------------------------------------------
# WIN95/NT resource files
# Windows resource files
TARGET_RESS = $(if $(RES),$(addsuffix $(RES),$(basename $($*_RCS))),)
@@ -187,11 +187,6 @@ PROD_LD_RESS = $(TARGET_RESS) $(PROD_RESS)
LIBRARY_RESS = $(if $(RES),$(addsuffix $(RES),$(basename $(RCS) $(LIB_RCS) $(LIBRARY_RCS))),)
LIBRARY_LD_RESS = $(TARGET_RESS) $(LIBRARY_RESS)
#--------------------------------------------------
# WIN95/NT source browser
PROD_BAF = $(addsuffix $(BAF), $(basename $(PROD)))
LIB_BAF=$(addsuffix $(BAF),$(basename $(LIBRARY)))
#--------------------------------------------------
# C preprocessor, compiler, and linker flag defaults
@@ -219,6 +214,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 =
@@ -277,32 +282,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)
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)
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)
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)
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
@@ -319,7 +327,6 @@ LEXOPT += -I
#--------------------------------------------------
# Build compile line here
PATH_FILTER = $(1)
COMPILE.c = $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES)
COMPILE.cpp = $(CCC) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES)
@@ -332,7 +339,7 @@ PREPROCESS.cpp = $(CPP) $(CPPFLAGS) $(INCLUDES) $< > $@
HDEPENDS_METHOD = MKMF
HDEPENDS_MKMFFLAGS = -m $*$(DEP) $(subst -I,,$(INCLUDES)) $@
HDEPENDS_MKMFFLAGS = -m $*$(DEP) $(INCLUDES) $@
HDEPENDS_MKMF.c = $(MKMF) $(HDEPENDS_FLAGS) $(HDEPENDS_MKMFFLAGS)
HDEPENDS_MKMF.cpp = $(MKMF) $(HDEPENDS_FLAGS) $(HDEPENDS_MKMFFLAGS)
@@ -351,6 +358,11 @@ TARGET_SRCS = $(foreach name, \
SRC_FILES = $(LIB_SRCS) $(LIBSRCS) $(SRCS) $(USR_SRCS) $(PROD_SRCS) $(TARGET_SRCS)
HDEPENDS_FILES = $(addsuffix $(DEP),$(notdir $(basename $(SRC_FILES))))
#--------------------------------------------------
# Deprecated and no longer used in Base
PATH_FILTER = $(1)$(warning PATH_FILTER is deprecated; used for $(1))
#---------------------------------------------------------------
# Names of installed items
#

View File

@@ -23,6 +23,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)
@@ -37,10 +38,13 @@
# solaris-x86_64-gnu (GNU compiler used for host builds)
# win32-x86 (MS Visual C++ 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:
# 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)
@@ -57,13 +61,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)
@@ -98,6 +102,7 @@
# RTEMS-pc386
# RTEMS-psim
# RTEMS-uC5282
# win32-x86-mingw (linux-x86 or -x86_64 host)
#
# Which target architectures to cross-compile for.
@@ -147,7 +152,7 @@ CROSS_WARN=YES
# Use POSIX thread priority scheduling (if available).
# Must be either 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

@@ -30,23 +30,23 @@
# local timezone info for vxWorks and RTEMS IOCs. The format is
# <name>::<minutesWest>:<start daylight>:<end daylight>
# where the start and end are mmddhh - that is month,day,hour
# e.g. for ANL in 2010: EPICS_TIMEZONE=CUS::360:031402:110702
# e.g. for ANL in 2015: EPICS_TIMEZONE=CST/CDT::360:030802:110102
#
# DST for 2011 US: Mar 13 - Nov 06
# EU: Mar 27 - Oct 30
# DST for 2012 US: Mar 11 - Nov 04
# EU: Mar 25 - Oct 28
# DST for 2013 US: Mar 10 - Nov 03
# EU: Mar 31 - Oct 27
# DST for 2014 US: Mar 09 - Nov 02
# EU: Mar 30 - Oct 26
# DST for 2015 US: Mar 08 - Nov 01
# EU: Mar 29 - Oct 25
# (see: http://www.worldtimezone.org/daylight.html)
# DST for 2016 US: Mar 13 - Nov 06
# EU: Mar 27 - Oct 30
# DST for 2017 US: Mar 12 - Nov 05
# EU: Mar 26 - Oct 29
# DST for 2018 US: Mar 11 - Nov 04
# EU: Mar 25 - Oct 28
# DST for 2019 US: Mar 10 - Nov 03
# EU: Mar 31 - Oct 27
# (see: http://www.timeanddate.com/time/map/)
#
# These values are for 2011:
EPICS_TIMEZONE=CUS::360:031302:110602
#EPICS_TIMEZONE=MET::-60:032702:103002
# These values are for 2015:
EPICS_TIMEZONE=CST/CDT::360:030802:110102
#EPICS_TIMEZONE=CET/CEST::-60:032902:102502
# EPICS_TS_NTP_INET
# NTP time server ip address. Uses boot host if not set.

View File

@@ -29,9 +29,9 @@ vpath %.acs $(USR_VPATH) $(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))
REGRDDFLAGS = $(DBDFLAGS) $($*_REGRDDFLAGS) $(USR_REGRDDFLAGS)
DBDFLAGS = $(USR_DBDFLAGS) $(CMD_DBDFLAGS) $(addprefix -I,$(DBD_SEARCH_DIRS))
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) $(CMD_DBFLAGS) $(addprefix -I,$(DB_SEARCH_DIRS))
REGRDDFLAGS = $(DBDFLAGS) $($*_REGRDDFLAGS) $(USR_REGRDDFLAGS) $(CMD_REGRDDFLAGS)
##################################################### Targets
@@ -151,7 +151,6 @@ ACTIONS = inc
ACTIONS += build
ACTIONS += install
ACTIONS += buildInstall
ACTIONS += browse
ACTIONS += runtests tapfiles
actionArchTargets = $(foreach x, $(ACTIONS),\ $(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
@@ -233,10 +232,14 @@ menu%.h$(DEP): menu%.dbd
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
menu%.h$(DEP): ../menu%.dbd
@$(RM) $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
%.dbd$(DEP): %.dbd.pod
@$(RM) $@
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@echo "$(COMMONDEP_TARGET): ../Makefile" > $@
%.dbd$(DEP): %Include.dbd
@$(RM) $@
@@ -255,23 +258,19 @@ menu%.h$(DEP): menu%.dbd
%.db$(RAW)$(DEP): %$(SUBST_SUFFIX)
@$(RM) $@
$(MKMF) -m$@ $(DBFLAGS) $(COMMONDEP_TARGET) $< $(TEMPLATE_FILENAME)
@echo "$(COMMONDEP_TARGET): $(TEMPLATE_FILENAME)" >> $@
@echo "$@: $(TEMPLATE_FILENAME)" >> $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
%.db$(RAW)$(DEP): ../%$(SUBST_SUFFIX)
@$(RM) $@
$(MKMF) -m$@ $(DBFLAGS) $(COMMONDEP_TARGET) $< $(TEMPLATE_FILENAME)
@echo "$(COMMONDEP_TARGET): $(TEMPLATE_FILENAME)" >> $@
@echo "$@: $(TEMPLATE_FILENAME)" >> $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
%.db$(RAW)$(DEP): %.template
@$(RM) $@
$(MKMF) -m$@ $(DBFLAGS) $(COMMONDEP_TARGET) $<
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
%.db$(RAW)$(DEP): ../%.template
@$(RM) $@
$(MKMF) -m$@ $(DBFLAGS) $(COMMONDEP_TARGET) $<
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
%.acf$(DEP): %.acs
@$(RM) $@
@@ -281,6 +280,8 @@ menu%.h$(DEP): menu%.dbd
@$(RM) $@
@$(ACFDEPENDS_CMD)
.PRECIOUS: %$(DEP)
##################################################### CapFast filter
$(COMMON_DIR)/%.edf: ../%.sch $(DEPSCHS)
@@ -300,11 +301,11 @@ $(COMMON_DIR)/%$(SUBST_SUFFIX):
endif
$(INSTALL_DB)/%$(SUBST_SUFFIX): %$(SUBST_SUFFIX)
$(ECHO) "Installing db file $@"
$(ECHO) "Installing substitution file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
$(INSTALL_DB)/%$(SUBST_SUFFIX): ../%$(SUBST_SUFFIX)
$(ECHO) "Installing db file $@"
$(ECHO) "Installing substitution file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
.PRECIOUS: $(COMMON_DIR)/%$(SUBST_SUFFIX)
@@ -318,11 +319,11 @@ $(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)
$(INSTALL_DB)/%.template: ../%.template
$(ECHO) "Installing db file $@"
$(ECHO) "Installing template file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
.PRECIOUS: $(COMMON_DIR)/%.template
@@ -370,7 +371,7 @@ $(COMMON_DIR)/bpt%.dbd: bpt%.data
$(COMMON_DIR)/%.dbd: %.dbd.pod
@$(RM) $(notdir $@)
$(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $<
$(PERL) $(TOOLS)/podRemove.pl -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.dbd: %Include.dbd
@@ -422,7 +423,7 @@ $$(INSTALL_DBD)/$$(notdir $(1)) : $(1)
endef
$(foreach file, $(DBD_INSTALLS), $(eval $(call DBD_INSTALLS_template, $(file))))
.PRECIOUS: $(COMMON_DBDS) $(COMMON_DIR)/%Include.dbd
.PRECIOUS: $(COMMON_DBDS) $(COMMON_DIR)/%.dbd
##################################################### HTML files
@@ -457,27 +458,27 @@ $(COMMON_DIR)/%.db$(RAW): $(COMMON_DIR)/%.edf
$(COMMON_DIR)/%.db$(RAW): %$(SUBST_SUFFIX)
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
@$(RM) $@ $*.tmp
$(MSI) $(DBFLAGS) -S$< $(TEMPLATE_FILENAME) > $*.tmp
$(MV) $*.tmp $@
@$(RM) $(notdir $@)
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) -S$< $(TEMPLATE_FILENAME)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.db$(RAW): ../%$(SUBST_SUFFIX)
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
@$(RM) $@ $*.tmp
$(MSI) $(DBFLAGS) -S$< $(TEMPLATE_FILENAME) > $*.tmp
$(MV) $*.tmp $@
@$(RM) $(notdir $@)
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) -S$< $(TEMPLATE_FILENAME)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.db$(RAW): %.template
$(ECHO) "Inflating database from $<"
@$(RM) $@ $*.tmp
$(MSI) $(DBFLAGS) $< > $*.tmp
$(MV) $*.tmp $@
@$(RM) $(notdir $@)
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.db$(RAW): ../%.template
$(ECHO) "Inflating database from $<"
@$(RM) $@ $*.tmp
$(MSI) $(DBFLAGS) $< > $*.tmp
$(MV) $*.tmp $@
@$(RM) $(notdir $@)
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.acf: %.acs
$(ECHO) "Creating acf file $@"
@@ -508,11 +509,11 @@ $(COMMON_DIR)/%.db: $(COMMON_DIR)/%.db$(RAW)
else
$(INSTALL_DB)/%: %
$(ECHO) "Installing db file $@"
$(ECHO) "Installing $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
$(INSTALL_DB)/%: ../%
$(ECHO) "Installing db file $@"
$(ECHO) "Installing $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
endif

View File

@@ -18,16 +18,17 @@ ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(ARCH))
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
clean$(DIVIDER)$(ARCH) clean:
$(RM) cdCommands envPaths dllPath.bat
$(RM) cdCommands envPaths dllPath.bat relPaths.sh
else
buildInstall$(DIVIDER)$(ARCH) buildInstall:
clean$(DIVIDER)$(ARCH) clean:
endif
cdCommands envPaths dllPath.bat: $(wildcard $(TOP)/configure/RELEASE*) \
cdCommands envPaths dllPath.bat relPaths.sh: \
$(wildcard $(TOP)/configure/RELEASE*) \
$(wildcard $(TOP)/configure/CONFIG_SITE*) $(INSTALL_BIN)
$(CONVERTRELEASE) -a $(ARCH) -t $(IOCS_APPL_TOP) $@
realclean:
$(RM) cdCommands envPaths dllPath.bat
$(RM) cdCommands envPaths dllPath.bat relPaths.sh

View File

@@ -17,57 +17,54 @@ ACTIONS = inc
ACTIONS += build
ACTIONS += install
ACTIONS += buildInstall
ACTIONS += browse
ACTIONS += runtests tapfiles
#ACTIONS += rebuild
actionPart = $(word 1, $(subst $(DIVIDER), ,$@))
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
actionArchTargets = $(foreach action, $(ACTIONS), \
$(addprefix $(action)$(DIVIDER), $(BUILD_ARCHS)))
actionArchTargets = $(foreach x, $(ACTIONS),\
$(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
cleanArchTargets = $(addprefix clean$(DIVIDER), $(BUILD_ARCHS))
cleanArchTargets = $(foreach arch,$(BUILD_ARCHS), clean$(DIVIDER)$(arch))
buildDirs = $(addprefix O., $(BUILD_ARCHS))
buildDirs = $(addprefix O.,$(BUILD_ARCHS))
# 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
# Only works with GNU make 3.81 or later (uses eval function)
# 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)
define DEP_template
$(2): $$(EPICS_HOST_ARCH)
$(1)$$(DIVIDER)$(2): $(1)$$(DIVIDER)$$(EPICS_HOST_ARCH) O.$(2)
$(2) : $(EPICS_HOST_ARCH)
$(1)$(DIVIDER)$(2) : $(1)$(DIVIDER)$(EPICS_HOST_ARCH) O.$(2)
endef
ifeq ($(MAKE_VERSION),3.81)
$(foreach action, $(ACTIONS), $(foreach arch,\
$(CROSS_ARCHS),$(eval $(call DEP_template,$(action),$(arch)))))
else
ifeq ($(findstring j,$(MAKEFLAGS)),j)
$(foreach action, $(ACTIONS), $(foreach arch,\
$(CROSS_ARCHS),$(eval $(call DEP_template,$(action),$(arch)))))
endif
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)))
$(buildDirs) O.Common : clean
rebuild: install
$(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=$@
$(ACTIONS):%: $(foreach arch, $(BUILD_ARCHS), %$(DIVIDER)$(arch))
$(ACTIONS) : % : $(foreach arch, $(BUILD_ARCHS), %$(DIVIDER)$(arch))
$(buildDirs):
$(PERL) $(TOOLS)/makeMakefile.pl $@ $(TOP)/..
@@ -75,24 +72,27 @@ $(buildDirs):
O.Common:
$(MKDIR) O.Common
# Clean rules
#
# special clean rule
#
clean : archs_common_clean
clean: archsCommonClean
archs_common_clean :
$(RMDIR) $(addprefix O.,$(BUILD_ARCHS)) O.Common
archsCommonClean:
$(RMDIR) $(buildDirs) O.Common
archclean :
$(RMDIR) $(addprefix O.,$(BUILD_ARCHS))
archclean:
$(RMDIR) $(buildDirs)
$(cleanArchTargets) :
$(cleanArchTargets):
$(RMDIR) O.$(archPart)
realclean :
realclean:
$(RMDIR) O.*
.PHONY : $(actionArchTargets)
.PHONY : $(cleanArchTargets)
.PHONY : $(BUILD_ARCHS) rebuild arch_common_clean
.PHONY : $(BUILD_ARCHS) rebuild archsCommonClean
.PHONY : $(ACTIONS) clean realclean archclean host all
# User specific rules
#
-include $(HOME)/configure/RULES_USER

View File

@@ -81,6 +81,8 @@ else
host:
endif
-include $(CONFIG)/RULES_FILE_TYPE
-include $(CONFIG)/RULES.Db
#---------------------------------------------------------------
@@ -94,7 +96,7 @@ include $(CONFIG)/RULES_TARGET
# Read dependency files
ifneq (,$(strip $(HDEPENDS_FILES)))
$(filter-out $(wildcard *$(DEP)), $(HDEPENDS_FILES)): $(COMMON_INC)
$(filter-out $(wildcard *$(DEP)), $(HDEPENDS_FILES)): | $(COMMON_INC)
-include $(HDEPENDS_FILES)
endif
@@ -122,8 +124,6 @@ LIBTARGETS += $(LIBNAME) $(INSTALL_LIBS) $(TESTLIBNAME) \
$(LOADABLE_SHRLIBNAME) $(INSTALL_LOADABLE_SHRLIBS)
-include $(CONFIG)/RULES_FILE_TYPE
# Main targets
install: buildInstall
@@ -166,17 +166,6 @@ build_clean:
ifdef RES
@$(RM) *$(RES)
endif
ifdef BAF
@$(RM) $(PROD_BAF) $(LIB_BAF)
endif
ifdef BOF
@$(RM) *$(BOF)
endif
# WIN95/NT source browser
#ifdef BAF
browse: $(LIB_BAF) $(PROD_BAF)
#endif
$(DIRECTORY_TARGETS) :
$(MKDIR) -p $@
@@ -226,29 +215,24 @@ $(TESTPRODNAME) $(PRODNAME): %$(EXE):
%.o : %.cc
%.o : %.cpp
%$(OBJ): %.c $(COMMON_INC) $(INSTALL_INC)
# Include files are order-only prerequisites for compilation:
%$(OBJ): %.c | $(COMMON_INC) $(INSTALL_INC)
@$(RM) $@
$(COMPILE.c) -c $<
%$(OBJ): %.cc $(COMMON_INC) $(INSTALL_INC)
%$(OBJ): %.cc | $(COMMON_INC) $(INSTALL_INC)
@$(RM) $@
$(COMPILE.cpp) -c $<
%$(OBJ): %.cpp $(COMMON_INC) $(INSTALL_INC)
%$(OBJ): %.cpp | $(COMMON_INC) $(INSTALL_INC)
@$(RM) $@
$(COMPILE.cpp) -c $<
# WIN95/NT resource compiler
# Windows resource compiler
%$(RES): %.rc
@$(RM) $@
$(RCCMD)
# WIN95/NT source browser
%.bsc: %.sbr
$(ECHO) "building source browser archive $@"
@$(RM) $@
$(BAFCMD) $<
YACCOPT ?= $($*_YACCOPT)
#
# rename the y.tab.h file only if we
@@ -271,22 +255,12 @@ YACCOPT ?= $($*_YACCOPT)
@$(RM) $@
$(MV) $*.yy.c $@
# WIN95/NT source browser
ifdef BAF
$(LIB_BAF): $(addsuffix $(BOF),$(basename $(LIBRARY_LD_OBJS)))
$(ECHO) "Building source browser archive $@"
@$(RM) $@
$(BAFCMD) $^
endif
#---------------------------------------------------------------
# Libraries, shared/DLL and stubs
$(LIBNAME) $(TESTLIBNAME): $(LIBRARY_OBJS)
$(LIBNAME) $(TESTLIBNAME): $(LIB_PREFIX)%$(LIB_SUFFIX):
$(filter-out $(DLLSTUB_LIBNAME) $(TESTDLLSTUB_LIBNAME), $(LIBNAME) $(TESTLIBNAME)): $(LIB_PREFIX)%$(LIB_SUFFIX):
@$(RM) $@
$(ARCMD)
ifneq ($(strip $(RANLIB)),)
@@ -296,11 +270,13 @@ endif # RANLIB
$(SHRLIBNAME) $(DLLSTUB_LIBNAME) $(TESTSHRLIBNAME) $(TESTDLLSTUB_LIBNAME): \
$(LIBRARY_OBJS) $(LIBRARY_RESS) $(SHRLIB_DEPLIBS)
$(DLLSTUB_LIBNAME): $(SHRLIBNAME);
$(SHRLIBNAME): $(SHRLIB_PREFIX)%$(SHRLIB_SUFFIX):
@$(RM) $@
$(LINK.shrlib)
$(MT_DLL_COMMAND)
$(TESTDLLSTUB_LIBNAME): $(TESTSHRLIBNAME);
$(TESTSHRLIBNAME): $(SHRLIB_PREFIX)%$(SHRLIB_SUFFIX):
@$(RM) $@
$(LINK.shrlib)
@@ -324,7 +300,7 @@ $(LOADABLE_SHRLIBNAME): $(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX):
@$(RM) $@
$(NM) $< > $@
%_ctdt.c: %.nm
%_ctdt.c: %.nm $(TOOLS)/munch.pl
@$(RM) $@
$(PERL) $(TOOLS)/munch.pl -o $@ $<
@@ -332,9 +308,12 @@ $(MUNCHNAME): %$(MUNCH_SUFFIX): $(MUNCH_DEPENDS) %$(EXE)
@$(RM) $@
$(MUNCH_CMD)
$(OBJLIB_MUNCHNAME): %.munch: %_ctdt$(OBJ) %$(OBJ)
#---------------------------------------------------------------
# GeSys modules for RTEMS
$(MODNAME): %$(MODEXT): %$(EXE)
@echo "Building module $@"
@$(RM) $@
$(MUNCH_CMD)
$(LINK.mod)
#---------------------------------------------------------------
# Automated testing
@@ -354,7 +333,7 @@ tapfiles: $(TESTSCRIPTS) $(TAPFILES)
# A .tap file is the output from running the associated test script
%.tap: %.t
-HARNESS_ACTIVE=1 $(PERL) $< > $@
-$(PERL) $< -tap > $@
# If there's a perl test script (.plt) available, use it
%.t: ../%.plt
@@ -363,7 +342,7 @@ tapfiles: $(TESTSCRIPTS) $(TAPFILES)
# 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 $@ $<

View File

@@ -15,28 +15,32 @@ ARCHS += $(BUILD_ARCHS)
ACTIONS += inc build install buildInstall clean realclean archclean
ACTIONS += runtests tapfiles
dirPart = $(join $(dir $@), $(word 1, $(subst $(DIVIDER), ,$(notdir $@))))
actionArchPart = $(join $(word 2, $(subst $(DIVIDER), ,$(notdir $@))), \
$(addprefix $(DIVIDER),$(word 3, $(subst $(DIVIDER), ,$(notdir $@)))))
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
host: install$(DIVIDER)$(EPICS_HOST_ARCH)
# 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)))
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)install): \
@@ -49,30 +53,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 host rebuild
.PHONY : $(ARCHS) $(ACTIONS)
@@ -80,3 +96,7 @@ $(ARCHS) $(ACTIONS) $(actionArchTargets) :%: \
.PHONY : $(dirActionArchTargets)
.PHONY : $(actionArchTargets)
# User specific rules
#
-include $(HOME)/configure/RULES_USER

View File

@@ -2,6 +2,9 @@
vpath %@ $(USR_VPATH) $(ALL_SRC_DIRS)
#---------------------------------------------------------------
# Variable expansion
# Default settings
EXPAND_TOOL ?= $(PERL) $(TOOLS)/expandVars.pl
@@ -24,3 +27,39 @@ expand_clean:
@$(RM) $(EXPANDED)
.PHONY : expand_clean
#---------------------------------------------------------------
# Assemblies (files assembled from snippets)
ASSEMBLE_TOOL ?= $(PERL) $(TOOLS)/assembleSnippets.pl
define COMMON_ASSEMBLY_template
$1_SNIPPETS += $$(foreach dir, .. $$(SRC_DIRS), \
$$(wildcard $$(dir)/$$($1_PATTERN)))
$(COMMON_DIR)/$1: $$($1_SNIPPETS)
$(ECHO) "Assembling common file $$@ from snippets"
@$(RM) $1
$(ASSEMBLE_TOOL) -o $1 $$^
@$(MV) $1 $$@
endef
$(foreach asy, $(COMMON_ASSEMBLIES), \
$(eval $(call COMMON_ASSEMBLY_template,$(strip $(asy)))))
define ASSEMBLY_template
$1_SNIPPETS += $$(foreach dir, .. $$(SRC_DIRS), \
$$(wildcard $$(dir)/$$($1_PATTERN)))
$1: $$($1_SNIPPETS)
$(ECHO) "Assembling file $$@ from snippets"
@$(RM) $$@
$(ASSEMBLE_TOOL) -o $$@ $$^
endef
$(foreach asy, $(ASSEMBLIES), \
$(eval $(call ASSEMBLY_template,$(strip $(asy)))))
define ASSEMBLY_DEP_template
$1$(DEP):
@echo $1: > $$@
endef
$(foreach asy, $(sort $(COMMON_ASSEMBLIES) $(ASSEMBLIES)), \
$(eval $(call ASSEMBLY_DEP_template,$(strip $(asy)))))

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,40 +35,42 @@ 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: file_type_clean
file_type_clean:
@$(RM) $(foreach type, $(FILE_TYPE), $($(type)))
.PHONY : file_type_clean
# 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,16 +22,14 @@ realuninstall: uninstallDirs
$(RMDIR) $(INSTALL_LOCATION_BIN)
$(RMDIR) $(INSTALL_LOCATION_LIB)
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC)
UNINSTALL_DIRS += $(INSTALL_HTML) $(INSTALL_TEMPLATES) $(INSTALL_DB)
UNINSTALL_DIRS += $(DIRECTORY_TARGETS)
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC) \
$(INSTALL_HTML) $(INSTALL_TEMPLATES) $(INSTALL_DB) $(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)%:
@@ -39,14 +37,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,27 +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)
# 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)
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)
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)
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
@@ -81,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
@@ -95,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
@@ -64,7 +64,7 @@ CC_CLANG = clang
CCC_CLANG = clang++
CMPLR_CLASS_CLANG = clang
CMPLR_CLASS = $(CMPLR_CLASS_$(COMPLER))
CMPLR_CLASS = $(CMPLR_CLASS_$(COMPILER))
# Convert the iOS platform to lowercase for passing to xcrun's sdk parameter
XCRUN_SDK_BASE = $(shell echo $(IOS_PLATFORM) | tr A-Z a-z)

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,9 +12,11 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = x86_64
ARCH_DEP_CFLAGS = $(GNU_TUNE_CFLAGS)
ARCH_DEP_CPPFLAGS += -D_X86_64_
ARCH_DEP_CFLAGS += -m64
ARCH_DEP_LDFLAGS += -m64
OP_SYS_CFLAGS += -m64
OP_SYS_LDFLAGS += -m64
# If your crosscompiler name has a GNU target prefix like <gnutarget>-gcc,
# e.g. x86_64-redhat-linux-gcc, put a GNU_TARGET definition in

View File

@@ -36,6 +36,7 @@ ARCH_DEP_LDFLAGS += -m32
OP_SYS_CPPFLAGS = -D_MINGW
EXE = .exe
RES = .coff
# Use .o for static object files, .obj for shared library object files
OBJ_NO = .o

View File

@@ -68,13 +68,12 @@ GNU = NO
#
# Darwin shared libraries
#
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \
-install_name $(shell $(FULLPATHNAME) $(INSTALL_LIB))/$@ \
-compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \
-current_version $(SHRLIB_VERSION)
-install_name $(shell $(FULLPATHNAME) $(INSTALL_LIB))/$@ \
$(addprefix -compatibility_version , $(SHRLIB_VERSION)) \
$(addprefix -current_version , $(SHRLIB_VERSION))
SHRLIB_SUFFIX_BASE = .dylib
SHRLIB_SUFFIX = .$(SHRLIB_VERSION)$(SHRLIB_SUFFIX_BASE)
SHRLIB_SUFFIX = $(addprefix ., $(SHRLIB_VERSION))$(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_LDFLAGS = -bundle -flat_namespace -undefined suppress

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

@@ -7,19 +7,18 @@
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon
RES = .coff
# Add resource compiler
RCCMD = $(GNU_BIN)/$(CMPLR_PREFIX)windres$(CMPLR_SUFFIX) $(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,$(DLLSTUB_PREFIX)$*$(DLLSTUB_SUFFIX)
LOADABLE_SHRLIB_LDFLAGS = -shared \
-Wl,--out-implib,$(DLLSTUB_PREFIX)$*$(DLLSTUB_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

@@ -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

@@ -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
#-------------------------------------------------------
CMPLR_CLASS = solStudio

View File

@@ -10,9 +10,6 @@
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common
# convert UNIX path to native path
PATH_FILTER = $(subst /,\\,$(1))
CP = $(PERL) -MExtUtils::Command -e cp
MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f

View File

@@ -9,24 +9,29 @@
# 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,$(DLLSTUB_PREFIX)$*$(DLLSTUB_SUFFIX)
LOADABLE_SHRLIB_LDFLAGS = -shared \
-Wl,--out-implib,$(DLLSTUB_PREFIX)$*$(DLLSTUB_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

@@ -7,9 +7,6 @@
# Sites may override these definitions in CONFIG_SITE.win32-x86.Common
#-------------------------------------------------------
# convert UNIX path to native path
PATH_FILTER = $(subst /,\\,$(1))
CP = $(PERL) -MExtUtils::Command -e cp
MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f

View File

@@ -21,8 +21,6 @@ RCCMD = rc -l 0x409 $(INCLUDES) -fo $@ $<
ARCMD = lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
BAFCMD = bscmake -nologo -o $@
#
# Configure OS vendor C compiler
CC = cl
@@ -130,6 +128,7 @@ RANLIB=
# -LTCG whole program optimization
# -incremental:no full linking
# -fixed:no generate relocatable code
# -version:<major>.<minor> - only 2 components allowed, 0-65535 each
# -debug generate debugging info
LINK_OPT_FLAGS_YES = -LTCG -incremental:no -opt:ref \
-release $(PROD_VERSION:%=-version:%)
@@ -150,8 +149,6 @@ WIN32=1
EXE=.exe
OBJ=.obj
RES=.res
BAF=.bsc
BOF=.sbr
# Problem: MS Visual C++ does not recognize *.cc as C++ source,
# so we do C++ compiles using the global flag -TP
@@ -164,10 +161,10 @@ OP_SYS_CXXFLAGS = $(COMPILER_CXXFLAGS)
#
# Files and flags needed to link DLLs (used in RULES_BUILD)
#
WIN32_DLLFLAGS = /subsystem:windows /dll $(OPT_LDFLAGS) \
$(USR_LDFLAGS) $(CMD_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS)
WIN32_DLLFLAGS = -subsystem:windows -dll \
$(OPT_LDFLAGS) $(USR_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS)
#
# specify dll .def file only if it exists
#
DLL_DEF_FLAG = $(addprefix -def:,$(wildcard ../$(addsuffix .def,$*)))

View File

@@ -10,19 +10,9 @@
-include $(CONFIG)/os/CONFIG.Common.win32-x86
-include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
ARCH_DEP_CPPFLAGS += /favor:blend
#ARCH_DEP_CPPFLAGS += /Wp64
# /favor:blend both AMD64 and INTEL64
# /favor:AMD64
# /favor:INTEL64 (new value)
# /favor:EN64T (old value)
OPT_LDFLAGS += /MACHINE:X64
# /MACHINE:X64
# /MACHINE:IA64 (Itanium)
# /MACHINE:X86
#The following option does not work
#ARCH_DEP_CPPFLAGS += /env x64

View File

@@ -9,14 +9,6 @@
-include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
ARCH_DEP_CPPFLAGS += /favor:blend
#ARCH_DEP_CPPFLAGS += /Wp64
# /favor:blend both AMD64 and INTEL64
# /favor:AMD64
# /favor:INTEL64 (new value)
# /favor:EN64T (old value)
OPT_LDFLAGS += /MACHINE:X64
# /MACHINE:X64

View File

@@ -0,0 +1,12 @@
# CONFIG.windows-x64.windows-x64-debug
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Definitions for windows-x64 compiler host - windows-x64 debug compiler target builds
# Sites may override these definitions in CONFIG_SITE.windows-x64.windows-x64-debug
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.windows-x64.windows-x64
HOST_OPT=NO

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

@@ -12,3 +12,11 @@
# Uncomment the following line if readline has problems
#LDLIBS_READLINE = -lreadline -lcurses
# 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

@@ -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,17 +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
IOS_VERSION = 8.0
# Minimum version of iOS the executables must run on.
# Earlier versions may work, if XCode supports them.
@@ -23,8 +12,13 @@ IOS_VERSION = 8.0
#IOS_DEPLOYMENT_TARGET = 5.1
#IOS_DEPLOYMENT_TARGET = 6.0
#IOS_DEPLOYMENT_TARGET = 6.1
IOS_DEPLOYMENT_TARGET = 7.0
#IOS_DEPLOYMENT_TARGET = 8.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

@@ -12,7 +12,7 @@
# a) LD_LIBRARY_PATH must include the full absolute pathname to
# $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when invoking base
# executables.
# b) Add the runtime path to SHRLIB_DEPLIB_DIRS and PROD_DEPLIB_DIRS, which
# b) Add the runtime path to SHRLIB_DEPLIB_DIRS and PROD_DEPLIB_DIRS, which
# will add the named directory to the list contained in the executables.
# c) Add the runtime path to /etc/ld.so.conf and run ldconfig
# to inform the system of the shared library location.
@@ -33,6 +33,10 @@ COMMANDLINE_LIBRARY = READLINE
#COMMANDLINE_LIBRARY = READLINE_CURSES
# Permit access to 64-bit file-systems
OP_SYS_CFLAGS += -D_FILE_OFFSET_BITS=64
# Uncomment the followings lines to build with CLANG instead of GCC.
#
#GNU = NO
@@ -49,7 +53,6 @@ OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
# Tune GNU compiler output for a specific cpu-type
# (e.g. generic, i386, i486, i586, or i686)
# Tune GNU compiler output for a specific 32-bit cpu-type
# (e.g. generic, native, i386, i686, pentium2/3/4, prescott, k6, athlon etc.)
GNU_TUNE_CFLAGS = -mtune=generic

View File

@@ -47,3 +47,8 @@ COMMANDLINE_LIBRARY = READLINE
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
# Tune GNU compiler output for a specific 64-bit cpu-type
# (e.g. generic, native, core2, nocona, k8, opteron, athlon64, barcelona etc.)
GNU_TUNE_CFLAGS = -mtune=generic

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

@@ -4,7 +4,6 @@
#
# 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,11 @@
# CONFIG_SITE.Common.windows-x64-static
#
# $Revision-Id$
#
# Site Specific definitions for windows-x64-static target
# Only the local epics system manager should modify this file
# 64-bit Visual Studio 2010 builds fail when built optimized.
# If you are using a newer version you can try removing this:
HOST_OPT = NO

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

@@ -4,8 +4,8 @@
#-------------------------------------------------------
# Early versions of the MinGW cross-build tools can only build
# static (non-DLL) libraries. The version of gcc 4.6.3 for Ubuntu
# succeeds, but Fedora's 4.4.6 does not and needs these uncommented:
# static (non-DLL) libraries. For example RHEL's cross-gcc 4.4.6
# needs these uncommented, cross-gcc 4.6.3 for Ubuntu does not:
SHARED_LIBRARIES = NO
STATIC_BUILD = YES
@@ -18,4 +18,5 @@ STATIC_BUILD = YES
#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

@@ -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

@@ -4,30 +4,40 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Known Problems in R3.15.0.2</title>
<title>Known Problems in R3.15.3</title>
</head>
<body>
<h1 style="text-align: center">EPICS Base R3.15.0.2: Known Problems</h1>
<h1 style="text-align: center">EPICS Base R3.15.3: Known Problems</h1>
<p>Any patch files linked below should be applied at the root of the
base-3.15.0.2 tree. Download them, then use the GNU Patch program as
base-3.15.3 tree. Download them, then use the GNU Patch program as
follows:</p>
<blockquote><pre>% <b>cd <i>/path/to/</i>base-3.15.0.2</b>
<blockquote><pre>% <b>cd <i>/path/to/</i>base-3.15.3</b>
% <b>patch -p0 &lt; <i>/path/to/</i>file.patch</b></pre></blockquote>
<p>The following significant problems have been reported with this
version of EPICS Base:</p>
<ul>
<li>64-bit Windows builds may not work with some tool-sets, the code in
<tt>src/legacy/gdd</tt> is not comptible with the LLP64 model that Windows
uses for its 64-bit ABI.</li>
<li>The <tt>-x</tt> option to the softIoc program loads a standard database
that is supposed to be able to exit the running IOC. In this release that
causes an assertion failure which prints a stack trace and suspends the
program wihout exiting.</li>
<li>See LaunchPad bug
<a href="https://bugs.launchpad.net/epics-base/+bug/1466129">#1466129</a>:
The feature that allows an IOC to bind to a single network interface is not
working correctly. The bug mentioned above contains a patch that has been
tested on Linux-64, a complete fix is expected for 3.15.4. Note that Windows
systems are not affected by this bug.</li>
<li>Parallel builds ("make -j") on native Windows are not working properly.
Builds tend to hang (saturating one core); interrupting and running make
again usually finishes the build. Limiting the number of parallel jobs using
something like "make -j8" also helps prevent this problem. Sequential builds
always work and are recommended for automated build environments.</li>
<li>64-bit Windows builds of the CAS library may not work with some compilers.
The code in <tt>src/legacy/gdd</tt> is currently incompatible with the LLP64
model that Windows uses for its 64-bit ABI.</li>
</ul>

View File

@@ -1,24 +1,24 @@
Installation Instructions
EPICS Base Release 3.15.0.2
EPICS Base Release 3.15.3
--------------------------------------------------------------------------
Table of Contents
* What is EPICS base?
* What is new in this release?
* Copyright
* Supported platforms
* Supported compilers
* Software requirements
* Host system storage requirements
* Documentation
* Directory Structure
* Build related components
* Building EPICS base (Unix and Win32)
* Example application and extension
* Multiple host platforms
* What is EPICS base?
* What is new in this release?
* Copyright
* Supported platforms
* Supported compilers
* Software requirements
* Host system storage requirements
* Documentation
* Directory Structure
* Build related components
* Building EPICS base (Unix and Win32)
* Example application and extension
* Multiple host platforms
--------------------------------------------------------------------------
@@ -102,13 +102,13 @@
later.
GNU readline or Tecla library
GNU readline and Tecla librararies can be used by the IOC shell to
provide command line editing and command line history recall and edit.
GNU readline (or Tecla library) must be installed on your target system
when COMMANDLINE_LIBRARY is set to READLINE (or TECLA) for that target.
EPICS (EPICS shell) is the default specified in CONFIG_COMMON. A
READLINE override is defined for linux-x86 in the EPICS distribution.
Comment out COMMANDLINE_LIBRARY=READLINE in
GNU readline and Tecla libraries can be used by the IOC shell to provide
command line editing and command line history recall and edit. GNU
readline (or Tecla library) must be installed on your target system when
COMMANDLINE_LIBRARY is set to READLINE (or TECLA) for that target. EPICS
(EPICS shell) is the default specified in CONFIG_COMMON. A READLINE
override is defined for linux-x86 in the EPICS distribution. Comment out
COMMANDLINE_LIBRARY=READLINE in
configure/os/CONFIG_SITE.Common.linux-x86 if readline is not installed
on linux-x86. Command-line editing and history will then be those
supplied by the os. On vxWorks the ledLib command-line input library is
@@ -125,7 +125,7 @@
EPICS documentation is available through the 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
@@ -135,7 +135,7 @@
base Root directory of the base distribution
base/configure Operating system independent build config files
base/configure/os Operating system dependent build config files
base/documentation Distributation documentation
base/documentation Distribution documentation
base/src Source code in various subdirectories
base/startup Scripts for setting up path and environment
@@ -156,7 +156,7 @@
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
@@ -185,7 +185,7 @@
CONFIG_COMMON Definitions common to all builds
CONFIG_ENV Definitions of EPICS environment variables
CONFIG_FILE_TYPE
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
RELEASE Location of external products

View File

@@ -9,7 +9,7 @@
<BODY>
<CENTER>
<H1>Installation Instructions</H1>
<H2>EPICS Base Release 3.15.0.2</H2><BR>
<H2>EPICS Base Release 3.15.3</H2><BR>
</CENTER>
<HR>
<H3> Table of Contents</H3>
@@ -107,7 +107,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.
@@ -130,7 +130,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>
@@ -140,7 +140,7 @@
base Root directory of the base distribution
base/configure Operating system independent build config files
base/configure/os Operating system dependent build config files
base/documentation Distributation documentation
base/documentation Distribution documentation
base/src Source code in various subdirectories
base/startup Scripts for setting up path and environment
</PRE>
@@ -165,7 +165,8 @@
<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
@@ -196,7 +197,7 @@
CONFIG_COMMON Definitions common to all builds
CONFIG_ENV Definitions of EPICS environment variables
CONFIG_FILE_TYPE
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
RELEASE Location of external products

View File

@@ -3,17 +3,236 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>EPICS Base R3.15.0.1 Release Notes</title>
<title>EPICS Base R3.15.3 Release Notes</title>
</head>
<body lang="en">
<h1 align="center">EPICS Base Release 3.15.0.2</h1>
<h1 align="center">EPICS Base Release 3.15.3</h1>
<h2 align="center">Changes between 3.15.2 and 3.15.3</h2>
<!-- Insert new items immediately below here ... -->
<h3>Make the NTP Time provider optional on VxWorks</h3>
<p>Recent versions of VxWorks (sometime after VxWorks 6) provide facilities for
automatically synchronizing the OS clock time with an NTP server. The EPICS time
system used to assume that it had to provide time synchronization on VxWorks,
but now it tests for the existance of either of the two OS synchronization
threads before starting the NTP time provider. It is still possible to force the
NTP provider to be started even if the OS synchronization is running by defining
the environment variable <tt>EPICS_TS_FORCE_NTPTIME</tt> in the startup script
before loading the IOC's .munch file. Forcing may be necessary if the VxWorks
image is not correctly configured with the IP address of a local NTP server.</p>
<h3>Assembling files from numbered snippets</h3>
<p>A tool has been added that assembles file snippets specified on the
command line into a single output file, with sorting and replacing/adding of
snippets done based on their file names. The build system integration requires
the output file to be specified setting COMMON_ASSEMBLIES (arch independent)
or ASSEMBLIES (created by arch), then defining the snippets for each assembly
setting *_SNIPPETS (explicitly) or *_PATTERN (searched relative to all source
directories).
</p>
<h3>Clean up after GNU readline()</h3>
<p>If EPICS Base is built with readline support, any IOC that calls epicsExit()
from a thread other than the main thread is likely to leave the user's terminal
in a weird state, requiring the user to run something like 'stty sane' to clean
it up. This release patches the readline support code to clean up automatically
by registering an epicsAtExit() routine.</p>
<h3>Removed the last vestiges of RSET::get_value()</h3>
<p>The IOC has not called the get_value() routine in the RSET for a very long
time, but there was still one implementation left in the event record support
code, and a structure definition for one of the original arguments to that
routine was defined in recGbl.h. Both of these have now been removed.</p>
<h2 align="center">Changes between 3.15.1 and 3.15.2</h2>
<h3>Raised limit on link field length in database files</h3>
<p>The length of INP/OUT link fields in database files was limited to 79 chars
by an internal buffer size in the db file parser. This limitation will go away
completely in 3.16, and has been statically raised to 255 chars for the 3.15
series.</p>
<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>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_REGRDDFLAGS</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>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>Use of PATH_FILTER in Makefiles deprecated</h3>
<p>The PATH_FILTER variable was being called to convert forward shashes
<tt><b>/</b></tt> in file paths into pairs of backward slashes
<tt><b>\\</b></tt> on Windows architectures. This has never been strictly
necessary, and was added about 10 years ago to get around some short-comings in
Windows tools at the time. All uses of PATH_FILTER in Base have now been
removed; the definition is still present, but will result in a warning being
printed if it is ever used.</p>
<h3>Using msi for dependencies</h3>
<p>To reduce confusion the msi program has been modified to allow the generation
of dependency rules by adding support for a <tt>-D</tt> option, and changing the
commands in RULES.Db to use this option instead of the mkmf.pl script. The new
build rules will not work with old versions of the msi program, so the command
variable name used in the rules has been changed from MSI to MSI3_15. Sites that
use a modified version of msi must provide support for both the <tt>-D</tt> and
<tt>-o&nbsp;outfile</tt> options, and should then point the MSI3_15 variable in
their applications' CONFIG_SITE files to that updated executable.</p>
<h2 align="center">Changes between 3.15.0.2 and 3.15.1</h2>
<h3>epicsStrnEscapedFromRaw() and epicsStrnRawFromEscaped()</h3>
<p>These routines have been rewritten; the previous implementations did not
always behave exactly as specified.</p>
<h3>Shared Library Versions</h3>
<p>On architectures that can support it, the shared library version number for
libraries provided with Base has had the third component of the EPICS version
number added to it, thus libCom.so.3.15.1 instead of libCom.so.3.15. Windows
can only support two components to its internal product version number, and the
Darwin bug that external shared libraries were being built using the EPICS
version number has been fixed.</p>
<h3>Hooking into dbLoadRecords</h3>
<p>A function pointer hook has been added to the dbLoadRecords() routine, to
allow external modules such as autosave to be notified when new records have
been loaded during IOC initialization. The hook is called dbLoadRecordsHook and
follows the model of the recGblAlarmHook pointer in that modules that wish to
use it must save the current value of the pointer before installing their own
function pointer, and must call the original function from their own
routine.</p>
<p>The hook is activiated from the dbLoadRecords() routine and gets called only
after a database instance file has been read in without error. Note that the
dbLoadTemplates() routine directly calls dbLoadRecords() so this hook also
provides information about instantiated database templates. It is still possible
to load record instances using dbLoadDatabase() though, and doing this will not
result in the hook routines being called.</p>
<p>Code to use this hook should look something like this:</p>
<blockquote><pre>
#include "dbAccessDefs.h"
static DB_LOAD_RECORDS_HOOK_ROUTINE previousHook;
static void myRoutine(const char* file, const char* subs) {
if (previousHook)
previousHook(file, subs);
/* Do whatever ... */
}
void myInit(void) {
static int done = 0;
if (!done) {
previousHook = dbLoadRecordsHook;
dbLoadRecordsHook = myRoutine;
done = 1;
}
}
</pre></blockquote>
<p>As with many other parts of the static database access library there is no
mutex to protect the function pointer. Initialization is expected to take place
in the context of the IOC's main thread, from either a static C++ constructor or
an EPICS registrar routine.</p>
<p>
EPICS Base 3.15.0.x releases are not intended for use in production systems.</p>
<h2 align="center">Changes between 3.15.0.1 and 3.15.0.2</h2>
<!-- Insert new items immediately below here ... -->
<h3>New iocshLoad command</h3>

View File

@@ -60,11 +60,8 @@ responsible for these tasks in the past and are expected to continue in the
relevent roles unless the Release Manager designates otherwise:</p>
<dl>
<dt><strong>Release Manager</strong> (Andrew Johnson)</dt>
<dd>Responsible for the release</dd>
<dt><strong>Configuration Manager</strong> (Janet Anderson)</dt>
<dd>Responsible for committing version number updates and for
creating tarfiles</dd>
<dt><strong>Release Manager</strong> (Ralph Lange)</dt>
<dd>Responsible for managing and tagging the release</dd>
<dt><strong>Platform Developers</strong></dt>
<dd>Responsible for individual operating system platforms</dd>
<dt><strong>Application Developers</strong></dt>
@@ -134,42 +131,42 @@ relevent roles unless the Release Manager designates otherwise:</p>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Release Manager</td>
<td>Edit and commit changes to the EPICS version number file
configure/CONFIG_BASE_VERSION.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Release Manager</td>
<td>Tag the module in Bazaar, using these tag conventions:
<ul>
<li>
<tt>R3.15.1-pre<i>n</i></tt>
<tt>R3.15.3-pre<i>n</i></tt>
&mdash; pre-release tag
</li>
<li>
<tt>R3.15.1-rc<i>n</i></tt>
<tt>R3.15.3-rc<i>n</i></tt>
&mdash; release candidate tag, note the <tt>rc</tt> is now
lower-case</li>
</ul>
<blockquote><tt>
cd ~/base/mirror-3.15<br />
bzr tag R3.15.1-rc<i>n</i>
bzr tag R3.15.3-rc<i>n</i>
</tt></blockquote>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Release Manager</td>
<td>Export the tagged version into a tarfile. Note that this command
generates a gzipped tarfile directly from the repository:
<blockquote><tt>
cd ~/base<br />
bzr export --keywords=publish
--root=base-3.15.1-rc<i>n</i>
-r tag:R3.15.1-rc<i>n</i>
baseR3.15.1-rc<i>n</i>.tar.gz
mirror-3.15
--root=base-3.15.3-rc<i>n</i>
-r tag:R3.15.3-rc<i>n</i>
base-3.15.3-rc<i>n</i>.tar.gz
mirror-3.15
</tt></blockquote>
This requires that the Bazaar keywords plugin is installed and
configured properly.
@@ -177,14 +174,15 @@ relevent roles unless the Release Manager designates otherwise:</p>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Release Manager</td>
<td>Test the tarfile by extracting its contents and building it on at
least one supported platform.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Copy the tar file to the Base download area of the website.</td>
<td>Website Manager</td>
<td>If necessary recreate the tarfile following the instructions above.
Copy the tar file to the Base download area of the website</td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -223,13 +221,6 @@ relevent roles unless the Release Manager designates otherwise:</p>
<td>Run the CA client side regression tests on all available host
platforms.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Platform Developers</td>
<td>Build and run the
<a href="https://launchpad.net/epics-base-tests">epics-base-tests</a>
suite on all available platforms.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Platform Developers</td>
@@ -279,32 +270,32 @@ relevent roles unless the Release Manager designates otherwise:</p>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Release Manager</td>
<td>Edit and commit changes to the EPICS version number file
configure/CONFIG_BASE_VERSION.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Release Manager</td>
<td>Tag the module in Bazaar:
<blockquote><tt>
cd ~/base/mirror-3.15<br />
bzr tag R3.15.1</i>
bzr tag R3.15.3</i>
</tt></blockquote>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Release Manager</td>
<td>Export the tagged version into a tarfile. Note that this command
generates a gzipped tarfile directly from the repository:
<blockquote><tt>
cd ~/base<br />
bzr export --keywords=publish
--root=base-3.15.1
-r tag:R3.15.1
baseR3.15.1.tar.gz
mirror-3.15
--root=base-3.15.3
-r tag:R3.15.3
base-3.15.3.tar.gz
mirror-3.15
</tt></blockquote>
This requires that the Bazaar keywords plugin is installed and
configured properly.
@@ -312,7 +303,7 @@ relevent roles unless the Release Manager designates otherwise:</p>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Release Manager</td>
<td>Test the tar file by extracting its contents and building it on at
least one supported platform</td>
</tr>
@@ -321,8 +312,9 @@ relevent roles unless the Release Manager designates otherwise:</p>
</tr>
<tr>
<td>&nbsp;</td>
<td>Configuration Manager</td>
<td>Copy the tar file to the Base download area of the website</td>
<td>Website Manager</td>
<td>If necessary recreate the tarfile following the instructions above.
Copy the tar file to the Base download area of the website</td>
</tr>
<tr>
<td>&nbsp;</td>

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
use strict;
use warnings;
my $version = '0.5';
my $version = '0.6';
package CA;
@@ -95,8 +95,8 @@ CA - Perl 5 interface to EPICS Channel Access
} else {
printf " Value: %g\n", $data->{value};
printf " Severity: %s\n", $data->{severity};
printf " Timestamp: %d.%09d\n",
$data->{stamp}, $data->{stamp_fraction};
printf " Timestamp: %.6f\n",
$data->{stamp} + $data->{stamp_fraction};
}
}
@@ -235,7 +235,7 @@ C<die> with an exception object in the callback and catch that using C<eval> in
the main thread are not likely to succeed and will probably result in a crash.
Callbacks should not perform any operations that would block for more than a
fraction of a second as this will hold up network communications with the
relevent server and could cause the Perl program and/or the Channel Access
relevant server and could cause the Perl program and/or the Channel Access
server to crash. Calling C<< CA->pend_event >> from within a callback is not
permitted by the underlying Channel Access library.
@@ -291,7 +291,7 @@ apply to the callback subroutine as described in C<get_callback> above.
=item put_acks( I<SEVR>, I<SUB> )
Applications that need to ackowledge alarms by doing a C<ca_put()> with type
Applications that need to acknowledge alarms by doing a C<ca_put()> with type
C<DBR_PUT_ACKS> can do so using the C<put_acks> method. The severity argument
may be provided as an integer from zero through three or as a string containing
one of the corresponding EPICS severity names C<NO_ALARM>, C<MINOR>, C<MAJOR> or
@@ -316,6 +316,19 @@ channel; see the C<new> constructor for details. If I<SUB> is C<undef> any
existing handler is removed, otherwise the new subroutine will be used for all
future connection events on this channel.
=item change_access_rights_event( I<SUB> )
This method replaces, adds or cancels an access rights handler subroutine for
the channel, which will be called if the client's right to read from or write
to the channel changes. If I<SUB> is C<undef> any existing handler is removed,
otherwise the new subroutine will be used for all future rights change events
on this channel.
The arguments passed to I<SUB> are the channel object and a pair of scalar
values for read and write permissions respectively, that are true when the
access is permitted, false when it is not.
=back
@@ -325,11 +338,12 @@ The data provided to a callback function registered with either C<get_callback>
or C<create_subscription> can be a scalar value or a reference to an array or a
hash, depending on the data type that was used for the data transfer. If the
request was for a single item of one of the basic data types, the data argument
will be a perl scalar that holds the value directly. If the request was for
will be a Perl scalar that holds the value directly. If the request was for
multiple items of one of the basic types, the data argument will be a reference
to an array holding the data. There is one exception though; if the data type
requested was for an array of C<DBF_CHAR> values that array will be represented
as a single Perl string contining all the characters before the first zero byte.
as a single Perl string containing all the characters before the first zero
byte.
If the request was for one of the compound data types, the data argument will be
a reference to a hash with keys as described below. Keys that are not classed
@@ -355,7 +369,7 @@ widened from the original type used to request or subscribe for the data.
The number of elements in the data returned by the server. If the data type is
C<DBF_CHAR> the value given for C<COUNT> is the number of bytes (including any
trailing zeros) returned by the server, although the value field is given as a
Perl string contining all the characters before the first zero byte.
Perl string containing all the characters before the first zero byte.
=back
@@ -417,7 +431,7 @@ Present only when I<TYPE> is C<DBR_GR_ENUM> or C<DBR_CTRL_ENUM>.
=item stamp
The process variable timestamp, converted to a local C<time_t>. This value is
suitable for passing to the perl C<localtime> or C<gmtime> functions.
suitable for passing to the Perl C<localtime> or C<gmtime> functions.
Present only when I<TYPE> is C<DBR_TIME_yyy>.
@@ -620,15 +634,15 @@ passing C<undef> as the subroutine reference.
Errors in using the library will be indicated by the module throwing an
exception, i.e. calling C<croak()> with an appropriate error message. These
exceptions can be caught using the standard Parl C<eval {}> statement and
exceptions can be caught using the standard Perl C<eval {}> statement and
testing the C<$@> variable afterwards; if not caught, they will cause the
running program to C<die> with an appropriate error message pointing to the
program line that called the C<CA> library.
Errors messages reported by the underlying CA client library all start with the
Error messages reported by the underlying CA client library all start with the
string C<ECA_> and the remainder of the symbol for the associated CA error
number, and are followed after a space-hyphen-space by a human-readable message
describing the error. Errors that are detected by the perl interface layer do
describing the error. Errors that are detected by the Perl interface layer do
not follow this pattern, but are still printable strings.
@@ -636,9 +650,9 @@ not follow this pattern, but are still printable strings.
=over
=item [1] R3.14 Channel Access Reference Manual by Jeffrey O. Hill
=item [1] R3.15 Channel Access Reference Manual by Jeffrey O. Hill
L<http://www.aps.anl.gov/epics/base/R3-14/12-docs/CAref.html>
L<http://www.aps.anl.gov/epics/base/R3-15/2-docs/CAref.html>
=back

View File

@@ -519,6 +519,46 @@ void CA_change_connection_event(SV *ca_ref, SV *sub) {
}
}
/* CA::replace_access_rights_event($ca_ref, \$sub) */
static
void rights_handler(struct access_rights_handler_args arha) {
CA_channel *pch = ca_puser(arha.chid);
PERL_SET_CONTEXT(p5_ctx);
{
dSP;
SvSetSV(ERRSV, &PL_sv_undef);
PUSHMARK(SP);
XPUSHs(pch->chan_ref);
XPUSHs(arha.ar.read_access ? &PL_sv_yes : &PL_sv_no);
XPUSHs(arha.ar.write_access ? &PL_sv_yes : &PL_sv_no);
PUTBACK;
call_sv(pch->rights_sub, G_EVAL | G_VOID | G_DISCARD | G_KEEPERR);
if (SvTRUE(ERRSV))
croak(NULL);
}
}
void CA_replace_access_rights_event(SV *ca_ref, SV *sub) {
CA_channel *pch = (CA_channel *)SvIV(SvRV(ca_ref));
caArh *handler = &rights_handler;
int status;
if (! replace_handler(sub, &pch->rights_sub, (long *)&handler))
return;
status = ca_replace_access_rights_event(pch->chan, handler);
if (status != ECA_NORMAL) {
croak("%s", get_error_msg(status));
}
}
/* CA::put($ca_ref, @values) */
@@ -914,16 +954,18 @@ SV * CA_create_subscription(SV *ca_ref, const char *mask_str, SV *sub, ...) {
dbr_text_to_type(treq, type);
if (type < 0) {
croak_msg = "Unknown data type";
croak_msg = "Unknown CA data type";
goto exit_croak;
}
if (type == DBR_PUT_ACKT ||
type == DBR_PUT_ACKS) {
croak_msg = "DBR_PUT_ACK types are write-only";
goto exit_croak;
} else if (type == DBR_CLASS_NAME ||
} else if (type == DBR_GR_ENUM ||
type == DBR_CTRL_ENUM ||
type == DBR_CLASS_NAME ||
type == DBR_STSACK_STRING)
/* These break the dbr_type_is macros */ ;
/* These above types are supported */ ;
else if (dbr_type_is_SHORT(type))
type += (DBR_LONG - DBR_SHORT);
else if (dbr_type_is_FLOAT(type))
@@ -1265,6 +1307,11 @@ CA_change_connection_event (ca_ref, sub)
SV * ca_ref
SV * sub
void
CA_replace_access_rights_event (ca_ref, sub)
SV * ca_ref
SV * sub
void
CA_put (ca_ref, val, ...)
SV * ca_ref

View File

@@ -8,27 +8,24 @@
TOP=../../../..
include $(TOP)/configure/CONFIG
# Use hdepends command (not GNU compiler flags)
# to generate header file dependancies for Darwin.
# Darwin has multiple -arch compiler flags.
# Special settings for Darwin:
ifeq ($(OS_CLASS),Darwin)
HDEPENDS_METHOD = MKMF
endif
# Use hdepends command (not GNU compiler flags)
# to generate header file dependancies for Darwin.
# Darwin has multiple -arch compiler flags.
HDEPENDS_METHOD = MKMF
ifneq ($(findstring darwin,$(T_A)),)
# Perl loadable libraries on Darwin have funny names
LOADABLE_SHRLIB_PREFIX =
LOADABLE_SHRLIB_SUFFIX = .bundle
LOADABLE_SHRLIB_SUFFIX = .$(shell $(PERL) ../perlConfig.pl dlext)
endif
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
@@ -56,10 +53,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 $@
$(INSTALL_PERL_MODULES)/$(PERL_ARCHPATH)/%: %
$(ECHO) "Installing loadable shared library $@"

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

@@ -59,28 +59,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);
}
}
@@ -113,6 +119,7 @@ char *val2str (const void *v, unsigned type, int index)
strcpy (str, "*** invalid type");
return str;
}
strcpy (str, "!!!");
base_type = type % (LAST_TYPE+1);
@@ -160,11 +167,21 @@ char *val2str (const void *v, unsigned type, int index)
case DBR_ENUM:
{
dbr_enum_t *val = (dbr_enum_t *)val_ptr;
if (dbr_type_is_GR(type) && !enumAsNr)
sprintf(str, "%s", ((struct dbr_gr_enum *)v)->strs[val[index]]);
else if (dbr_type_is_CTRL(type) && !enumAsNr)
sprintf(str, "%s", ((struct dbr_ctrl_enum *)v)->strs[val[index]]);
else
if (dbr_type_is_GR(type) && !enumAsNr) {
if (val[index] >= MAX_ENUM_STATES)
sprintf(str, "Illegal Value (%d)", val[index]);
else if (val[index] >= ((struct dbr_gr_enum *)v)->no_str)
sprintf(str, "Enum Index Overflow (%d)", val[index]);
else
sprintf(str, "%s", ((struct dbr_gr_enum *)v)->strs[val[index]]);
} else if (dbr_type_is_CTRL(type) && !enumAsNr) {
if (val[index] >= MAX_ENUM_STATES)
sprintf(str, "Illegal Value (%d)", val[index]);
else if (val[index] >= ((struct dbr_ctrl_enum *)v)->no_str)
sprintf(str, "Enum Index Overflow (%d)", val[index]);
else
sprintf(str, "%s", ((struct dbr_ctrl_enum *)v)->strs[val[index]]);
} else
sprintf(str, "%d", val[index]);
}
}

View File

@@ -79,9 +79,9 @@ dbMapper$(DEP): $(COMMON_DIR)/gddApps.h
# Rules for generated files
#
$(COMMON_DIR)/aitConvertGenerated.cc: $(TOOLS)/aitGen$(HOSTEXE)
$(call PATH_FILTER, $(TOOLS)/aitGen$(HOSTEXE)) $@
$(COMMON_DIR)/aitConvertGenerated.cc: $(EPICS_BASE_HOST_BIN)/aitGen$(HOSTEXE)
$(TOOLS)/aitGen$(HOSTEXE) $@
$(COMMON_DIR)/gddApps.h : $(TOOLS)/genApps$(HOSTEXE)
$(call PATH_FILTER, $(TOOLS)/genApps$(HOSTEXE)) $@
$(COMMON_DIR)/gddApps.h : $(EPICS_BASE_HOST_BIN)/genApps$(HOSTEXE)
$(TOOLS)/genApps$(HOSTEXE) $@

View File

@@ -323,7 +323,7 @@ inline int aitString::installBuf(const char* pString, unsigned strLengthIn, unsi
inline int aitString::installBuf(const char* pString)
{
unsigned strLengthIn = strlen(pString);
unsigned strLengthIn = (unsigned) strlen(pString);
return this->installBuf(pString, strLengthIn, strLengthIn+1u);
}
@@ -350,7 +350,7 @@ inline int aitString::installConstBuf(const char* pString, unsigned strLengthIn,
inline int aitString::installConstBuf(const char* pString)
{
unsigned strLengthIn = strlen(pString);
unsigned strLengthIn = (unsigned) strlen(pString);
return this->installConstBuf(pString, strLengthIn, strLengthIn+1u);
}
@@ -378,7 +378,7 @@ inline int aitString::installConstImortalBuf(const char* pString,
inline int aitString::installConstImortalBuf(const char* pString)
{
unsigned strLengthIn = strlen(pString);
unsigned strLengthIn = (unsigned) strlen(pString);
return this->installConstImortalBuf(pString, strLengthIn, strLengthIn+1u);
}
@@ -396,7 +396,7 @@ inline int aitString::copy(const char* pString, unsigned stringLength)
inline int aitString::copy(const char* p)
{
return this->copy(p, strlen(p));
return this->copy(p, (unsigned) strlen(p));
}
inline int aitString::copy(const aitString* p)
@@ -436,7 +436,7 @@ inline aitString::aitString(void)
inline aitString::aitString(const char* p, aitStrType typeIn)
{
unsigned strLengthIn = strlen(p);
unsigned strLengthIn = (unsigned) strlen(p);
this->init(p, typeIn, strLengthIn, strLengthIn+1u);
}

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

@@ -164,10 +164,9 @@ struct sockaddr caNetAddr::getSock() const
throw std::logic_error ( "caNetAddr::getSock (): address wasnt IP" );
}
struct sockaddr sa;
struct sockaddr_in *psain = reinterpret_cast <struct sockaddr_in*> ( & sa );
*psain = this->addr.ip;
return sa;
osiSockAddr addr;
addr.ia = this->addr.ip;
return addr.sa;
}
caNetAddr::operator sockaddr_in () const

View File

@@ -12,5 +12,5 @@
# This is a Makefile fragment, see src/ioc/Makefile.
$(patsubst %,$(COMMON_DIR)/%,$(BPT_DBD)) : \
$(COMMON_DIR)/bpt%.dbd : $(TOOLS)/makeBpt$(HOSTEXE)
$(COMMON_DIR)/bpt%.dbd : $(EPICS_BASE_HOST_BIN)/makeBpt$(HOSTEXE)

View File

@@ -40,25 +40,25 @@ INC += db_access_routines.h
INC += db_convert.h
INC += dbUnitTest.h
# Generate menuGlobal.dbd automatically
DBD += menuGlobal.dbd
# Generate menuGlobal.dbd, not really by concatenation, see RULES
DBDCAT += menuGlobal.dbd
menuGlobal_DBD += menuAlarmSevr.dbd
menuGlobal_DBD += menuAlarmStat.dbd
menuGlobal_DBD += menuCompress.dbd
menuGlobal_DBD += menuFtype.dbd
menuGlobal_DBD += menuIvoa.dbd
menuGlobal_DBD += menuOmsl.dbd
menuGlobal_DBD += menuPini.dbd
menuGlobal_DBD += menuPost.dbd
menuGlobal_DBD += menuPriority.dbd
menuGlobal_DBD += menuScan.dbd
menuGlobal_DBD += menuYesNo.dbd
menuGlobal_DBD += menuSimm.dbd
DBDINC += $(basename $(menuGlobal_DBD))
DBDINC += menuScan
DBDINC += dbCommon
HTMLS += $(patsubst %.dbd.pod,%.html,$(notdir $(wildcard ../db/menu*.dbd.pod)))
dbMenusPod = $(notdir $(wildcard ../db/menu*.dbd.pod))
HTMLS += $(patsubst %.dbd.pod,%.html,$(menusPod))
dbCore_SRCS += dbLock.c
dbCore_SRCS += dbAccess.c

View File

@@ -14,9 +14,14 @@
dbCommon.h$(DEP): $(IOCDIR)/db/dbCommonRecord.dbd $(IOCDIR)/db/RULES
@$(RM) $@
@$(DBTORECORDTYPEH) -D -I ../db -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
$(COMMON_DIR)/dbCommon.h: $(IOCDIR)/db/dbCommonRecord.dbd
$(COMMON_DIR)/dbCommon.h: $(IOCDIR)/db/dbCommonRecord.dbd $(IOCDIR)/db/RULES
@$(RM) $(notdir $@)
$(DBTORECORDTYPEH) -I ../db -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/menuGlobal.dbd: $(IOCDIR)/db/Makefile $(IOCDIR)/db/RULES
# This is a target-specific variable
$(COMMON_DIR)/menuGlobal.dbd: DBDCAT_COMMAND = \
$(PERL) $(TOOLS)/makeIncludeDbd.pl $(menuGlobal_DBD) $(@F)

View File

@@ -54,6 +54,7 @@ typedef struct cbQueueSet {
epicsEventId semWakeUp;
epicsRingPointerId queue;
int queueOverflow;
int shutdown;
int threadsConfigured;
int threadsRunning;
} cbQueueSet;
@@ -73,7 +74,8 @@ static epicsTimerQueueId timerQueue;
enum ctl {ctlInit, ctlRun, ctlPause, ctlExit};
static volatile enum ctl cbCtl;
static epicsEventId startStopEvent;
static void *exitCallback;
static int callbackIsInit;
/* Static data */
static char *threadNamePrefix[NUM_CALLBACK_PRIORITIES] = {
@@ -89,7 +91,7 @@ static int priorityValue[NUM_CALLBACK_PRIORITIES] = {0, 1, 2};
int callbackSetQueueSize(int size)
{
if (startStopEvent) {
if (callbackIsInit) {
errlogPrintf("Callback system already initialized\n");
return -1;
}
@@ -99,7 +101,7 @@ int callbackSetQueueSize(int size)
int callbackParallelThreads(int count, const char *prio)
{
if (startStopEvent) {
if (callbackIsInit) {
errlogPrintf("Callback system already initialized\n");
return -1;
}
@@ -149,12 +151,13 @@ int callbackParallelThreads(int count, const char *prio)
static void callbackTask(void *arg)
{
cbQueueSet *mySet = &callbackQueue[*(int*)arg];
int prio = *(int*)arg;
cbQueueSet *mySet = &callbackQueue[prio];
taskwdInsert(0, NULL, NULL);
epicsEventSignal(startStopEvent);
while(TRUE) {
while(!mySet->shutdown) {
void *ptr;
if (epicsRingPointerIsEmpty(mySet->queue))
epicsEventMustWait(mySet->semWakeUp);
@@ -163,42 +166,52 @@ static void callbackTask(void *arg)
CALLBACK *pcallback = (CALLBACK *)ptr;
if(!epicsRingPointerIsEmpty(mySet->queue))
epicsEventMustTrigger(mySet->semWakeUp);
if (ptr == &exitCallback) goto shutdown;
mySet->queueOverflow = FALSE;
(*pcallback->callback)(pcallback);
}
}
shutdown:
mySet->threadsRunning--;
if(!epicsAtomicDecrIntT(&mySet->threadsRunning))
epicsEventSignal(startStopEvent);
taskwdRemove(0);
epicsEventSignal(startStopEvent);
}
void callbackShutdown(void)
void callbackStop(void)
{
int i;
if (cbCtl == ctlExit) return;
cbCtl = ctlExit;
/* sequential shutdown of workers */
for (i = 0; i < NUM_CALLBACK_PRIORITIES; i++) {
while (callbackQueue[i].threadsRunning) {
if(epicsRingPointerPush(callbackQueue[i].queue, &exitCallback)) {
epicsEventSignal(callbackQueue[i].semWakeUp);
epicsEventWait(startStopEvent);
} else {
epicsThreadSleep(0.05);
}
}
assert(callbackQueue[i].threadsRunning==0);
epicsEventDestroy(callbackQueue[i].semWakeUp);
epicsRingPointerDelete(callbackQueue[i].queue);
callbackQueue[i].shutdown = 1;
epicsEventSignal(callbackQueue[i].semWakeUp);
}
for (i = 0; i < NUM_CALLBACK_PRIORITIES; i++) {
cbQueueSet *mySet = &callbackQueue[i];
while (epicsAtomicGetIntT(&mySet->threadsRunning)) {
epicsEventSignal(mySet->semWakeUp);
epicsEventWaitWithTimeout(startStopEvent, 0.1);
}
}
}
void callbackCleanup(void)
{
int i;
for (i = 0; i < NUM_CALLBACK_PRIORITIES; i++) {
cbQueueSet *mySet = &callbackQueue[i];
assert(epicsAtomicGetIntT(&mySet->threadsRunning)==0);
epicsEventDestroy(mySet->semWakeUp);
epicsRingPointerDelete(mySet->queue);
}
epicsTimerQueueRelease(timerQueue);
epicsEventDestroy(startStopEvent);
startStopEvent = NULL;
callbackIsInit = 0;
memset(callbackQueue, 0, sizeof(callbackQueue));
}
@@ -208,10 +221,14 @@ void callbackInit(void)
int j;
char threadName[32];
if (startStopEvent)
if (callbackIsInit) {
errlogMessage("Warning: callbackInit called again before callbackCleanup\n");
return;
}
callbackIsInit = 1;
startStopEvent = epicsEventMustCreate(epicsEventEmpty);
if(!startStopEvent)
startStopEvent = epicsEventMustCreate(epicsEventEmpty);
cbCtl = ctlRun;
timerQueue = epicsTimerQueueAllocate(0, epicsThreadPriorityScanHigh);
@@ -239,7 +256,7 @@ void callbackInit(void)
cantProceed("Failed to spawn callback thread %s\n", threadName);
} else {
epicsEventWait(startStopEvent);
callbackQueue[i].threadsRunning++;
epicsAtomicIncrIntT(&callbackQueue[i].threadsRunning);
}
}
}

View File

@@ -57,7 +57,8 @@ typedef void (*CALLBACKFUNC)(struct callbackPvt*);
( (USER) = (void *)((CALLBACK *)(PCALLBACK))->user )
epicsShareFunc void callbackInit(void);
epicsShareFunc void callbackShutdown(void);
epicsShareFunc void callbackStop(void);
epicsShareFunc void callbackCleanup(void);
epicsShareFunc int callbackRequest(CALLBACK *pCallback);
epicsShareFunc void callbackSetProcess(
CALLBACK *pcallback, int Priority, void *pRec);

View File

@@ -65,6 +65,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,
@@ -711,7 +715,11 @@ int dbLoadDatabase(const char *file, const char *path, const char *subs)
int 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;
}
@@ -730,6 +738,11 @@ static long getLinkValue(DBADDR *paddr, short dbrType,
if (nRequest && *nRequest > 1) *nRequest = 1;
break;
case DBR_DOUBLE: /* Needed for dbCa links */
if (nRequest && *nRequest) *nRequest = 1;
*(double *)pbuf = epicsNAN;
return 0;
case DBR_CHAR:
case DBR_UCHAR:
if (nRequest && *nRequest > 0) {
@@ -835,17 +848,15 @@ long dbGet(DBADDR *paddr, short dbrType,
return S_db_badDbrtype;
}
/* For array field, the rset function
/* For SPC_DBADDR fields, the rset function
* get_array_info() is allowed to modify
* paddr->pfield. So we store the original
* value and restore it later.
*/
pfieldsave = paddr->pfield;
/* check for array */
if ((!pfl || pfl->type == dbfl_type_rec) &&
paddr->pfldDes->special == SPC_DBADDR &&
no_elements > 1 &&
/* Update field info */
if (paddr->pfldDes->special == SPC_DBADDR &&
(prset = dbGetRset(paddr)) &&
prset->get_array_info) {
status = prset->get_array_info(paddr, &no_elements, &offset);
@@ -1171,7 +1182,9 @@ long dbPut(DBADDR *paddr, short dbrType,
long no_elements = paddr->no_elements;
long special = paddr->special;
void *pfieldsave = paddr->pfield;
struct rset *prset = dbGetRset(paddr);
long status = 0;
long offset;
dbFldDes *pfldDes;
int isValueField;
@@ -1195,40 +1208,41 @@ long dbPut(DBADDR *paddr, short dbrType,
if (status) return status;
}
if (paddr->pfldDes->special == SPC_DBADDR &&
prset && prset->get_array_info) {
long dummy;
status = prset->get_array_info(paddr, &dummy, &offset);
/* paddr->pfield may be modified */
if (status) goto done;
} else
offset = 0;
if (no_elements <= 1) {
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
paddr->pfield, paddr);
nRequest = 1;
} else {
struct rset *prset = dbGetRset(paddr);
long offset = 0;
if (no_elements < nRequest)
nRequest = no_elements;
status = dbPutConvertRoutine[dbrType][field_type](paddr, pbuffer,
nRequest, no_elements, offset);
}
if (paddr->pfldDes->special == SPC_DBADDR &&
prset && prset->get_array_info) {
long dummy;
/* update array info */
if (!status &&
paddr->pfldDes->special == SPC_DBADDR &&
prset && prset->put_array_info) {
status = prset->put_array_info(paddr, nRequest);
}
status = prset->get_array_info(paddr, &dummy, &offset);
/* paddr->pfield may be modified */
}
if (no_elements < nRequest) nRequest = no_elements;
if (!status)
status = dbPutConvertRoutine[dbrType][field_type](paddr, pbuffer,
nRequest, no_elements, offset);
/* update array info */
if (!status &&
paddr->pfldDes->special == SPC_DBADDR &&
prset && prset->put_array_info) {
status = prset->put_array_info(paddr, nRequest);
}
/* Always do special processing if needed */
if (special) {
long status2 = dbPutSpecial(paddr, 1);
if (status2) goto done;
}
if (status) goto done;
/* check if special processing is required */
if (special) {
status = dbPutSpecial(paddr,1);
if (status) goto done;
}
/* Propagate monitor events for this field, */
/* unless the field is VAL and PP is true. */
pfldDes = paddr->pfldDes;

View File

@@ -233,9 +233,14 @@ epicsShareFunc long dbBufferSize(
short dbrType,long options,long nRequest);
epicsShareFunc long 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 dbLoadDatabase(
const char *filename, const char *path, const char *substitutions);
epicsShareFunc int dbLoadRecords(
const char* filename, const char* substitutions);

View File

@@ -48,7 +48,6 @@
#include "dbDefs.h"
#include "ellLib.h"
#include "epicsEvent.h"
#include "epicsExit.h"
#include "epicsMutex.h"
#include "epicsThread.h"
#include "epicsTime.h"
@@ -252,11 +251,6 @@ static long FIND_CONT_NODE(
return(0);
}
static void dbBkptExit(void *junk) {
epicsMutexDestroy(bkpt_stack_sem);
bkpt_stack_sem = NULL;
}
/*
* Initialise the breakpoint stack
*/
@@ -265,7 +259,6 @@ void dbBkptInit(void)
if (! bkpt_stack_sem) {
bkpt_stack_sem = epicsMutexMustCreate();
lset_stack_count = 0;
epicsAtExit(dbBkptExit, NULL);
}
}

View File

@@ -34,6 +34,8 @@
# undef epicsExportSharedSymbols
#endif
#include "stdlib.h"
#include "tsDLList.h"
#include "tsFreeList.h"
#include "resourceLib.h"
@@ -137,7 +139,9 @@ public:
void show ( unsigned level ) const;
private:
struct cacheElem_t {
size_t size;
struct cacheElem_t * pNext;
char buf[1];
};
unsigned long _readNotifyCacheSize;
cacheElem_t * _pReadNotifyCache;

View File

@@ -100,7 +100,7 @@ static int dbca_chan_count;
* that has been deleted.
*
* Just a few words about handling dbCaRemoveLink because this is when
* it is essential that nothing trys to use a caLink that has been freed.
* it is essential that nothing tries to use a caLink that has been freed.
*
* dbCaRemoveLink is called when links are being modified. This is only
* done with the dbScan mechanism guranteeing that nothing from
@@ -119,19 +119,16 @@ static int dbca_chan_count;
* dbCaTask issues a ca_clear_channel and then frees the caLink.
*
* If any channel access callback gets called before the ca_clear_channel
* it finds pca->plink=0 and does nothing. Once ca_clear_channel
* it finds pca->plink==0 and does nothing. Once ca_clear_channel
* is called no other callback for this caLink will be called.
*
* dbCaPutLinkCallback causes an additional complication because
* when dbCaRemoveLink is called the callback may not have occured.
* What is done is the following:
* If callback has not occured dbCaRemoveLink sets plinkPutCallback=plink
* If putCallback is called before dbCaTask calls ca_clear_channel
* it does NOT call the users callback.
* dbCaTask calls the users callback passing plinkPutCallback AFTER
* it has called ca_clear_channel
* Thus the users callback will get called exactly once.
*/
* If putComplete sees plink==0 it will not call the user's code.
* If pca->putCallback is non-zero, dbCaTask will call the
* user's callback AFTER it has called ca_clear_channel.
* Thus the user's callback will get called exactly once.
*/
static void addAction(caLink *pca, short link_action)
{
@@ -168,7 +165,7 @@ static void addAction(caLink *pca, short link_action)
static void dbCaLinkFree(caLink *pca)
{
dbCaCallback callback;
struct link *plinkPutCallback = 0;
void *userPvt = 0;
if (pca->chid) {
ca_clear_channel(pca->chid);
@@ -176,8 +173,7 @@ static void dbCaLinkFree(caLink *pca)
}
callback = pca->putCallback;
if (callback) {
plinkPutCallback = pca->plinkPutCallback;
pca->plinkPutCallback = 0;
userPvt = pca->putUserPvt;
pca->putCallback = 0;
pca->putType = 0;
}
@@ -188,12 +184,12 @@ static void dbCaLinkFree(caLink *pca)
free(pca->pvname);
epicsMutexDestroy(pca->lock);
free(pca);
if (callback) callback(plinkPutCallback);
if (callback) callback(userPvt);
}
void dbCaCallbackProcess(void *usrPvt)
void dbCaCallbackProcess(void *userPvt)
{
struct link *plink = (struct link *)usrPvt;
struct link *plink = (struct link *)userPvt;
dbCommon *pdbCommon = plink->value.pv_link.precord;
dbScanLock(pdbCommon);
@@ -223,11 +219,6 @@ void dbCaShutdown(void)
}
}
static void dbCaExit(void *arg)
{
dbCaShutdown();
}
void dbCaLinkInitIsolated(void)
{
if (!workListLock)
@@ -235,7 +226,6 @@ void dbCaLinkInitIsolated(void)
if (!workListEvent)
workListEvent = epicsEventMustCreate(epicsEventEmpty);
dbCaCtl = ctlExit;
epicsAtExit(dbCaExit, NULL);
}
void dbCaLinkInit(void)
@@ -297,8 +287,6 @@ void dbCaRemoveLink(struct link *plink)
epicsMutexMustLock(pca->lock);
pca->plink = 0;
plink->value.pv_link.pvt = 0;
if (pca->putCallback)
pca->plinkPutCallback = plink;
/* Unlock before addAction or dbCaTask might free first */
epicsMutexUnlock(pca->lock);
addAction(pca, CA_CLEAR_CHANNEL);
@@ -425,7 +413,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];
@@ -439,7 +427,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;
@@ -794,7 +788,7 @@ static void exceptionCallback(struct exception_handler_args args)
}
}
static void putCallback(struct event_handler_args arg)
static void putComplete(struct event_handler_args arg)
{
caLink *pca = (caLink *)arg.usr;
struct link *plink;
@@ -957,7 +951,7 @@ static void dbCaTask(void *arg)
status = ca_array_put_callback(
pca->dbrType, pca->nelements,
pca->chid, pca->pputNative,
putCallback, pca);
putComplete, pca);
} else {
status = ECA_PUTFAIL;
}
@@ -980,7 +974,7 @@ static void dbCaTask(void *arg)
status = ca_array_put_callback(
DBR_STRING, 1,
pca->chid, pca->pputString,
putCallback, pca);
putComplete, pca);
} else {
status = ECA_PUTFAIL;
}

View File

@@ -63,7 +63,6 @@ typedef struct caLink
short putType;
dbCaCallback putCallback;
void *putUserPvt;
struct link *plinkPutCallback;
/* The following are for access to additional attributes*/
char gotAttributes;
dbCaCallback getAttributes;

View File

@@ -192,7 +192,7 @@ void dbcaStats(int *pchans, int *pdiscon)
caLink *pca = (caLink *)plink->value.pv_link.pvt;
ncalinks++;
if (pca && ca_state(pca->chid) == cs_conn) {
if (pca && pca->chid && ca_state(pca->chid) == cs_conn) {
nconnected++;
}
}

View File

@@ -38,9 +38,6 @@
#include "recSup.h"
#include "special.h"
/* The following is defined in db_convert.h */
extern unsigned short dbDBRnewToDBRold[DBR_ENUM+1];
typedef struct parseContext {
dbChannel *chan;
chFilter *filter;
@@ -53,7 +50,7 @@ static void *dbChannelFreeList;
static void *chFilterFreeList;
static void *dbchStringFreeList;
static void dbChannelExit(void* junk)
void dbChannelExit(void)
{
freeListCleanup(dbChannelFreeList);
freeListCleanup(chFilterFreeList);
@@ -69,7 +66,6 @@ void dbChannelInit (void)
freeListInitPvt(&dbChannelFreeList, sizeof(dbChannel), 128);
freeListInitPvt(&chFilterFreeList, sizeof(chFilter), 64);
freeListInitPvt(&dbchStringFreeList, sizeof(epicsOldString), 128);
epicsAtExit(dbChannelExit, NULL);
}
static void chf_value(parseContext *parser, parse_result *presult)
@@ -619,7 +615,7 @@ long dbChannelOpen(dbChannel *chan)
/* Set up type probe */
probe.type = dbfl_type_val;
probe.ctx = dbfl_context_read;
probe.field_type = dbChannelFieldType(chan);
probe.field_type = dbChannelExportType(chan);
probe.no_elements = dbChannelElements(chan);
probe.field_size = dbChannelFieldSize(chan);
p = probe;
@@ -661,7 +657,6 @@ long dbChannelOpen(dbChannel *chan)
chan->final_no_elements = probe.no_elements;
chan->final_field_size = probe.field_size;
chan->final_type = probe.field_type;
chan->final_dbr_type = dbDBRnewToDBRold[mapDBFToDBR[probe.field_type]];
return 0;
}
@@ -710,9 +705,9 @@ void dbChannelShow(dbChannel *chan, int level, const unsigned short indent)
int post = ellCount(&chan->post_chain);
printf("%*schannel name: %s\n", indent, "", chan->name);
/* FIXME: show field_type as text */
printf("%*s field_type=%d (%dB), %ld element%s, %d filter%s", indent, "",
chan->addr.field_type, chan->addr.field_size, elems, elems == 1 ? "" : "s",
printf("%*s field_type=%s (%d bytes), dbr_type=%s, %ld element%s, %d filter%s", indent, "",
dbGetFieldTypeString(chan->addr.field_type), chan->addr.field_size,
dbGetFieldTypeString(chan->addr.dbr_field_type), elems, elems == 1 ? "" : "s",
count, count == 1 ? "" : "s");
if (count)
printf(" (%d pre eventq, %d post eventq)\n", pre, post);
@@ -721,9 +716,9 @@ void dbChannelShow(dbChannel *chan, int level, const unsigned short indent)
if (level > 0)
dbChannelFilterShow(chan, level - 1, indent + 2);
if (count) {
/* FIXME: show field_type as text */
printf("%*s final field_type=%d (%dB), %ld element%s\n", indent, "",
chan->final_type, chan->final_field_size, felems, felems == 1 ? "" : "s");
printf("%*s final field_type=%s (%dB), %ld element%s\n", indent, "",
dbGetFieldTypeString(chan->final_type), chan->final_field_size,
felems, felems == 1 ? "" : "s");
}
}
@@ -762,7 +757,7 @@ void dbChannelMakeArrayCopy(void *pvt, db_field_log *pfl, dbChannel *chan)
void *p;
struct dbCommon *prec = dbChannelRecord(chan);
if (!pfl->type == dbfl_type_rec) return;
if (pfl->type != dbfl_type_rec) return;
pfl->type = dbfl_type_ref;
pfl->stat = prec->stat;

View File

@@ -56,7 +56,6 @@ typedef struct dbChannel {
long final_no_elements; /* final number of elements (arrays) */
short final_field_size; /* final size of element */
short final_type; /* final type of database field */
short final_dbr_type; /* final field type as seen by database request */
ELLLIST filters; /* list of filters as created from JSON */
ELLLIST pre_chain; /* list of filters to be called pre-event-queue */
ELLLIST post_chain; /* list of filters to be called post-event-queue */
@@ -150,10 +149,13 @@ struct dbCommon;
struct dbFldDes;
epicsShareFunc void dbChannelInit (void);
epicsShareFunc void dbChannelExit(void);
epicsShareFunc long dbChannelTest(const char *name);
epicsShareFunc dbChannel * dbChannelCreate(const char *name);
epicsShareFunc long dbChannelOpen(dbChannel *chan);
/*Following is also defined in db_convert.h*/
epicsShareExtern unsigned short dbDBRnewToDBRold[];
/* In the following macros pChan is dbChannel* */
@@ -175,6 +177,9 @@ epicsShareFunc long dbChannelOpen(dbChannel *chan);
/* evaluates to short */
#define dbChannelExportType(pChan) ((pChan)->addr.dbr_field_type)
/* evaluates to short */
#define dbChannelExportCAType(pChan) (dbDBRnewToDBRold[dbChannelExportType(pChan)])
/* evaluates to short */
#define dbChannelFieldSize(pChan) ((pChan)->addr.field_size)
@@ -185,7 +190,7 @@ epicsShareFunc long dbChannelOpen(dbChannel *chan);
#define dbChannelFinalFieldType(pChan) ((pChan)->final_type)
/* evaluates to short */
#define dbChannelFinalExportType(pChan) ((pChan)->final_dbr_type)
#define dbChannelFinalCAType(pChan) (dbDBRnewToDBRold[(pChan)->final_type])
/* evaluates to short */
#define dbChannelFinalFieldSize(pChan) ((pChan)->final_field_size)

View File

@@ -159,7 +159,7 @@ void dbChannelIO::show (
if ( level > 0u ) {
printf ( " type %s, element count %li, field at %p\n",
dbf_type_to_text ( dbChannelExportType ( this->dbch ) ),
dbf_type_to_text ( dbChannelExportCAType ( this->dbch ) ),
dbChannelElements ( this->dbch ),
dbChannelField ( this->dbch ) );
if ( level > 1u ) {
@@ -206,7 +206,7 @@ short dbChannelIO::nativeType (
epicsGuard < epicsMutex > & guard ) const
{
guard.assertIdenticalMutex ( this->mutex );
return dbChannelExportType( this->dbch );
return dbChannelExportCAType( this->dbch );
}
void * dbChannelIO::operator new ( size_t size,

View File

@@ -13,7 +13,10 @@
* Auther Jeff Hill
*/
#include <stdlib.h>
#include "epicsMutex.h"
#include "dbDefs.h"
#include "cadef.h" // this can be eliminated when the callbacks use the new interface
#include "db_access.h" // should be eliminated here in the future
@@ -23,6 +26,8 @@
#include "db_access_routines.h"
#include "dbCAC.h"
#include "epicsAssert.h"
dbContextReadNotifyCache::dbContextReadNotifyCache ( epicsMutex & mutexIn ) :
_mutex ( mutexIn )
{
@@ -112,10 +117,10 @@ dbContextReadNotifyCacheAllocator::~dbContextReadNotifyCacheAllocator ()
void dbContextReadNotifyCacheAllocator::reclaimAllCacheEntries ()
{
while ( _pReadNotifyCache ) {
cacheElem_t * pNext = _pReadNotifyCache->pNext;
delete [] _pReadNotifyCache;
assert(_pReadNotifyCache->size == _readNotifyCacheSize);
::free(_pReadNotifyCache);
_pReadNotifyCache = pNext;
}
}
@@ -129,20 +134,26 @@ char * dbContextReadNotifyCacheAllocator::alloc ( unsigned long size )
cacheElem_t * pAlloc = _pReadNotifyCache;
if ( pAlloc ) {
assert(pAlloc->size == _readNotifyCacheSize);
_pReadNotifyCache = pAlloc->pNext;
}
else {
size_t nElem = _readNotifyCacheSize / sizeof ( cacheElem_t );
pAlloc = new cacheElem_t [ nElem + 1 ];
pAlloc = (cacheElem_t*)calloc(1, sizeof(cacheElem_t)+_readNotifyCacheSize);
if(!pAlloc) throw std::bad_alloc();
pAlloc->size = _readNotifyCacheSize;
}
return reinterpret_cast < char * > ( pAlloc );
return pAlloc->buf;
}
void dbContextReadNotifyCacheAllocator::free ( char * pFree )
{
cacheElem_t * pAlloc = reinterpret_cast < cacheElem_t * > ( pFree );
pAlloc->pNext = _pReadNotifyCache;
_pReadNotifyCache = pAlloc;
cacheElem_t * pAlloc = (cacheElem_t*)(pFree - offsetof(cacheElem_t, buf));
if (pAlloc->size == _readNotifyCacheSize) {
pAlloc->pNext = _pReadNotifyCache;
_pReadNotifyCache = pAlloc;
} else {
::free(pAlloc);
}
}
void dbContextReadNotifyCacheAllocator::show ( unsigned level ) const
@@ -152,6 +163,7 @@ void dbContextReadNotifyCacheAllocator::show ( unsigned level ) const
size_t count =0;
cacheElem_t * pNext = _pReadNotifyCache;
while ( pNext ) {
assert(pNext->size == _readNotifyCacheSize);
pNext = _pReadNotifyCache->pNext;
count++;
}

View File

@@ -46,6 +46,7 @@
#include "dbFldTypes.h"
#include "dbLock.h"
#include "link.h"
#include "special.h"
#define EVENTSPERQUE 32
#define EVENTENTRIES 4 /* the number of que entries for each event */
@@ -452,7 +453,8 @@ dbEventSubscription db_add_event (
* communication (for other types they get whatever happens to be
* there upon wakeup)
*/
if( dbChannelElements(chan) == 1 &&
if (dbChannelElements(chan) == 1 &&
dbChannelSpecial(chan) != SPC_DBADDR &&
dbChannelFieldSize(chan) <= sizeof(union native_value)) {
pevent->useValque = TRUE;
}
@@ -824,7 +826,7 @@ unsigned int caEventMask
/*
* Only send event msg if they are waiting on the field which
* changed or pval==NULL and waiting on alarms and alarms changed
* changed or pval==NULL, and are waiting on matching event
*/
if ( (dbChannelField(pevent->chan) == (void *)pField || pField==NULL) &&
(caEventMask & pevent->select)) {
@@ -977,6 +979,7 @@ static void event_task (void *pParm)
{
struct event_user * const evUser = (struct event_user *) pParm;
struct event_que * ev_que;
unsigned char pendexit;
/* init hook */
if (evUser->init_func) {
@@ -1018,9 +1021,10 @@ static void event_task (void *pParm)
event_read (ev_que);
epicsMutexMustLock ( evUser->lock );
}
pendexit = evUser->pendexit;
epicsMutexUnlock ( evUser->lock );
} while ( ! evUser->pendexit );
} while( ! pendexit );
epicsMutexDestroy(evUser->firstque.writelock);

View File

@@ -233,6 +233,17 @@ static void dbtpnCallFunc(const iocshArgBuf *args)
static const iocshFuncDef dbNotifyDumpFuncDef = {"dbNotifyDump",0,0};
static void dbNotifyDumpCallFunc(const iocshArgBuf *args) { dbNotifyDump();}
/* dbPutAttribute */
static const iocshArg dbPutAttrArg0 = { "record type",iocshArgString};
static const iocshArg dbPutAttrArg1 = { "attribute name",iocshArgString};
static const iocshArg dbPutAttrArg2 = { "value",iocshArgString};
static const iocshArg * const dbPutAttrArgs[] =
{&dbPutAttrArg0, &dbPutAttrArg1, &dbPutAttrArg2};
static const iocshFuncDef dbPutAttrFuncDef =
{"dbPutAttribute",3,dbPutAttrArgs};
static void dbPutAttrCallFunc(const iocshArgBuf *args)
{ dbPutAttribute(args[0].sval,args[1].sval,args[2].sval);}
/* tpn */
static const iocshArg tpnArg0 = { "record name",iocshArgString};
static const iocshArg tpnArg1 = { "value",iocshArgString};
@@ -405,6 +416,7 @@ void dbIocRegister(void)
iocshRegister(&pftFuncDef,pftCallFunc);
iocshRegister(&dbtpnFuncDef,dbtpnCallFunc);
iocshRegister(&dbNotifyDumpFuncDef,dbNotifyDumpCallFunc);
iocshRegister(&dbPutAttrFuncDef,dbPutAttrCallFunc);
iocshRegister(&tpnFuncDef,tpnCallFunc);
iocshRegister(&dblsrFuncDef,dblsrCallFunc);
iocshRegister(&dbLockShowLockedFuncDef,dbLockShowLockedCallFunc);

View File

@@ -76,6 +76,25 @@ static void inherit_severity(const struct pv_link *ppv_link, dbCommon *pdest,
}
}
/* How to identify links in error messages */
static const char * link_field_name(const struct link *plink)
{
const struct dbCommon *precord = plink->value.pv_link.precord;
const dbRecordType *pdbRecordType = precord->rdes;
dbFldDes * const *papFldDes = pdbRecordType->papFldDes;
const short *link_ind = pdbRecordType->link_ind;
int i;
for (i = 0; i < pdbRecordType->no_links; i++) {
const dbFldDes *pdbFldDes = papFldDes[link_ind[i]];
if (plink == (DBLINK *)((char *)precord + pdbFldDes->offset))
return pdbFldDes->name;
}
return "????";
}
/***************************** Constant Links *****************************/
static long dbConstLoadLink(struct link *plink, short dbrType, void *pbuffer)
@@ -412,9 +431,13 @@ void dbInitLink(struct dbCommon *precord, struct link *plink, short dbfType)
if (pperiod && strstr(pperiod, "PROC")) {
plink->value.pv_link.pvlMask |= pvlOptFWD;
} else {
errlogPrintf("%s.FLNK is a Channel Access Link "
" but does not link to a PROC field\n", precord->name);
}
else {
errlogPrintf("Forward-link uses Channel Access "
"without pointing to PROC field\n"
" %s.%s => %s\n",
precord->name, link_field_name(plink),
plink->value.pv_link.pvname);
}
}
}

View File

@@ -50,7 +50,7 @@ typedef struct lset {
} lset;
#define dbGetSevr(PLINK, PSEVERITY) \
dbGetAlarm((PLINK), NULL, (PSEVERITY));
dbGetAlarm((PLINK), NULL, (PSEVERITY))
epicsShareFunc void dbInitLink(struct dbCommon *precord, struct link *plink,
short dbfType);

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