Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: buildchangelog Up: Code management Previous: avers

Subsections



ax

AIPS++ deletion utility.

Synopsis

ax [ -src | -sys | -top ] target1 [target2 ...] [...]

Description

ax is used to delete AIPS++ files and directories. It does not delete them itself but instead appends deletion commands to the action list contained within ax_master (see below). It then invokes ax_master on the master AIPS++ RCS repository which must be available (see §1.1.4). The deletions will be applied to the slave RCS repositories and system by inhale (p[*]) and sneeze (p[*]) respectively. This mechanism allows AIPS++ slave sites to follow changes made to the master. General users can delete directories at or below the third level below $AIPSCODE (see §1.1.1). In particular, this includes module and application subdirectories. Deletion of higher-level directories is only allowed for members of the aips2mgr group.

ax_master does not actually delete anything from the AIPS++ master RCS repositories but instead ``rescinds'' them by renaming them so as to hide them from the code distribution system, see exhale (p[*]). Rescinded files and directories are given names of the form .MM.NNN.filename, where MM.NNN is the AIPS++ version number at the time the file is rescinded (see avers (p[*])).

Options

-src
Delete a pair of files from the AIPS++ RCS repository and code subtree. The target must be specified as a pathname relative to $AIPSCODE (and therefore $AIPSLAVE and $AIPSMSTR, and need not have an RCS ,v suffix. For example,

   ax -src aips/apps/App1/App1.cc

would cause the following files to be deleted

   $AIPSMSTR/aips/apps/App1/App1.cc,v
   $AIPSLAVE/aips/apps/App1/App1.cc,v
   $AIPSCODE/aips/apps/App1/App1.cc

the first is rescinded when ax_master is invoked by ax itself, and the other two are deleted when ax_master is invoked by inhale (p[*]). Note, however, that any executables associated with an application will not be deleted. These may be deleted explicitly by using the -sys option (see below).

If the target specified is a class implementation file, the object module will be deleted from the relevant library when ax_master is invoked by sneeze (p[*]). For example,

   ax -src aips/implement/Class.cc

would result in the following deletions

   $AIPSMSTR/aips/implement/Class.cc,v
   $AIPSLAVE/aips/implement/Class.cc,v
   $AIPSCODE/aips/implement/Class.cc
   $AIPSARCH/lib/libaips.a(Class.o)
   $AIPSARCH/libdbg/libaips.a(Class.o)

If necessary, ax_master will also ranlib the object libraries and rebuild any sharable objects.

Directories specified as targets will be rescinded from the master and recursively deleted from the slave and code areas.

-sys
Delete a file from the AIPS++ system area. The target must be specified as a pathname relative to $AIPSARCH - the master, slave, and code areas are not affected. For example,

   ax -sys bin/Application bindbg/Application

would mark

   $AIPSARCH/bin/Application

and

   $AIPSARCH/bindbg/Application

for deletion by ax_master when invoked by sneeze (p[*]).

Targets specified in the form x(y) denote library modules. For example,

   ax -sys lib/libaips.a(Class.o)

would mark Class.o for deletion from

   $AIPSARCH/lib/libaips.a

and

   $AIPSARCH/libdbg/libaips.a

by ax_master when invoked by sneeze (p[*]). If necessary, ax_master would then ranlib the object libraries and rebuild any sharable objects.

A directory may be specified as the target, in which case it will be recursively deleted.

-top
Delete a file beneath $AIPSROOT. The target must be specified as a pathname relative to $AIPSROOT. This is a catch-all target and should only be used when the -src and -sys options are inappropriate.

If the target refers to a file in the master repository then it will be rescinded when ax_master is invoked by ax. If it refers to a file in the slave or code areas then it will be deleted when ax_master is invoked by inhale (p[*]). If it refers to a file in the system area then it will be deleted when ax_master is invoked by sneeze (p[*]) running on a machine of the corresponding architecture.

For example,

   ax -top docs/reference/Example.ps

would mark

   $AIPSROOT/docs/reference/Example.ps

for deletion by ax_master when invoked by inhale (p[*]). Note the following:

   ax -top master/aips/apps/App1/App1.cc,v
   ax -top slave/aips/apps/App1/App1.cc,v
   ax -top rcs/aips/apps/App1/App1.cc,v

The first rescinds the master RCS version file, the second deletes the slave RCS version file, and by convention the third does both. Note that the RCS ,v suffix does need to be specified here.

A directory may be specified as the target, in which case it will be rescinded from the master and recursively deleted from the slave and code areas.

Resources

Notes

Diagnostics

Status return values
0: success
1: initialization error
2: failed to get ax_master
3: argument error

Examples

To recursively delete module subdirectory trial/implement/Junk use

   ax -src trial/implement/Junk
Where several files are to be deleted, it may be convenient in csh and some other shells which allow it to use a command of the form

   cd /aips++/code
   ax -src aips/implement/\{Foo,Man,Chu}.*

Assuming the files existed, the shell would expand the argument to

   aips/implement/Foo.cc aips/implement/Foo.h \
   aips/implement/Man.cc aips/implement/Man.h \
   aips/implement/Chu.cc aips/implement/Chu.h \

Note that the 'cd /aips++/code' provided the context for the shell's wildcarding mechanism.

Refer also to the examples provided in the ``Options'' section above.

Bugs

See also

AIPS++ variable names (§1.2).
getrc (p[*]), query AIPS++ resource database.
exhale (p[*]), AIPS++ code export utility.
inhale (p[*]), AIPS++ code import utility.
ai (p[*]), AIPS++ code checkin utility.
amv (p[*]), AIPS++ code rename utility.
ao (p[*]), AIPS++ code checkout utility.
au (p[*]), AIPS++ code update utility.
avers (p[*]), AIPS++ version report utility.

Author

Original: 1992/05/14 by Mark Calabretta, ATNF.


next up previous contents index
Next: buildchangelog Up: Code management Previous: avers   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15