Next: , Previous: config.h, Up: Implementation


30.7 Making CONGEN

CONGEN is constructed using either the make command on Unix machines or the MMS utility on VMS. There is a master makefile or descrip.mms file in CG, which will invoke all the necessary makefiles needed to build the entire system. These makefiles work fine on most machines, but have trouble on the Convex because their make program is older.

In order to handle the different compiler names and flags necessary for each different machine, many of the CONGEN directories have a file named makefile.gen which is missing definitions for these macros. In the CG directory, there are a set of *.make files which contain the macros needed for each type of machine. The names of the *.make files is as follows:

sgi...
There are several files for Silicon Graphics workstations which are described in UNIX Installation. Currently, there are four versions of these files, sgi_r10k_i6.4_c7.1_m4_a64.make, sgi_r3k_i5.3_c5.3_m1_a32.make, sgi_r4k_i5.3_c5.3_m2_a32.make, and sgi_r8k_i6.1_c6.1_m4_a64.make
unicos
Cray YMP running Unicos.
rs6000
IBM RS/6000 workstation running AIX.
convex
Convex computers.
hpux
Hewlett Packard 700 series workstations running HPUX.
sparc
Sun Sparcstations using gcc as the C compiler.
alphaosf
DEC Alpha machines running OSF.
fujitsu
Fujitsu VP240.

There is a program, fixmake, in the CG directory which will take one of these files, and incorporate into a makefile.

The selection of machine is done via the CGPLATFORM environment variable which is set in $CG/cgdefs or $CG/cgprofile.

The master makefile has several different targets that can be specified to build parts of the system. Use them with care. They are listed as follows:

prepare
Prepare for rebuilding the entire system. This will set up to rebuild everything including binary data files. It should be used only when porting CONGEN to a new machine, or when file structures are changed.
clean
Clean up unnecessary copies of executables, intermediate data files, objects, etc.
all
Make everything in place. Executables made by this target are not copied to the directories which are included into user PATH environment variables.
install
Make everything and put them where users will access them. Note that the install script from the X window system is used.1
tovax
Copy files to dino. This should be used only at Bristol-Myers Squibb, but will not have any effect on other sites except if the file name /u/dino/fc/congen/... leads someplace real.
setup
This will construct all the makefiles from the makefile.gens.

In order to construct CONGEN from scratch on a brand new machine, the following steps must be followed:

  1. Modify $CG/cgdefs and $CG/cgprofile to reflect your directory structure and the hardware platform.
  2. Create a platform file in $CG which specifies the necessary switches for compilation.
  3. Set your default directory to $CG.
  4. Do a make prepare.
  5. Do a make install. Some of the utility programs like peer may not build correctly on all SGI platforms. This should not interfere with the installation of CONGEN.
  6. Compare the test cases found in $CGT.

To make a new directory tree for a different SGI platform, perform the following steps:

  1. Verify that the master tree name in $CGROOT/master_machine is correct.
  2. Add a new platform file in CG which specifies the necessary switches for compilation.
  3. Execute cd $CGROOT
  4. Execute ./update_tree new_platform_name
    The script, ./update_tree, copies all the files from the master directory stored in the file $CGROOT/master_machine into the directory specified above as new_platform_name. It sets up links for all RCS directories except the test case archive, which is duplicated for the new platform, because it is likely that the test values will change slightly.
  5. Execute source cgundef
  6. Follow the procedure for building CONGEN above starting at the cd $CG step.

Footnotes

[1] The installation script is Copyright © 1984, 1985,1986, 1987, 1988, 1989, 1990, 1991 by the Massachusetts Institute of Technology.

Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of MIT not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. MIT makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.