diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON index 18e5a2cec..99033c381 100644 --- a/configure/CONFIG_COMMON +++ b/configure/CONFIG_COMMON @@ -76,11 +76,14 @@ COMMON_DIR = ../O.Common IOCS_APPL_TOP = $(shell $(FULLPATHNAME) $(INSTALL_LOCATION)) #------------------------------------------------------- -# Make echo output - suppress echoing if make's '-s' flag is set +# Silencing the build - suppress messages during 'make -s' NOP = : -ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(NOP),echo) -QUIET_FLAG := $(if $(findstring s,$(MAKEFLAGS)),-q,) -QUESTION_FLAG := $(if $(findstring q,$(MAKEFLAGS)),-i,) +ECHO = @$(if $(findstring s,$(MFLAGS)),$(NOP),echo) +QUIET_FLAG := $(if $(findstring s,$(MFLAGS)),-q,) + +#------------------------------------------------------- +# Convert 'make -q' flag into '-i' for genVersionHeader.pl +QUESTION_FLAG := $(if $(findstring q,$(MFLAGS)),-i,) #------------------------------------------------------- ifdef T_A @@ -90,7 +93,7 @@ INSTALL_SHRLIB = $(INSTALL_LOCATION_LIB)/$(T_A) INSTALL_TCLLIB = $(INSTALL_LOCATION_LIB)/$(T_A) INSTALL_BIN = $(INSTALL_LOCATION_BIN)/$(T_A) -#Directories for libraries +# Directories for libraries SHRLIB_SEARCH_DIRS = $(INSTALL_LIB) #------------------------------------------------------- diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 0ff5ed8b3..6fac21753 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -354,14 +354,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) diff --git a/configure/os/CONFIG.Common.RTEMS b/configure/os/CONFIG.Common.RTEMS index 214ba794d..8425e6ef9 100644 --- a/configure/os/CONFIG.Common.RTEMS +++ b/configure/os/CONFIG.Common.RTEMS @@ -76,7 +76,7 @@ CPPFLAGS += $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS) $(OPT_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) +ECHO = @$(if $(findstring s,$(MFLAGS)),$(NOP),echo) #-------------------------------------------------- # Although RTEMS uses gcc, it wants to use gcc its own way diff --git a/configure/os/CONFIG.Common.vxWorksCommon b/configure/os/CONFIG.Common.vxWorksCommon index 50f626959..f28f0e327 100644 --- a/configure/os/CONFIG.Common.vxWorksCommon +++ b/configure/os/CONFIG.Common.vxWorksCommon @@ -146,8 +146,10 @@ SHRLIB_CFLAGS = SHRLIB_LDFLAGS = #-------------------------------------------------- -# Earlier versions of gcc don't understand -MF -HDEPENDS_COMPFLAGS = -MM > $@ +# Don't use gcc 2.x for dependency generation + +HDEPENDS_METHOD_2 = MKMF +HDEPENDS_METHOD = $(firstword $(HDEPENDS_METHOD_$(VX_GNU_MAJOR_VERSION)) COMP) #-------------------------------------------------- # osithead use default stack, YES or NO override diff --git a/src/ca/client/tools/caget.c b/src/ca/client/tools/caget.c index 00056709e..75225d07f 100644 --- a/src/ca/client/tools/caget.c +++ b/src/ca/client/tools/caget.c @@ -34,6 +34,7 @@ #include #include #include +#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 ad580f473..fc18ccd3f 100644 --- a/src/ca/client/tools/cainfo.c +++ b/src/ca/client/tools/cainfo.c @@ -23,6 +23,7 @@ #include #include +#include "epicsVersion.h" #include #include @@ -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..a3fdecd55 100644 --- a/src/ca/client/tools/camonitor.c +++ b/src/ca/client/tools/camonitor.c @@ -26,6 +26,7 @@ #include #include #include +#include "epicsVersion.h" #include #include @@ -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 5e4d10e23..79ffef8c3 100644 --- a/src/ca/client/tools/caput.c +++ b/src/ca/client/tools/caput.c @@ -37,6 +37,7 @@ #include #include #include +#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" @@ -281,11 +283,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; diff --git a/src/ioc/db/dbChannel.c b/src/ioc/db/dbChannel.c index 92be08c77..9792708cb 100644 --- a/src/ioc/db/dbChannel.c +++ b/src/ioc/db/dbChannel.c @@ -20,6 +20,7 @@ #include "cantProceed.h" #include "epicsAssert.h" #include "epicsString.h" +#include "epicsStdio.h" #include "errlog.h" #include "freeList.h" #include "gpHash.h" 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 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