ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/tex/manual/QuickHelpGuide.tex
Revision: 1.3.2.1
Committed: Thu Nov 2 15:01:02 2006 UTC (18 years, 6 months ago) by sashby
Content type: application/x-tex
Branch: v103_with_xml
CVS Tags: forV1_1_0, v103_xml_071106, V110p2, V110p1
Changes since 1.3: +2 -20 lines
Log Message:
update manual for V1_1_0 XML

File Contents

# User Rev Content
1 sashby 1.1 %%____________________________________________________________________
2     %% File: QuickHelpGuide.tex
3     %%____________________________________________________________________
4     %%
5     %% Author: Shaun ASHBY <Shaun.Ashby@cern.ch>
6     %% Update: 2005-11-02 17:10:20+0100
7 sashby 1.3.2.1 %% Revision: $Id: QuickHelpGuide.tex,v 1.3 2006/09/11 13:37:36 sashby Exp $
8 sashby 1.1 %%
9     %% Copyright: 2005 (C) Shaun ASHBY
10     %%
11     %%--------------------------------------------------------------------
12     \newcommand{\cmdintro}{Command overview}
13     %%
14     \chapter{Quick Help Guide for Developers}
15     \label{ch:quickhelpguide}\index{help pages for developers}\index{\texttt{scram}}
16     This chapter is intended to be a quick help guide for developers
17     already familiar with working in a \scram\ project environment. Each
18     of the recognised \scram\ commands is described here.
19 sashby 1.3.2.1 All commands provide online help too which can be accessed using
20 sashby 1.1
21     \hspace{5mm}\scram~\inbrackets{command}~\texttt{--help}
22    
23     or
24    
25     \hspace{5mm}\scram~\inbrackets{command}~\texttt{-h}
26    
27     \ni For administrators setting up a project area for the first time,
28     refer to Chapter~\ref{ch:creatingprojects}.
29    
30     \section{\scram\ version}
31     \index{\texttt{scram}!\texttt{version}}
32    
33     \cmdintro:
34    
35     \hspace{5mm}\scram~\texttt{version}~[\texttt{-c}]~[\texttt{-i}]~[\textit{version}]
36    
37     \ni With no \textit{version} argument given, this command will simply show
38     the current \scram\ version number. If a version argument is supplied,
39     that version will be downloaded and installed, if not already locally available.
40    
41     \begin{description}
42     \item[\textbf{-i}]
43     Show \scram\ CVS commit info (the value of the CVS \texttt{Id} variable)
44     \item[\textbf{-c}]
45     Print site CVS parameters to \texttt{stdout}. These parameters are used
46     when downloading and installing new \scram\ versions at a site.
47     \end{description}
48    
49    
50     \section{\scram\ arch}
51     \index{\texttt{scram}!\texttt{arch}}
52    
53     \cmdintro:
54    
55     \hspace{5mm}\scram~\texttt{arch}
56    
57     \hspace{5mm}\scram~\texttt{-arch}~\inbrackets{architecture}
58    
59     \ni Print out the architecture flag for the current machine or
60     set the architecture to that specified.
61    
62     \section{\scram\ runtime}
63     \index{\texttt{scram}!\texttt{runtime}}
64    
65     \cmdintro:
66    
67     \hspace{5mm}\scram~\texttt{runtime} [-csh,-sh \textit{or} -win]
68    
69     \hspace{5mm}\scram~\texttt{runtime} [-csh,-sh \textit{or} -win]~\texttt{-file}~\textit{filename}
70    
71     \hspace{5mm}\scram~\texttt{runtime} [-csh,-sh \textit{or} -win]~\texttt{-file}~\textit{filename}~\texttt{-info}~\inbrackets{variable}
72    
73     \hspace{5mm}\scram~\texttt{runtime} [-csh,-sh \textit{or} -win]~\texttt{-dump}~\textit{filename}
74    
75     \ni Print the runtime environment for the current development area
76     in \texttt{csh}, \texttt{sh} or Windows flavours.
77    
78     \example{Examples}\mbox{}
79    
80     \ni Set up to include the project runtime settings
81     in the current \texttt{tcsh} shell environment:
82    
83     \hspace{5mm}\texttt{eval}~`\scram~\texttt{runtime}~\texttt{-csh}`
84    
85     \ni Set up to include the project runtime settings
86     in a \texttt{bash} or Bourne shell environment:
87    
88     \hspace{5mm}\texttt{eval}~`\scram~\texttt{runtime}~\texttt{-csh}`
89    
90     \ni To dump this environment to a file which can be sourced later, use
91    
92     \hspace{5mm}\scram~\texttt{runtime}~\texttt{-sh}~\texttt{-dump}~\textit{env.sh}
93    
94     \ni Note that from \scram\ \thisrelease\ it is no longer necessary to
95     set the runtime environment before using the \scram~\texttt{build}
96     command as this is now handled automatically. Of course, it is still
97     required before running any executable in a developer area.
98    
99     \section{\scram\ config}
100    
101     \cmdintro:
102    
103     \hspace{5mm}\scram~\texttt{config}~[\texttt{-t}]~[\texttt{-f}]
104    
105     \ni Dump configuration information for the current project area.
106    
107     \begin{description}
108     \item[\textbf{-t}]
109     Dump a list of configured tools, rather like "\texttt{scram tool info}", but
110     in a format parseable by external scripts. This could be used to
111     create RPMs or \texttt{tar} files of external products required by a project.
112    
113     \ni The format of each line of output is:
114    
115     \hspace{5mm} \textsf{name} : \textsf{version} : \textsf{project} : $<$\textsf{base\_path}$>$ : \textit{dependencies}
116    
117     \ni where the \textsf{project} entry is 0 or 1 depending on whether the
118     tool refers to a \scram\ project, $<$\textsf{base\_path}$>$ is the top
119     directory where the tool is installed (it can have the value
120     \texttt{SYSTEM} if located in system directories, \eg /lib) and
121     \textit{dependencies} lists the dependencies that the tool has on
122     other external tools. This will be set to \texttt{NONE} if there are
123     no external dependencies.\\
124    
125     \item[\textbf{-f}]
126     List the tool info and project information.
127     \end{description}
128    
129     \section{\scram\ list}
130     \index{\texttt{scram}!\texttt{list}}
131    
132     \cmdintro:
133    
134     \hspace{5mm}\scram~\texttt{list}~[\texttt{-c}]~[\texttt{-o}]~\inbrackets{projectname}
135    
136     \ni List the available projects and versions installed in the
137     local \scram\ database (see the help for the \texttt{scram install} command).
138    
139     \begin{description}
140     \item[\textbf{-c}]
141     List the available projects and versions installed in the local
142     \scram\ database without fancy formatting or header strings. The
143     project name, version and installation directory are printed on \texttt{stdout}, separated
144     by spaces for use in scripts.
145     \item[\textbf{-o}]
146     Show all projects from all versions (\ie pre-\scramvx)
147     of \scram\ (by default, only projects built and installed with
148     \scramvx\ will be listed). This emulates the old style of output.
149     \end{description}
150    
151     \section{\scram\ db}
152    
153     \cmdintro:
154    
155     \hspace{5mm}\scram~\texttt{db}~\inbrackets{subcommand}
156    
157     \ni The \scram\ database administration command. Supported subcommands are:
158    
159     \begin{description}
160 sashby 1.2 \item[\texttt{-link}]\mbox{}\\
161 sashby 1.1 Make available an additional database for project and
162     list operations, \eg
163    
164     \hspace{15mm}\scram~\texttt{db}~\texttt{-link}~\texttt{/some/path/project.lookup}
165    
166 sashby 1.2 \item[\texttt{-unlink}]\mbox{}\\
167 sashby 1.1 Remove a database from the link list. Note this does
168     not remove the database, just the link.
169    
170     \hspace{15mm}\scram~\texttt{db}~\texttt{-unlink}~\texttt{/some/path/project.lookup}
171    
172 sashby 1.2 \item[\texttt{-show}]\mbox{}\\
173 sashby 1.1 List the databases that are linked in.
174     \end{description}
175    
176    
177    
178     \section{\scram\ urlget}
179    
180     \cmdintro:
181    
182     \hspace{5mm}\scram~\texttt{urlget}~\inbrackets{url}
183    
184     \ni Retrieve document \texttt{URL} information. For example, show location in the cache
185     of a local copy of a tool description document or a requirements file
186     which has already been downloaded.
187    
188     \section{\scram\ project}
189    
190     \cmdintro:
191    
192     \hspace{5mm}\scram~\texttt{project} [-t] [-d area ] [-n dir ] [-f tools.conf] projecturl [projectversion]
193    
194     \hspace{5mm}\scram~\texttt{project}~\texttt{-update}~\texttt{projectversion}
195    
196     \ni Set up a new project development area or update an existing one. A new area will appear in the
197     current working directory by default.
198    
199     \ni Supported options are
200     \begin{description}
201     \item[\inbrackets{projecturl}]\mbox{}\\
202     The URL of a \scram\ boot file.
203     \item[\inbrackets{projectversion}]\mbox{}\\
204     Only for use with a database label.
205     \item[\textbf{-d}~\inbrackets{area}]\mbox{}\\
206     Indicate a project installation area into which the new
207     project area should appear. Default is the current working
208     directory.
209     \item[\textbf{-n}~\inbrackets{dir}]\mbox{}\\
210     Specify the name of the \scram\ development area you wish to
211     create.
212     \end{description}
213    
214     \ni Currently supported \texttt{URL} types are:
215     \begin{description}
216     \item[\textbf{database label}]\mbox{}\\
217     Labels can be assigned to installed releases of projects for easy
218     access (See "scram install" command). If you specify a label you must also specify
219     a project version. This command is normally used to create cloned developer areas.
220     \item[\textbf{-b}~\inbrackets{file}]\mbox{}\\
221     A boot file on an accessible file system. This command would
222     be used to create a project area from scratch on a laptop.
223     \end{description}
224    
225     \example{Examples}\mbox{}
226    
227     \hspace{5mm}\scram~\texttt{project}~\texttt{XX}~\texttt{XX\_8\_0}
228    
229     \hspace{5mm}\scram~\texttt{project}~\texttt{-b}~\texttt{~/myprojects/projecta/config/boot}
230    
231     \ni Use the \textbf{-f} flag followed by a valid filename (which \textit{must} end in ".conf") to
232     allow auto setup to proceed without reading files from a repository (standalone mode).
233    
234     \ni Some project template files can be obtained using the command:
235    
236     \hspace{5mm}\scram~\texttt{project}~\texttt{-template}
237    
238     \ni The templates will be copied to a directory called \texttt{config} in the current directory.
239    
240     \ni An existing developer area for a project can be updated to a more recent version of
241     the \textit{same} project by running
242    
243     \hspace{5mm}\scram~\texttt{project}~\texttt{-update}~\inbrackets{VERSION}
244    
245     \ni in the developer area. If no \texttt{VERSION} is given, the command is
246     considered as a query and will return a list of project versions which
247     are compatible with the configuration of the current area.
248     A subsequent invocation of the command with a valid \texttt{VERSION} will then update the area
249     to that version.
250    
251     \section{\scram\ setup}
252    
253 sashby 1.3 \hspace{5mm}\scram~\texttt{setup}~[-i]~[\texttt{toolname}]~\{[\texttt{version}]~[\texttt{url}]\}~[-f \textit{tools.conf}]
254 sashby 1.1
255     \ni Allows installation/re-installation of a new tool/external package into an
256     already existing development area. If no toolname is specified,
257     the complete installation process is initiated.
258    
259     \begin{description}
260     \item[\inbrackets{projecturl}]\mbox{}\\
261     The URL of a \scram\ bootstrap file.
262     \item[\texttt{toolname}]\mbox{}\\
263     The name of the tool to be set up.
264     \item[\texttt{version}]\mbox{}\\
265     The version of the tool to set up.
266     \item[\texttt{url}]\mbox{}\\
267     URL of the tool document describing the tool being set up. Supported
268     URLs are \texttt{file:} and \texttt{http:}.\\
269     \item[\textbf{-i}]
270     Turn off the automatic search mechanism allowing for more
271     user interaction during setup.
272     \item[\textbf{-f}]
273     Allow the user to specify a tools file (the
274     filename \textit{must} end in ".conf"). This file contains values
275     to be used for settings of the tool.
276     \end{description}
277    
278    
279     \section{\scram\ tool}
280    
281     \cmdintro:
282    
283     \hspace{5mm}\scram~\texttt{tool}~\inbrackets{subcommand}
284    
285     \ni Manage the tools in the current \scram\ project area.
286     Valid tool subcommands and arguments are:
287    
288     \begin{description}
289     \item[\texttt{list}]\mbox{}\\
290     List of configured tools available in the current \scram\ area.
291     \item[\texttt{info}~\inbrackets{tool\_name}]\mbox{}\\
292     Print out information on the specified tool in the current area.
293     \item[\texttt{tag}~\inbrackets{tool\_name}~\inbrackets{tag\_name}]\mbox{}\\
294     Print out the value of a variable (tag) for the specified tool in the
295     current area configuration. If no tag name is given, then all known tag
296     names are printed to \texttt{stdout}.
297     \item[\texttt{remove}~\inbrackets{tool\_name}]\mbox{}\\
298     Remove the specified tool from the current project area.
299     \item[\texttt{template}~\inbrackets{TYPE}]\mbox{}\\
300     Create a template tool description file of type \inbrackets{TYPE},
301     where \inbrackets{TYPE} can be either "compiler" or "basic" depending on whether the
302     template is for a compiler or for a basic tool. The template will be
303     created in the current directory.
304     \end{description}
305    
306     %\section{\scram\ gui}
307     %
308     % scram gui -edit [class]
309     % scram gui -show [meta type]
310     %
311     %Allow user interaction with the build Metadata.
312    
313 sashby 1.2 \section{\scram\ build}
314    
315     \cmdintro:
316    
317     \hspace{5mm}\scram~\texttt{[--debug]}~\texttt{build}~\texttt{[options]}~\texttt{[makeopts]}~\texttt{TARGET}
318    
319     \ni Run compilation in the current project area.
320    
321     \textbf{--debug} can be used to turn on full \scram\ debug output.
322    
323     The following long options are supported (short options can also be used):
324     \begin{description}
325     \item[\texttt{--help}]\mbox{}\\
326     Show this help message.
327     \item[\texttt{--verbose}]\mbox{}\\
328     Verbose mode. Show cache scan progress and compilation commands
329     (this will automatically set \texttt{SCRAM\_BUILDVERBOSE} to \texttt{true})
330     \item[\texttt{--testrun}]\mbox{}\\
331     Do everything except run \texttt{gmake}.
332     \item[\texttt{--reset}]\mbox{}\\
333     Reset the project caches and rescan then rebuild.
334     \item[\texttt{--fast}]\mbox{}\\
335     Skip checking the cache and go straight to building.
336     \item[\texttt{--writegraphs=$<$g,p$>$}]\mbox{}\\
337     Enable creation of dependency graphs. Set this to 'global' (g) if you
338     want to create project-wide dependency graphs or 'package' (p) for
339     package-level graphs. The graphs will be stored in the project working
340     directory. If you set the environment variable \texttt{SCRAM\_WRITEGRAPHS=X}
341     (where \texttt{X} is PS/JPEG/GIF), \scram\ will automatically create the graphs in format \texttt{X}.
342    
343     Note that you must have AT\&T's \texttt{dot} program installed and in
344     your path to be able to use this feature.
345    
346     \end{description}
347    
348     \example{Example}\mbox{}
349     To refresh the current area cache, produce global dependency graphs but not run \texttt{gmake}
350    
351     \hspace{5mm}\scram~\texttt{build}~\texttt{-r}~\texttt{-w=g}~\texttt{-t}
352    
353     \ni Make option flags can be passed to gmake at build-time: the supported options are
354     \begin{description}
355     \item[\textbf{-n}]\mbox{}\\
356     Print the commands that would be executed but do not run them.
357     \item[\texttt{--printdir}]\mbox{}\\
358     Print the working directory before and after entering it.
359     \item[\texttt{--printdb}]\mbox{}\\
360     Print the data base of rules after scanning makefiles, then build as normal.
361     \item[\textbf{-j $<$n$>$}]\mbox{}\\
362     The number of processes to run simultaneously.
363     \item[\textbf{-k}]\mbox{}\\
364     Continue for as long as possible after an error.
365     \item[\textbf{-s}]\mbox{}\\
366     Do not print any output.
367     \item[\textbf{-d}]\mbox{}\\
368     Run \texttt{gmake} in debug mode.
369     \end{description}
370    
371 sashby 1.1 \section{\scram\ install}
372     \index{\texttt{scram}!\texttt{install}}
373    
374     \cmdintro:
375    
376     \hspace{5mm}\scram~\texttt{install}~[-f]~[\inbrackets{project\_tag}~[\inbrackets{version\_tag}]]
377    
378     \ni Associates a label with the a project release listed in the \scram\ database.
379     This allows other users to refer to a centrally installed project by
380     this label rather than a remote URL reference.
381    
382     \begin{description}
383     \item[\textbf{-f}]
384     Force an installation of a project, overwriting any entries
385     with the same project name and version (useful in batch processing).
386     \item[\inbrackets{project\_tag}]\mbox{}\\
387     Override default label (the project
388     name of the current release)
389     \item[\inbrackets{version\_tag}]\mbox{}\\
390     Version tag of the current release. If version is not specified the base release version will be taken by default.
391     \end{description}
392    
393     \section{\scram\ remove}
394     \index{\texttt{scram}!\texttt{remove}}
395    
396     \cmdintro:
397    
398     \hspace{5mm}\texttt{scram}~\texttt{remove}~[\texttt{-f}]~[\inbrackets{projectname}] [\inbrackets{projectversion}]
399    
400     \ni Remove a project entry from the \scram\ project database file ("project.lookup").
401     \begin{description}
402     \item[\textbf{-f}]
403     Force removal of a project, not prompting the user for confirmation (useful in batch processing).
404     \end{description}
405    
406    
407     %%% Local Variables:
408     %%% mode: latex
409     %%% TeX-master: "SCRAM-man"
410     %%% End:
411    
412     %%____________________________________________________________________
413     %% End of QuickHelpGuide.tex
414     %%____________________________________________________________________
415     %%