Skip to content

Commit 8b34054

Browse files
committed
use system cp to reduce io operations; doc updated
1 parent 3059603 commit 8b34054

File tree

8 files changed

+114
-296
lines changed

8 files changed

+114
-296
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2014-11-25 Shahzad Muzaffar <[email protected]>
2+
3+
* Use system cp for copying directories to avoid couple of extra stats
4+
on the file system.
5+
* Do not copy un-necessary stuff from release in to dev area.
6+
* Document/man pages updated for scram control flags.
7+
18
2014-10-27 Shahzad Muzaffar <[email protected]>
29

310
* Makefile: Newly added makefile for building and installing SCRAM

ReleaseNotes.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11

22
SCRAM Release Notes
3+
V2_2_6_pre3: 2014-11-14
4+
5+
* Documentation updated for various SCRAM Control flags.
6+
* Use system cp command for copying the files which is
7+
bit faster than then the perl copy.
8+
39
V2_2_6_pre2: 2014-10-27
410

511
* Release deprecation checks.

docs/man/scram.1.in

Lines changed: 83 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ and management processes for software development. It resolves the issues of
1010
configuration definition, build, project organization and run-time environment.
1111
It was designed with a focus on supporting a distributed, multi-project
1212
development work-model
13-
.\##############################################################################
13+
.##############################################################################
1414
.SH OPTIONS
1515
.TP 3
1616
-a, --arch <arch>
@@ -33,15 +33,15 @@ To show the help message for the selected command e.g.
3333
.RE
3434
.TP 0
3535
.B COMMANDS
36-
.\##############################################################################
37-
.\COMMAND: scram arch
36+
.##############################################################################
37+
.COMMAND: scram arch
3838
.TP 3
3939
.B arch
4040
Show the current architecture flag. If this command is run from a SCRAM-based
4141
release/developer area then it shows the architecture for which that release
4242
was created otherwise shows out the SCRAM_ARCH environment variable value.
43-
.\##############################################################################
44-
.\COMMAND: scram build
43+
.##############################################################################
44+
.COMMAND: scram build
4545
.TP 3
4646
.B build [options] [gmake-options] [<targets>]
4747
Build the productions (shared libraries, plugins, executables and tests) for the
@@ -165,8 +165,8 @@ Shows the value of a variable used by the game e.g.
165165
shows the default flags used by the CXX compilers
166166
.RE
167167
.RE
168-
.\##############################################################################
169-
.\COMMAND: scram config
168+
.##############################################################################
169+
.COMMAND: scram config
170170
.TP 3
171171
.B config [<parameter[=value]
172172
Show/Set site specific parameters.Running it without any argument shows all
@@ -195,8 +195,8 @@ Time in seconds after which a request to get release information should be timed
195195
out (min. value 3s). Default value is 10s.
196196
.RE
197197
.RE
198-
.\##############################################################################
199-
.\COMMAND: scram db
198+
.##############################################################################
199+
.COMMAND: scram db
200200
.TP 3
201201
.B db --show|--link <path>|--unlink <path>
202202
Show, link/add or unlink/remove additional SCRAM db. By adding an external
@@ -216,8 +216,8 @@ Show all the external databases linked in to your SCRAM db.
216216
-u, --unlink <path>
217217
Unlink/Remove an already linked external db <path> from the local scram db.
218218
.RE
219-
.\##############################################################################
220-
.\COMMAND: scram list
219+
.##############################################################################
220+
.COMMAND: scram list
221221
.TP 3
222222
.B list [options] [<project_name>] [<version>]
223223
Show available SCRAM-based projects for the selected SCRAM_ARCH.
@@ -246,8 +246,8 @@ Name of the project for which SCRAM should display the available versions.
246246
.B Optional:
247247
To Show only those installed versions which contain <version>
248248
.RE
249-
.\##############################################################################
250-
.\COMMAND: scram project
249+
.##############################################################################
250+
.COMMAND: scram project
251251
.TP 3
252252
.B project [options] <-boot bootstrap_file> | <project_name version> | <release_path>
253253
Creates a project developer area based on a release area or a release area using
@@ -304,8 +304,8 @@ Creates a developer area based on an already available release <version>.
304304
<release_path>
305305
Creates a developer area based on <release_path> release area.
306306
.RE
307-
.\##############################################################################
308-
.\COMMAND: scram runtime
307+
.##############################################################################
308+
.COMMAND: scram runtime
309309
.TP 3
310310
.B runtime -csh|-sh|-win [--dump <file>]
311311
Shows the list of shell commands needed to set the runtime environment for the
@@ -329,8 +329,8 @@ Show runtime commands for cygwin.
329329
.B Optional:
330330
Save the runtime environment in a <file> for the selected shell.
331331
.RE
332-
.\##############################################################################
333-
.\COMMAND: scram setup
332+
.##############################################################################
333+
.COMMAND: scram setup
334334
.TP 3
335335
.B setup [<toolname>|<toolfile>.xml]
336336
Setup/add an external tool to be used by the project. All selected tools
@@ -353,32 +353,32 @@ Name of the external tool which is already by the scram. A corresponding
353353
Full path of the toolfile. SCRAM will make a copy of <toolfile>.xml in to
354354
config/toolbox/$SCRAM_ARCH/tools for future use.
355355
.RE
356-
.\##############################################################################
357-
.\COMMAND: scram tool
356+
.##############################################################################
357+
.COMMAND: scram tool
358358
.TP 3
359359
.B tool
360360
This command consists of many sub-commands which deals with externals tools. This
361361
command needs to be run from a release or developer area.
362-
.\##############################################################################
363-
.\COMMAND: scram tool list
362+
.##############################################################################
363+
.COMMAND: scram tool list
364364
.TP 3
365365
.B tool list
366366
Shows the list of all selected tools names and their versions.
367-
.\##############################################################################
368-
.\COMMAND: scram tool info
367+
.##############################################################################
368+
.COMMAND: scram tool info
369369
.TP 3
370370
.B tool info <toolname>
371371
Shows the current tool definition for tool <toolname>.
372-
.\##############################################################################
373-
.\COMMAND: scram tool remove
372+
.##############################################################################
373+
.COMMAND: scram tool remove
374374
.TP 3
375375
.B tool remove <toolname>
376376
Makes the tool <toolname> unavailable. SCRAM moves the tools definition file
377377
from config/toolbox/$SCRAM_ARCH/tools/selected/<toolname>.xml to
378378
config/toolbox/$SCRAM_ARCH/tools/available directory. So if one needs to select
379379
this tool again then just run 'scram setup <toolname>' command.
380-
.\##############################################################################
381-
.\COMMAND: scram tool tag
380+
.##############################################################################
381+
.COMMAND: scram tool tag
382382
.TP 3
383383
.B tool tag <toolname> <tag_name>
384384
Shows the value of a variable(tag_name) for the <toolname> e.g.
@@ -390,8 +390,8 @@ Shows the value of a variable(tag_name) for the <toolname> e.g.
390390
.RS 3
391391
shows the c++ compiler's path.
392392
.RE
393-
.\##############################################################################
394-
.\COMMAND: scram unsetenv
393+
.##############################################################################
394+
.COMMAND: scram unsetenv
395395
.TP 3
396396
.B unsetenv -csh|-sh|-win
397397
Shows the list of shell commands needed to unset the runtime environment set
@@ -411,30 +411,30 @@ Show unset commands for sh/bash/zsh shell.
411411
-win
412412
Show unset commands for cygwin.
413413
.RE
414-
.\##############################################################################
415-
.\COMMAND: scram version
414+
.##############################################################################
415+
.COMMAND: scram version
416416
.TP 3
417417
.B version
418418
Show default version of SCRAM. If this command is run from a SCRAM-based
419419
release/developer area then it shows the latest available version of SCRAM available
420420
for that release.
421-
.\##############################################################################
421+
.##############################################################################
422422
.SH SCRAM FLAGS
423423
SCRAM-based projects' build rules provided via cmssw-config support many
424424
compilation/control flags. Scope of build/compilation flag are defined
425425
by the place they are defined in. e.g.
426426
.RS 3
427427
.TP 3
428428
.B Project level flags
429-
Any flag defined/provided via fllowing are used for all build products of the project
429+
Any flag defined/provided via following are used for all build products of the project
430430
.RS 3
431431
.B - top-level config/BuildFile.xml
432432
.RE
433433
.RS 3
434434
.B - compiler's tools files (e.g. gcc-cxxcompiler.xml, gcc-cxxcompiler.xml and gcc-f77compiler.xml)
435435
.RE
436436
.RS 3
437-
.B - via command-line USER_<flag>
437+
.B - via command-line USER_<flag>/SCRAM_<flag>
438438
.RE
439439
.TP 3
440440
.B Tool level flags
@@ -479,84 +479,54 @@ Only for compilation/build in the release area environment.
479479
Only for compilation/build user development area.
480480
.RE
481481
.RE
482-
.\##############################################################################
482+
.##############################################################################
483483
.SH SCRAM BUILD FLAGS
484484
SCRAM sets variuos flags to be used by different compilers (e.g CXX, C
485485
and Fortran)
486486
.TP 3
487-
.B [CXX|C|F]FLAGS
487+
.B [<class|type>_][REM_]<CXX|C|F>FLAGS
488488
Compilation flags for CXX/C/Fortran compilers.
489-
.RS 3
490-
USER, USER_REM, <class|type>, <class|type>_REM and REM flags supported.
491-
.RE
492489
.TP 3
493-
.B CPPFLAGS
490+
.B [<class|type>_][REM_]CPPFLAGS
494491
Pre-processor flags for pre-processing.
495-
.RS 3
496-
USER, USER_REM, <class|type>, <class|type>_REM and REM flags supported.
497-
.RE
498492
.TP 3
499-
.B CPPDEFINES
493+
.B [<class|type>_][REM_]CPPDEFINES
500494
Pre-processor macros, SCRAM adds -D for each of these flags.
501-
.RS 3
502-
USER, USER_REM, <class|type>, <class|type>_REM and REM flags supported.
503-
.RE
504495
.TP 3
505-
.B LDFLAGS
496+
.B [<class|type>_][REM_]LDFLAGS
506497
Link flags for linking shared libraries or building executables.
507-
.RS 3
508-
USER, USER_REM, <class|type>, <class|type>_REM and REM flags supported.
509-
.RE
510498
.TP 3
511499
.B [CXX|C|F]OPTIMISEDFLAGS
512500
Optiomization flags for CXX/C/Fortran
513501
.TP 3
514502
.B [CXX|C|F]CXXSHAREDOBJECTFLAGS
515503
Shared object flags for CXX/C/Fortran
516504
.TP 3
517-
.B CUDA_FLAGS
505+
.B [REM_]CUDA_FLAGS
518506
Compilation flags for CUDA compiler.
519-
.RS 3
520-
USER, USER_REM and REM flags supported.
521-
.RE
522507
.TP 3
523-
.B CUDA_CFLAGS
508+
.B [REM_]CUDA_CFLAGS
524509
Compilation flags for CUDA compiler which should passes via --compiler-options.
525-
.RS 3
526-
USER, USER_REM and REM flags supported.
527-
.RE
528510
.TP 3
529-
.B [EDM|CAPABILITIES]_[CPPFLAGS|CXXFLAGS|CFLAGS]
511+
.B [<class>_][REM_]<EDM|CAPABILITIES>_<CPPFLAGS|CXXFLAGS|CFLAGS>
530512
Compilation flags for EDM/Capabilities Plugin compilation
531-
.RS 3
532-
<class>, <class>_REM and REM flag supported.
533-
.RE
534513
.TP 3
535-
.B EDM_LDFLAGS
514+
.B [<class>_][REM_]EDM_LDFLAGS
536515
Link flags for EDM Plugin linking.
537-
.RS 3
538-
<class>, <class>_REM and REM flag supported.
539-
.RE
540516
.TP 3
541-
.B LCGDICT_LDFLAGS
517+
.B [REM_]LCGDICT_LDFLAGS
542518
Link flags for EDM Capabilities Plugin linking.
543-
.RS 3
544-
Only REM flag supported.
545-
.RE
546519
.TP 3
547-
.B [LCG|ROOT]DICT_[CPPFLAGS|CXXFLAGS]
520+
.B [<class>_][REM_]<LCG|ROOT>DICT_<CPPFLAGS|CXXFLAGS>
548521
Compilation flags to compile generated lcg/root dictionary files.
549-
.RS 3
550-
<class>, <class>_REM and REM flag supported.
551-
.RE
552522
.TP 3
553523
.B LD_UNIT
554524
Flags used for the generation of big object file for big plugins.
555525
.TP 3
556526
.B MISSING_SYMBOL_FLAGS
557527
Link flags used for linking to make sure there are no missing symbols.
558528
.TP 3
559-
.B [USER[_REM]][BIGOBJ[_REM]]_[CPPFLAGS|CXXFLAGS|CFLAGS|FFLAGS|LDFLAGS]
529+
.B BIGOBJ_[REM_]<CPPFLAGS|CXXFLAGS|CFLAGS|FFLAGS|LDFLAGS>
560530
Various compilation/link flags for Big Plugins.
561531
.TP 3
562532
.B GENREFLEX_ARGS
@@ -637,10 +607,6 @@ config/BuildFile.xml.
637607
Default checkers to be enbabled for LLVM Static Analysis. Effective only in
638608
config/BuildFile.xml.
639609
.TP 3
640-
.B USER_LLVM_CHECKERS
641-
Used defined extra checkers to be enabled for LLVM Static Analysis (for command-line
642-
use only).
643-
.TP 3
644610
.B <library name="<name>" file="<files>">[dependencies/flags]</library>
645611
To generate a shared library from a <packages>/[plugins|test|bin] directory.
646612
.RS 3
@@ -677,3 +643,40 @@ Default compiler is set via config/Self.xml file.
677643
.RS 3
678644
Nasted compiler blocks are allowed.
679645
.RE
646+
.##############################################################################
647+
.SS CONTROL FLAGS (via environment)
648+
There are few environment flags that can control SCRAM e.g.
649+
.TP 3
650+
.B USER_[BIGOBJ_][REM_]<CPPFLAGS|CXXFLAGS|CFLAGS|FFLAGS|LDFLAGS>
651+
Various user defined compilation/link flags.
652+
.TP 3
653+
.B USER_LLVM_CHECKERS
654+
Used defined extra checkers to be enabled for LLVM Static Analysis.
655+
.TP 3
656+
.B SCRAM_USERLOOKUPDB=<path>
657+
To instruct SCRAM to use <path> as its database and look for projects under this directory.
658+
.TP 3
659+
.B RUN_LLVM_ANALYZER_ON_ALL=yes
660+
To run llvm analyzer on generated code too. By default it does not run on generated code.
661+
.TP 3
662+
.B BUILD_LOG=yes
663+
To redirect the "scram build -j n" output to log files for each product.
664+
.TP 3
665+
.B SCRAM_NOEDMWRITECONFIG=1
666+
No to run EDM Write Config script after the edmplugin build.
667+
.TP 3
668+
.B SCRAM_IGNORE_PACKAGES=<packages>
669+
Do not build <packages>
670+
.TP 3
671+
.B SCRAM_IGNORE_SUBDIRS=<sub-dirs>
672+
Do not build <sub-dirs> of each package e.g. one can set it to test to avoid building
673+
test executables/plugins.
674+
.TP 3
675+
.B SKIP_UNITTESTS=<tests>
676+
Do not run these <tests> when "scram build runtests|unittests" is run.
677+
.TP 3
678+
.B SCRAM_NOSYMCHECK=1
679+
Do not run any extra shared library missing symbols checks.
680+
.TP 3
681+
.B SCRAM_TEST_RUNNER_PREFIX=<command>
682+
Prefix each unittest with <command> before running.

src/ActiveDoc/SimpleURLDoc.pm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ sub urldownload()
2828
my $des=shift;
2929
$des=~s/^\s*file://;
3030
use Utilities::AddDir;
31+
use File::Basename;
32+
Utilities::AddDir::adddir(dirname($des));
3133
if (-f $src)
3234
{
33-
use File::Basename;
34-
use File::Copy;
35-
Utilities::AddDir::adddir(dirname($des));
36-
copy($src,$des);
35+
Utilities::AddDir::copyfile($src,$des);
3736
}
3837
elsif (-d $src)
3938
{

src/BuildSystem/ToolManager.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ sub setupalltools()
7878
my $self = shift;
7979
my @selected=();
8080
my $tooldir=$self->{toolcache}."/selected";
81-
foreach my $tool (@{&getfileslist($tooldir)})
81+
foreach my $tool (@{&Utilities::AddDir::getfileslist($tooldir)})
8282
{
8383
if ($tool=~/^(.+)\.xml$/) {push @selected,$1;}
8484
}

src/Configuration/BootStrapProject.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ sub project_()
7272
use Utilities::AddDir;
7373
if (-d "${toolbox}/tools")
7474
{
75-
Utilities::AddDir::copydirexp("${toolbox}/tools","${conf}/tools",'\.xml$');
75+
Utilities::AddDir::adddir("${conf}/tools");
76+
Utilities::AddDir::copydir("${toolbox}/tools/selected","${conf}/tools/");
77+
Utilities::AddDir::copydir("${toolbox}/tools/available","${conf}/tools/");
7678
}
7779
else
7880
{

0 commit comments

Comments
 (0)