Compare commits

...

3 Commits

9 changed files with 47 additions and 56 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ include
*.pdf
*.*log
StreamVersion.h
*.local

View File

@ -21,21 +21,10 @@
# along with StreamDevice. If not, see https://www.gnu.org/licenses/.
#########################################################################/
TOP = ..
ifneq ($(wildcard ../configure),)
# We are in an EPICS R3.14+ <TOP> location
include $(TOP)/configure/CONFIG
else ifneq ($(wildcard ../config),)
# We are in an EPICS R3.13 <TOP> location
CONFIG = $(TOP)/config
include $(TOP)/config/CONFIG_APP
else
# Using our own local configuration
TOP = .
DIRS = configure
src_DEPEND_DIRS := $(DIRS)
include $(TOP)/configure/CONFIG
endif
TOP = .
DIRS = configure
src_DEPEND_DIRS := $(DIRS)
include $(TOP)/configure/CONFIG
DIRS += src
DIRS += streamApp

View File

@ -54,15 +54,17 @@ git clone https://github.com/paulscherrerinstitute/StreamDevice.git
<p class="new">
<em>StreamDevice</em> now comes with a standard
<kbd>configure</kbd> directory.
But it can still be built in an external <em>&lt;top&gt;</em>
<del>But it can still be built in an external <em>&lt;top&gt;</em>
directory as in previous versions.
It will automatically detect <em>&lt;top&gt;</em> locations
from the presence of <kbd>../configure</kbd> or <kbd>../config</kbd>
directories.
directories.</del> Using an upper level <kbd>../configure</kbd> is
no longer supported due to compatibility issues with <em>SynApps</em>.
</p>
<p class="new">
Edit the <kbd>configure/RELEASE</kbd> file to specify the install location
of EPICS base and of additional software modules, for example:
of EPICS base and of additional software modules or add a
<kbd>configure/RELEASE.local</kbd> file to overwrite, for example:
<pre>
EPICS_BASE=/home/epics/base-3.16.1
</pre>

View File

@ -21,16 +21,8 @@
# along with StreamDevice. If not, see https://www.gnu.org/licenses/.
#########################################################################/
TOP = ../..
ifneq ($(wildcard ../../configure),)
include $(TOP)/configure/CONFIG
else ifneq ($(wildcard ../../config),)
include $(TOP)/config/CONFIG_APP
include $(TOP)/config/RULES_ARCHS
else
TOP= ..
include $(TOP)/configure/CONFIG
endif
TOP= ..
include $(TOP)/configure/CONFIG
-include CONFIG_STREAM
-include ../CONFIG_STREAM
@ -89,7 +81,7 @@ CPPFLAGS += -DSTREAM_INTERNAL
# Update version string whenever something changed.
StreamVersion$(OBJ): $(COMMON_DIR)/StreamVersion.h $(filter-out StreamVersion$(OBJ),$(LIBOBJS) $(LIBRARY_OBJS)) ../CONFIG_STREAM
$(COMMON_DIR)/StreamVersion.h: $(SRCS) $(filter-out StreamVersion.h, $(INC))
$(COMMON_DIR)/StreamVersion.h: ../../.VERSION $(SRCS) $(filter-out StreamVersion.h, $(INC))
@echo Creating $@
$(PERL) ../makeStreamVersion.pl $@

View File

