ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/tex/manual/QuickHelpGuide.tex
Revision: 1.5
Committed: Tue Feb 27 16:16:01 2007 UTC (18 years, 2 months ago) by sashby
Content type: application/x-tex
Branch: MAIN
CVS Tags: V110p6, V110p5, V110p4, V110p3
Branch point for: v200branch
Changes since 1.4: +2 -4 lines
Log Message:
Doc updates

File Contents

# Content
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 %% Revision: $Id: QuickHelpGuide.tex,v 1.4 2007/02/27 11:59:41 sashby Exp $
8 %%
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 All commands provide online help too which can be accessed using
20
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 \item[\texttt{-link}]\mbox{}\\
161 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 \item[\texttt{-unlink}]\mbox{}\\
167 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 \item[\texttt{-show}]\mbox{}\\
173 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.xml}
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 \hspace{5mm}\scram~\texttt{setup}~[-i]~[\texttt{toolname}]~\{[\texttt{version}]~[\texttt{url}]\}~[-f \textit{tools.conf}]
254
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[\texttt{toolname}]\mbox{}\\
261 The name of the tool to be set up.
262 \item[\texttt{version}]\mbox{}\\
263 The version of the tool to set up.
264 \item[\texttt{url}]\mbox{}\\
265 URL of the tool document describing the tool being set up. Supported
266 URLs are \texttt{file:} and \texttt{http:}.\\
267 \item[\textbf{-i}]
268 Turn off the automatic search mechanism allowing for more
269 user interaction during setup.
270 \item[\textbf{-f}]
271 Allow the user to specify a tools file (the
272 filename \textit{must} end in ".conf"). This file contains values
273 to be used for settings of the tool.
274 \end{description}
275
276
277 \section{\scram\ tool}
278
279 \cmdintro:
280
281 \hspace{5mm}\scram~\texttt{tool}~\inbrackets{subcommand}
282
283 \ni Manage the tools in the current \scram\ project area.
284 Valid tool subcommands and arguments are:
285
286 \begin{description}
287 \item[\texttt{list}]\mbox{}\\
288 List of configured tools available in the current \scram\ area.
289 \item[\texttt{info}~\inbrackets{tool\_name}]\mbox{}\\
290 Print out information on the specified tool in the current area.
291 \item[\texttt{tag}~\inbrackets{tool\_name}~\inbrackets{tag\_name}]\mbox{}\\
292 Print out the value of a variable (tag) for the specified tool in the
293 current area configuration. If no tag name is given, then all known tag
294 names are printed to \texttt{stdout}.
295 \item[\texttt{remove}~\inbrackets{tool\_name}]\mbox{}\\
296 Remove the specified tool from the current project area.
297 \item[\texttt{template}~\inbrackets{TYPE}]\mbox{}\\
298 Create a template tool description file of type \inbrackets{TYPE},
299 where \inbrackets{TYPE} can be either "compiler" or "basic" depending on whether the
300 template is for a compiler or for a basic tool. The template will be
301 created in the current directory.
302 \end{description}
303
304 %\section{\scram\ gui}
305 %
306 % scram gui -edit [class]
307 % scram gui -show [meta type]
308 %
309 %Allow user interaction with the build Metadata.
310
311 \section{\scram\ build}
312
313 \cmdintro:
314
315 \hspace{5mm}\scram~\texttt{[--debug]}~\texttt{build}~\texttt{[options]}~\texttt{[makeopts]}~\texttt{TARGET}
316
317 \ni Run compilation in the current project area.
318
319 \textbf{--debug} can be used to turn on full \scram\ debug output.
320
321 The following long options are supported (short options can also be used):
322 \begin{description}
323 \item[\texttt{--help}]\mbox{}\\
324 Show this help message.
325 \item[\texttt{--verbose}]\mbox{}\\
326 Verbose mode. Show cache scan progress and compilation commands
327 (this will automatically set \texttt{SCRAM\_BUILDVERBOSE} to \texttt{true})
328 \item[\texttt{--testrun}]\mbox{}\\
329 Do everything except run \texttt{gmake}.
330 \item[\texttt{--reset}]\mbox{}\\
331 Reset the project caches and rescan then rebuild.
332 \item[\texttt{--fast}]\mbox{}\\
333 Skip checking the cache and go straight to building.
334 \item[\texttt{--writegraphs=$<$g,p$>$}]\mbox{}\\
335 Enable creation of dependency graphs. Set this to 'global' (g) if you
336 want to create project-wide dependency graphs or 'package' (p) for
337 package-level graphs. The graphs will be stored in the project working
338 directory. If you set the environment variable \texttt{SCRAM\_WRITEGRAPHS=X}
339 (where \texttt{X} is PS/JPEG/GIF), \scram\ will automatically create the graphs in format \texttt{X}.
340
341 Note that you must have AT\&T's \texttt{dot} program installed and in
342 your path to be able to use this feature.
343
344 \end{description}
345
346 \example{Example}\mbox{}
347 To refresh the current area cache, produce global dependency graphs but not run \texttt{gmake}
348
349 \hspace{5mm}\scram~\texttt{build}~\texttt{-r}~\texttt{-w=g}~\texttt{-t}
350
351 \ni Make option flags can be passed to gmake at build-time: the supported options are
352 \begin{description}
353 \item[\textbf{-n}]\mbox{}\\
354 Print the commands that would be executed but do not run them.
355 \item[\texttt{--printdir}]\mbox{}\\
356 Print the working directory before and after entering it.
357 \item[\texttt{--printdb}]\mbox{}\\
358 Print the data base of rules after scanning makefiles, then build as normal.
359 \item[\textbf{-j $<$n$>$}]\mbox{}\\
360 The number of processes to run simultaneously.
361 \item[\textbf{-k}]\mbox{}\\
362 Continue for as long as possible after an error.
363 \item[\textbf{-s}]\mbox{}\\
364 Do not print any output.
365 \item[\textbf{-d}]\mbox{}\\
366 Run \texttt{gmake} in debug mode.
367 \end{description}
368
369 \section{\scram\ install}
370 \index{\texttt{scram}!\texttt{install}}
371
372 \cmdintro:
373
374 \hspace{5mm}\scram~\texttt{install}~[-f]~[\inbrackets{project\_tag}~[\inbrackets{version\_tag}]]
375
376 \ni Associates a label with the a project release listed in the \scram\ database.
377 This allows other users to refer to a centrally installed project by
378 this label rather than a remote URL reference.
379
380 \begin{description}
381 \item[\textbf{-f}]
382 Force an installation of a project, overwriting any entries
383 with the same project name and version (useful in batch processing).
384 \item[\inbrackets{project\_tag}]\mbox{}\\
385 Override default label (the project
386 name of the current release)
387 \item[\inbrackets{version\_tag}]\mbox{}\\
388 Version tag of the current release. If version is not specified the base release version will be taken by default.
389 \end{description}
390
391 \section{\scram\ remove}
392 \index{\texttt{scram}!\texttt{remove}}
393
394 \cmdintro:
395
396 \hspace{5mm}\texttt{scram}~\texttt{remove}~[\texttt{-f}]~[\inbrackets{projectname}] [\inbrackets{projectversion}]
397
398 \ni Remove a project entry from the \scram\ project database file ("project.lookup").
399 \begin{description}
400 \item[\textbf{-f}]
401 Force removal of a project, not prompting the user for confirmation (useful in batch processing).
402 \end{description}
403
404
405 %%% Local Variables:
406 %%% mode: latex
407 %%% TeX-master: "SCRAM-man"
408 %%% End:
409
410 %%____________________________________________________________________
411 %% End of QuickHelpGuide.tex
412 %%____________________________________________________________________
413 %%