How opticks-full works ======================== *opticks-full* is a bash function from the opticks.bash file that does the below: 1. installs externals *opticks-externals-install* 2. configures, builds and installs controlled by *om-install* 4. prepares installcache *opticks-prepare-installcache* The *opticks-vi* bash function allows you to examine/edit the functions. Structure of Opticks Build ----------------------------- Opticks is structured as a "bunch of separate CMake projects" which are linked together using the CMake "find_package" mechanism and CMake target export/import using my fork of BCM (Boost CMake Modules, which is downloaded and installed as the first external *bcm*). BCM avoids all the boilerplate that is otherwise needed to do CMake target export/import. The "bunch of separate CMake" projects are tied together using the *om-* (which stands for "Opticks Minimal" ) bash functions. opticks-full bash function --------------------------- :: opticks-full() { local msg="=== $FUNCNAME :" echo $msg START $(date) opticks-info if [ ! -d "$(opticks-prefix)/externals" ]; then echo $msg installing the below externals into $(opticks-prefix)/externals opticks-externals opticks-externals-install else echo $msg using preexisting externals from $(opticks-prefix)/externals fi om- cd $(om-home) om-install opticks-prepare-installcache echo $msg DONE $(date) } Installation Basics, bash reminder --------------------------------------- Opticks builds and installs are based on CMake but are controlled from a layer of bash functions. These functions follow consistent naming conventions, functions such as *opticks-* or *om-* ending in *-* are termed *precursor* functions. Running these functions define other functions all with the corresponding prefix, to see the functions use eg *opticks-vi* or *om-vi*. To introspect the definition of a function use *type*:: epsilon:opticks blyth$ type opticks-full opticks-full is a function opticks-full () { local msg="=== $FUNCNAME :"; echo $msg START $(date); ... It is convenient to alias type for simple introspection:: alias t="type" Allowing:: epsilon:opticks blyth$ t t t is aliased to `type' epsilon:opticks blyth$ t opticks- opticks- is a function opticks- () { source $(opticks-source) && opticks-env $* } epsilon:opticks blyth$ opticks-source /Users/blyth/opticks/opticks.bash epsilon:opticks blyth$ t om- om- is a function om- () { . $(opticks-home)/om.bash && om-env $* } Troubleshooting installation of externals ------------------------------------------- It is necessary for the externals to install without serious error for the rest of the build to succeed. First use introspection to see how the functions work:: opticks- ## run the precursor epsilon:opticks blyth$ t opticks-externals ## introspect using "t" which is an alias for "type" opticks-externals is a function opticks-externals () { : emits to stdout the names of the bash precursors that download and install the externals; cat <