Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
The AIPS++ environment is defined via a once-only modification of your shell startup script.
Assuming that AIPS++ has been installed under /aips++, users of Bourne-like shells (sh, ksh, bash) must add the following line to their .profile file at a point after PATH (and MANPATH) are defined:
[ -f /aips++/aipsinit.sh ] && . /aips++/aipsinit.sh
The equivalent entry in .login for C-like shells (csh, tcsh) is:
if (-f /aips++/aipsinit.csh) source /aips++/aipsinit.csh
The aipsinit scripts define a single environment variable called AIPSPATH, and prepend the AIPS++ bin area to the PATH environment variable, and the AIPS++ doc directory to the MANPATH environment variable (There are no UNIX style man pages available, AIPS++ documentation is available on-line via the world-wide-web).
For more detailed information, see aipsinit including an explanation of AIPSPATH and a mechanism for controlling the point where the AIPS++ bin areas are added to PATH.
AIPS++ programmers must invoke the aipsinit scripts from their .profile or .login files as do users. However, programming is normally done on the gnu version of AIPS++. The required incantation of aipsinit for Bourne-like shells is
if [ -f /aips++/aipsinit.sh ] then aips_ext=gnu . /aips++/aipsinit.sh fi
and for C-like shells
if (-f /aips++/aipsinit.csh) then set aips_ext = gnu source /aips++/aipsinit.csh endif
Note that the aipsinit scripts explicitly unsets aips_ext In Socorro, the default aips_ext is gnu, so there is no need to set it.
mkdir $HOME/aips++ cd $HOME/aips++ mktree
Apart from creating a shadow copy of the AIPS++ code directory tree, mktree creates symbolic links into the local AIPS++ rcs directory tree thereby linking the programmer's workspace directly to the local copy of the AIPS++ RCS repositories. However, do not use ci or co to check code in or out, see Checkout for instructions on how to do that.
mktree works incrementally so that if any workspace directories or RCS symbolic links are accidently deleted, or if new AIPS++ directories are created, mktree will recreate only what is necessary. For a more detailed description, see mktree
RCS is used for source code management in AIPS++, refer to the unix manual page for rcsintro for more information. On both master and slave systems the AIPS++ sources reside within dual directory trees which exist under the AIPS++ root directory. One of these, aips++/rcs, contains the RCS source code repositories, and the other, aips++/code, contains plain-text sources. Symbolic links named RCS exist in each subdirectory of aips++/code and point into the corresponding subdirectory of aips++/rcs, thereby tying the two directory trees together for checkout of sources. The code distribution system updates the rcs tree, and the code tree is then updated from it. The sources under aips++/code are used to build the AIPS++ system locally, including object libraries, executables, documentation, system databases and more.
When it comes to modifying or adding new AIPS++ sources, the RCS checkin and checkout operations must be performed directly on the master RCS repositories in Socorro. A valid but tedious way of doing this would be to rlogin to Socorro, checkout the sources you're interested in, ftp them back to your home machine, modify them, ftp them back to Socorro, and then check them back in. Alternatively, AIPS++ sources can be checked in and out, updated, or deleted via the ai, ao, au, and ax utilities running on your local machine (ax may only be run in Socorro). These commands work directly on the master AIPS++ RCS repositories via an NFS automount running across the internet which was (or should have been) set up when AIPS++ was first installed at your site. For this reason the commands may appear to execute slowly, or in some cases you may get a message to the effect that the network is down and to try again later (you will also get this message if the NFS automount was not set up properly).
Note carefully that although the programmer workspace created by mktree contains RCS symlinks into the local RCS slave repositories, you should never use co -l to check code out with a lock, or ci to check it back in again. This would only affect the local slave repository, your changes would not be propagated back to the master in Socorro or the other consortium sites. The RCS symlinks in programmer workspaces are provided so that you can check out sources without a lock, or use the rlog or rcsdiff commands (provided you don't mind that the local RCS repository may be out-of-date by up to a day).
Since AIPS++ is a production system, we are very concerned about the stability of the system. As a result, one should be very careful about checking in new features. The overall rules are:
Deletion of sources is handled by the ax utility. Since all deletions must be propagated to the slave copies, and also because of certain timing questions, ax can only be run on the master sources in Socorro.
For a more detailed description of the various utilities discussed, see Code management
For a programmer, however, the main thing to recognize about the makefiles is their two-sided nature. Apart from rebuilding the AIPS++ system from installed sources, they also support programmer workspaces. Where a programmer has created new sources, or checked out and modified old ones, they must recompile them locally and leave the results in the programmer's private workspace. Furthermore, programmers are not required to check out associated sources, such as header files, just for the sake of the compilation. After searching unsuccessfully for a file in the programmers own workspace, the makefiles carry the search into the standard AIPS++ source code directories.
gmake MYINCL=/home/bloggs/include MyClass.o
Likewise, the applications makefile provides a MYLIBS variable which allows for private libraries. If you wanted to compile an AIPS++ application and link it to class implementation files which you had modified but not checked in, you would need to build a private library by using the programmer-oriented mylib target in the implementation makefile. You could then link your application to this using the MYLIBS variable.
The AIPS++ makefiles and the standard target names are discussed at length in makefiles