%N mirprogd %F $MIR/src/scripts/mirprogd.clone
%D Debugging script for miriad subroutines
%P mjs
%: programmer tool
%B
Debugging script for miriad fortran programs.  Compile and link
programs using miriad's default libraries, taking any local
relocatables (subroutine dot-o files) in preference to the
installed miriad subroutines.  -DMIRDEBUG is defined (so
compilation is with the -g option and rattyoutput is retained).
Users may define -DTESTBED prior to invocation.

Users are expected to put source code in a private directory and
work from that directory; input source code is expected to be in
the current working directory, and all output will be placed
there.

  Usage:  mirprogd  [-O] <prog-name>

If the -O flag is given, the compile is optimized (making the
code generally unuseful for stepping through a program/subroutine
with dbx); omitting this flag produces unoptimized code.

Filename extensions (.for, .f) are required.

Sample session:

  mkdir mydir
  cd mydir
  cp $MIR/borrow/pgplot/src/pgbeg.f .
  cp $MIR/borrow/pgplot/src/pgplot.inc .
  mirsubsd pgbeg.f
  cp $MIRSUBS/wrap.f2c $MIRSUBS/key.for .
  mirsubsd wrap.f2c
  mirsubsd key.for
  cp $MIRSUBS/key.h .
  mirsubsd key.for
  mirsubsd key.f
  mirsubsd wrap.c
  cp $MIRPROG/analysis/implot.for .
  mirprogd implot.for
  mirprogd implot.f
