From b9fb83d506c76fe93c53b43d55d3aefd19c993ad Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 26 Sep 2000 16:41:34 +0000 Subject: [PATCH] allow IOC to mount through different path than build system --- src/makeBaseApp/top/configure/CONFIG | 8 ++++++++ src/makeBaseApp/top/configure/RULES.ioc | 4 ++-- src/makeBaseApp/top/configure/makeIocCdCommands.pl | 9 +++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/makeBaseApp/top/configure/CONFIG b/src/makeBaseApp/top/configure/CONFIG index 2d2376c45..bf5e617fc 100644 --- a/src/makeBaseApp/top/configure/CONFIG +++ b/src/makeBaseApp/top/configure/CONFIG @@ -3,3 +3,11 @@ include $(TOP)/configure/CONFIG_APP # Add any changes to make definitions here #CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 + +# Use this when your IOC and the host use different paths +# to access the application. Typically this will be +# used with the Microsoft FTP server or with NFS mounts. Use +# is indicated by failure of the cdCommands script on +# vxWorks. You must rebuild in the iocBoot directory +# before this takes effect. +#IOCS_APPL_TOP = diff --git a/src/makeBaseApp/top/configure/RULES.ioc b/src/makeBaseApp/top/configure/RULES.ioc index 32bb502fa..37760dd3a 100644 --- a/src/makeBaseApp/top/configure/RULES.ioc +++ b/src/makeBaseApp/top/configure/RULES.ioc @@ -2,8 +2,8 @@ include $(EPICS_BASE)/configure/RULES_DIRS buildInstall: cdCommands -cdCommands: Makefile - $(PERL) $(TOP)/configure/makeIocCdCommands.pl $(ARCH) +cdCommands: Makefile $(TOP)/configure/makeIocCdCommands.pl $(TOP)/configure/CONFIG + $(PERL) $(TOP)/configure/makeIocCdCommands.pl $(ARCH) $(IOCS_APPL_TOP) clean: @$(RM) cdCommands diff --git a/src/makeBaseApp/top/configure/makeIocCdCommands.pl b/src/makeBaseApp/top/configure/makeIocCdCommands.pl index 0c1962f02..35940a681 100644 --- a/src/makeBaseApp/top/configure/makeIocCdCommands.pl +++ b/src/makeBaseApp/top/configure/makeIocCdCommands.pl @@ -6,7 +6,16 @@ use Cwd; $cwd = cwd(); #hack for sun4 $cwd =~ s|/tmp_mnt||; +#hack for win32 +$cwd =~ s|\\|\/|g; $arch = $ARGV[0]; +$iocsApplTop = $ARGV[1]; +#remove top parts of current working directory +#and add ioc's appl top alias (if supplied) +if ( $iocsApplTop ne "" ) { + $cwd =~ s|.*(/iocBoot.*)|$1|; + $cwd = $iocsApplTop . $cwd; +} unlink("cdCommands"); open(OUT,">cdCommands") or die "$! opening cdCommands";