From db0fbf9f73f226a9299c723a677a8f6dd6e55b52 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Wed, 3 Dec 2014 15:11:30 +0100 Subject: [PATCH 1/8] .bzrignore: add wildcard for suppressing QtCreator project files --- .bzrignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.bzrignore b/.bzrignore index a73784625..df0e03ed6 100644 --- a/.bzrignore +++ b/.bzrignore @@ -6,3 +6,4 @@ ./include ./templates **/O.* +./QtC-* From 846d55dac5be885f0206dff169eacc6ff701ec9c Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 4 Dec 2014 14:05:44 -0600 Subject: [PATCH 2/8] Build support for 64-bit iPhone Simulator From Tom Palaia. --- configure/os/CONFIG.Common.ios-x86 | 5 ----- configure/os/CONFIG_SITE.Common.ios-arm | 11 ++++++----- configure/os/CONFIG_SITE.Common.ios-x86 | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 configure/os/CONFIG_SITE.Common.ios-x86 diff --git a/configure/os/CONFIG.Common.ios-x86 b/configure/os/CONFIG.Common.ios-x86 index 0c786653d..a8175a34e 100644 --- a/configure/os/CONFIG.Common.ios-x86 +++ b/configure/os/CONFIG.Common.ios-x86 @@ -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 diff --git a/configure/os/CONFIG_SITE.Common.ios-arm b/configure/os/CONFIG_SITE.Common.ios-arm index 3e20f58f6..1262b4372 100644 --- a/configure/os/CONFIG_SITE.Common.ios-arm +++ b/configure/os/CONFIG_SITE.Common.ios-arm @@ -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 diff --git a/configure/os/CONFIG_SITE.Common.ios-x86 b/configure/os/CONFIG_SITE.Common.ios-x86 new file mode 100644 index 000000000..8c59187c7 --- /dev/null +++ b/configure/os/CONFIG_SITE.Common.ios-x86 @@ -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 From d1481b23d9f0e1ea45550c953f1bac24a3f68d56 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 10 Dec 2014 12:09:34 -0600 Subject: [PATCH 3/8] Use msi for dependency rules generation Added -D command, modified RULES.Db to use it. --- configure/CONFIG_BASE | 4 +- configure/RULES.Db | 36 ++++----- documentation/RELEASE_NOTES.html | 11 +++ src/ioc/dbtemplate/msi.c | 103 +++++++++++++++++++------- src/ioc/dbtemplate/test/Makefile | 2 +- src/ioc/dbtemplate/test/msi.plt | 33 +++++++-- src/ioc/dbtemplate/test/t8-result.txt | 2 + src/ioc/dbtemplate/test/t9-result.txt | 1 + 8 files changed, 135 insertions(+), 57 deletions(-) create mode 100644 src/ioc/dbtemplate/test/t8-result.txt create mode 100644 src/ioc/dbtemplate/test/t9-result.txt diff --git a/configure/CONFIG_BASE b/configure/CONFIG_BASE index ab30d7f8b..08515ac02 100644 --- a/configure/CONFIG_BASE +++ b/configure/CONFIG_BASE @@ -87,9 +87,9 @@ YACC = $(EYACC) LEX = $(ELEX) #--------------------------------------------------------------- -# msi used to be an external tool +# Our use of msi is incompatible with older versions -MSI ?= $(EPICS_BASE_HOST_BIN)/msi +MSI3_15 = $(EPICS_BASE_HOST_BIN)/msi #--------------------------------------------------------------- # External tools and tool flags - must be in path or defined in application diff --git a/configure/RULES.Db b/configure/RULES.Db index ecb3e7181..dd3ab9c0d 100644 --- a/configure/RULES.Db +++ b/configure/RULES.Db @@ -259,23 +259,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) $@ @@ -461,27 +457,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 $@" diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index cd2e7f339..aa27e96c5 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -14,6 +14,17 @@

Changes between 3.15.1 and 3.15.2

+

Using msi for dependencies

+ +

To reduce confusion the msi program has been modified to allow the generation +of dependency rules by adding support for a -D 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 -D and +-o outfile options, and should then point the MSI3_15 variable in +their applications' CONFIG_SITE files to that updated executable.

+

Changes between 3.15.0.2 and 3.15.1

epicsStrnEscapedFromRaw() and epicsStrnRawFromEscaped()

