Appgen is a Makefile generator for use with the Anderson Group Data Acquisition System. It reads in a specification file and produces a Makefile with standard targets appropriate to the architecture. For an overview of the programs that are required to support an instrument, please review the Data Acquisition Architecture Overview.
Appgen was first developed for QNX4 in June of 1993. The version described in this document is for use with the QNX6 version of the data acquisition architecture. The appgen program itself is written in Korn Shell script, so it is easily portable to other operating systems.
appgen [spec file]
appgen
generates a makefile based on the
spec_file
input. If spec file
is not specified, appgen will look for a file of the form
*.spec in the current directory. If there is a unique one, it
will be used. appgen
automatically overwrites
the Makefile, so care should be taken that it is not invoked
in the wrong directory.
The spec_file
has two main sections. The first
section is where the core components of the data acquisition
system are specified. The second (optional) section, delineated
by a line containing the string '%%', consists of additional
text to be appended to the end of the generated Makefile. This
makes it possible to extend the capabilities of appgen
.
The main section of the spec_file
has a syntax
similar to that of a Makefile. Input can include comments,
variable definitions and dependency definitions. Unlike in a
Makefile, you do not define build commands, since defining
those is appgen
's job.
A variable definition consists of:
<name> = <value>
Spaces around the '=' are required. The same variable can be defined multiple times with each new definition simply appending to the current value.
Important variables include:
$(TGTNODE)
to allow interactive
addressing of multiple nodes. For example:TGTDIR = $(TGTNODE)/home/Exp
TGTDIR
to target a destination on a specific node. For example:make distribution TGTNODE=/net/Exp
.tmc
source files that define telemetry
frame variables. That includes any .tmc
file containing
a variable definition with an explicit rate definition. Since multiple
programs access the telemetry frame, it is important that they are all
using the same definition..tmc
or other source files required by the data collection
process. These usually involve code to initialize interfaces that receive
data from device drivers.$(TGTDIR)/bin/$(VERSION)
.
$(TGTDIR)/bin/$(VERSION)
.
All recognized targets get added to DISTRIB
automatically, but
additional targets can be added as well. For example, device drivers built in
another directory are often referenced in this way.$(TGTDIR)/bin/$(VERSION)/Base
.
The files in tmcbase
and qclibase
as well as source
files of type .tma
,
.tbl
and
.sol
are included by default. Also, the .m
files generated from
qclibase
.$(TGTDIR)
. This
includes any scripts which users are expected to execute interactively.
This slways includes VERSION
, Experiment.config
and any generated doit
scripts.Dependencies take the form:
<target> : <sources>
<target> is the name of the output file and must have one of the suffixes listed below.
Sources listed in one of the base
variables do not need to be listed explicitly in a dependency line.
Sources may also include library dependencies, e.g. -lsubbus
.
Collection ($(prefix)col
), command server ($(prefix)srvr
)
and keyboard client ($(prefix)clt
) programs may not require an
explicit dependency line in simple cases. These programs may be fully specified by
the base
variables.
$(prefix)col
$(prefix)srvr
$(prefix)clt
*disp
*algo
*doit
*sft
*ext
# comment line prefix = <prefix> (optional: derived from spec file name) tmcbase = <files> cmdbase = <files> colbase = <files> swsbase = <files> qclibase = <files> var = substitution (supported vars are SRC TOOL OBJ TGT (targets to build. copied to $TGTDIR/bin/$VERSION) SCRIPT (source to be copied to $TGTDIR/bin/$VERSION) DISTRIB (other files to be copied to $TGTDIR/bin/$VERSION) SRCDIST (source to be copied to $TGTDIR/bin/$VERSION/Base) IDISTRIB (to be copied to $TGTDIR) TGTNODE TGTDIR target : <files> ... %% <additional Makefile contents> The following target types are supported: *algo TMCBASE dc usage *col TMCBASE dg usage T1 etc. *ext TMCBASE dc usage *disp TMCBASE dc usage *clt CMDBASE nl_cons, client usage *srvr CMDBASE T1 *.sft *doit The following source types are supported: *.cdf *.edf *.tbl *.tma *.cyc *.tmc *.tmg *.cmd *.c *.slp (soldrv proxy) ==> .sol and something else *.oui *.doit *.DR
Return to Manuals Guide
last updated: Mon Feb 27 13:00 2017 EST | webmaster@huarp.harvard.edu |
Copyright 2017 by the President and Fellows of Harvard College |