diff --git a/configure/RULES.ioc b/configure/RULES.ioc index 6b2150fcb..1024fcb22 100644 --- a/configure/RULES.ioc +++ b/configure/RULES.ioc @@ -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 diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index 3d8747947..d906ec904 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -13,6 +13,20 @@ +

Better Cygwin IOC Application Support

+ +

IOC applications built for Cygwin with shared libraries need to have PATH +configured to include all of the bin directories for support modules listed in +the RELEASE file. For applications run from the Windows cmd.exe shell the +Makefile in the application's iocBoot/ioc directory can be set to build a file +dllPath.bat which performs the appropriate changes to PATH, but this file uses +syntax which is unique to the cmd.exe shell. Cygwin applications can now add a +target relPaths.sh to this Makefile, which will generate a file appropriate for +sourcing in the Bash shell instead.

+ +

The makeBaseApp.pl templates now include this file in the list of targets to +be built in the iocBoot/ioc/Makefile for Cygwin architectures.

+

Reject NULL callback functions in ca_array_*_callback

The two CA routines ca_array_get_callback() and ca_array_put_callback() were diff --git a/src/makeBaseApp/Makefile b/src/makeBaseApp/Makefile index c7f89f8e1..7b728394d 100644 --- a/src/makeBaseApp/Makefile +++ b/src/makeBaseApp/Makefile @@ -53,6 +53,8 @@ TEMPLATES += top/exampleBoot/nfsCommands@RTEMS TEMPLATES += top/exampleBoot/ioc/Makefile@Common TEMPLATES += top/exampleBoot/ioc/Makefile@vxWorks TEMPLATES += top/exampleBoot/ioc/Makefile@win32 +TEMPLATES += top/exampleBoot/ioc/Makefile@windows +TEMPLATES += top/exampleBoot/ioc/Makefile@cygwin TEMPLATES += top/exampleBoot/ioc/st.cmd@Common TEMPLATES += top/exampleBoot/ioc/st.cmd@vxWorks TEMPLATES += top/exampleBoot/ioc/st.cmd@RTEMS @@ -82,6 +84,8 @@ TEMPLATES += top/iocBoot/nfsCommands@RTEMS TEMPLATES += top/iocBoot/ioc/Makefile@Common TEMPLATES += top/iocBoot/ioc/Makefile@vxWorks TEMPLATES += top/iocBoot/ioc/Makefile@win32 +TEMPLATES += top/iocBoot/ioc/Makefile@windows +TEMPLATES += top/iocBoot/ioc/Makefile@cygwin TEMPLATES += top/iocBoot/ioc/st.cmd@Common TEMPLATES += top/iocBoot/ioc/st.cmd@Cross TEMPLATES += top/iocBoot/ioc/st.cmd@vxWorks diff --git a/src/makeBaseApp/top/exampleBoot/ioc/Makefile@cygwin b/src/makeBaseApp/top/exampleBoot/ioc/Makefile@cygwin new file mode 100644 index 000000000..77c3215d7 --- /dev/null +++ b/src/makeBaseApp/top/exampleBoot/ioc/Makefile@cygwin @@ -0,0 +1,5 @@ +TOP = ../.. +include $(TOP)/configure/CONFIG +ARCH = _ARCH_ +TARGETS = envPaths relPaths.sh +include $(TOP)/configure/RULES.ioc diff --git a/src/makeBaseApp/top/exampleBoot/ioc/Makefile@windows b/src/makeBaseApp/top/exampleBoot/ioc/Makefile@windows new file mode 100644 index 000000000..59b32d734 --- /dev/null +++ b/src/makeBaseApp/top/exampleBoot/ioc/Makefile@windows @@ -0,0 +1,5 @@ +TOP = ../.. +include $(TOP)/configure/CONFIG +ARCH = _ARCH_ +TARGETS = envPaths dllPath.bat +include $(TOP)/configure/RULES.ioc diff --git a/src/makeBaseApp/top/iocBoot/ioc/Makefile@cygwin b/src/makeBaseApp/top/iocBoot/ioc/Makefile@cygwin new file mode 100644 index 000000000..77c3215d7 --- /dev/null +++ b/src/makeBaseApp/top/iocBoot/ioc/Makefile@cygwin @@ -0,0 +1,5 @@ +TOP = ../.. +include $(TOP)/configure/CONFIG +ARCH = _ARCH_ +TARGETS = envPaths relPaths.sh +include $(TOP)/configure/RULES.ioc diff --git a/src/makeBaseApp/top/iocBoot/ioc/Makefile@windows b/src/makeBaseApp/top/iocBoot/ioc/Makefile@windows new file mode 100644 index 000000000..59b32d734 --- /dev/null +++ b/src/makeBaseApp/top/iocBoot/ioc/Makefile@windows @@ -0,0 +1,5 @@ +TOP = ../.. +include $(TOP)/configure/CONFIG +ARCH = _ARCH_ +TARGETS = envPaths dllPath.bat +include $(TOP)/configure/RULES.ioc diff --git a/src/tools/convertRelease.pl b/src/tools/convertRelease.pl index 5b0890425..abf63c3ec 100644 --- a/src/tools/convertRelease.pl +++ b/src/tools/convertRelease.pl @@ -82,6 +82,7 @@ expandRelease(\%macros, \@apps); for ($outfile) { m/releaseTops/ and do { &releaseTops; last; }; m/dllPath\.bat/ and do { &dllPath; last; }; + m/relPaths\.sh/ and do { &relPaths; last; }; m/cdCommands/ and do { &cdCommands; last; }; m/envPaths/ and do { &envPaths; last; }; m/checkRelease/ and do { &checkRelease; last; }; @@ -96,7 +97,8 @@ sub HELP_MESSAGE { Usage: convertRelease.pl [-a arch] [-T top] [-t ioctop] outfile where outfile is one of: releaseTops - lists the module names defined in RELEASE*s - dllPath.bat - path changes for cmd.exe to find WIN32 DLLs + dllPath.bat - path changes for cmd.exe to find Windows DLLs + relPaths.sh - path changes for bash to add RELEASE bin dir's cdCommands - generate cd path strings for vxWorks IOCs envPaths - generate epicsEnvSet commands for other IOCs checkRelease - checks consistency with support modules @@ -113,13 +115,21 @@ sub releaseTops { } # -# Generate Path files so Windows can find our DLLs +# Generate Path files so Windows/Cygwin can find our DLLs # sub dllPath { unlink $outfile; open(OUT, ">$outfile") or die "$! creating $outfile"; print OUT "\@ECHO OFF\n"; - print OUT "PATH %PATH%;", join(';', binDirs()), "\n"; + print OUT "PATH \%PATH\%;", join(';', binDirs()), "\n"; + close OUT; +} + +sub relPaths { + unlink $outfile; + open(OUT, ">$outfile") or die "$! creating $outfile"; + print OUT "export PATH=\$PATH:", + join(':', map {m/\s/ ? "\"$_\"" : $_ } binDirs()), "\n"; close OUT; }