diff --git a/src/ioc/dbtemplate/msi.c b/src/ioc/dbtemplate/msi.c index 782161a7f..5a5023163 100644 --- a/src/ioc/dbtemplate/msi.c +++ b/src/ioc/dbtemplate/msi.c @@ -24,6 +24,7 @@ #include #define MAX_BUFFER_SIZE 4096 +#define MAX_DEPS 1024 /* Module to read the template files */ typedef struct inputData inputData; @@ -47,12 +48,16 @@ static char *substituteGetReplacements(subInfo *pvt); static char *substituteGetGlobalReplacements(subInfo *pvt); /* Forward references to local routines */ -static void usageExit(void); +static void usageExit(int status); static void addMacroReplacements(MAC_HANDLE *macPvt, char *pval); static void makeSubstitutions(inputData *inputPvt, MAC_HANDLE *macPvt, char *templateName); /*Global variables */ static int opt_V = 0; +static int opt_D = 0; + +static char *outFile = 0; +static int numDeps = 0, depHashes[MAX_DEPS]; int main(int argc,char **argv) @@ -73,24 +78,26 @@ int main(int argc,char **argv) pval = (narg==1) ? (argv[1]+2) : argv[2]; if(strncmp(argv[1],"-I",2)==0) { inputAddPath(inputPvt,pval); + } else if (strcmp(argv[1], "-D") == 0) { + opt_D = 1; + narg = 1; /* no argument for this option */ } else if(strncmp(argv[1],"-o",2)==0) { - if(freopen(pval,"w",stdout)==NULL) { - fprintf(stderr,"msi: Can't open %s for writing: %s\n", - pval, strerror(errno)); - exit(1); - } + outFile = epicsStrDup(pval); } else if(strncmp(argv[1],"-M",2)==0) { addMacroReplacements(macPvt,pval); } else if(strncmp(argv[1],"-S",2)==0) { substitutionName = epicsStrDup(pval); - } else if(strncmp(argv[1],"-V",2)==0) { + } else if (strcmp(argv[1], "-V") == 0) { opt_V = 1; narg = 1; /* no argument for this option */ - } else if(strncmp(argv[1],"-g",2)==0) { + } else if (strcmp(argv[1], "-g") == 0) { localScope = 0; narg = 1; /* no argument for this option */ + } else if (strcmp(argv[1], "-h") == 0) { + usageExit(0); } else { - usageExit(); + fprintf(stderr, "msi: Bad argument \"%s\"\n", argv[1]); + usageExit(1); } argc -= narg; for(i=1; i2) { fprintf(stderr,"msi: Too many arguments\n"); - usageExit(); + usageExit(1); + } + if (opt_D) { + if (!outFile) { + fprintf(stderr, "msi: Option -D requires -o for Makefile target\n"); + exit(1); + } + printf("%s:", outFile); + } + else if (outFile && freopen(outFile, "w", stdout) == NULL) { + fprintf(stderr, "msi: Can't open %s for writing: %s\n", + outFile, strerror(errno)); + exit(1); } if(argc==2) { templateName = epicsStrDup(argv[1]); @@ -122,7 +141,7 @@ int main(int argc,char **argv) if(templateName) filename = templateName; if(!filename) { fprintf(stderr,"msi: No template file\n"); - usageExit(); + usageExit(1); } while((pval = substituteGetReplacements(substitutePvt))){ if (localScope) macPushScope(macPvt); @@ -137,24 +156,30 @@ int main(int argc,char **argv) errlogFlush(); macDeleteHandle(macPvt); inputDestruct(inputPvt); + if (opt_D) { + printf("\n"); + } free(templateName); free(substitutionName); return opt_V & 2; } -void usageExit(void) +void usageExit(int status) { - fprintf(stderr,"usage: msi [options] [template]\n"); - fprintf(stderr,"stdin is used if neither template nor substitution file is given\n"); - fprintf(stderr,"options:\n"); - fprintf(stderr," -V Undefined macros generate an error\n"); - fprintf(stderr," -g All macros have global scope\n"); - fprintf(stderr," -o Save output to \n"); - fprintf(stderr," -I Add to include file search path\n"); - fprintf(stderr," -M Add to (global) macro definitions\n"); - fprintf(stderr," ( takes the form VAR=VALUE,...)\n"); - fprintf(stderr," -S Expand the substitutions in FILE\n"); - exit(1); + fprintf(stderr, + "Usage: msi [options] [template]\n" + " stdin is used if neither template nor substitution file is given\n" + " options:\n" + " -h Print this help message\n" + " -D Output file dependencies, not substitutions\n" + " -V Undefined macros generate an error\n" + " -g All macros have global scope\n" + " -o Send output to \n" + " -I Add to include file search path\n" + " -M Add to (global) macro definitions\n" + " ( takes the form VAR=VALUE,...)\n" + " -S Expand the substitutions in FILE\n"); + exit(status); } static void addMacroReplacements(MAC_HANDLE *macPvt,char *pval) @@ -165,13 +190,13 @@ static void addMacroReplacements(MAC_HANDLE *macPvt,char *pval) status = macParseDefns(macPvt,pval,&pairs); if(status==-1) { fprintf(stderr,"msi: Error from macParseDefns\n"); - usageExit(); + usageExit(1); } if(status) { status = macInstallMacros(macPvt,pairs); if(!status) { fprintf(stderr,"Error from macInstallMacros\n"); - usageExit(); + usageExit(1); } free(pairs); } @@ -249,7 +274,7 @@ static void makeSubstitutions(inputData *inputPvt, MAC_HANDLE *macPvt, char *tem expand = 0; } endif: - if (expand) { + if (expand && !opt_D) { n = macExpandString(macPvt,input,buffer,MAX_BUFFER_SIZE-1); fputs(buffer,stdout); if (opt_V == 1 && n < 0) { @@ -432,6 +457,32 @@ static void inputOpenFile(inputData *pinputData,char *filename) } else { pinputFile->filename = epicsStrDup("stdin"); } + + if (opt_D) { + int hash = epicsStrHash(pinputFile->filename, 12345); + int i = 0; + int match = 0; + + while (i < numDeps) { + if (hash == depHashes[i++]) { + match = 1; + break; + } + } + if (!match) { + const char *wrap = numDeps ? " \\\n" : ""; + + printf("%s %s", wrap, pinputFile->filename); + if (numDeps < MAX_DEPS) { + depHashes[numDeps++] = hash; + } + else { + fprintf(stderr, "msi: More than %d dependencies!\n", MAX_DEPS); + depHashes[0] = hash; + } + } + } + pinputFile->fp = fp; ellInsert(&pinputData->inputFileList,0,&pinputFile->node); } diff --git a/src/ioc/dbtemplate/test/Makefile b/src/ioc/dbtemplate/test/Makefile index 27bb17ac0..30e748983 100644 --- a/src/ioc/dbtemplate/test/Makefile +++ b/src/ioc/dbtemplate/test/Makefile @@ -22,6 +22,6 @@ TARGETS += $(TARGETS_$(BUILD_CLASS)) include $(TOP)/configure/RULES -msi-copy$(EXE): $(INSTALL_BIN)/msi$(EXE) ../Makefile +msi-copy$(EXE): $(INSTALL_BIN)/msi$(EXE) @$(RM) $@ $(CP) $< $@ diff --git a/src/ioc/dbtemplate/test/msi.plt b/src/ioc/dbtemplate/test/msi.plt index 7d8aab7b2..f584dcf3d 100644 --- a/src/ioc/dbtemplate/test/msi.plt +++ b/src/ioc/dbtemplate/test/msi.plt @@ -11,23 +11,40 @@ use strict; use Test; -BEGIN {plan tests => 7} +BEGIN {plan tests => 9} +# Check include/substitute command model ok(msi('-I .. ../t1-template.txt'), slurp('../t1-result.txt')); -ok(msi('-I.. -S ../t2-substitution.txt'), slurp('../t2-result.txt')); -ok(msi('-I. -I.. -S ../t3-substitution.txt'), slurp('../t3-result.txt')); -ok(msi('-g -I.. -S ../t4-substitution.txt'), slurp('../t4-result.txt')); -ok(msi('-S ../t5-substitute.txt ../t5-template.txt'), slurp('../t5-result.txt')); -ok(msi('-S ../t6-substitute.txt ../t6-template.txt'), slurp('../t6-result.txt')); -# Check -o works +# Substitution file, dbLoadTemplate format +ok(msi('-I.. -S ../t2-substitution.txt'), slurp('../t2-result.txt')); + +# Macro scoping +ok(msi('-I. -I.. -S ../t3-substitution.txt'), slurp('../t3-result.txt')); + +# Global scope (backwards compatibility check) +ok(msi('-g -I.. -S ../t4-substitution.txt'), slurp('../t4-result.txt')); + +# Substitution file, regular format +ok(msi('-S ../t5-substitute.txt ../t5-template.txt'), slurp('../t5-result.txt')); + +# Substitution file, pattern format +ok(msi('-S../t6-substitute.txt ../t6-template.txt'), slurp('../t6-result.txt')); + +# Output option -o my $out = 't7-output.txt'; unlink $out; msi("-I.. -o $out ../t1-template.txt"); ok(slurp($out), slurp('../t1-result.txt')); +# Dependency generation, include/substitute model +ok(msi('-I.. -D -o t8.txt ../t1-template.txt'), slurp('../t8-result.txt')); -# Support routines +# Dependency generation, dbLoadTemplate format +ok(msi('-I.. -D -ot9.txt -S ../t2-substitution.txt'), slurp('../t9-result.txt')); + + +# Test support routines sub slurp { my ($file) = @_; diff --git a/src/ioc/dbtemplate/test/t8-result.txt b/src/ioc/dbtemplate/test/t8-result.txt new file mode 100644 index 000000000..478c00614 --- /dev/null +++ b/src/ioc/dbtemplate/test/t8-result.txt @@ -0,0 +1,2 @@ +t8.txt: ../t1-template.txt \ + ../t1-include.txt diff --git a/src/ioc/dbtemplate/test/t9-result.txt b/src/ioc/dbtemplate/test/t9-result.txt new file mode 100644 index 000000000..9f122bbcf --- /dev/null +++ b/src/ioc/dbtemplate/test/t9-result.txt @@ -0,0 +1 @@ +t9.txt: ../t2-template.txt From e886022343d97925b76d3df8c81273078b5c6950 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 10 Dec 2014 13:35:15 -0600 Subject: [PATCH 4/8] Deprecate and remove all uses of PATH_FILTER --- configure/CONFIG_BASE | 6 +++--- configure/CONFIG_COMMON | 6 +++++- configure/os/CONFIG.win32-x86-mingw.Common | 3 --- configure/os/CONFIG.win32-x86.Common | 3 --- documentation/RELEASE_NOTES.html | 10 ++++++++++ src/ca/legacy/gdd/Makefile | 4 ++-- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/configure/CONFIG_BASE b/configure/CONFIG_BASE index 08515ac02..236f1457a 100644 --- a/configure/CONFIG_BASE +++ b/configure/CONFIG_BASE @@ -58,7 +58,7 @@ TOOLS = $(EPICS_BASE_HOST_BIN) #--------------------------------------------------------------- # 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 @@ -80,8 +80,8 @@ 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) diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON index 3d4df3bd2..0df8ced84 100644 --- a/configure/CONFIG_COMMON +++ b/configure/CONFIG_COMMON @@ -314,7 +314,6 @@ LEXOPT += -I #-------------------------------------------------- # Build compile line here -PATH_FILTER = $(1) COMPILE.c = $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) COMPILE.cpp = $(CCC) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) @@ -346,6 +345,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 # diff --git a/configure/os/CONFIG.win32-x86-mingw.Common b/configure/os/CONFIG.win32-x86-mingw.Common index 35b62ce72..a488c6647 100644 --- a/configure/os/CONFIG.win32-x86-mingw.Common +++ b/configure/os/CONFIG.win32-x86-mingw.Common @@ -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 diff --git a/configure/os/CONFIG.win32-x86.Common b/configure/os/CONFIG.win32-x86.Common index 42937222d..f2c75b055 100644 --- a/configure/os/CONFIG.win32-x86.Common +++ b/configure/os/CONFIG.win32-x86.Common @@ -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 diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index aa27e96c5..ad503c2a7 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -14,6 +14,16 @@

