From 64e299dfdb0eb2eee9c2fde03f507f6259ff4272 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Wed, 23 Feb 2005 22:10:28 +0000 Subject: [PATCH] Added st.cmd@Cross files for cross builds. --- src/makeBaseApp/Makefile | 2 ++ src/makeBaseApp/makeBaseApp.pl | 5 +++- .../top/exampleBoot/ioc/st.cmd@Cross | 26 +++++++++++++++++++ src/makeBaseApp/top/iocBoot/ioc/st.cmd@Cross | 18 +++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 src/makeBaseApp/top/exampleBoot/ioc/st.cmd@Cross create mode 100644 src/makeBaseApp/top/iocBoot/ioc/st.cmd@Cross diff --git a/src/makeBaseApp/Makefile b/src/makeBaseApp/Makefile index 02079a1e1..e4e535e26 100644 --- a/src/makeBaseApp/Makefile +++ b/src/makeBaseApp/Makefile @@ -47,6 +47,7 @@ TEMPLATES += top/exampleBoot/nfsCommands@vxWorks TEMPLATES += top/exampleBoot/ioc/Makefile@Common TEMPLATES += top/exampleBoot/ioc/Makefile@vxWorks TEMPLATES += top/exampleBoot/ioc/st.cmd@Common +TEMPLATES += top/exampleBoot/ioc/st.cmd@Cross TEMPLATES += top/exampleBoot/ioc/st.cmd@vxWorks TEMPLATES += top/exampleBoot/ioc/st.cmd@RTEMS TEMPLATES += top/exampleBoot/ioc/README@Common @@ -74,6 +75,7 @@ TEMPLATES += top/iocBoot/nfsCommands@vxWorks TEMPLATES += top/iocBoot/ioc/Makefile@Common TEMPLATES += top/iocBoot/ioc/Makefile@vxWorks TEMPLATES += top/iocBoot/ioc/st.cmd@Common +TEMPLATES += top/iocBoot/ioc/st.cmd@Cross TEMPLATES += top/iocBoot/ioc/st.cmd@vxWorks TEMPLATES += top/iocBoot/ioc/st.cmd@RTEMS diff --git a/src/makeBaseApp/makeBaseApp.pl b/src/makeBaseApp/makeBaseApp.pl index 8558e39cf..78994301e 100755 --- a/src/makeBaseApp/makeBaseApp.pl +++ b/src/makeBaseApp/makeBaseApp.pl @@ -51,11 +51,14 @@ sub ReplaceFilename { # (filename) # NB: Won't work with directories, don't use '@' in a directory name! my($base,$filearch) = split /@/, $file; if ($base ne $file) { # This file is arch-specific - my($os,$cpu_toolset) = split /-/, $arch, 2; + my($os,$cpu,$toolset) = split /-/, $arch, 3; if (-r "$base\@$arch") { # A version exists for this arch $base = '' unless ($filearch eq $arch && -s $file); } elsif (-r "$base\@$os") { # A version exists for this os $base = '' unless ($filearch eq $os && -s $file); + } elsif ( $ENV{EPICS_HOST_ARCH} !~ "$os-$cpu" && + -r "$base\@Cross" ) { # Cross version exists + $base = '' unless ($filearch eq "Cross" && -s $file); } elsif (-r "$base\@Common") { # Default version exists $base = '' unless ($filearch eq "Common" && -s $file); } else { # No default version diff --git a/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@Cross b/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@Cross new file mode 100644 index 000000000..b07c8dfad --- /dev/null +++ b/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@Cross @@ -0,0 +1,26 @@ +#!../../bin/_ARCH_/_APPNAME_ + +## You may have to change _APPNAME_ to something else +## everywhere it appears in this file + +#< envPaths + +## Register all support components +dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0) +_APPNAME__registerRecordDeviceDriver(pdbbase) + +## Load record instances +dbLoadRecords("../../db/dbExample1.db","user=_USER_Host") +dbLoadRecords("../../db/dbExample2.db","user=_USER_Host,no=1,scan=1 second") +dbLoadRecords("../../db/dbExample2.db","user=_USER_Host,no=2,scan=2 second") +dbLoadRecords("../../db/dbExample2.db","user=_USER_Host,no=3,scan=5 second") +dbLoadRecords("../../db/dbSubExample.db","user=_USER_Host") + +## Set this to see messages from mySub +#var mySubDebug 1 + +iocInit() + +## Start any sequence programs +#seq sncExample,"user=_USER_" + diff --git a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Cross b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Cross new file mode 100644 index 000000000..b02eeba6d --- /dev/null +++ b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Cross @@ -0,0 +1,18 @@ +#!../../bin/_ARCH_/_APPNAME_ + +## You may have to change _APPNAME_ to something else +## everywhere it appears in this file + +#< envPaths + +## Register all support components +dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0) +_APPNAME__registerRecordDeviceDriver(pdbbase) + +## Load record instances +dbLoadRecords("../../db/_APPNAME_.db","user=_USER_") + +iocInit() + +## Start any sequence programs +#seq snc_APPNAME_,"user=_USER_"