| Version 1.9 Build 1556
|
|
Next: runtests
Up: System verification
Previous: assay
Subsections
Diagnostic makefile rules
Use of the AIPS++ makefiles for various diagnostic purposes.
makefile
makefile.{app,aps,chk,doc,ftn,imp,pkg,scr,tst}
The AIPS++ diagnostic targets are listed below by category. These lists
are not exhaustive, but do aim to cover everything of practical use. In
particular, they omit targets which are intended for the internal use of the
makefiles.
A target is labelled as ``recursive'' if it causes gmake (p) to be
invoked in all subdirectories. It is ``general'' if it applies to all
makefiles; such targets are defined in makedefs (p). A target is
``specific'' if defined in a specific makefile.
Some targets such as help have a general meaning, the specific
behaviour of which differs for specific makefiles. These are referred to as
``general/specific'' and where appropriate the details of a target's behaviour
are described for each of the generic makefiles, for the top-level makefile
(top), and the installation makefile (ins).
System diagnostic targets:
There are two classes of diagnostic target. The first class is
self-referential in that it deals with the AIPS++ system and contains rules
to report and/or verify makedefs variable definitions, report
variables defined by the specific makefiles, print help information, and
especially for debugging the makefiles. The rules to report and/or verify
makedefs variables are actually defined in testdefs (p).
- command : (general)
This could be described as a ``do-it-yourself'' rule (without
dependencies). It invokes a command or sequence of commands specified by
the COMMAND variable defined on the gmake command line.
This makes most sense if the command sequence uses makedefs
variables.
- printenv : (general)
Print out the environment as seen by the commands within makefile rules.
This is especially useful for diagnosing problems related to makefile
variables not being exported, unresolved recursively defined variables, and
variables which cannot be exported to the environment because they contain
non-alphanumeric characters.
- eval_vars : (general)
Print variables specified by VARS on the gmake command
line in a form suitable for eval'ing into the environment in
Bourne shell. This is used in particular by ax_master (p),
depend (p) and updatelib (p) for getting makedefs
variable definitions when invoked in stand-alone mode (when invoked via a
makefile rule the required variables are explicitly exported to
them). An example of its use would be
eval `gmake -f $AIPSARCH/makedefs VARS="AR ARFLAGS" eval_vars`
This would create environment variables AR and ARFLAGS and
give them the values of the makedefs variables of the same name.
- diagnostics : (general)
This target simply invokes the versions and test_global
targets. It is used by the code distribution system on cumulative updates
to produce a status report for consortium installations (see
sneeze (p)).
- versions : (general)
Print the installed version of certain utilities required by AIPS++,
the main one being gmake itself.
- show_all : (general)
This target invokes the show_global and show_local
targets to show the value of all makedefs variables and all
variables defined in the specific makefile.
- test_all : (general)
Similar to show_all except that it invokes test_global
instead of show_global. See testdefs (p).
- show_global : (general)
This target effectively invokes the show_sys, show_prg
and show_aux targets to show all makedefs variables.
- test_global : (general)
This target effectively invokes the test_sys, test_prg
and test_aux targets to show and verify all makedefs
variables. See testdefs (p).
- show_sys : (general)
Report the value of all system variables defined in makedefs.
- test_sys : (general)
Report and verify the value of all system variables defined in
makedefs. See testdefs (p).
- show_prg : (general)
Report the value of all variables defined in makedefs which are
of immediate interest to AIPS++ programmers. This is particularly useful
for reporting the compiler options set by the site-specific
makedefs in response to use of the OPT variable or
alternate programmer compilation flags.
- test_prg : (general)
Report and verify the value of all variables defined in makedefs
of immediate interest to AIPS++ programmers. See testdefs (p).
- show_aux : (general)
Report the value of all auxilliary variables defined in makedefs.
(Certain of these may have been redefined in the specific makefiles.)
- test_aux : (general)
Report and verify the value of all auxilliary variables defined in
makedefs. See testdefs (p).
- show_local : (specific)
Report the value of all variables defined within the specific makefile.
Typically these contain target and dependency lists.
- show_vars : (general)
Report the value of the makedefs variables specified by
VARS on the gmake command line. For example
cd $HOME/aips++/code/install
gmake VARS="AIPSSRCS" show_vars
This would show all AIPS++ system sources in the current directory.
- help : (general/specific)
Print an itemized summary of all general and specific targets categorized
as ``programmer'', ``system'', or ``diagnostic''. The general targets are
reported by makedefs, and the specific targets are appended by the
specific makefile.
Source code testsuite targets:
The second class of diagnostic targets contains rules to compile and execute
the test programs and verify their output.
- cleansys : (general/specific, recursive)
The cleansys rule for the tst makefile cleans up files
produced by the runtests rule. Refer to the description in section
§10.9.
- cleanfail : (specific)
Delete reports for failed tests, see runtests below.
- tst: Delete reports for failed tests in $(BINTESTD). The
deletion of these files will cause the runtests rule to
selectively redo those tests. The list of failed tests is determined
from $(BINTESTD)/runtests.report.
- %.report : (specific, pattern rule)
Compile and exercise a test program.
- tst: Compile a test program and invoke assay (p) to exercise
it. If necessary for the compilation, template instantiation files will
be created from a templates file and compiled into an object
library (which is retained). The executable and .report file,
which contains the output from assay, are deposited in
$(BINTESTD). The .report file for each test program is
used as a dependency file so the test will not be done if the
.report file exists and is newer than the source files and
libraries used to generate the test executable. The cleanfail
rule can be used to selectively delete reports for failed tests. A
one-line summary of the test result is reported by the rule which also
collates and maintains these in $(BINTESTD)/runtests.report.
The test executable will be deleted when gmake terminates (unless an
up-to-date executable already existed in $(BINTESTD) when the
rule was invoked).
- runtests : (general/specific)
The general rule does nothing. Specific makefiles behave as follows:
- app: (none)
- aps: (none)
- chk: (none)
- doc: (none)
- ftn: (none)
- imp: Recurse into every package subdirectory.
- ins: (none)
- pkg: Recurse into the implement subdirectory.
- scr: (none)
- top: Recurse into every package subdirectory then print a summary
of results.
- tst: Invoke the %.report pattern rule for every test
program in the directory. The intermediate object library containing
template instantiations (if any) is deleted when all tests have been
done.
- The rules to report and/or verify makedefs variables are actually
defined in testdefs (p).
After modifying any makedefs variable definitions,
gmake test_all
reports and verifies their values.
The GNU Make manual.
The GNU manual page for gmake.
AIPS++ variable names (§1.2).
gmake (p), GNU make.
makedefs (p), AIPS++ makefile definitions.
testdefs (p), rules for reporting and validating AIPS++ makefile
definitions.
Next: runtests
Up: System verification
Previous: assay
  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