Changes between 3.15.1 and 3.15.2

+

Use of PATH_FILTER in Makefiles deprecated

+ +

The PATH_FILTER variable was being called to convert forward shashes +/ in file paths into pairs of backward slashes +\\ 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.

+

Using msi for dependencies

To reduce confusion the msi program has been modified to allow the generation diff --git a/src/ca/legacy/gdd/Makefile b/src/ca/legacy/gdd/Makefile index af656d138..78c69321e 100644 --- a/src/ca/legacy/gdd/Makefile +++ b/src/ca/legacy/gdd/Makefile @@ -80,8 +80,8 @@ dbMapper$(DEP): $(COMMON_DIR)/gddApps.h # Rules for generated files # $(COMMON_DIR)/aitConvertGenerated.cc: $(TOOLS)/aitGen$(HOSTEXE) - $(call PATH_FILTER, $(TOOLS)/aitGen$(HOSTEXE)) $@ + $(TOOLS)/aitGen$(HOSTEXE) $@ $(COMMON_DIR)/gddApps.h : $(TOOLS)/genApps$(HOSTEXE) - $(call PATH_FILTER, $(TOOLS)/genApps$(HOSTEXE)) $@ + $(TOOLS)/genApps$(HOSTEXE) $@ From 5b6dce2681f60a7a5f138a821518c7ec8eb4d326 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 10 Dec 2014 17:40:40 -0600 Subject: [PATCH 5/8] 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. --- configure/CONFIG_BASE | 3 ++- src/ca/legacy/gdd/Makefile | 4 ++-- src/ioc/bpt/RULES | 2 +- src/libCom/as/RULES | 4 ++-- src/libCom/flex/RULES | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/configure/CONFIG_BASE b/configure/CONFIG_BASE index 236f1457a..2d9d77120 100644 --- a/configure/CONFIG_BASE +++ b/configure/CONFIG_BASE @@ -52,8 +52,9 @@ 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 ../ -TOOLS = $(EPICS_BASE_HOST_BIN) +TOOLS = $(abspath $(EPICS_BASE_HOST_BIN)) #--------------------------------------------------------------- # Epics base build tools and tool flags diff --git a/src/ca/legacy/gdd/Makefile b/src/ca/legacy/gdd/Makefile index 78c69321e..b1e8fceaa 100644 --- a/src/ca/legacy/gdd/Makefile +++ b/src/ca/legacy/gdd/Makefile @@ -79,9 +79,9 @@ dbMapper$(DEP): $(COMMON_DIR)/gddApps.h # Rules for generated files # -$(COMMON_DIR)/aitConvertGenerated.cc: $(TOOLS)/aitGen$(HOSTEXE) +$(COMMON_DIR)/aitConvertGenerated.cc: $(EPICS_BASE_HOST_BIN)/aitGen$(HOSTEXE) $(TOOLS)/aitGen$(HOSTEXE) $@ -$(COMMON_DIR)/gddApps.h : $(TOOLS)/genApps$(HOSTEXE) +$(COMMON_DIR)/gddApps.h : $(EPICS_BASE_HOST_BIN)/genApps$(HOSTEXE) $(TOOLS)/genApps$(HOSTEXE) $@ diff --git a/src/ioc/bpt/RULES b/src/ioc/bpt/RULES index 8b9ffe771..a434eb342 100644 --- a/src/ioc/bpt/RULES +++ b/src/ioc/bpt/RULES @@ -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) diff --git a/src/libCom/as/RULES b/src/libCom/as/RULES index 9b6fa1bc5..a2a416f6e 100644 --- a/src/libCom/as/RULES +++ b/src/libCom/as/RULES @@ -16,6 +16,6 @@ asLib$(DEP): asLib_lex.c asLib.c: asLib_lex.c # Ensure that lexer and parser are built before they are needed -asLib.c: $(TOOLS)/antelope$(HOSTEXE) -asLib_lex.c: $(TOOLS)/e_flex$(HOSTEXE) +asLib.c: $(EPICS_BASE_HOST_BIN)/antelope$(HOSTEXE) +asLib_lex.c: $(EPICS_BASE_HOST_BIN)/e_flex$(HOSTEXE) asLib_lex.c: $(INSTALL_INCLUDE)/flex.skel.static diff --git a/src/libCom/flex/RULES b/src/libCom/flex/RULES index b4f4cbaf4..65406f4c5 100644 --- a/src/libCom/flex/RULES +++ b/src/libCom/flex/RULES @@ -10,4 +10,4 @@ # This is a Makefile fragment, see src/libCom/Makefile. # Ensure that the lexer is built before it is needed -parse.c: $(TOOLS)/antelope$(HOSTEXE) +parse.c: $(EPICS_BASE_HOST_BIN)/antelope$(HOSTEXE) From 36850cf67767a119c09c1e06eaf919758188418c Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 11 Dec 2014 13:56:15 -0600 Subject: [PATCH 6/8] Remove trailing ; from dbGetSevr macro --- src/ioc/db/dbLink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ioc/db/dbLink.h b/src/ioc/db/dbLink.h index ff0de3003..1a4524b14 100644 --- a/src/ioc/db/dbLink.h +++ b/src/ioc/db/dbLink.h @@ -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); From 07c8b675498f241edd1f3178e2690231fcf5a883 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 11 Dec 2014 14:56:31 -0600 Subject: [PATCH 7/8] Add missing DLLSTUB dependency rules --- configure/RULES_BUILD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index ad2867137..3f952c516 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -269,11 +269,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) From 2b950754c421a607de27aea6d05b7129198b5317 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 23 Dec 2014 10:35:09 -0600 Subject: [PATCH 8/8] Fix FLNK-over-CA error message --- src/misc/iocInit.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/misc/iocInit.c b/src/misc/iocInit.c index 9f9c1a385..27313da80 100644 --- a/src/misc/iocInit.c +++ b/src/misc/iocInit.c @@ -461,9 +461,11 @@ static void doResolveLinks(dbRecordType *pdbRecordType, dbCommon *precord, 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); + errlogPrintf("Forward-link uses Channel Access " + "without pointing to PROC field\n" + " %s.%s = %s\n", + precord->name, pdbFldDes->name, + plink->value.pv_link.pvname); } } }