Build Configuration

The source-code configure script, $JSOCROOT/configure, sets environment variables, make variables, and creates on-the-fly make rules that allow users to localize and/or customize the way the JSOC-SDP code is built. Depending on how the make system is configured with these variables and rules, the user can build NetDRMS or the DRMS used at the JSOC-SDP. And for both builds, the user can customize various details.

There are several files that control configuration. Some files are not to edited by users:

Other files are available for the user to edit. These files allow the user to control configuration:

Once the user has modified these configuration files as desired, configuration proceeds when the user runs the $JSOCROOT/configure script. This script first determines if the build to be performed is a JSOC-SDP DRMS build, or a NetDRMS build. If $JSOCROOT/configsdp.txt is present, then it will assume the former, otherwise it will assume the latter. If performing a NetDRMS build, then the script requires that config.local be present. For a JSOC-SDP DRMS build, the presence of this file is NOT required. If it is present, then the contents of that file will customize the JSOC-SDP DRMS build, but if it is absent, then a default build will be performed.

If building NetDRMS, configure first runs gen_init.csh. This will parse the config.local file to produce a NetDRMS-site-specific localization.h file, which then contains parameters, specified by the user, that override the parameters used by the JSOC-SDP. The script then runs moreconfigure.pl, which examines the C and FORTRAN compilers available and chooses the "best" ones that make will use. These choices are codified in the $(COMPLIER) and $(FCOMPILER) make variables, which are written to $JSOC/localization/custom.mk, which is included into make_basic.mk where the contained make-variables assignments will have effect. This auto-selection of compilers can be disabled by setting the AUTOSELCOMP parameter in config.local to 0, in which case the $(COMPILER) and $(FCOMPILER) make variables in make_basic.mk are used for compiler selection, which are overridable by the $JSOC_COMPILER and $JSOC_FCOMPILER environment variables. configure finally runs customizemake.pl, which parses the config.local file, generating make-variable assignment statements out of the key-value parameter lines in config.local. These make-variable assignment statements are also written to custom.mk.

If building the JSOC SDP DRMS, and there is no $JSOCROOT/config.local file present, then, as with the NetDRMS build, configure runs moreconfigure.pl, which chooses the best C and FORTRAN compilers that are available. As before, the appropriate $(COMPLIER) and $(FCOMPILER) make-variable assignments are written to $JSOC/localization/custom.mk, and included into $JSOCROOT/make_basic.mk. If a config.local does exist, then configure first runs customizedefs.pl. This produces a header file, $JSOC/base/include/customizeddefs.h, that contains C #defines for each of the lines in the DEFS section of config.local. customizeddefs.h is #included into serverdefs.h, where its #defines can override the JSOC-SDP DRMS default ones defined in serverdefs.h. After that, the script, as before, runs moreconfigure.pl, which chooses the best C and FORTRAN compilers that are available. The script finally runs customizemake.pl, which parses the config.local file, as before, generating make-variable assignment statements out of the key-value parameter lines in config.local. These make-variable assignment statements are also written to custom.mk.

configure next runs $JSOC/configproj.pl. This script parses a "project-configuration" file that describes the set of projects included in the current build (configsdp.txt is actually such a file, but users can override the use of configsdp.txt by providing a different configuration file as an argument to the $JSOC/configure script). This script creates several files in $JSOC/localization that are needed by the make system when building the project directories.

JsocWiki: BuildConfiguration (last edited 2013-05-01 04:35:24 by localhost)