Add relPaths.sh target to convertRelease.pl
This is a /bin/sh syntax version of the dllPath.bat file, needed to run IOCs under Cygwin when SHARED_LIBRARIES=YES.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -13,6 +13,20 @@
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
<h3>Better Cygwin IOC Application Support</h3>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<p>The makeBaseApp.pl templates now include this file in the list of targets to
|
||||
be built in the iocBoot/ioc/Makefile for Cygwin architectures.</p>
|
||||
|
||||
<h3>Reject NULL callback functions in ca_array_*_callback</h3>
|
||||
|
||||
<p>The two CA routines ca_array_get_callback() and ca_array_put_callback() were
|
||||
|
||||
@@ -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
|
||||
|
||||
5
src/makeBaseApp/top/exampleBoot/ioc/Makefile@cygwin
Normal file
5
src/makeBaseApp/top/exampleBoot/ioc/Makefile@cygwin
Normal file
@@ -0,0 +1,5 @@
|
||||
TOP = ../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
ARCH = _ARCH_
|
||||
TARGETS = envPaths relPaths.sh
|
||||
include $(TOP)/configure/RULES.ioc
|
||||
5
src/makeBaseApp/top/exampleBoot/ioc/Makefile@windows
Normal file
5
src/makeBaseApp/top/exampleBoot/ioc/Makefile@windows
Normal file
@@ -0,0 +1,5 @@
|
||||
TOP = ../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
ARCH = _ARCH_
|
||||
TARGETS = envPaths dllPath.bat
|
||||
include $(TOP)/configure/RULES.ioc
|
||||
5
src/makeBaseApp/top/iocBoot/ioc/Makefile@cygwin
Normal file
5
src/makeBaseApp/top/iocBoot/ioc/Makefile@cygwin
Normal file
@@ -0,0 +1,5 @@
|
||||
TOP = ../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
ARCH = _ARCH_
|
||||
TARGETS = envPaths relPaths.sh
|
||||
include $(TOP)/configure/RULES.ioc
|
||||
5
src/makeBaseApp/top/iocBoot/ioc/Makefile@windows
Normal file
5
src/makeBaseApp/top/iocBoot/ioc/Makefile@windows
Normal file
@@ -0,0 +1,5 @@
|
||||
TOP = ../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
ARCH = _ARCH_
|
||||
TARGETS = envPaths dllPath.bat
|
||||
include $(TOP)/configure/RULES.ioc
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user