From 8f55a1307d93bc72681053b1ede5270dd9bdbf7e Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Fri, 22 Jun 2018 14:54:06 -0500
Subject: [PATCH 01/18] startup: Update win*.bat files
---
startup/win32.bat | 128 ++++++++++----------------------------------
startup/windows.bat | 73 +++++++++++++++++++++++++
2 files changed, 100 insertions(+), 101 deletions(-)
create mode 100755 startup/windows.bat
diff --git a/startup/win32.bat b/startup/win32.bat
index af9155dd7..575b06f42 100644
--- a/startup/win32.bat
+++ b/startup/win32.bat
@@ -1,147 +1,73 @@
@ECHO OFF
REM *************************************************************************
-REM Copyright (c) 2002 The University of Chicago, as Operator of Argonne
+REM Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
REM National Laboratory.
REM Copyright (c) 2002 The Regents of the University of California, as
REM Operator of Los Alamos National Laboratory.
-REM EPICS BASE Versions 3.13.7
-REM and higher are distributed subject to a Software License Agreement found
+REM EPICS BASE is distributed subject to a Software License Agreement found
REM in file LICENSE that is included with this distribution.
REM *************************************************************************
REM
-REM Site-specific EPICS environment settings
-REM
-REM sites should modify these definitions
+REM EPICS build configuration environment settings
+REM
+REM Installers should modify these definitions as appropriate.
+REM This file configures the PATH variable from scratch.
REM ======================================================
REM ====== REQUIRED ENVIRONMENT VARIABLES FOLLOW ======
REM ======================================================
REM ======================================================
-REM ---------------- WINDOWS ---------------------------
+REM ---------------- WINDOWS -------------------------
REM ======================================================
-REM ----- WIN95 -----
-REM set PATH=C:\WINDOWS;C:\WINDOWS\COMMAND
-REM ----- WINNT, WIN2000 -----
-REM set PATH=C:\WINNT;C:\WINNT\SYSTEM32
REM ----- WINXP, Vista, Windows 7 -----
-set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\Wbem
+set PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem
REM ======================================================
-REM ---------------- make and perl ---------------------
+REM --------------- Strawberry Perl ------------------
REM ======================================================
-REM --------------- ActiveState perl -------------------
-set PATH=C:\Perl\bin;%PATH%
-
-REM --------------- mingw make ------------------------
-REM set PATH=C:\mingw-make\bin;%PATH%
-REM set PATH=C:\mingw-make82-3\bin;%PATH%
-
-REM --------------- gnuwin32 make ----------------------
-set PATH=C:\gnuwin32\bin;%PATH%
+set PATH=C:\Strawberry\perl\bin;%PATH%
+set PATH=C:\Strawberry\perl\site\bin;%PATH%
+set PATH=C:\Strawberry\c\bin;%PATH%
REM ======================================================
-REM ---------------- cygwin tools ------------------------
+REM --------------- Visual C++ -----------------------
REM ======================================================
-REM (make & perl if above perl and make are REMs)
-REM Dont use cygwin GNU make and Perl!
-REM cygwin contains tk/tcl, vim, perl, and many unix tools
-REM need grep from here NOT from cvs directory
-REM set PATH=%PATH%;.;..
-REM set PATH=%PATH%;c:\cygwin\bin
-
-REM ======================================================
-REM --------------- Visual c++ -------------------------
-REM ======================================================
-
-REM ------ Microsoft Visual Studio 2005 ------
-REM call "C:\Program files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86_amd64
-REM set PATH=%PATH%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
-REM set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include
-REM REM set LIBPATH=%LIBPATH%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib
-REM set LIB=%LIB%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib
-
-REM ------ Microsoft Visual Studio 2008 ------
-REM call "C:\Program files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
-REM call "C:\Program files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64
-REM set PATH=C:\Program Files\Microsoft SDKs\Windows\v7.0\bin;%PATH%
-REM set INCLUDE=C:\Program Files\Microsoft SDKs\Windows\v7.0\include;%INCLUDE%
-REM set LIBPATH=C:\Program Files\Microsoft SDKs\Windows\v7.0\lib;%LIBPATH%
-REM set LIB=C:\Program Files\Microsoft SDKs\Windows\v7.0\lib;%LIB%
-
-REM ----- Visual Studion 2010 -----
-REM -- windows-x64 ---
-REM call "C:\Program files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
REM -- win32-x86 ---
-call "C:\Program files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
+
+REM ----- Visual Studio 2010 -----
+REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
+
+REM ----- Visual Studio 2015 -----
+call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
REM ======================================================
-REM --------------- EPICS --------------------------------
+REM --------------- EPICS Base -----------------------
REM ======================================================
-REM set EPICS_HOST_ARCH=windows-x64
set EPICS_HOST_ARCH=win32-x86
set PATH=%PATH%;G:\epics\base\bin\%EPICS_HOST_ARCH%
-set PATH=%PATH%;G:\epics\extensions\bin\%EPICS_HOST_ARCH%
REM ======================================================
-REM ------- OPTIONAL ENVIRONMENT VARIABLES FOLLOW --------
+REM ====== OPTIONAL ENVIRONMENT VARIABLES FOLLOW =====
REM ======================================================
REM ======================================================
-REM ----------------- remote CVS -------------------------
+REM --------------------- Git ------------------------
REM ======================================================
-REM set CVS_RSH=c:/cygwin/bin/ssh.exe
-REM set CVSROOT=:ext:jba@aps.anl.gov:/usr/local/epicsmgr/cvsroot
-REM set HOME=c:/users/%USERNAME%
-REM set HOME=c:/users/jba
+set PATH=%PATH%;C:\Program files\Git
REM ======================================================
-REM ------------------- Bazaar ---------------------------
+REM --------------- EPICS Extensions -----------------
REM ======================================================
-set PATH=%PATH%;C:\Program files\Bazaar
+REM set PATH=%PATH%;G:\epics\extensions\bin\%EPICS_HOST_ARCH%
REM ======================================================
-REM ----------------- GNU make flags ---------------------
+REM --------------- Exceed ---------------------------
REM ======================================================
-set MAKEFLAGS=-w
-
-REM ======================================================
-REM -------------- vim (use cygwin vim ) -----------------
-REM ======================================================
-REM HOME needed by vim to write .viminfo file.
-REM VIM needed by vim to find _vimrc file.
-REM set VIM=c:\cygwin
-
-REM ======================================================
-REM --------------- Epics Channel Access -----------------
-REM Modify and uncomment the following lines
-REM to override the base/configure/CONFIG_ENV defaults
-REM ======================================================
-REM set EPICS_CA_ADDR_LIST=n.n.n.n n.n.n.n
-REM set EPICS_CA_AUTO_ADDR_LIST=YES
-
-REM set EPICS_CA_CONN_TMO=30.0
-REM set EPICS_CA_BEACON_PERIOD=15.0
-REM set EPICS_CA_REPEATER_PORT=5065
-REM set EPICS_CA_SERVER_PORT=5064
-REM set EPICS_TS_MIN_WEST=420
-
-REM ======================================================
-REM --------------- JAVA ---------------------------------
-REM ======================================================
-REM Needed for java extensions
-REM set CLASSPATH=G:\epics\extensions\javalib
-REM set PATH=%PATH%;C:\j2sdk1.4.1_01\bin
-REM set CLASSPATH=%CLASSPATH%;C:\j2sdk1.4.1_01\lib\tools.jar
-
-REM ======================================================
-REM --------------- Exceed -------------------------------
REM Needed for X11 extensions
-REM ======================================================
-REM set EX_VER=7.10
-REM set EX_VER=12.00
REM set EX_VER=14.00
+REM set EX_VER=15.00
REM set PATH=%PATH%;C:\Exceed%EX_VER%\XDK\
REM set PATH=%PATH%;C:\Program Files\Hummingbird\Connectivity\%EX_VER%\Exceed\
diff --git a/startup/windows.bat b/startup/windows.bat
new file mode 100755
index 000000000..1b0d32eb2
--- /dev/null
+++ b/startup/windows.bat
@@ -0,0 +1,73 @@
+@ECHO OFF
+REM *************************************************************************
+REM Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
+REM National Laboratory.
+REM Copyright (c) 2002 The Regents of the University of California, as
+REM Operator of Los Alamos National Laboratory.
+REM EPICS BASE is distributed subject to a Software License Agreement found
+REM in file LICENSE that is included with this distribution.
+REM *************************************************************************
+REM
+REM EPICS build configuration environment settings
+REM
+REM Installers should modify these definitions as appropriate.
+REM This file configures the PATH variable from scratch.
+
+REM ======================================================
+REM ====== REQUIRED ENVIRONMENT VARIABLES FOLLOW =====
+REM ======================================================
+
+REM ======================================================
+REM ---------------- WINDOWS -------------------------
+REM ======================================================
+REM ----- WINXP, Vista, Windows 7 -----
+set PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem
+
+REM ======================================================
+REM --------------- Strawberry Perl ------------------
+REM ======================================================
+
+set PATH=C:\Strawberry\perl\bin;%PATH%
+set PATH=C:\Strawberry\perl\site\bin;%PATH%
+set PATH=C:\Strawberry\c\bin;%PATH%
+
+REM ======================================================
+REM --------------- Visual C++ -----------------------
+REM ======================================================
+REM -- windows-x64 ---
+
+REM ----- Visual Studio 2010 -----
+REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
+
+REM ----- Visual Studio 2015 -----
+call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
+
+REM ======================================================
+REM --------------- EPICS Base -----------------------
+REM ======================================================
+set EPICS_HOST_ARCH=windows-x64
+set PATH=%PATH%;G:\epics\base\bin\%EPICS_HOST_ARCH%
+
+REM ======================================================
+REM ====== OPTIONAL ENVIRONMENT VARIABLES FOLLOW =====
+REM ======================================================
+
+REM ======================================================
+REM --------------------- Git ------------------------
+REM ======================================================
+set PATH=%PATH%;C:\Program files\Git
+
+REM ======================================================
+REM --------------- EPICS Extensions -----------------
+REM ======================================================
+REM set PATH=%PATH%;G:\epics\extensions\bin\%EPICS_HOST_ARCH%
+
+REM ======================================================
+REM --------------- Exceed ---------------------------
+REM ======================================================
+REM Needed for X11 extensions
+REM set EX_VER=14.00
+REM set EX_VER=15.00
+REM set PATH=%PATH%;C:\Exceed%EX_VER%\XDK\
+REM set PATH=%PATH%;C:\Program Files\Hummingbird\Connectivity\%EX_VER%\Exceed\
+
From 220e404203e51624fb7e90f8fe5bcde2ba2767c4 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Tue, 26 Jun 2018 11:23:15 -0500
Subject: [PATCH 02/18] Move EpicsHostArch.pl into src/tools, install to
lib/perl
---
configure/CONFIG | 5 ++++-
{startup => src/tools}/EpicsHostArch.pl | 0
src/tools/Makefile | 3 +++
3 files changed, 7 insertions(+), 1 deletion(-)
rename {startup => src/tools}/EpicsHostArch.pl (100%)
diff --git a/configure/CONFIG b/configure/CONFIG
index 6fe6b9b55..9d8d7e04b 100644
--- a/configure/CONFIG
+++ b/configure/CONFIG
@@ -21,8 +21,11 @@ endif
# Provide a default if the user hasn't set EPICS_HOST_ARCH
ifeq ($(origin EPICS_HOST_ARCH), undefined)
+ # Bootstrapping ...
+ EHA = $(firstword $(wildcard $(EPICS_BASE)/lib/perl/EpicsHostArch.pl \
+ $(TOP)/src/tools/EpicsHostArch.pl))
# NB: We use a simply expanded variable here for performance:
- EPICS_HOST_ARCH := $(shell $(CONFIG)/../startup/EpicsHostArch.pl)
+ export EPICS_HOST_ARCH := $(shell perl $(EHA))
endif
#
diff --git a/startup/EpicsHostArch.pl b/src/tools/EpicsHostArch.pl
similarity index 100%
rename from startup/EpicsHostArch.pl
rename to src/tools/EpicsHostArch.pl
diff --git a/src/tools/Makefile b/src/tools/Makefile
index bcf12700d..c54470364 100644
--- a/src/tools/Makefile
+++ b/src/tools/Makefile
@@ -16,6 +16,9 @@ PERL_MODULES += EPICS/Path.pm
PERL_MODULES += EPICS/Release.pm
PERL_MODULES += EPICS/Getopts.pm
+# This goes into lib/perl, not bin/
+PERL_MODULES += EpicsHostArch.pl
+
PERL_SCRIPTS += convertRelease.pl
PERL_SCRIPTS += cvsclean.pl
PERL_SCRIPTS += dos2unix.pl
From b32629c3bf4e718afd42acffd3f5e100d0f17a94 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Tue, 26 Jun 2018 11:23:35 -0500
Subject: [PATCH 03/18] Start release notes for tidy-startup branch.
---
documentation/RELEASE_NOTES.html | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index b454da0d6..a1c80695b 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -13,6 +13,27 @@
+Cleanup of startup directory
+
+The files in the startup directory have not been maintained in recent years
+and have grown crufty (technical term). This release includes the following
+updates to these files:
+
+
+- The EpicsHostArch.pl script has been moved into src/tools
+from where it gets installed into lib/perl. The build system has been
+adjusted to look for it in both places if the EPICS_HOST_ARCH
+environment variable has not been set at build-time. Sites that may have used
+this to set EPICS_HOST_ARCH as part of their standard environment may
+need to adjust their scripts when they upgrade to this release.
+
+- The existing win32.bat file has been cleaned up and a new
+windows.bat file added for 64-bit targets. The contents of these files
+should be seen as examples, don't uncomment or install parts for software that
+you don't explicitly know that you need.
+
+
+
Fixes for Launchpad bugs
The following launchpad bugs have fixes included:
From eae59183cc0d2675496425c4b3017dddef383800 Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Tue, 26 Jun 2018 15:41:27 -0500
Subject: [PATCH 04/18] Rename Site.{cshrc,profile} to unix.{csh,sh}
---
documentation/README.1st | 4 ++--
documentation/README.darwin.html | 2 +-
documentation/README.html | 4 ++--
documentation/RELEASE_NOTES.html | 3 +++
startup/{Site.cshrc => unix.csh} | 0
startup/{Site.profile => unix.sh} | 0
6 files changed, 8 insertions(+), 5 deletions(-)
rename startup/{Site.cshrc => unix.csh} (100%)
rename startup/{Site.profile => unix.sh} (100%)
diff --git a/documentation/README.1st b/documentation/README.1st
index 462ac460a..4ddad2772 100644
--- a/documentation/README.1st
+++ b/documentation/README.1st
@@ -223,10 +223,10 @@
EpicsHostArch C shell script to set EPICS_HOST_ARCH env variable
EpicsHostArch.pl Perl script to set EPICS_HOST_ARCH env variable
- Site.profile bourne shell script to set path and env variables
- Site.cshrc c shell script to set path and env variables
borland.bat WIN32 bat file to set borland path and env variables
cygwin.bat WIN32 bat file to set cygwin path and env variables
+ unix.csh C shell script to set path and env variables
+ unix.sh Bourne shell script to set path and env variables
win32.bat WIN32 bat file to set path and env variables
win32-debug.bat WIN32 debug bat file to set debug path and env variables
diff --git a/documentation/README.darwin.html b/documentation/README.darwin.html
index cbc290178..dd11ce857 100644
--- a/documentation/README.darwin.html
+++ b/documentation/README.darwin.html
@@ -21,7 +21,7 @@ of my Bash login script (~/.bash_login):
#
EPICS_BASE="${HOME}/src/EPICS/base"
EPICS_EXTENSIONS="${HOME}/src/EPICS/extensions"
-. "${EPICS_BASE}"/startup/Site.profile
+. "${EPICS_BASE}"/startup/unix.sh
diff --git a/documentation/README.html b/documentation/README.html
index a8a572372..ad67cdfcb 100644
--- a/documentation/README.html
+++ b/documentation/README.html
@@ -232,10 +232,10 @@
EpicsHostArch C shell script to set EPICS_HOST_ARCH env variable
EpicsHostArch.pl Perl script to set EPICS_HOST_ARCH env variable
- Site.profile bourne shell script to set path and env variables
- Site.cshrc c shell script to set path and env variables
borland.bat WIN32 bat file to set borland path and env variables
cygwin.bat WIN32 bat file to set cygwin path and env variables
+ unix.csh C shell script to set path and env variables
+ unix.sh Bourne shell script to set path and env variables
win32.bat WIN32 bat file to set path and env variables
win32-debug.bat WIN32 debug bat file to set debug path and env variables
diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index a1c80695b..85dc54a7b 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -27,6 +27,9 @@ environment variable has not been set at build-time. Sites that may have used
this to set EPICS_HOST_ARCH as part of their standard environment may
need to adjust their scripts when they upgrade to this release.
+The Site.cshrc and Site.profile files have been renamed to
+unix.csh and unix.sh, respectively.
+
The existing win32.bat file has been cleaned up and a new
windows.bat file added for 64-bit targets. The contents of these files
should be seen as examples, don't uncomment or install parts for software that
diff --git a/startup/Site.cshrc b/startup/unix.csh
similarity index 100%
rename from startup/Site.cshrc
rename to startup/unix.csh
diff --git a/startup/Site.profile b/startup/unix.sh
similarity index 100%
rename from startup/Site.profile
rename to startup/unix.sh
From 7a5ff269846aa8c09ab972294f193299e21c1537 Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Tue, 26 Jun 2018 16:20:07 -0500
Subject: [PATCH 05/18] Remove EpicsHostArch
---
ci/travis-build.sh | 2 +-
documentation/README.1st | 1 -
documentation/README.html | 1 -
documentation/RELEASE_NOTES.html | 3 ++
startup/EpicsHostArch | 84 --------------------------------
5 files changed, 4 insertions(+), 87 deletions(-)
delete mode 100755 startup/EpicsHostArch
diff --git a/ci/travis-build.sh b/ci/travis-build.sh
index a3ca3fd16..2ee5d652f 100644
--- a/ci/travis-build.sh
+++ b/ci/travis-build.sh
@@ -17,7 +17,7 @@ ticker() {
CACHEKEY=1
-EPICS_HOST_ARCH=`sh startup/EpicsHostArch`
+EPICS_HOST_ARCH=`perl src/tools/EpicsHostArch.pl`
[ -e configure/os/CONFIG_SITE.Common.linux-x86 ] || die "Wrong location: $PWD"
diff --git a/documentation/README.1st b/documentation/README.1st
index 4ddad2772..f5f209dd1 100644
--- a/documentation/README.1st
+++ b/documentation/README.1st
@@ -221,7 +221,6 @@
base/startup directory - contains scripts to set environment and path
- EpicsHostArch C shell script to set EPICS_HOST_ARCH env variable
EpicsHostArch.pl Perl script to set EPICS_HOST_ARCH env variable
borland.bat WIN32 bat file to set borland path and env variables
cygwin.bat WIN32 bat file to set cygwin path and env variables
diff --git a/documentation/README.html b/documentation/README.html
index ad67cdfcb..c803ab767 100644
--- a/documentation/README.html
+++ b/documentation/README.html
@@ -230,7 +230,6 @@
base/startup directory - contains scripts to set environment and path
- EpicsHostArch C shell script to set EPICS_HOST_ARCH env variable
EpicsHostArch.pl Perl script to set EPICS_HOST_ARCH env variable
borland.bat WIN32 bat file to set borland path and env variables
cygwin.bat WIN32 bat file to set cygwin path and env variables
diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index 85dc54a7b..a419bcabc 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -20,6 +20,9 @@ and have grown crufty (technical term). This release includes the following
updates to these files:
+- The EpicsHostArch script has been removed.
+EpicsHostArch.pl should be used instead.
+
- The EpicsHostArch.pl script has been moved into src/tools
from where it gets installed into lib/perl. The build system has been
adjusted to look for it in both places if the EPICS_HOST_ARCH
diff --git a/startup/EpicsHostArch b/startup/EpicsHostArch
deleted file mode 100755
index 8861ac56c..000000000
--- a/startup/EpicsHostArch
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-#*************************************************************************
-# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
-# National Laboratory.
-# Copyright (c) 2002 The Regents of the University of California, as
-# Operator of Los Alamos National Laboratory.
-# EPICS BASE is distributed subject to a Software License Agreement found
-# in file LICENSE that is included with this distribution.
-#*************************************************************************
-#
-# EpicsHostArch - returns the Epics host architecture suitable
-# for assigning to the EPICS_HOST_ARCH variable
-
-if [ "x${1}" != "x" ]
-then
- suffix="-"${1}
-else
- suffix=""
-fi
-
-sysname=`uname`
-
-case $sysname in
- Linux )
- os=linux
- cpu=`uname -m`
- case $cpu in
- i386 | i486 | i586 | i686 )
- cpu=x86 ;;
- x86_64 )
- ;; # $cpu is correct
- armv6l | armv7l )
- cpu=arm ;;
- esac
- echo ${os}-${cpu}${suffix}
- ;;
- Darwin )
- os=darwin
- cpu=`uname -m`
- case $cpu in
- "Power Macintosh")
- cpu=ppc ;;
- i386 | x86_64 )
- cpu=x86 ;;
- esac
- echo ${os}-${cpu}${suffix}
- ;;
- SunOS )
- version=`uname -r | sed '1s/^\([0-9]*\).*$/\1/'`
- if [ ${version} -ge 5 ]; then
- os=solaris
- else
- os=sun4
- fi
- cpu=`uname -m`
- case $cpu in
- sun4*)
- cpu=sparc
- ;;
- i86pc)
- cpu=x86
- ;;
- esac
- echo ${os}-${cpu}${suffix}
- ;;
- * )
- sysname=`uname -o`
- case $sysname in
- Cygwin )
- os=cygwin
- cpu=`uname -m`
- case $cpu in i386 | i486 | i586 | i686 )
- cpu=x86
- ;;
- esac
- echo ${os}-${cpu}${suffix}
- ;;
- * )
- echo unsupported
- ;;
- esac
- ;;
-esac
-
From 68779943ebd2da19d6840660a01c79a2a6623e1f Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Tue, 26 Jun 2018 16:34:04 -0500
Subject: [PATCH 06/18] Remove execute file mode bit
---
startup/cygwin.bat | 0
startup/unix.csh | 0
startup/unix.sh | 0
startup/windows.bat | 0
4 files changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 startup/cygwin.bat
mode change 100755 => 100644 startup/unix.csh
mode change 100755 => 100644 startup/unix.sh
mode change 100755 => 100644 startup/windows.bat
diff --git a/startup/cygwin.bat b/startup/cygwin.bat
old mode 100755
new mode 100644
diff --git a/startup/unix.csh b/startup/unix.csh
old mode 100755
new mode 100644
diff --git a/startup/unix.sh b/startup/unix.sh
old mode 100755
new mode 100644
diff --git a/startup/windows.bat b/startup/windows.bat
old mode 100755
new mode 100644
From ab493264b2d08e45bb9f9359390689b3ff14c6c2 Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Tue, 26 Jun 2018 17:56:58 -0500
Subject: [PATCH 07/18] Make EpicsHostArch.pl print newline
Print a newline after the EPICS host architecture spec. This is typical
for a UNIX-like program (e.g., date).
---
src/tools/EpicsHostArch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tools/EpicsHostArch.pl b/src/tools/EpicsHostArch.pl
index 09f7ffddd..5f5dad453 100755
--- a/src/tools/EpicsHostArch.pl
+++ b/src/tools/EpicsHostArch.pl
@@ -19,7 +19,7 @@ $suffix="";
$suffix="-".$ARGV[0] if ($ARGV[0] ne "");
$EpicsHostArch = GetEpicsHostArch();
-print "$EpicsHostArch$suffix";
+print "$EpicsHostArch$suffix\n";
sub GetEpicsHostArch { # no args
$arch=$Config{'archname'};
From e0399478adf8e5d7b19df9db5e3afeb0e6155c68 Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Fri, 20 Jul 2018 17:14:43 -0500
Subject: [PATCH 08/18] Remove startup/cygwin.bat
Cygwin is no longer supported for Microsoft API builds, so remove it.
---
startup/cygwin.bat | 122 ---------------------------------------------
1 file changed, 122 deletions(-)
delete mode 100644 startup/cygwin.bat
diff --git a/startup/cygwin.bat b/startup/cygwin.bat
deleted file mode 100644
index ff75b5335..000000000
--- a/startup/cygwin.bat
+++ /dev/null
@@ -1,122 +0,0 @@
-@ECHO OFF
-REM *************************************************************************
-REM Copyright (c) 2002 The University of Chicago, as Operator of Argonne
-REM National Laboratory.
-REM Copyright (c) 2002 The Regents of the University of California, as
-REM Operator of Los Alamos National Laboratory.
-REM EPICS BASE Versions 3.13.7
-REM and higher are distributed subject to a Software License Agreement found
-REM in file LICENSE that is included with this distribution.
-REM *************************************************************************
-REM
-REM Site-specific EPICS environment settings
-REM
-REM sites should modify these definitions
-
-REM ======================================================
-REM ====== REQUIRED ENVIRONMENT VARIABLES FOLLOW ======
-REM ======================================================
-
-REM ======================================================
-REM ---------------- WINDOWS ---------------------------
-REM ======================================================
-REM ----- WIN95 -----
-REM set PATH=C:\WINDOWS;C:\WINDOWS\COMMAND
-REM ----- WINNT, WIN2000 -----
-REM set PATH=C:\WINNT;C:\WINNT\SYSTEM32
-REM ----- WINXP, Vista, Windows 7 -----
-set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\Wbem
-
-REM ======================================================
-REM ---------------- make and perl ---------------------
-REM ======================================================
-
-REM --------------- ActiveState perl -------------------
-set PATH=C:\Perl\bin;%PATH%
-
-REM --------------- mingw make ------------------------
-REM set PATH=C:\mingw-make\bin;%PATH%
-REM set PATH=C:\mingw-make82-3\bin;%PATH%
-
-REM --------------- gnuwin32 make ----------------------
-set PATH=C:\gnuwin32\bin;%PATH%
-
-REM ======================================================
-REM ---------------- cygwin tools ------------------------
-REM ======================================================
-REM (make & perl if above perl and make are REMs)
-REM Dont use cygwin GNU make and Perl!
-REM cygwin contains tk/tcl, vim, perl, and many unix tools
-REM need grep from here NOT from cvs directory
-set PATH=%PATH%;.;..
-set PATH=%PATH%;c:\cygwin\bin
-
-REM ======================================================
-REM --------------- EPICS --------------------------------
-REM ======================================================
-set EPICS_HOST_ARCH=cygwin-x86
-set PATH=%PATH%;G:\epics\base\bin\%EPICS_HOST_ARCH%
-set PATH=%PATH%;G:\epics\extensions\bin\%EPICS_HOST_ARCH%
-
-REM ======================================================
-REM ------- OPTIONAL ENVIRONMENT VARIABLES FOLLOW --------
-REM ======================================================
-
-REM ======================================================
-REM ----------------- remote CVS -------------------------
-REM ======================================================
-REM set CVS_RSH=c:/cygwin/bin/ssh.exe
-REM set CVSROOT=:ext:jba@aps.anl.gov:/usr/local/epicsmgr/cvsroot
-REM set HOME=c:/users/%USERNAME%
-REM set HOME=c:/users/jba
-
-REM ======================================================
-REM ------------------- Bazaar ---------------------------
-REM ======================================================
-set PATH=%PATH%;C:\Program files\Bazaar
-
-REM ======================================================
-REM ----------------- GNU make flags ---------------------
-REM ======================================================
-set MAKEFLAGS=-w
-
-REM ======================================================
-REM -------------- vim (use cygwin vim ) -----------------
-REM ======================================================
-REM HOME needed by vim to write .viminfo file.
-REM VIM needed by vim to find _vimrc file.
-REM set VIM=c:\cygwin
-
-REM ======================================================
-REM --------------- Epics Channel Access -----------------
-REM Modify and uncomment the following lines
-REM to override the base/configure/CONFIG_ENV defaults
-REM ======================================================
-REM set EPICS_CA_ADDR_LIST=n.n.n.n n.n.n.n
-REM set EPICS_CA_AUTO_ADDR_LIST=YES
-
-REM set EPICS_CA_CONN_TMO=30.0
-REM set EPICS_CA_BEACON_PERIOD=15.0
-REM set EPICS_CA_REPEATER_PORT=5065
-REM set EPICS_CA_SERVER_PORT=5064
-REM set EPICS_TS_MIN_WEST=420
-
-REM ======================================================
-REM --------------- JAVA ---------------------------------
-REM ======================================================
-REM Needed for java extensions
-REM set CLASSPATH=G:\epics\extensions\javalib
-REM set PATH=%PATH%;C:\j2sdk1.4.1_01\bin
-REM set CLASSPATH=%CLASSPATH%;C:\j2sdk1.4.1_01\lib\tools.jar
-
-REM ======================================================
-REM --------------- Exceed -------------------------------
-REM Needed for X11 extensions
-REM ======================================================
-REM set EX_VER=7.10
-REM set EX_VER=12.00
-REM set EX_VER=14.00
-REM set PATH=%PATH%;C:\Exceed%EX_VER%\XDK\
-REM set PATH=%PATH%;C:\Program Files\Hummingbird\Connectivity\%EX_VER%\Exceed\
-
-
From 8f161f9463f1605d9a6ba907890c9ac58cd6318f Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Fri, 20 Jul 2018 17:18:22 -0500
Subject: [PATCH 09/18] Rewrite startup/unix.sh
Remove extraneous things unrelated to EPICS Base.
Make it behave consistently with the other startup scripts.
Make it easy to configure both for a human and a program.
---
startup/unix.sh | 184 ++++++++++++++++++++++--------------------------
1 file changed, 83 insertions(+), 101 deletions(-)
diff --git a/startup/unix.sh b/startup/unix.sh
index 5cb9b0273..8f45629ee 100644
--- a/startup/unix.sh
+++ b/startup/unix.sh
@@ -1,4 +1,3 @@
-#!/bin/sh
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
@@ -8,111 +7,94 @@
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
-# Site-specific EPICS environment settings
#
-# sites should modify these definitions
+# Site-specific EPICS environment settings
+#
+# Attempts to set EPICS_HOST_ARCH. Optionally, adds the EPICS Base
+# install host architecture bin directory to PATH.
+#
-# Location of epics base
-if [ -z "${MY_EPICS_BASE}" ] ; then
- MY_EPICS_BASE=/usr/local/epics/base
+#-----------------------------------------------------------------------
+# Site serviceable parts (These definitions may be modified)
+#-----------------------------------------------------------------------
+
+# Automatically set up the environment when possible ("yes" or "no").
+# If set to yes, as much of the environment will be set up as possible.
+# If set to no, just the minimum environment will be set up. More
+# specific _auto_* definitions take precedence over this definition.
+_auto=no
+
+# Automatically append to PATH ("yes" or "no"). If set to yes, the
+# EPICS Base install host architecture bin directory will be added to
+# PATH if possible. If set to no, the bin directory will not be added
+# to PATH.
+_auto_path_append=$_auto
+
+# The program used to run Perl scripts (pathname).
+_perl_prog=perl
+
+# The EPICS host architecture specification for EPICS_HOST_ARCH
+# (-[-] as defined in configure/CONFIG_SITE). If
+# nonempty, the value will be used as the value of EPICS_HOST_ARCH. If
+# empty, an attempt will be made to automatically determine the value
+# with EpicsHostArch.pl.
+_epics_host_arch=
+
+# The install location of EPICS Base (pathname). If nonempty, the
+# EpicsHostArch.pl script from it, if it exists, will be used to
+# determine EPICS_HOST_ARCH. If nonempty and EPICS_HOST_ARCH was
+# determined successfully, it will be used to add the host architecture
+# bin directory to PATH if _auto_path_append is yes.
+_epics_base=
+
+# The source location of EPICS Base (pathname). If nonempty, the
+# EpicsHostArch.pl script from it, if it exists and _epics_base is empty
+# or it did not exist in the _epics_base location, will be used to
+# determine EPICS_HOST_ARCH.
+_epics_base_src=
+
+#-----------------------------------------------------------------------
+# Internal parts (There is typically no need to modify these)
+#-----------------------------------------------------------------------
+
+# Define the possible locations of EpicsHostArch.pl
+_epics_host_arch_pl=
+_src_epics_host_arch_pl=
+if [ -n "$_epics_base" ]; then
+ _epics_host_arch_pl="$_epics_base/lib/perl/EpicsHostArch.pl"
+fi
+if [ -n "$_epics_base_src" ]; then
+ _src_epics_host_arch_pl="$_epics_base_src/src/tools/EpicsHostArch.pl"
fi
-# Location of epics extensions (medm, msi, etc.)
-if [ -z "${EPICS_EXTENSIONS}" ] ; then
- EPICS_EXTENSIONS=/usr/local/epics/extensions
+# Set the EPICS host architecture specification
+if [ -n "$_epics_host_arch" ]; then
+ EPICS_HOST_ARCH=$_epics_host_arch
+ export EPICS_HOST_ARCH
+elif [ -e "$_epics_host_arch_pl" ]; then
+ _epics_host_arch=$("$_perl_prog" "$_epics_host_arch_pl")
+ EPICS_HOST_ARCH=$_epics_host_arch
+ export EPICS_HOST_ARCH
+elif [ -e "$_src_epics_host_arch_pl" ]; then
+ _epics_host_arch=$("$_perl_prog" "$_src_epics_host_arch_pl")
+ EPICS_HOST_ARCH=$_epics_host_arch
+ export EPICS_HOST_ARCH
fi
-# Postscript printer definition needed by some extensions (eg medm, dp, dm, ...)
-if [ -z "${PSPRINTER}" ] ; then
- export PSPRINTER=lp
+# Add the EPICS Base host architecture bin directory to PATH
+if [ "$_auto_path_append" = yes ]; then
+ if [ -n "$_epics_base" ] && [ -n "$_epics_host_arch" ]; then
+ PATH="$PATH:$_epics_base/bin/$_epics_host_arch"
+ export PATH
+ fi
fi
-#Needed only by the idl and ezcaIDL extensions.
-#export EPICS_EXTENSIONS
-
-# Needed only by medm extension
-#export EPICS_DISPLAY_PATH=/path/to/adl/files
-export BROWSER=firefox
-
-# Needed only by orbitscreen extension
-#if [ -z "${ORBITSCREENHOME}" ] ; then
-# export "ORBITSCREENHOME=${EPICS_EXTENSIONS/src/orbitscreen}"
-#fi
-
-# Needed only by adt extension
-#if [ -z "${ADTHOME}" ] ; then
-# ADTHOME=
-# export ADTHOME
-#fi
-
-# Needed only by ar extension (archiver)
-#EPICS_AR_PORT=7002
-#export EPICS_AR_PORT
-
-# Needed for java extensions
-if [ -z "${CLASSPATH}" ] ; then
- CLASSPATH="${EPICS_EXTENSIONS}/javalib"
-else
- CLASSPATH="${CLASSPATH}:${EPICS_EXTENSIONS}/javalib"
-fi
-export CLASSPATH
-
-# Allow private versions of extensions without a bin subdir
-if [ -n "${EPICS_EXTENSIONS_PVT}" ] ; then
- PATH="${PATH}:${EPICS_EXTENSIONS_PVT}"
-fi
-
-#---------------------------------------------------------------
-# Start of set R3.14 environment variables
-#
-EPICS_HOST_ARCH=`"${MY_EPICS_BASE}"/startup/EpicsHostArch.pl`
-export EPICS_HOST_ARCH
-
-# Allow private versions of base
-if [ -n "${EPICS_BASE_PVT}" ] ; then
- if [ -d "${EPICS_BASE_PVT}/bin/${EPICS_HOST_ARCH}" ]; then
- PATH="${PATH}:${EPICS_BASE_PVT}/bin/${EPICS_HOST_ARCH}"
- fi
-fi
-
-# Allow private versions of extensions
-if [ -n "${EPICS_EXTENSIONS_PVT}" ] ; then
- if [ -d "${EPICS_EXTENSIONS_PVT}/bin/${EPICS_HOST_ARCH}" ]; then
- PATH="${PATH}:${EPICS_EXTENSIONS_PVT}/bin/${EPICS_HOST_ARCH}"
- fi
-fi
-PATH="${PATH}:${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}"
-
-# End of set R3.14 environment variables
-
-#---------------------------------------------------------------
-#
-## Start of set pre R3.14 environment variables
-#
-## Time service:
-## EPICS_TS_MIN_WEST the local time difference from GMT.
-#EPICS_TS_MIN_WEST=360
-#export EPICS_TS_MIN_WEST
-#
-#HOST_ARCH=`"${MY_EPICS_BASE}"/startup/HostArch`
-#export HOST_ARCH
-#
-## Allow private versions of base
-#if [ -n "${EPICS_BASE_PVT}" ] ; then
-# if [ -d "${EPICS_BASE_PVT}/bin/${HOST_ARCH}" ]; then
-# PATH="${PATH}:${EPICS_BASE_PVT}/bin/${HOST_ARCH}"
-# fi
-#fi
-#
-## Allow private versions of extensions
-#if [ -n "${EPICS_EXTENSIONS_PVT}" ] ; then
-# if [ -d "${EPICS_EXTENSIONS_PVT}/bin/${HOST_ARCH}" ]; then
-# PATH="${PATH}:${EPICS_EXTENSIONS_PVT}/bin/${HOST_ARCH}"
-# fi
-#fi
-#
-#PATH="${PATH}:${EPICS_EXTENSIONS}/lib/${HOST_ARCH}"
-#
-# End of set pre R3.14 environment variables
-
-#---------------------------------------------------------------
+# Don't leak variables into the environment
+unset _auto
+unset _auto_path_append
+unset _perl_prog
+unset _epics_host_arch
+unset _epics_base
+unset _epics_base_src
+unset _epics_host_arch_pl
+unset _src_epics_host_arch_pl
From 31844af88e440052e98ab3419803fee683e594b6 Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Fri, 20 Jul 2018 17:29:47 -0500
Subject: [PATCH 10/18] Rewrite startup/unix.csh
Remove extraneous things unrelated to EPICS Base.
Make it behave consistently with the other startup scripts.
Make it easy to configure both for a human and a program.
---
startup/unix.csh | 188 +++++++++++++++++++++--------------------------
1 file changed, 83 insertions(+), 105 deletions(-)
diff --git a/startup/unix.csh b/startup/unix.csh
index 23453cb91..dce441ea8 100644
--- a/startup/unix.csh
+++ b/startup/unix.csh
@@ -1,4 +1,3 @@
-#!/bin/csh -f
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
@@ -8,111 +7,90 @@
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
-# Site-specific EPICS environment settings
#
-# sites should modify these definitions
-
-# Location of epics base
-if ( ! $?EPICS_BASE ) then
- set EPICS_BASE=/usr/local/epics/base
-endif
-
-# Location of epics extensions
-if ( ! $?EPICS_EXTENSIONS ) then
- setenv EPICS_EXTENSIONS /usr/local/epics/extensions
-endif
-
-# Postscript printer definition needed by some extensions (eg medm, dp, dm, ...)
-if ( ! $?PSPRINTTER ) then
- setenv PSPRINTER lp
-endif
-
-# Needed only by medm extension
-#setenv EPICS_DISPLAY_PATH
-# Needed only by medm extension
-setenv BROWSER firefox
-
-# Needed only by orbitscreen extension
-if ( ! $?ORBITSCREENHOME ) then
- setenv ORBITSCREENHOME $EPICS_EXTENSIONS/src/orbitscreen
-endif
-
-# Needed only by adt extension
-if ( ! $?ADTHOME ) then
- setenv ADTHOME /usr/local/oag/apps/src/appconfig/adt
- echo $ADTHOME
-endif
-
-# Needed only by ar extension (archiver)
-setenv EPICS_AR_PORT 7002
-
-# Needed for java extensions
-if ( $?CLASSPATH ) then
- setenv CLASSPATH "${CLASSPATH}:${EPICS_EXTENSIONS}/javalib"
-else
- setenv CLASSPATH "${EPICS_EXTENSIONS}/javalib"
-endif
-
-# Allow private versions of extensions without a bin subdir
-if ( $?EPICS_EXTENSIONS_PVT ) then
- set path = ( $path $EPICS_EXTENSIONS_PVT)
-endif
-
-##################################################################
-
-# Start of set R3.14 environment variables
-
-setenv EPICS_HOST_ARCH `$EPICS_BASE/startup/EpicsHostArch.pl`
-
-# Allow private versions of base
-if ( $?EPICS_BASE_PVT ) then
- if ( -e $EPICS_BASE_PVT/bin/$EPICS_HOST_ARCH ) then
- set path = ( $path $EPICS_BASE_PVT/bin/$EPICS_HOST_ARCH)
- endif
-endif
-
-# Allow private versions of extensions
-if ( $?EPICS_EXTENSIONS_PVT ) then
- if ( -e $EPICS_EXTENSIONS_PVT/bin/$EPICS_HOST_ARCH ) then
- set path = ( $path $EPICS_EXTENSIONS_PVT/bin/$EPICS_HOST_ARCH)
- endif
-endif
-set path = ( $path $EPICS_EXTENSIONS/bin/$EPICS_HOST_ARCH )
-
-# End of set R3.14 environment variables
-##################################################################
-
-
-## Start of set pre R3.14 environment variables
+# Site-specific EPICS environment settings
#
-## Time service:
-## EPICS_TS_MIN_WEST the local time difference from GMT.
-#setenv EPICS_TS_MIN_WEST 360
+# Attempts to set EPICS_HOST_ARCH. Optionally, adds the EPICS Base
+# install host architecture bin directory to PATH.
#
-#if ( -e /usr/local/etc/setup/HostArch.pl ) then
-# setenv HOST_ARCH `/usr/local/etc/setup/HostArch.pl`
-#else
-# setenv HOST_ARCH `/usr/local/epics/startup/HostArch.pl`
-#endif
-#
-## Allow private versions of extensions
-#if ( $?EPICS_EXTENSIONS_PVT ) then
-# if ( -e $EPICS_EXTENSIONS_PVT/bin/$HOST_ARCH ) then
-# set path = ( $path $EPICS_EXTENSIONS_PVT/bin/$HOST_ARCH)
-# endif
-# # Needed if shared extension libraries are built
-# if ( -e $EPICS_EXTENSIONS_PVT/lib/$HOST_ARCH ) then
-# if ( $?LD_LIBRARY_PATH ) then
-# setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS_PVT}/lib/${HOST_ARCH}"
-# else
-# setenv LD_LIBRARY_PATH "${EPICS_EXTENSIONS_PVT}/lib/${HOST_ARCH}"
-# endif
-# endif
-#endif
-#
-#set path = ( $path $EPICS_EXTENSIONS/bin/$HOST_ARCH )
-## Needed if shared extension libraries are built
-#setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS}/lib/${HOST_ARCH}"
-# End of set pre R3.14 environment variables
-##################################################################
+#-----------------------------------------------------------------------
+# Site serviceable parts (These definitions may be modified)
+#-----------------------------------------------------------------------
+
+# Automatically set up the environment when possible ("yes" or "no").
+# If set to yes, as much of the environment will be set up as possible.
+# If set to no, just the minimum environment will be set up. More
+# specific _auto_* definitions take precedence over this definition.
+set _auto=no
+
+# Automatically append to PATH ("yes" or "no"). If set to yes, the
+# EPICS Base install host architecture bin directory will be added to
+# PATH if possible. If set to no, the bin directory will not be added
+# to PATH.
+set _auto_path_append=$_auto
+
+# The program used to run Perl scripts (pathname).
+set _perl_prog=perl
+
+# The EPICS host architecture specification for EPICS_HOST_ARCH
+# (-[-] as defined in configure/CONFIG_SITE). If
+# nonempty, the value will be used as the value of EPICS_HOST_ARCH. If
+# empty, an attempt will be made to automatically determine the value
+# with EpicsHostArch.pl.
+set _epics_host_arch=
+
+# The install location of EPICS Base (pathname). If nonempty, the
+# EpicsHostArch.pl script from it, if it exists, will be used to
+# determine EPICS_HOST_ARCH. If nonempty and EPICS_HOST_ARCH was
+# determined successfully, it will be used to add the host architecture
+# bin directory to PATH if _auto_path_append is yes.
+set _epics_base=
+
+# The source location of EPICS Base (pathname). If nonempty, the
+# EpicsHostArch.pl script from it, if it exists and _epics_base is empty
+# or it did not exist in the _epics_base location, will be used to
+# determine EPICS_HOST_ARCH.
+set _epics_base_src=
+
+#-----------------------------------------------------------------------
+# Internal parts (There is typically no need to modify these)
+#-----------------------------------------------------------------------
+
+# Define the possible locations of EpicsHostArch.pl
+set _epics_host_arch_pl=
+set _src_epics_host_arch_pl=
+if ("$_epics_base" != '') then
+ set _epics_host_arch_pl="$_epics_base/lib/perl/EpicsHostArch.pl"
+endif
+if ("$_epics_base_src" != '') then
+ set _src_epics_host_arch_pl="$_epics_base_src/src/tools/EpicsHostArch.pl"
+endif
+
+# Set the EPICS host architecture specification
+if ("$_epics_host_arch" != '') then
+ setenv EPICS_HOST_ARCH "$_epics_host_arch"
+else if (-e "$_epics_host_arch_pl") then
+ set _epics_host_arch=`"$_perl_prog" "$_epics_host_arch_pl"`
+ setenv EPICS_HOST_ARCH "$_epics_host_arch"
+else if (-e "$_src_epics_host_arch_pl") then
+ set _epics_host_arch=`"$_perl_prog" "$_src_epics_host_arch_pl"`
+ setenv EPICS_HOST_ARCH "$_epics_host_arch"
+endif
+
+# Add the EPICS Base host architecture bin directory to PATH
+if ("$_auto_path_append" == yes) then
+ if ("$_epics_base" != '' && "$_epics_host_arch" != '') then
+ setenv PATH "${PATH}:$_epics_base/bin/$_epics_host_arch"
+ endif
+endif
+
+# Don't leak variables into the environment
+unset _auto
+unset _auto_path_append
+unset _perl_prog
+unset _epics_host_arch
+unset _epics_base
+unset _epics_base_src
+unset _epics_host_arch_pl
+unset _src_epics_host_arch_pl
From 998fa984babf11735df9cca8f18b6b7d6349bd16 Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Fri, 20 Jul 2018 17:30:30 -0500
Subject: [PATCH 11/18] Rewrite startup/win32.bat
Remove extraneous things unrelated to EPICS Base.
Make it behave consistently with the other startup scripts.
Make it easy to configure both for a human and a program.
---
startup/win32.bat | 178 +++++++++++++++++++++++++++-------------------
1 file changed, 105 insertions(+), 73 deletions(-)
diff --git a/startup/win32.bat b/startup/win32.bat
index 575b06f42..6652fc97c 100644
--- a/startup/win32.bat
+++ b/startup/win32.bat
@@ -1,73 +1,105 @@
-@ECHO OFF
-REM *************************************************************************
-REM Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
-REM National Laboratory.
-REM Copyright (c) 2002 The Regents of the University of California, as
-REM Operator of Los Alamos National Laboratory.
-REM EPICS BASE is distributed subject to a Software License Agreement found
-REM in file LICENSE that is included with this distribution.
-REM *************************************************************************
-REM
-REM EPICS build configuration environment settings
-REM
-REM Installers should modify these definitions as appropriate.
-REM This file configures the PATH variable from scratch.
-
-REM ======================================================
-REM ====== REQUIRED ENVIRONMENT VARIABLES FOLLOW ======
-REM ======================================================
-
-REM ======================================================
-REM ---------------- WINDOWS -------------------------
-REM ======================================================
-REM ----- WINXP, Vista, Windows 7 -----
-set PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem
-
-REM ======================================================
-REM --------------- Strawberry Perl ------------------
-REM ======================================================
-
-set PATH=C:\Strawberry\perl\bin;%PATH%
-set PATH=C:\Strawberry\perl\site\bin;%PATH%
-set PATH=C:\Strawberry\c\bin;%PATH%
-
-REM ======================================================
-REM --------------- Visual C++ -----------------------
-REM ======================================================
-REM -- win32-x86 ---
-
-REM ----- Visual Studio 2010 -----
-REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
-
-REM ----- Visual Studio 2015 -----
-call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
-
-REM ======================================================
-REM --------------- EPICS Base -----------------------
-REM ======================================================
-set EPICS_HOST_ARCH=win32-x86
-set PATH=%PATH%;G:\epics\base\bin\%EPICS_HOST_ARCH%
-
-REM ======================================================
-REM ====== OPTIONAL ENVIRONMENT VARIABLES FOLLOW =====
-REM ======================================================
-
-REM ======================================================
-REM --------------------- Git ------------------------
-REM ======================================================
-set PATH=%PATH%;C:\Program files\Git
-
-REM ======================================================
-REM --------------- EPICS Extensions -----------------
-REM ======================================================
-REM set PATH=%PATH%;G:\epics\extensions\bin\%EPICS_HOST_ARCH%
-
-REM ======================================================
-REM --------------- Exceed ---------------------------
-REM ======================================================
-REM Needed for X11 extensions
-REM set EX_VER=14.00
-REM set EX_VER=15.00
-REM set PATH=%PATH%;C:\Exceed%EX_VER%\XDK\
-REM set PATH=%PATH%;C:\Program Files\Hummingbird\Connectivity\%EX_VER%\Exceed\
-
+@echo off
+rem *************************************************************************
+rem Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
+rem National Laboratory.
+rem Copyright (c) 2002 The Regents of the University of California, as
+rem Operator of Los Alamos National Laboratory.
+rem EPICS BASE is distributed subject to a Software License Agreement found
+rem in file LICENSE that is included with this distribution.
+rem *************************************************************************
+rem
+rem Site-specific EPICS environment settings
+rem
+rem Sets EPICS_HOST_ARCH and the environment for Microsoft Visual Studio.
+rem Optionally, resets PATH, adds Strawberry Perl to PATH, and adds the
+rem EPICS Base install host architecture bin directory to PATH.
+rem
+
+rem ----------------------------------------------------------------------
+rem Site serviceable parts (These definitions may be modified)
+rem ----------------------------------------------------------------------
+
+rem The values of the definitions in this section must not contain
+rem double-quotes.
+rem
+rem * Right: set _foo=C:\foo
+rem * Right: set "_foo=C:\foo"
+rem * Wrong: set _foo="C:\foo"
+
+rem Automatically set up the environment when possible ("yes" or "no").
+rem If set to yes, as much of the environment will be set up as possible.
+rem If set to no, just the minimum environment will be set up. More
+rem specific _auto_* definitions take precedence over this definition.
+set _auto=no
+
+rem Automatically reset PATH ("yes" or "no"). If set to yes, PATH will
+rem be reset to the value of _path_new. If set to no, PATH will not be
+rem reset.
+set _auto_path_reset=%_auto%
+
+rem Automatically append to PATH ("yes" or "no"). If set to yes, the
+rem EPICS Base install host architecture bin directory will be added to
+rem PATH if possible. If set to no, the bin directory will not be added
+rem to PATH.
+set _auto_path_append=%_auto%
+
+rem The new value for PATH. If _auto_path_reset is yes, PATH will be set
+rem to it.
+set _path_new=C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem
+
+rem The location of Strawberry Perl (pathname). If empty, Strawberry Perl
+rem is assumed to already be in PATH and will not be added. If nonempty,
+rem Strawberry Perl will be added to PATH.
+set _strawberry_perl_home=C:\Strawberry
+
+rem The location of Microsoft Visual Studio (pathname).
+set _visual_studio_home=C:\Program Files (x86)\Microsoft Visual Studio 14.0
+
+rem The EPICS host architecture specification for EPICS_HOST_ARCH
+rem (-[-] as defined in configure/CONFIG_SITE).
+set _epics_host_arch=win32-x86
+
+rem The install location of EPICS Base (pathname). If nonempty and
+rem _auto_path_append is yes, it will be used to add the host architecture
+rem bin directory to PATH.
+set _epics_base=
+
+rem ----------------------------------------------------------------------
+rem Internal parts (There is typically no need to modify these)
+rem ----------------------------------------------------------------------
+
+rem Reset PATH
+if "%_auto_path_reset%" == "yes" (
+ set "PATH=%_path_new%"
+)
+
+rem Add Strawberry Perl to PATH
+if "%_strawberry_perl_home%" == "" goto after_add_strawberry_perl
+rem Can't do this inside parentheses because PATH would be read only once
+set "PATH=%PATH%;%_strawberry_perl_home%\c\bin"
+set "PATH=%PATH%;%_strawberry_perl_home%\perl\site\bin"
+set "PATH=%PATH%;%_strawberry_perl_home%\perl\bin"
+:after_add_strawberry_perl
+
+rem Set the environment for Microsoft Visual Studio
+call "%_visual_studio_home%\VC\vcvarsall.bat" x86
+
+rem Set the EPICS host architecture specification
+set "EPICS_HOST_ARCH=%_epics_host_arch%"
+
+rem Add the EPICS Base host architecture bin directory to PATH
+if "%_auto_path_append%" == "yes" (
+ if not "%_epics_base%" == "" (
+ set "PATH=%PATH%;%_epics_base%\bin\%_epics_host_arch%"
+ )
+)
+
+rem Don't leak variables into the environment
+set _auto=
+set _auto_path_reset=
+set _auto_path_append=
+set _path_new=
+set _strawberry_perl_home=
+set _visual_studio_home=
+set _epics_host_arch=
+set _epics_base=
From 80869a0868aebfc9b3576793ad62d33d13967b12 Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Fri, 20 Jul 2018 17:43:01 -0500
Subject: [PATCH 12/18] Rewrite startup/windows.bat
Remove extraneous things unrelated to EPICS Base.
Make it behave consistently with the other startup scripts.
Make it easy to configure both for a human and a program.
---
startup/windows.bat | 178 ++++++++++++++++++++++++++------------------
1 file changed, 105 insertions(+), 73 deletions(-)
diff --git a/startup/windows.bat b/startup/windows.bat
index 1b0d32eb2..877c0d5a9 100644
--- a/startup/windows.bat
+++ b/startup/windows.bat
@@ -1,73 +1,105 @@
-@ECHO OFF
-REM *************************************************************************
-REM Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
-REM National Laboratory.
-REM Copyright (c) 2002 The Regents of the University of California, as
-REM Operator of Los Alamos National Laboratory.
-REM EPICS BASE is distributed subject to a Software License Agreement found
-REM in file LICENSE that is included with this distribution.
-REM *************************************************************************
-REM
-REM EPICS build configuration environment settings
-REM
-REM Installers should modify these definitions as appropriate.
-REM This file configures the PATH variable from scratch.
-
-REM ======================================================
-REM ====== REQUIRED ENVIRONMENT VARIABLES FOLLOW =====
-REM ======================================================
-
-REM ======================================================
-REM ---------------- WINDOWS -------------------------
-REM ======================================================
-REM ----- WINXP, Vista, Windows 7 -----
-set PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem
-
-REM ======================================================
-REM --------------- Strawberry Perl ------------------
-REM ======================================================
-
-set PATH=C:\Strawberry\perl\bin;%PATH%
-set PATH=C:\Strawberry\perl\site\bin;%PATH%
-set PATH=C:\Strawberry\c\bin;%PATH%
-
-REM ======================================================
-REM --------------- Visual C++ -----------------------
-REM ======================================================
-REM -- windows-x64 ---
-
-REM ----- Visual Studio 2010 -----
-REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
-
-REM ----- Visual Studio 2015 -----
-call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
-
-REM ======================================================
-REM --------------- EPICS Base -----------------------
-REM ======================================================
-set EPICS_HOST_ARCH=windows-x64
-set PATH=%PATH%;G:\epics\base\bin\%EPICS_HOST_ARCH%
-
-REM ======================================================
-REM ====== OPTIONAL ENVIRONMENT VARIABLES FOLLOW =====
-REM ======================================================
-
-REM ======================================================
-REM --------------------- Git ------------------------
-REM ======================================================
-set PATH=%PATH%;C:\Program files\Git
-
-REM ======================================================
-REM --------------- EPICS Extensions -----------------
-REM ======================================================
-REM set PATH=%PATH%;G:\epics\extensions\bin\%EPICS_HOST_ARCH%
-
-REM ======================================================
-REM --------------- Exceed ---------------------------
-REM ======================================================
-REM Needed for X11 extensions
-REM set EX_VER=14.00
-REM set EX_VER=15.00
-REM set PATH=%PATH%;C:\Exceed%EX_VER%\XDK\
-REM set PATH=%PATH%;C:\Program Files\Hummingbird\Connectivity\%EX_VER%\Exceed\
-
+@echo off
+rem *************************************************************************
+rem Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
+rem National Laboratory.
+rem Copyright (c) 2002 The Regents of the University of California, as
+rem Operator of Los Alamos National Laboratory.
+rem EPICS BASE is distributed subject to a Software License Agreement found
+rem in file LICENSE that is included with this distribution.
+rem *************************************************************************
+rem
+rem Site-specific EPICS environment settings
+rem
+rem Sets EPICS_HOST_ARCH and the environment for Microsoft Visual Studio.
+rem Optionally, resets PATH, adds Strawberry Perl to PATH, and adds the
+rem EPICS Base install host architecture bin directory to PATH.
+rem
+
+rem ----------------------------------------------------------------------
+rem Site serviceable parts (These definitions may be modified)
+rem ----------------------------------------------------------------------
+
+rem The values of the definitions in this section must not contain
+rem double-quotes.
+rem
+rem * Right: set _foo=C:\foo
+rem * Right: set "_foo=C:\foo"
+rem * Wrong: set _foo="C:\foo"
+
+rem Automatically set up the environment when possible ("yes" or "no").
+rem If set to yes, as much of the environment will be set up as possible.
+rem If set to no, just the minimum environment will be set up. More
+rem specific _auto_* definitions take precedence over this definition.
+set _auto=no
+
+rem Automatically reset PATH ("yes" or "no"). If set to yes, PATH will
+rem be reset to the value of _path_new. If set to no, PATH will not be
+rem reset.
+set _auto_path_reset=%_auto%
+
+rem Automatically append to PATH ("yes" or "no"). If set to yes, the
+rem EPICS Base install host architecture bin directory will be added to
+rem PATH if possible. If set to no, the bin directory will not be added
+rem to PATH.
+set _auto_path_append=%_auto%
+
+rem The new value for PATH. If _auto_path_reset is yes, PATH will be set
+rem to it.
+set _path_new=C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem
+
+rem The location of Strawberry Perl (pathname). If empty, Strawberry Perl
+rem is assumed to already be in PATH and will not be added. If nonempty,
+rem Strawberry Perl will be added to PATH.
+set _strawberry_perl_home=C:\Strawberry
+
+rem The location of Microsoft Visual Studio (pathname).
+set _visual_studio_home=C:\Program Files (x86)\Microsoft Visual Studio 14.0
+
+rem The EPICS host architecture specification for EPICS_HOST_ARCH
+rem (-[-] as defined in configure/CONFIG_SITE).
+set _epics_host_arch=windows-x64
+
+rem The install location of EPICS Base (pathname). If nonempty and
+rem _auto_path_append is yes, it will be used to add the host architecture
+rem bin directory to PATH.
+set _epics_base=
+
+rem ----------------------------------------------------------------------
+rem Internal parts (There is typically no need to modify these)
+rem ----------------------------------------------------------------------
+
+rem Reset PATH
+if "%_auto_path_reset%" == "yes" (
+ set "PATH=%_path_new%"
+)
+
+rem Add Strawberry Perl to PATH
+if "%_strawberry_perl_home%" == "" goto after_add_strawberry_perl
+rem Can't do this inside parentheses because PATH would be read only once
+set "PATH=%PATH%;%_strawberry_perl_home%\c\bin"
+set "PATH=%PATH%;%_strawberry_perl_home%\perl\site\bin"
+set "PATH=%PATH%;%_strawberry_perl_home%\perl\bin"
+:after_add_strawberry_perl
+
+rem Set the environment for Microsoft Visual Studio
+call "%_visual_studio_home%\VC\vcvarsall.bat" x64
+
+rem Set the EPICS host architecture specification
+set "EPICS_HOST_ARCH=%_epics_host_arch%"
+
+rem Add the EPICS Base host architecture bin directory to PATH
+if "%_auto_path_append%" == "yes" (
+ if not "%_epics_base%" == "" (
+ set "PATH=%PATH%;%_epics_base%\bin\%_epics_host_arch%"
+ )
+)
+
+rem Don't leak variables into the environment
+set _auto=
+set _auto_path_reset=
+set _auto_path_append=
+set _path_new=
+set _strawberry_perl_home=
+set _visual_studio_home=
+set _epics_host_arch=
+set _epics_base=
From 4e9cf72d712a96df2dd48158d27ab9a9896004f0 Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Fri, 20 Jul 2018 17:45:47 -0500
Subject: [PATCH 13/18] Remove execute file mode bit on EpicsHostArch.pl
---
src/tools/EpicsHostArch.pl | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 src/tools/EpicsHostArch.pl
diff --git a/src/tools/EpicsHostArch.pl b/src/tools/EpicsHostArch.pl
old mode 100755
new mode 100644
From 89870e28179552cb256edadd672fbe6d0777aa32 Mon Sep 17 00:00:00 2001
From: "J. Lewis Muir"
Date: Fri, 20 Jul 2018 17:47:39 -0500
Subject: [PATCH 14/18] Remove trailing space in license of startup/unix.*
---
startup/unix.csh | 2 +-
startup/unix.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/startup/unix.csh b/startup/unix.csh
index dce441ea8..788a639e6 100644
--- a/startup/unix.csh
+++ b/startup/unix.csh
@@ -5,7 +5,7 @@
# Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
-# in file LICENSE that is included with this distribution.
+# in file LICENSE that is included with this distribution.
#*************************************************************************
#
# Site-specific EPICS environment settings
diff --git a/startup/unix.sh b/startup/unix.sh
index 8f45629ee..a8d8328ec 100644
--- a/startup/unix.sh
+++ b/startup/unix.sh
@@ -5,7 +5,7 @@
# Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
-# in file LICENSE that is included with this distribution.
+# in file LICENSE that is included with this distribution.
#*************************************************************************
#
# Site-specific EPICS environment settings
From 2548a372672367b2662dac5a484b634acb8b7f65 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Wed, 8 Aug 2018 16:53:32 -0500
Subject: [PATCH 15/18] Update/clean up EpicsHostArch.pl
---
src/tools/EpicsHostArch.pl | 76 +++++++++++++++++++++-----------------
1 file changed, 42 insertions(+), 34 deletions(-)
diff --git a/src/tools/EpicsHostArch.pl b/src/tools/EpicsHostArch.pl
index 5f5dad453..e8e49bc5e 100644
--- a/src/tools/EpicsHostArch.pl
+++ b/src/tools/EpicsHostArch.pl
@@ -1,47 +1,55 @@
-eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
- if $running_under_some_shell; # EpicsHostArch.pl
+#!/usr/bin/env perl
#*************************************************************************
-# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
+# Copyright (c) 2018 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
-# Copyright (c) 2002 The Regents of the University of California, as
-# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
-# Returns the Epics host architecture suitable
-# for assigning to the EPICS_HOST_ARCH variable
+# Returns an architecture name for EPICS_HOST_ARCH that should be
+# appropriate for the CPU that this version of Perl was built for.
+# Any arguments to the program will be appended with separator '-'
+# to allow flags like -gnu -debug and/or -static to be added.
+
+# Before Base has been built, use a command like this:
+# bash$ export EPICS_HOST_ARCH=`perl src/tools/EpicsHostArch.pl`
+#
+# If Base is already built, use
+# tcsh% setenv EPICS_HOST_ARCH `perl base/lib/perl/EpicsHostArch.pl`
+
+# If your architecture is not recognized by this script, please send
+# the output from running 'perl --version' to the EPICS tech-talk
+# mailing list to have it added.
+
+use strict;
use Config;
use POSIX;
-$suffix="";
-$suffix="-".$ARGV[0] if ($ARGV[0] ne "");
+print join('-', HostArch(), @ARGV), "\n";
-$EpicsHostArch = GetEpicsHostArch();
-print "$EpicsHostArch$suffix\n";
+sub HostArch {
+ my $arch = $Config{archname};
+ for ($arch) {
+ return 'linux-x86_64' if m/^x86_64-linux/;
+ return 'linux-x86' if m/^i[3-6]86-linux/;
+ return 'linux-arm' if m/^arm-linux/;
+ return 'windows-x64' if m/^MSWin32-x64/;
+ return 'win32-x86' if m/^MSWin32-x86/;
+ return "cygwin-x86_64" if m/^x86_64-cygwin/;
+ return "cygwin-x86" if m/^i[3-6]86-cygwin/;
+ return 'solaris-sparc' if m/^sun4-solaris/;
+ return 'solaris-x86' if m/^i86pc-solaris/;
-sub GetEpicsHostArch { # no args
- $arch=$Config{'archname'};
- if ($arch =~ /sun4-solaris/) { return "solaris-sparc";
- } elsif ($arch =~ m/i86pc-solaris/) { return "solaris-x86";
- } elsif ($arch =~ m/i[3-6]86-linux/){ return "linux-x86";
- } elsif ($arch =~ m/x86_64-linux/) { return "linux-x86_64";
- } elsif ($arch =~ m/arm-linux/) { return "linux-arm";
- } elsif ($arch =~ m/MSWin32-x86/) { return "win32-x86";
- } elsif ($arch =~ m/MSWin32-x64/) { return "windows-x64";
- } elsif ($arch =~ m/cygwin/) {
- my($kernel, $hostname, $release, $version, $cpu) = POSIX::uname();
- if ($cpu =~ m/x86_64/) { return "cygwin-x86_64"; }
- return "cygwin-x86";
- } elsif ($arch =~ m/darwin/) {
- my($kernel, $hostname, $release, $version, $cpu) = POSIX::uname();
- if ($cpu =~ m/Power Macintosh/) { return "darwin-ppc"; }
- elsif ($cpu =~ m/i386/) { return "darwin-x86"; }
- elsif ($cpu =~ m/x86_64/) { return "darwin-x86"; }
- else { return "unsupported"; }
- } else { return "unsupported"; }
+ my ($kernel, $hostname, $release, $version, $cpu) = uname;
+ if (m/^darwin/) {
+ for ($cpu) {
+ return 'darwin-x86' if m/^(i386|x86_64)/;
+ return 'darwin-ppc' if m/Power Macintosh/;
+ }
+ die "$0: macOS CPU type '$cpu' not recognized\n";
+ }
+
+ die "$0: Architecture '$arch' not recognized\n";
+ }
}
-
-#EOF EpicsHostArch.pl
-
From 9051cdbb34429cc03867f5ec1be990d63c3193a9 Mon Sep 17 00:00:00 2001
From: Andrew Johnson
Date: Fri, 10 Aug 2018 15:20:29 -0500
Subject: [PATCH 16/18] Added a simpler startup/EpicsHostArch for
backwards-compatibility
Many downstream modules seem to be using the EpicsHostArch script in
their CI build scripts and would break if we remove that. I created
a new version that finds and execs the Perl script directly.
Also reworded and expanded the Release Notes about the EpicsHostArch
scripts.
---
documentation/RELEASE_NOTES.html | 28 ++++++++++++++++++++--------
startup/EpicsHostArch | 21 +++++++++++++++++++++
2 files changed, 41 insertions(+), 8 deletions(-)
create mode 100644 startup/EpicsHostArch
diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index a419bcabc..d6e40de42 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -20,15 +20,27 @@ and have grown crufty (technical term). This release includes the following
updates to these files: