PSRDADA Developer's Guide

Introduction

PSRDADA makes use of the GNU autotools to compile the source code and install the header files, scripts, libraries and binary executables. An introduction to GNU autoconf, automake, and libtool is available as The Goat Book. Developers with an interest in writing robust and portable code may also take interest in the GNU coding standards.

The phases required for installing PSRDADA are:

  1. Checkout
  2. Bootstrap
  3. Configure
  4. Compile
  5. Install


1. Check-out

Developers may check out the software from the GIT repository with:
git clone ssh://USER@git.code.sf.net/p/psrdada/code psrdada
where USER is a valid sourceforge user account login id. Upon successful checkout, a single directory, psrdada, will be created in the current working directory. The core library is located in the src directory, the applications in the apps and examples directories.

2. Bootstrap

Before configuring and compiling, developers must create the configure script and Makefile.in input files by running the GNU build tools. This procedure is performed by the bootstrap script, which must be run in the psrdada directory:
cd psrdada 
./bootstrap

3. Configure

After running bootstrap, the procedure for compiling is pretty much the same for both developers and external users, as described in the configure and make notes. The only difference is, instead of having a top-level directory named psrdada-x.y, developers will be dealing directly with the psrdada directory.

4. Compile

In the top-level build directory (psrdada in most simple cases), type make to compile and make install to copy all products to the install directory. A complete list of the standard make targets can be found in the Standard Targets for Users section of the GNU coding standards.

In addition to the standard make targets, the following targets have been defined in the main directories:

  • libs compile and install only the library defined in the main directory
  • include install only the header files defined in the main directory

5. Install

The installation directory is the directory to which all build products (header files, libraries, executables, and runtime data) will be installed when you type make install. The installation directory is set when you run the configure script, and is stored in the variable, prefix. When you type make install, build products are installed in
$prefix/include
$prefix/lib
$prefix/bin
$prefix/share
There are currently two ways in which the installation directory can be specified:

1. Default installation

The default installation directory is $PSRHOME/$LOGIN_ARCH. If the PSRHOME environment variable is not set, /usr/local will be used instead.

2. Arbitrary installation

As with any package that is configured and built using the GNU autotools, the install directory may be specified using the --prefix argument to the configure script.

Changing the installation directory

It is possible to install build products in a directory other than the installation directory that was set when the configure script was run. It is not necessary to make distclean, nor must the configure script be run again. Simply run
make install prefix=desired_install_path