EPICS BUILDER SCRIPTS


Overview

The EPICS BUILDER perl scripts modify base, extensions and module configuration files to be site-specific, and then build the product.  The scripts obtain site-specific settings from environment variables, and in a few cases take arguments. 

 

Use

where they are:

The scripts are located in /usr/local/lcls/epics/setup and /afs/slac/g/lcls/epics/setup (intentionally outside the PATH, so they won’t be executed by accident on production EPICS!)

 

help: 

Each script has help text which lists the required environment variables, arguments (if any), input file format (if any) which can be displayed like this:

            scriptname help   

for example

            ./moduleBuilder.pl help

 

to use the scripts:

1.       For a new package, place its files (via cvs co, untar, cp, whatever) in the desired location (development, production, sandbox area, etc.)

2.       Set up the appropriate environment variables for the desired target directories, location of subsidiary packages, etc. (use “help” to see the list)

3.       If relevant, make an ascii file list of items and versions.

4.       Run the script of choice with the appropriate arguments (use “help” or “-help” to see the list), for example

moduleBuilder.pl help

1.       The script will display your environment variable settings.  Examine these carefully!  When you’re satisfied the settings are correct, enter “GO” or “go” to continue script operation.  Enter any other key to terminate the script operation now.

2.       The script will stop when an error is encountered.  For example, a “make” error will stop script execution, so the last output will show the error condition.

3.       Examine output for errors (can redirect to a file)

 

Environment variables

Use help (see above) to see which environment variables need to be set for each script. 

 

**** Please note: a script won’t run if the required environment variables for that particular script are not set.  However, if they are set incorrectly, the script will run, but you will encounter build problems (for example, an incorrect epics version could cause compile errors; an incorrect EPICS_SITE_TOP could cause the EPICS build system to flag module inconsistencies…etc. etc. etc.!)

 

Here is the list of environment variables that may be needed.  Use help (see above) to see which of these environment variables are needed for each script.

env var

what it is

examples

EPICS_SITE_TOP

the top for all components of EPICS.

/usr/local/lcls/epics

/afs/slac/g/lcls/epics

EPICS_MODULES_TOP

top directory containing all modules

/usr/local/lcls/epics/modules

/afs/slac/g/lcls/epics/modules

EXTENSIONS_SITE_TOP

top directory containing all extensions

/usr/local/lcls/epics/extensions

/afs/slac/g/lcls/epics/extensions

EPICS_EXTENSIONS_VER

epics extensions version

Extensions software is here:

$EPICS_SITE_TOP/extensions/extensions-$EPICS_EXTENSIONS_VER

R3-14-8-2 

EPICS_BASE_VER

epics base version

Base software is here:

$EPICS_SITE_TOP/base/$EPICS_BASE_VER

base-R3-14-8-2-lcls2

RTEMS_SITE_TOP

top rtems directory

/usr/local/lcls/rtems

/afs/slac/g/lcls/rtems

RTEMS_VER

rtems version

rtems-4.7.1

CVSROOT

root of CVS dirs

/afs/slac/g/lcls/cvs

CVS_RSH

remote access for CVS (if needed)

ssh

 

the Scripts

baseBuilder.pl

Builds EPICS Base.

 

extBuilder.pl

Builds all extensions that are installed in this type of directory structure:

…./epics/extensions/extensions-R3-14-10/src/<each extension’s src dir>

 

extensionsBuilder.pl

Builds a list of extensions in a modules-type directory structure:

…./epics/extensions/<ext name>/<version>

 

Takes as an argument the name of a file containing the list of extensions to build, with list of versions for each extension

file format:

Extension  CVS_tag1  CVS_tag2 CVS_tag3 ...

for example:

edm      edm-1-11-1L

caSnooper  caSnooper-R1-1-0 caSnooper-R2-0-0

 

moduleBuilder.pl

Builds a list of modules in a directory structure like this:

…./epics/modules/<module name>/<version>

 

Takes as an argument the name of a file containing the list of modules to build, with list of versions for each module

file format:

Extension  CVS_tag1  CVS_tag2 CVS_tag3 ...

for example:

msi      msi-R0-1-1

dbreport dbreport-R2-0-1 dbreport-R1-0-0

 

 

moduleCheckouter.pl

CVS checkout a list of modules into subdirectories of the current directory.  The CVS command used is:

cvs co –r <version> -d <version> <modulename>

 

Takes as an argument the name of a file containing the list of modules to check, with list of versions for each module

file format:

Extension  CVS_tag1  CVS_tag2 CVS_tag3 ...

for example:

msi      msi-R0-1-1

dbreport dbreport-R2-0-1 dbreport-R1-0-0

 

modulesToDev.pl

CVS checkout a list of modules for development.  Script arguments specify the usual modules list file, a working directory, and a working version (defaults to “Development”):

The module ends up in the directory:

./<workingdir>/<modulename>/<working version>

for example:

            ./sandbox/dbrestore/Development

 

The CVS command used is:

            cvs co –d <working version> <module name> -dP

 

Takes as an argument the name of a file containing the list of modules to check out.  The script parses out the first entry on each line as the module name, and uses only that (i.e. any version numbers list on the line aren’t used)

 

modulesToDevNOWRITE.pl

            Same as modulesToDev.pl, except does NOT update configure/RELEASE.

 

moduleExporter.pl

            Same as moduleCheckouter.pl, except does a cvs export command instead of a cvs checkout.

 

rtemsConfigure.pl

            Sets up rtems for building by replacing paths in all versions of makefile.inc in an rtems release with site-specific paths.

 

changeRELEASE_SITE.pl

            Finds all RELEASE_SITE files in a top-level modules directory tree and replaces EPICS_SITE_TOP with the specified directory.

 

moduleWebPage3.14.9.pl

moduleWebPage.pl

These scripts go through a top modules directory and create a web page like this one:

http://www.slac.stanford.edu/grp/lcls/controls/global/sw/epics/modules/swModules-R3.14.9-lcls1.htm

with info about each module.  The modules are listed in build order, which is discovered by parsing and processing the dependencies in each module’s configure/RELEASE file.

 

moduleCVS.pm

            Perl module shared by moduleCheckouter.pl and moduleExporter.pl