User-defined commands can be added to SPECX by making use of the subroutines EXTRNL1 to EXTRNL10. There is currently little support for this and the user is left to hack her way around the SPECX directory tree.

It is relatively easy to modify the distributed source code. This is mainly an option for a local but site-wide version with EXTRNLn routines. Assuming that you are a Starlink site manager you would proceed as follows

% cd /star/sources/specx                       # 1
% setenv INSTALL /star
% ./mk deinstall

% cd /star                                     # 2
% mv specx /star/specx /star/local/specx

% cd /star/local/specx/external                # 3
{Make your modifications in this directory}

% cd /star/local/specx                         # 4
% setenv INSTALL /star/local
% ./mk build
% ./mk clean
% ./mk install

% cd /star/local/etc                           # 5
{Modify files login and cshrc to reflect that SPECX is in /star/local}
• De-install the existing package from /star/bin/specx and /star/help/specx. After this step the existing package will still be in its built form in /star/specx.
• Move (or copy with cp -pr) the built system to the local Starlink tree. You can use any directory.
• Generate your own version of the “external” library. You have to carefully inspect the makefile and amend it. Also check makefiles in sister directories like ../fitting to see how include files are handled.
• Re-build and install SPECX. Installation goes into /star/local/bin/specx and /star/local/help/specx. You can use something else instead of /star/local.
• Amend the Starlink login files to reflect the different place for the SPECX installation.

In order to re-build SPECX you need a number of Starlink libraries and include files in their usual place. Non-Starlink sites may or may not have been issued with these libraries. As indicators, you can check whether you have /star/lib/libhds*, /star/include/dat_par and /star/figaro/lib/libfit.a.