From b84ee89d8785a71d77a35585b20d6e1801c6bcce Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 16 Apr 2018 18:50:51 -0700 Subject: [PATCH 1/8] Fix ECHO definition to not match variables in MAKEFLAGS by using MFLAGS instead. Prior ECHO definition strips T_A=XXX command line variable definitions from MAKEFLAGS but doesn't strip other variable definitions such as INSTALL_LOCATION. As a result, if you "make INSTALL_LOCATION=XXX" the ECHO definition erroneously matches if your install location contains 's'. Changing the ECHO definition to MFLAGS avoids all command line variable definitions. --- configure/CONFIG_COMMON | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON index e6e60332b..43f4866d7 100644 --- a/configure/CONFIG_COMMON +++ b/configure/CONFIG_COMMON @@ -82,7 +82,7 @@ IOCS_APPL_TOP = $(shell $(FULLPATHNAME) $(INSTALL_LOCATION)) #------------------------------------------------------- # Make echo output - suppress echoing if make's '-s' flag is set NOP = : -ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(NOP),echo) +ECHO = @$(if $(findstring s,$(MFLAGS)),$(NOP),echo) #------------------------------------------------------- ifdef T_A From 43322335dfae49b62930f95b634265ac936968f9 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 30 May 2018 01:46:29 -0700 Subject: [PATCH 2/8] Add -V flag to ca client tools to show EPICS and CA versions. --- src/ca/client/tools/caget.c | 17 +++++++++++------ src/ca/client/tools/cainfo.c | 14 ++++++++++---- src/ca/client/tools/camonitor.c | 15 ++++++++++----- src/ca/client/tools/caput.c | 17 +++++++++++------ 4 files changed, 42 insertions(+), 21 deletions(-) diff --git a/src/ca/client/tools/caget.c b/src/ca/client/tools/caget.c index a2b0e08b0..ffc4244f0 100644 --- a/src/ca/client/tools/caget.c +++ b/src/ca/client/tools/caget.c @@ -28,12 +28,13 @@ #include #include -#include -#include +#include "epicsStdlib.h" +#include "epicsString.h" -#include -#include -#include +#include "alarm.h" +#include "cadef.h" +#include "epicsGetopt.h" +#include "epicsVersion.h" #include "tool_lib.h" @@ -55,6 +56,7 @@ static void usage (void) { fprintf (stderr, "\nUsage: caget [options] ...\n\n" " -h: Help: Print this message\n" + " -V: Version: Show EPICS and CA versions\n" "Channel Access options:\n" " -w : Wait time, specifies CA timeout, default is %f second(s)\n" " -c: Asynchronous get (use ca_get_callback and wait for completion)\n" @@ -389,11 +391,14 @@ int main (int argc, char *argv[]) LINE_BUFFER(stdout); /* Configure stdout buffering */ - while ((opt = getopt(argc, argv, ":taicnhsSe:f:g:l:#:d:0:w:p:F:")) != -1) { + while ((opt = getopt(argc, argv, ":taicnhsSVe:f:g:l:#:d:0:w:p:F:")) != -1) { switch (opt) { case 'h': /* Print usage */ usage(); return 0; + case 'V': + printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); + return 0; case 't': /* Terse output mode */ complainIfNotPlainAndSet(&format, terse); break; diff --git a/src/ca/client/tools/cainfo.c b/src/ca/client/tools/cainfo.c index 924c34b10..e881ef240 100644 --- a/src/ca/client/tools/cainfo.c +++ b/src/ca/client/tools/cainfo.c @@ -22,10 +22,11 @@ */ #include -#include +#include "epicsStdlib.h" +#include "epicsVersion.h" -#include -#include +#include "cadef.h" +#include "epicsGetopt.h" #include "tool_lib.h" @@ -36,12 +37,14 @@ void usage (void) { fprintf (stderr, "\nUsage: cainfo [options] ...\n\n" " -h: Help: Print this message\n" + " -V: Version: Show EPICS and CA versions\n" "Channel Access options:\n" " -w : Wait time, specifies CA timeout, default is %f second(s)\n" " -s : Call ca_client_status with the specified interest level\n" " -p : CA priority (0-%u, default 0=lowest)\n" "\nExample: cainfo my_channel another_channel\n\n" , DEFAULT_TIMEOUT, CA_PRIORITY_MAX); + fprintf (stderr, "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); } @@ -137,11 +140,14 @@ int main (int argc, char *argv[]) LINE_BUFFER(stdout); /* Configure stdout buffering */ - while ((opt = getopt(argc, argv, ":nhw:s:p:")) != -1) { + while ((opt = getopt(argc, argv, ":nhVw:s:p:")) != -1) { switch (opt) { case 'h': /* Print usage */ usage(); return 0; + case 'V': + printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); + return 0; case 'w': /* Set CA timeout value */ if(epicsScanDouble(optarg, &caTimeout) != 1) { diff --git a/src/ca/client/tools/camonitor.c b/src/ca/client/tools/camonitor.c index 307dad8d6..09c965ebb 100644 --- a/src/ca/client/tools/camonitor.c +++ b/src/ca/client/tools/camonitor.c @@ -24,11 +24,12 @@ */ #include -#include +#include "epicsStdlib.h" #include +#include "epicsVersion.h" -#include -#include +#include "cadef.h" +#include "epicsGetopt.h" #include "tool_lib.h" @@ -44,7 +45,8 @@ void usage (void) { fprintf (stderr, "\nUsage: camonitor [options] ...\n" "\n" - " -h: Help; Print this message\n" + " -h: Help: Print this message\n" + " -V: Version: Show EPICS and CA versions\n" "Channel Access options:\n" " -w : Wait time, specifies CA timeout, default is %f second(s)\n" " -m : Specify CA event mask to use. is any combination of\n" @@ -209,11 +211,14 @@ int main (int argc, char *argv[]) LINE_BUFFER(stdout); /* Configure stdout buffering */ - while ((opt = getopt(argc, argv, ":nhm:sSe:f:g:l:#:0:w:t:p:F:")) != -1) { + while ((opt = getopt(argc, argv, ":nhVm:sSe:f:g:l:#:0:w:t:p:F:")) != -1) { switch (opt) { case 'h': /* Print usage */ usage(); return 0; + case 'V': + printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); + return 0; case 'n': /* Print ENUM as index numbers */ enumAsNr=1; break; diff --git a/src/ca/client/tools/caput.c b/src/ca/client/tools/caput.c index f6dcc21cd..a7ea618a6 100644 --- a/src/ca/client/tools/caput.c +++ b/src/ca/client/tools/caput.c @@ -31,12 +31,13 @@ #include #include -#include +#include "epicsStdlib.h" -#include -#include -#include -#include +#include "cadef.h" +#include "epicsGetopt.h" +#include "epicsEvent.h" +#include "epicsString.h" +#include "epicsVersion.h" #include "tool_lib.h" @@ -59,6 +60,7 @@ void usage (void) fprintf (stderr, "\nUsage: caput [options] \n" " caput -a [options] ...\n\n" " -h: Help: Print this message\n" + " -V: Version: Show EPICS and CA versions\n" "Channel Access options:\n" " -w : Wait time, specifies CA timeout, default is %f second(s)\n" " -c: Asynchronous put (use ca_put_callback and wait for completion)\n" @@ -279,11 +281,14 @@ int main (int argc, char *argv[]) LINE_BUFFER(stdout); /* Configure stdout buffering */ putenv("POSIXLY_CORRECT="); /* Behave correct on GNU getopt systems */ - while ((opt = getopt(argc, argv, ":cnlhatsS#:w:p:F:")) != -1) { + while ((opt = getopt(argc, argv, ":cnlhatsVS#:w:p:F:")) != -1) { switch (opt) { case 'h': /* Print usage */ usage(); return 0; + case 'V': + printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); + return 0; case 'n': /* Force interpret ENUM as index number */ enumAsNr = 1; enumAsString = 0; From 072dbd53e7d8babe70a40e25c72379703e6bfaad Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 2 Nov 2018 17:47:13 -0500 Subject: [PATCH 3/8] Adjust clean-tests rule Only delete test-result files that actually exist. --- configure/RULES_BUILD | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 1c38eef4c..7061c5658 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -353,14 +353,17 @@ ifneq ($(TAPFILES),) ifdef RUNTESTS_ENABLED prove --failures --ext .tap --exec "$(CAT)" --color $(TAPFILES) endif + +CURRENT_TAPFILES := $(wildcard $(TAPFILES)) +CURRENT_JUNITFILES := $(wildcard $(JUNITFILES)) endif clean-tests: -ifneq ($(TAPFILES),) - $(RM) $(TAPFILES) +ifneq ($(CURRENT_TAPFILES),) + $(RM) $(CURRENT_TAPFILES) endif -ifneq ($(JUNITFILES),) - $(RM) $(JUNITFILES) +ifneq ($(CURRENT_JUNITFILES),) + $(RM) $(CURRENT_JUNITFILES) endif tapfiles: $(TESTSCRIPTS) $(TAPFILES) From 3d8e2d933d035e2bf71990b27b5356d4e7faecd0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 13 Aug 2018 19:14:16 -0700 Subject: [PATCH 4/8] Include epicsStdio.h so driver report output can be redirected from iocsh --- src/ioc/db/dbChannel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ioc/db/dbChannel.c b/src/ioc/db/dbChannel.c index c6a8454f6..399d13dab 100644 --- a/src/ioc/db/dbChannel.c +++ b/src/ioc/db/dbChannel.c @@ -21,6 +21,7 @@ #include "epicsAssert.h" #include "epicsExit.h" #include "epicsString.h" +#include "epicsStdio.h" #include "errlog.h" #include "freeList.h" #include "gpHash.h" From 9a8860b77197ff6ab1cf4e9a65e5d24aaf10a51f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 5 Nov 2018 18:44:46 -0800 Subject: [PATCH 5/8] Expand tabs and revert #include lines to <> instead of quotes. --- src/ca/client/tools/caget.c | 14 +++++++------- src/ca/client/tools/cainfo.c | 10 +++++----- src/ca/client/tools/camonitor.c | 10 +++++----- src/ca/client/tools/caput.c | 14 +++++++------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/ca/client/tools/caget.c b/src/ca/client/tools/caget.c index ffc4244f0..383a8e1ce 100644 --- a/src/ca/client/tools/caget.c +++ b/src/ca/client/tools/caget.c @@ -28,12 +28,12 @@ #include #include -#include "epicsStdlib.h" -#include "epicsString.h" +#include +#include -#include "alarm.h" -#include "cadef.h" -#include "epicsGetopt.h" +#include +#include +#include #include "epicsVersion.h" #include "tool_lib.h" @@ -396,8 +396,8 @@ int main (int argc, char *argv[]) case 'h': /* Print usage */ usage(); return 0; - case 'V': - printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); + case 'V': + printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); return 0; case 't': /* Terse output mode */ complainIfNotPlainAndSet(&format, terse); diff --git a/src/ca/client/tools/cainfo.c b/src/ca/client/tools/cainfo.c index e881ef240..2263249fb 100644 --- a/src/ca/client/tools/cainfo.c +++ b/src/ca/client/tools/cainfo.c @@ -22,11 +22,11 @@ */ #include -#include "epicsStdlib.h" +#include #include "epicsVersion.h" -#include "cadef.h" -#include "epicsGetopt.h" +#include +#include #include "tool_lib.h" @@ -145,8 +145,8 @@ int main (int argc, char *argv[]) case 'h': /* Print usage */ usage(); return 0; - case 'V': - printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); + case 'V': + printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); return 0; case 'w': /* Set CA timeout value */ if(epicsScanDouble(optarg, &caTimeout) != 1) diff --git a/src/ca/client/tools/camonitor.c b/src/ca/client/tools/camonitor.c index 09c965ebb..a3fdecd55 100644 --- a/src/ca/client/tools/camonitor.c +++ b/src/ca/client/tools/camonitor.c @@ -24,12 +24,12 @@ */ #include -#include "epicsStdlib.h" +#include #include #include "epicsVersion.h" -#include "cadef.h" -#include "epicsGetopt.h" +#include +#include #include "tool_lib.h" @@ -216,8 +216,8 @@ int main (int argc, char *argv[]) case 'h': /* Print usage */ usage(); return 0; - case 'V': - printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); + case 'V': + printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); return 0; case 'n': /* Print ENUM as index numbers */ enumAsNr=1; diff --git a/src/ca/client/tools/caput.c b/src/ca/client/tools/caput.c index a7ea618a6..d6db8ba7f 100644 --- a/src/ca/client/tools/caput.c +++ b/src/ca/client/tools/caput.c @@ -31,12 +31,12 @@ #include #include -#include "epicsStdlib.h" +#include -#include "cadef.h" -#include "epicsGetopt.h" -#include "epicsEvent.h" -#include "epicsString.h" +#include +#include +#include +#include #include "epicsVersion.h" #include "tool_lib.h" @@ -286,8 +286,8 @@ int main (int argc, char *argv[]) case 'h': /* Print usage */ usage(); return 0; - case 'V': - printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); + case 'V': + printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() ); return 0; case 'n': /* Force interpret ENUM as index number */ enumAsNr = 1; From 168d430921791007a0cdbe6806db13e054afbd96 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 6 Nov 2018 10:15:06 -0600 Subject: [PATCH 6/8] Unify shebang line in tap-to-junit-xml --- src/tools/tap-to-junit-xml.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tap-to-junit-xml.pl b/src/tools/tap-to-junit-xml.pl index fdcfcf99b..76f9721a3 100644 --- a/src/tools/tap-to-junit-xml.pl +++ b/src/tools/tap-to-junit-xml.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl =head1 NAME tap-to-junit-xml - convert perl-style TAP test output to JUnit-style XML From 6ea6c6ff665f43fe05402d6fbdbee17617a29afe Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 6 Nov 2018 13:02:36 -0600 Subject: [PATCH 7/8] VxWorks: Don't use GCC 2.x for dependency file generation --- configure/os/CONFIG.Common.vxWorksCommon | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure/os/CONFIG.Common.vxWorksCommon b/configure/os/CONFIG.Common.vxWorksCommon index 875fe81b7..95f8f7f70 100644 --- a/configure/os/CONFIG.Common.vxWorksCommon +++ b/configure/os/CONFIG.Common.vxWorksCommon @@ -185,6 +185,12 @@ COMPILE.ctdt = $(CC) -c $(CPPFLAGS) $(CFLAGS_ctdt) $(INCLUDES) $(SOURCE_FLAG) VXCPPFLAGS = $(filter-out $(OP_SYS_INCLUDE_CPPFLAGS),$(CPPFLAGS)) PREPROCESS.cpp = $(CPP) $(VXCPPFLAGS) $(INCLUDES) $< > $@ +#-------------------------------------------------- +# Don't use gcc 2.x for dependency generation + +HDEPENDS_METHOD_2 = MKMF +HDEPENDS_METHOD = $(firstword $(HDEPENDS_METHOD_$(VX_GNU_MAJOR_VERSION)) COMP) + #-------------------------------------------------- # Allow site overrides -include $(CONFIG)/os/CONFIG_SITE.Common.vxWorksCommon From 6e536e1ee04ddd32a0c2a7cf0b316e77d500f4da Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 19 Nov 2018 17:59:27 -0600 Subject: [PATCH 8/8] Fix msi-copy target for cross-build host arch's --- src/ioc/dbtemplate/test/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ioc/dbtemplate/test/Makefile b/src/ioc/dbtemplate/test/Makefile index fb03b54cf..dc73eacd0 100644 --- a/src/ioc/dbtemplate/test/Makefile +++ b/src/ioc/dbtemplate/test/Makefile @@ -17,8 +17,9 @@ TESTS += msi TESTSCRIPTS_HOST += $(TESTS:%=%.t) -TARGETS_HOST += msi-copy$(EXE) -TARGETS += $(TARGETS_$(BUILD_CLASS)) +ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS))) + TARGETS += msi-copy$(EXE) +endif include $(TOP)/configure/RULES