@ -187,9 +187,12 @@ bool StreamCore::
parse(const char* filename, const char* _protocolname)
{
protocolname = _protocolname;
// extract substitutions from protocolname "name(sub1,sub2)"
// extract substitutions from protocolname "name ( sub1, sub2 ) "
ssize_t i = protocolname.find('(');
if (i >= 0)
if (i < 0) i = 0;
while (protocolname[i-1] == ' ')
protocolname.remove(--i, 1);
if (protocolname[i] == '(')
{
while (i < (ssize_t)protocolname.length())
{

View File

@ -26,10 +26,16 @@
#define STR(x) STR2(x)
const char StreamVersion [] =
"StreamDevice"
#if STREAM_MAJOR+0
#ifdef STREAM_MAJOR
" " STR(STREAM_MAJOR)
"." STR(STREAM_MINOR)
"." STR(STREAM_PATCHLEVEL)
STREAM_DEV
#endif
" commit:" STREAM_COMMIT_HASH;
#ifdef STREAM_COMMIT_DATE
" " STREAM_COMMIT_DATE
#endif
#ifdef STREAM_COMMIT_HASH
"\n commit: " STREAM_COMMIT_HASH
#endif
;

View File

@ -23,7 +23,7 @@
use strict;
my ( $major, $minor, $patch, $dev, $branch, $date, $hash );
my ( $major, $minor, $patch, $dev, $date, $hash );
if (my $version = `git describe --tags --abbrev=0 --dirty --match "[0-9]*" 2>/dev/null`) {
if ($version =~ m/(\d+)\.(\d+)\.(\d+)?(.*)?/) {
@ -39,10 +39,10 @@ if (!$major) {
if ($line =~ m/COMMIT: *([[:xdigit:]]+)/) {
$hash = $1;
}
if ($line =~ m/REFS: *tag: *((\d+)\.(\d+)\.(\d+)?,)? *(.*)/) {
$major = $2; $minor = $3; $patch = $4; $branch = $5;
if ($line =~ m/REFS: .*tag: *(\d+)\.(\d+)\.?(\d+)?/) {
$major = $1; $minor = $2; $patch = $3 or $patch = 0;
}
if ($line =~ m/DATE: *(.+)/) {
if ($line =~ m/DATE: *([-0-9:+ ]*)/) {
$date = $1;
}
}
@ -58,14 +58,20 @@ print $out <<EOF;
#ifndef StreamVersion_h
#define StreamVersion_h
EOF
if ($major) {
print $out <<EOF;
#define STREAM_MAJOR $major
#define STREAM_MINOR $minor
#define STREAM_PATCHLEVEL $patch
#define STREAM_DEV "$dev"
#define STREAM_COMMIT_HASH "$hash"
#define STREAM_COMMIT_DATE "$date"
#endif /* StreamVersion_h */
EOF
}
if ($hash) {
print $out "#define STREAM_COMMIT_HASH \"$hash\"\n";
}
if ($date) {
print $out "#define STREAM_COMMIT_DATE \"$date\"\n";
}
print $out "#endif /* StreamVersion_h */\n";
close $out

View File

@ -21,16 +21,8 @@
# along with StreamDevice. If not, see https://www.gnu.org/licenses/.
#########################################################################/
TOP = ../..
ifneq ($(wildcard ../../configure),)
include $(TOP)/configure/CONFIG
else ifneq ($(wildcard ../../config),)
include $(TOP)/config/CONFIG_APP
include $(TOP)/config/RULES_ARCHS
else
TOP= ..
include $(TOP)/configure/CONFIG
endif
TOP= ..
include $(TOP)/configure/CONFIG
PROD = streamApp
DBD = streamApp.dbd

View File

@ -22,20 +22,20 @@
record (stringout, "$(P):cmd")
{
field (DTYP, "stream")
field (OUT, "@test.proto command terminal")
field (OUT, "@test.proto command terminal")
field (PRIO, "HIGH")
field (VAL, "")
}
record (stringout, "$(P):info")
{
field (DTYP, "stream")
field (OUT, "@test.proto info terminal")
field (OUT, "@test.proto info terminal ")
field (PRIO, "HIGH")
}
record (stringout, "$(P):request")
{
field (DTYP, "stream")
field (OUT, "@test.proto request($(P):reply.VAL) terminal")
field (OUT, "@test.proto request ($(P):reply.VAL) terminal")
field (PRIO, "HIGH")
}
record (stringin, "$(P):reply")
@ -44,7 +44,7 @@ record (stringin, "$(P):reply")
record (stringout, "$(P):checksum")
{
field (DTYP, "stream")
field (OUT, "@test.proto checksum($(CHKSUM=sum)) terminal")
field (OUT, "@test.proto checksum ($(CHKSUM=sum)) terminal")
}
record (stringin, "$(P):spy")
{