| [118] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
|
|---|
| 2 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="fr">
|
|---|
| 3 |
|
|---|
| [240] | 4 | <head profile="http://purl.org/net/uriprofile/">
|
|---|
| 5 | <title>Cmt / Scons</title>
|
|---|
| [118] | 6 |
|
|---|
| [240] | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|---|
| 8 | <meta http-equiv="Content-Language" content="fr" />
|
|---|
| 9 | <meta http-equiv="Content-Style-Type" content="text/css" />
|
|---|
| 10 | <meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|---|
| 11 |
|
|---|
| 12 | <meta name="author" content="Laurent Garnier <garnier@lal.in2p3.fr>" />
|
|---|
| 13 | <meta name="description" content="Présentation de Scons / Cmt" />
|
|---|
| 14 | <meta name="keywords" content="XHTML, CSS, HTML, (X)HTML" />
|
|---|
| 15 |
|
|---|
| [265] | 16 | <link rel="stylesheet" href="../../tags/Tools/v2/Slidy/slidy-toc.css" type="text/css" media="screen, projection, print" />
|
|---|
| 17 | <link rel="stylesheet" href="../../tags/Tools/v2/css/screen.css" type="text/css" media="screen, projection, tv, print" />
|
|---|
| 18 | <script src="../../tags/Tools/v2/Slidy/slidy.js" type="text/javascript"></script>
|
|---|
| 19 | <script src="../../tags/Tools/v2/Slidy/slidy-toc.js" type="text/javascript"></script>
|
|---|
| [240] | 20 | </head>
|
|---|
| 21 |
|
|---|
| 22 | <body style="font-size: 18pt;">
|
|---|
| [118] | 23 |
|
|---|
| [240] | 24 | <!-- Introduction [Start] -->
|
|---|
| [118] | 25 |
|
|---|
| [240] | 26 | <div style="border-style: none; display: block; visibility: visible; position: absolute;" class="slide" id="cover">
|
|---|
| [118] | 27 |
|
|---|
| [119] | 28 | <div class="callout">
|
|---|
| 29 | <p id="title">
|
|---|
| [238] | 30 | <a href="http://www.scons.org/">Scons</a>
|
|---|
| [240] | 31 | </a>
|
|---|
| [119] | 32 | </p>
|
|---|
| 33 | </div>
|
|---|
| [240] | 34 | <p id="subtitle">Une alternative à <a href="http://www.cmtsite.org/">CMT</a> ?</p>
|
|---|
| 35 | <p id="author"><a href="mailto:garnier@lal.in2p3.fr">Laurent Garnier</a>
|
|---|
| 36 | </p>
|
|---|
| 37 | <p id="date">15 Avril 2007<br /></p>
|
|---|
| 38 | <p id="event"><a href="http://trac.lal.in2p3.fr/devdu/">Devdu</a></p>
|
|---|
| [118] | 39 |
|
|---|
| [240] | 40 | </div>
|
|---|
| [118] | 41 |
|
|---|
| [240] | 42 | <!-- Introduction [Start] -->
|
|---|
| [118] | 43 |
|
|---|
| [240] | 44 | <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide" id="logo">
|
|---|
| [118] | 45 |
|
|---|
| [240] | 46 | <div class="callout">
|
|---|
| 47 | <h1>Sommaire</h1>
|
|---|
| [118] | 48 |
|
|---|
| [240] | 49 | <ul class="outline">
|
|---|
| [245] | 50 | <li>Etat de l'art</li>
|
|---|
| 51 | <li>Qui est Scons</li>
|
|---|
| 52 | <li>Pour/ Contre</li>
|
|---|
| 53 | <li>Comment ça marche</li>
|
|---|
| 54 | <li>CMT/SCons</li>
|
|---|
| 55 | <li>Tests de performances</li>
|
|---|
| [240] | 56 | </ul>
|
|---|
| 57 | </div>
|
|---|
| 58 | </div>
|
|---|
| [167] | 59 |
|
|---|
| [238] | 60 | <div class="slide">
|
|---|
| 61 | <h1>État de l'art</h1>
|
|---|
| 62 | <ul class="incremental">
|
|---|
| [246] | 63 | <li><a href="http://en.wikipedia.org/wiki/Build_automation"> gestionnaires de build</a> d'après wikipedia</p>
|
|---|
| [240] | 64 | <p> </p>
|
|---|
| [238] | 65 | </li>
|
|---|
| [244] | 66 | <li><a href="http://freshmeat.net/articles/view/1715/">Alternatives à make</a>
|
|---|
| 67 | </li>
|
|---|
| [238] | 68 | <li>Quelques projets sous scons
|
|---|
| 69 | <ul class="incremental">
|
|---|
| 70 | <li><a href="http://dev.openwengo.org/trac/openwengo/trac.cgi/wiki/HowToBuildFromSourceNg">OpenWengo</a> ->Migrent vers cmake</li>
|
|---|
| 71 | <li>kde -> Ont migrés vers cmake</li>
|
|---|
| 72 | <li><a href="http://opensg.vrsource.org/trac/browser/trunk/Tools/scons-local/scons-local-0.96.95/SCons">OpenSG</a></li>
|
|---|
| 73 | <li><a href="https://twiki.cern.ch/twiki/bin/view/LCG/RELAX">package RELAX au cern</a></li>
|
|---|
| 74 | </li>
|
|---|
| [118] | 75 | </ul>
|
|---|
| [238] | 76 | </div>
|
|---|
| [239] | 77 |
|
|---|
| [238] | 78 | <div class="slide">
|
|---|
| [240] | 79 | <h1>What is Scons ? 1/2 <font size="-1">(copier-collé de leur site ;-)</font> </h1>
|
|---|
| 80 | <ul class="incremental"><li><b>What makes SCons better?</b>
|
|---|
| [239] | 81 | <ul class="incremental">
|
|---|
| [240] | 82 | <li><font color="red">Configuration files are Python scripts</font>--use the power of a real programming language to solve build problems.</li>
|
|---|
| 83 | <li>Reliable, automatic dependency analysis built-in for C, C++ and Fortran--no more "make depend" or "make clean" to get all of the dependencies. Dependency analysis is easily extensible through user-defined dependency Scanners for other languages or file types.</li>
|
|---|
| 84 | <li>Built-in support for <font color="red">C, C++, Java</font>, D, Fortran, Yacc, Lex, Qt and SWIG, and building TeX and LaTeX documents. Easily extensible through user-defined Builders for other languages or file types.</li>
|
|---|
| 85 | <li><font color="red">Building from central repositories</font> of source code and/or pre-built targets.</li>
|
|---|
| [242] | 86 | <li>Built-in support for fetching source files from SCCS, RCS, CVS, Subversion, BitKeeper and Perforce.</li>
|
|---|
| [240] | 87 | <li>Built-in support for Microsoft Visual Studio .NET and past Visual Studio versions, including generation of .dsp, .dsw, .sln and .vcproj files.</li>
|
|---|
| 88 | </ul>
|
|---|
| [239] | 89 | </li>
|
|---|
| [240] | 90 | </ul>
|
|---|
| 91 | </div>
|
|---|
| 92 | <div class="slide">
|
|---|
| 93 | <h1>What is Scons ? 2/2 <font size="-1">(copier-collé de leur site ;-)</font> </h1>
|
|---|
| 94 | <ul class="incremental"><li>
|
|---|
| [239] | 95 | <ul class="incremental">
|
|---|
| [240] | 96 | <li><font color="red">Reliable detection of build changes</font> using MD5 signatures; optional, configurable support for traditional timestamps.</li>
|
|---|
| 97 | <li>Improved support for <font color="red">parallel builds</font>--like make -j but keeps N jobs running simultaneously regardless of directory hierarchy.</li>
|
|---|
| 98 | <li>Integrated Autoconf-like support for finding #include files, libraries, functions and typedefs.</li>
|
|---|
| 99 | <li>Global view of all dependencies--no more multiple build passes or reordering targets to build everything.</li>
|
|---|
| 100 | <li>Ability to <font color="red">share built files</font> in a cache to speed up multiple builds--like ccache but for any type of target file, not just C/C++ compilation.</li>
|
|---|
| 101 | <li>Designed from the ground up for <font color="red">cross-platform builds</font>, and known to work on Linux, other POSIX systems (including AIX, *BSD systems, HP/UX, IRIX and Solaris), Windows NT, Mac OS X, and OS/2.</li>
|
|---|
| 102 | </ul>
|
|---|
| 103 | </li>
|
|---|
| 104 | </ul>
|
|---|
| [239] | 105 | </div>
|
|---|
| 106 | <div class="slide">
|
|---|
| [240] | 107 | <h1>Scons Pro/Cons <font size="-1">(copier-collé de leur site ;-)</font></h1>
|
|---|
| 108 | <ul class="incremental"><li><b>Pros :</b>
|
|---|
| 109 | <ul class="incremental">
|
|---|
| 110 | <li><font color="red">Based on</font> a full-fledged programming language, <font color="red">Python</font>. This means you can make the build system do pretty much anything you can figure out how to program, if it doesn't do it already.</li>
|
|---|
| 111 | <li><font color="red">Support for many platforms</font>, compilers, and targets built-in.</li>
|
|---|
| 112 | <li>Has <font color="red">auto-configuration abilities</font>.</li>
|
|---|
| 113 | <li>Can be <font color="red">distributed with the software product</font> so users do not need to install it.</li>
|
|---|
| 114 | </ul>
|
|---|
| 115 | </li>
|
|---|
| 116 | <li><b>Cons :</b>
|
|---|
| 117 | <ul class="incremental">
|
|---|
| 118 | <li><font color="red">Based on</font> a general-purpose programming language, <font color="red">Python</font>. This means writing even a basic build file requires you to know a bit about Python and its syntax.</li>
|
|---|
| 119 | <li>If you want to do <font color="red">more complicated builds</font>, you will quickly find yourself having to write a <font color="red">fair amount of Python</font> code to achieve the functionality built into something like Boost Jam.</li>
|
|---|
| 120 | <li>Requires users (developers) to have a <font color="red">full Python installation</font> and then to install the SCons scripts on top of that.</li>
|
|---|
| 121 | <li><font color="red">Very centric on the idea of having a build dir</font>. Great pains to avoid this.</li>
|
|---|
| 122 | </div>
|
|---|
| 123 |
|
|---|
| 124 | <div class="slide">
|
|---|
| [242] | 125 | <h1>Comment ça marche? Les bases </h1>
|
|---|
| [241] | 126 | <ul class="incremental">
|
|---|
| 127 | <li>SCons recherche un fichier python nommé <b>SConstruct</b> dans le dossier courant.</li>
|
|---|
| 128 | <li>SCons execute le script et construit les dépendances (libraries, programmes....) </li>
|
|---|
| [242] | 129 | <li>Toutes les dépendances dont les fichiers ont étés modifiés vont être reconstruits </li>
|
|---|
| [241] | 130 | <li>Un fichier .sconsign.dblite (base de données dblite) est créé pour gérér ces dépendances. </li>
|
|---|
| 131 | </div>
|
|---|
| 132 |
|
|---|
| 133 | <div class="slide">
|
|---|
| [242] | 134 | <h1>Comment ça marche? Hello world</h1>
|
|---|
| 135 | <ul class="incremental">
|
|---|
| 136 | <li>Fichier source : helloworld.c
|
|---|
| 137 | <pre>
|
|---|
| 138 | int main() {
|
|---|
| 139 | printf("Hello, world!\n");<br />
|
|---|
| 140 | }
|
|---|
| 141 | </pre>
|
|---|
| [241] | 142 | </li>
|
|---|
| 143 | </ul>
|
|---|
| 144 | <p> </p>
|
|---|
| [242] | 145 | <ul class="incremental">
|
|---|
| 146 | <li>Fichier SConstruct
|
|---|
| 147 | <pre>
|
|---|
| 148 | Program('helloworld.c')
|
|---|
| 149 | </pre>
|
|---|
| 150 | </li>
|
|---|
| [241] | 151 | </ul>
|
|---|
| 152 | </div>
|
|---|
| 153 |
|
|---|
| 154 | <div class="slide">
|
|---|
| [242] | 155 | <h1>Comment ça marche? Libraries</h1>
|
|---|
| 156 | <ul class="incremental">
|
|---|
| 157 | <li>Librarie statique
|
|---|
| 158 | <pre>
|
|---|
| 159 | StaticLibrary('foo', ['f1.c', 'f2.c', 'f3.c'])
|
|---|
| 160 | </pre>
|
|---|
| 161 | </li>
|
|---|
| 162 | <li>Librarie partagée
|
|---|
| 163 | <pre>
|
|---|
| 164 | SharedLibrary('foo2', ['f4.c', 'f5.c', 'f3.c'])
|
|---|
| 165 | </pre>
|
|---|
| 166 | </li>
|
|---|
| [240] | 167 | </div>
|
|---|
| [241] | 168 | <div class="slide">
|
|---|
| [246] | 169 | <h1>Principes de CMT par rapport à Scons</h1>
|
|---|
| 170 | <ul>
|
|---|
| 171 | <li>CMT utilise <em>une base logicielle </em><font color="red">(SCons aussi)</font></li>
|
|---|
| 172 | <li>La base logicielle est décomposée en projets
|
|---|
| 173 | <ul>
|
|---|
| 174 | <li>Un projet fournit une zone d'accès aux packages<font color="red">(l'équivalent est possible avec les fichiers SConscript)</font>
|
|---|
| 175 | <ul>
|
|---|
| 176 | <li>Un package est une entité minimale de structuration/composant de la base logicielle</li>
|
|---|
| 177 | </ul>
|
|---|
| 178 | </li>
|
|---|
| 179 | <li>Zone d'accès spécifiable par variable d'environnement <font color="red">(SCons aussi)</font>
|
|---|
| 180 | <ul>
|
|---|
| 181 | <li><pre>CMTPATH = zone1:zone2:zone3 ou CMTPROJECTPATH = zone1:zone2:zone3</pre></li>
|
|---|
| 182 | </ul>
|
|---|
| 183 | </li>
|
|---|
| 184 | </ul>
|
|---|
| 185 | </li>
|
|---|
| 186 | <li>CMT gère les dépendances actives entre projets et packages
|
|---|
| 187 | <ul>
|
|---|
| 188 | <li>Transmission (héritage) des propriétés de configuration <font color="red">(SCons aussi)</font></li>
|
|---|
| 189 | <li>Fichiers de spécifications formant une base de données <font color="red">(SCons aussi)</font></li>
|
|---|
| 190 | <li>Gestion du graphe de dépendance par CMT<font color="red">(non natif, mais extention possible grace un plugin python)</font>
|
|---|
| 191 | <ul>
|
|---|
| 192 | <li>Navigation, requêtes dans la base de données</li>
|
|---|
| 193 | </ul>
|
|---|
| 194 | </li>
|
|---|
| 195 | <li>Spécification des contraintes de version <font color="red">(non en natif)</font></li>
|
|---|
| 196 | </ul>
|
|---|
| 197 | </li>
|
|---|
| 198 | </ul>
|
|---|
| 199 | </div>
|
|---|
| 200 |
|
|---|
| 201 | <div class="slide">
|
|---|
| [241] | 202 | <h1>CMT / Scons</h1>
|
|---|
| [244] | 203 | <p>Gestion des packages "à la CMT" : </p>
|
|---|
| [243] | 204 | <pre>
|
|---|
| 205 | |-- interfaces
|
|---|
| 206 | | |-- CLHEP
|
|---|
| 207 | | | |-- SConscript
|
|---|
| 208 | | |-- HDF5
|
|---|
| 209 | | | |-- SConscript
|
|---|
| 210 | | |-- dld
|
|---|
| 211 | | | |-- SConscript
|
|---|
| 212 | | `-- zlib
|
|---|
| 213 | | |-- SConscript
|
|---|
| 214 | </pre>
|
|---|
| 215 | </div>
|
|---|
| 216 | <div class="slide">
|
|---|
| [245] | 217 | <h1>Exemple de fichier SConscript</h1>
|
|---|
| 218 | <p>
|
|---|
| 219 | <font color=green">
|
|---|
| 220 | #<br />
|
|---|
| 221 | # File Interface/HDF5/SConcript<br />
|
|---|
| 222 | #<br />
|
|---|
| 223 | </font>
|
|---|
| 224 | <font color="red">import</font> os.path<br />
|
|---|
| 225 | <font color="red">import</font> sys<br />
|
|---|
| 226 |
|
|---|
| 227 | <font color="red">Import</font>('env')<br />
|
|---|
| 228 |
|
|---|
| 229 | <font color=green">
|
|---|
| 230 | # for HDF5 :<br />
|
|---|
| 231 | </font>
|
|---|
| 232 | env.Replace(HDF5_native_version=<font color="orange">'1.6.5'</font>)<br />
|
|---|
| 233 |
|
|---|
| 234 | <font color="red">if</font> (sys.platform == <font color="orange">'win32'</font>) :<br />
|
|---|
| 235 | env.Replace(HDF5_home=<font color="orange">'C:\usr\local\HDF5\$HDF5_native_version'</font>)<br />
|
|---|
| 236 | <font color="red">elif</font> (sys.platform == <font color="orange">'darwin'</font>):<br />
|
|---|
| 237 | env.Replace(HDF5_home=<font color="orange">'/usr/local/hdf5/'</font>)<br />
|
|---|
| 238 | <font color="red">else</font> :<br />
|
|---|
| 239 | env.Replace(HDF5_home=<font color="orange">'/usr/local/hdf5-$HDF5_native_version'</font>)<br />
|
|---|
| 240 | <br />
|
|---|
| 241 | env.Append(CPPPATH = [<font color="orange">'$HDF5_home/$HDF5_native_version/include'</font>])<br />
|
|---|
| 242 | env.Prepend(LIBPATH = [<font color="orange">'$HDF5_home/$HDF5_native_version/lib'</font>])<br />
|
|---|
| 243 | env.Prepend(LIBS = [<font color="orange">'hdf5'</font>])<br />
|
|---|
| 244 | <br />
|
|---|
| 245 | <font color="red">if</font> (sys.platform != <font color="orange">'win32'</font>) :<br />
|
|---|
| 246 | env.PrependENVPath(<font color="orange">'LD_LIBRARY_PATH'</font>, env.Dir(<font color="orange">'$HDF5_home/lib'</font>).abspath)<br />
|
|---|
| 247 | <br />
|
|---|
| 248 | <font color="red">if</font> (sys.platform == <font color="orange">'darwin'</font>) :<br />
|
|---|
| 249 | env.PrependENVPath(<font color="orange">'DYLD_LIBRARY_PATH'</font>, env.Dir(<font color="orange">'$HDF5_home/lib'</font>).abspath)<br />
|
|---|
| 250 | <br />
|
|---|
| 251 | <font color="red">if</font> (sys.platform != <font color="orange">'win32'</font>) :<br />
|
|---|
| 252 | env.PrependENVPath(<font color="orange">'PATH'</font>, env.Dir(<font color="orange">'$HDF5_home/bin'</font>).abspath)<br />
|
|---|
| 253 | <font color="red">else</font> :<br />
|
|---|
| 254 | env.PrependENVPath(<font color="orange">'PATH'</font>, env.Dir(<font color="orange">'$HDF5_home\bin'</font>).abspath)<br />
|
|---|
| 255 | </p>
|
|---|
| 256 | </div>
|
|---|
| 257 | <div class="slide">
|
|---|
| 258 | <table><tr><td>
|
|---|
| 259 | <pre>
|
|---|
| 260 | #
|
|---|
| 261 | # File bhep/SConcript
|
|---|
| 262 | #
|
|---|
| 263 |
|
|---|
| 264 |
|
|---|
| 265 | import os.path
|
|---|
| 266 | import glob
|
|---|
| 267 | import sys
|
|---|
| 268 |
|
|---|
| 269 | import SCons.Tool
|
|---|
| 270 |
|
|---|
| 271 | #import version
|
|---|
| 272 | #Export('version')
|
|---|
| 273 |
|
|---|
| 274 | #EnsurePythonVersion(2,3)
|
|---|
| 275 |
|
|---|
| 276 | # List of Interfaces
|
|---|
| 277 | interfaces = ['CLHEP','HDF5','zlib','dld']
|
|---|
| 278 |
|
|---|
| 279 |
|
|---|
| 280 |
|
|---|
| 281 | env = Environment()
|
|---|
| 282 |
|
|---|
| 283 | # no DEBUG
|
|---|
| 284 | debug=0
|
|---|
| 285 |
|
|---|
| 286 | # Get Interfaces scripts
|
|---|
| 287 |
|
|---|
| 288 | for dict in interfaces :
|
|---|
| 289 | print "Reading Interfaces %s" % (dict)
|
|---|
| 290 | SConscript('platform'+os.sep+'interfaces'+os.sep+'%s'%dict+os.sep+'SConscript', exports=['env','debug'])
|
|---|
| 291 |
|
|---|
| 292 |
|
|---|
| 293 | env.Replace(BUILDTOP=['#Release'+os.sep+'${PLATFORM}'])
|
|---|
| 294 | env.Replace(BINDIR = ['${BUILDTOP}'+os.sep+'bin'])
|
|---|
| 295 | env.Replace(LIBDIR = ['${BUILDTOP}'+os.sep+'lib'])
|
|---|
| 296 | env.Replace(INCDIR = ['${BUILDTOP}'+os.sep+'include'])
|
|---|
| 297 | env.Replace(OBJDIR = ['${BUILDTOP}'+os.sep+'obj'])
|
|---|
| 298 |
|
|---|
| 299 | # Set the sources to 'source directory
|
|---|
| 300 | env.Replace(SRCDIR = ['sources'])
|
|---|
| 301 |
|
|---|
| 302 | # set the cache dir
|
|---|
| 303 | CacheDir('cache')
|
|---|
| 304 |
|
|---|
| 305 |
|
|---|
| 306 |
|
|---|
| 307 |
|
|---|
| 308 | # Set the build dir of all cpp files in build directory
|
|---|
| 309 | for projects in [
|
|---|
| 310 | '.',
|
|---|
| 311 | 'base',
|
|---|
| 312 | 'util',
|
|---|
| 313 | 'converters',
|
|---|
| 314 | 'manager',
|
|---|
| 315 | 'examples',
|
|---|
| 316 | 'tutorials',
|
|---|
| 317 | 'histos',
|
|---|
| 318 | 'tools'] :
|
|---|
| 319 | BuildDir(env.Dir('$OBJDIR').abspath+os.sep+projects,projects, duplicate=0)
|
|---|
| 320 |
|
|---|
| 321 |
|
|---|
| 322 | # CPPPATH for my files
|
|---|
| 323 | env.Append(CPPPATH = [env.Dir('$SRCDIR').abspath+os.sep+'.',
|
|---|
| 324 | env.Dir('$SRCDIR').abspath+os.sep+'bhep',
|
|---|
| 325 | env.Dir('$SRCDIR').abspath+os.sep+'examples',
|
|---|
| 326 | env.Dir('$SRCDIR').abspath+os.sep+'tutorials'])
|
|---|
| 327 | </pre>
|
|---|
| 328 | </td>
|
|---|
| 329 | <td>
|
|---|
| 330 | <pre>
|
|---|
| 331 | # REPOSITORY :
|
|---|
| 332 | # but very strange comportment, dir 'base' will be checkout correctly, but 'util' won't...
|
|---|
| 333 | # and a dir call 'bu' will and 'bus' won't... WHY ???
|
|---|
| 334 |
|
|---|
| 335 | #svn = SCons.Tool.Tool('Subversion')
|
|---|
| 336 | #svn(env)
|
|---|
| 337 | #env.SourceCode('.', env.Subversion('svn://neutrinos1.ific.uv.es:/usr/local/svn/nautilus/bhep/tags/bhepv1r5p2'))
|
|---|
| 338 |
|
|---|
| 339 | # PRINT EVERYTHING
|
|---|
| 340 | #for key, val in env.items():
|
|---|
| 341 | # print " %-20s %s" % (key, val)
|
|---|
| 342 |
|
|---|
| 343 | print "CPPPATH =", env['CPPPATH']
|
|---|
| 344 | print "CXXFLAGS =", env['CXXFLAGS']
|
|---|
| 345 | print "CCFLAGS =", env['CCFLAGS']
|
|---|
| 346 | print "CFLAGS =", env['CFLAGS']
|
|---|
| 347 |
|
|---|
| 348 | # sources
|
|---|
| 349 | bhep_sources = [
|
|---|
| 350 | 'version.cpp',
|
|---|
| 351 | 'base/event.cpp',
|
|---|
| 352 | 'base/hit.cpp',
|
|---|
| 353 | 'base/mparticle.cpp',
|
|---|
| 354 | 'base/particle.cpp',
|
|---|
| 355 | 'base/sparticle.cpp',
|
|---|
| 356 | 'base/track.cpp',
|
|---|
| 357 | 'util/particle_definition.cpp',
|
|---|
| 358 | 'util/ray.cpp',
|
|---|
| 359 | 'util/material.cpp',
|
|---|
| 360 | 'converters/event_cvt.cpp',
|
|---|
| 361 | 'converters/hit_cvt.cpp',
|
|---|
| 362 | 'converters/mparticle_cvt.cpp',
|
|---|
| 363 | 'converters/particle_cvt.cpp',
|
|---|
| 364 | 'converters/sparticle_cvt.cpp',
|
|---|
| 365 | 'converters/track_cvt.cpp',
|
|---|
| 366 | 'manager/base_reader.cpp',
|
|---|
| 367 | 'manager/bhep_svc.cpp',
|
|---|
| 368 | 'manager/brw.cpp',
|
|---|
| 369 | 'manager/converter_svc.cpp',
|
|---|
| 370 | 'manager/random_reader.cpp',
|
|---|
| 371 | 'manager/random_writer.cpp',
|
|---|
| 372 | 'manager/reader_gz.cpp',
|
|---|
| 373 | 'manager/reader_hdf5.cpp',
|
|---|
| 374 | 'manager/reader_txt.cpp',
|
|---|
| 375 | 'manager/sequential_reader.cpp',
|
|---|
| 376 | 'manager/sequential_writer.cpp',
|
|---|
| 377 | 'manager/writer_gz.cpp',
|
|---|
| 378 | 'manager/writer_hdf5.cpp',
|
|---|
| 379 | 'manager/writer_txt.cpp',
|
|---|
| 380 | 'examples/generate_event.cpp',
|
|---|
| 381 | 'tutorials/gevent.cpp',
|
|---|
| 382 | 'histos/axis.cpp',
|
|---|
| 383 | 'histos/histogram.cpp',
|
|---|
| 384 | 'tools/EventManager.cpp']
|
|---|
| 385 | # 'tools/EventManager.cpp2']
|
|---|
| 386 |
|
|---|
| 387 | bhep_sources = [os.path.join(env.Dir('$OBJDIR').abspath+os.sep, x) for x in bhep_sources]
|
|---|
| 388 | bhep_sources = [x.replace('/',os.sep) for x in bhep_sources]
|
|---|
| 389 |
|
|---|
| 390 | # name of the library
|
|---|
| 391 | bhep_libname = 'bhep'
|
|---|
| 392 |
|
|---|
| 393 | # shared lib :
|
|---|
| 394 | env.SharedLibrary(target=bhep_libname,
|
|---|
| 395 | source = bhep_sources)
|
|---|
| 396 |
|
|---|
| 397 | # install the library
|
|---|
| 398 | env['BHEP_LIBNAME'] = env.subst(env['SHLIBPREFIX'])+bhep_libname+env.subst(env['SHLIBSUFFIX'])
|
|---|
| 399 | env.Install(env['LIBDIR'], env['BHEP_LIBNAME'])
|
|---|
| 400 | </pre>
|
|---|
| 401 | </td></tr>
|
|---|
| 402 | </table>
|
|---|
| 403 | </div>
|
|---|
| 404 | <div class="slide">
|
|---|
| [243] | 405 | <h1>CMT / Scons</h1>
|
|---|
| [242] | 406 | <ul class="incremental">
|
|---|
| [247] | 407 | <li>Test de performances (sur mac PPC) : Création d'une librarie partagée avec 35 fichiers
|
|---|
| [242] | 408 | <ul class="incremental">
|
|---|
| 409 | <li>CMT : 101.28s user 21.32s system 60% cpu 3:22.03 total</li>
|
|---|
| 410 | <li>Scons : 96.19s user 15.23s system 70% cpu 2:38.14 total </li>
|
|---|
| 411 | </ul>
|
|---|
| 412 | </li>
|
|---|
| 413 | <li>Test de performances : Apres modification d'un fichier (recompilation)
|
|---|
| 414 | <ul class="incremental">
|
|---|
| 415 | <li>CMT : 10.97s user 7.44s system 67% cpu 27.147 total</li>
|
|---|
| 416 | <li>Scons : 6.00s user 1.33s system 59% cpu 12.349 total</li>
|
|---|
| 417 | </ul>
|
|---|
| 418 | </li>
|
|---|
| [241] | 419 | </div>
|
|---|
| [240] | 420 |
|
|---|
| 421 | <div class="slide">
|
|---|
| [238] | 422 |
|
|---|
| 423 | <h1>Pour aller plus loin</h1>
|
|---|
| [242] | 424 | <ul class="incremental">
|
|---|
| 425 | <li>Test de performances :
|
|---|
| 426 | <ul class="incremental">
|
|---|
| 427 | <li><a href="http://www.oroboro.com/kjam/docserv.php/page/doc_perf">KJam Beta 0.31</a> contre
|
|---|
| 428 | <br\> Jam/MR 2.5
|
|---|
| 429 | <br\>Gnu Make 3.80
|
|---|
| 430 | <br\>MSBuild 2.0.5</li>
|
|---|
| 431 | <li><a href="http://www.gamesfromwithin.com/articles/0509/000100.html">Jam</a> contre
|
|---|
| 432 | <br\>GNU Make (3.80)
|
|---|
| 433 | <br\>Jam (2.5)
|
|---|
| 434 | <br\>BoostBuild v2 (3.1.10)
|
|---|
| 435 | <br\>Scons (0.96.91 pre-release)
|
|---|
| 436 | <br\>Ant (1.6.5)
|
|---|
| 437 | <br\>Rant (0.4.4)
|
|---|
| 438 | </li>
|
|---|
| [245] | 439 | <li><a href="http://www.scons.org/wiki/SconsVsOtherBuildTools">Comparaison Scons / autres builds systems</a><br /> <br />
|
|---|
| [242] | 440 | </li>
|
|---|
| 441 | </ul>
|
|---|
| [238] | 442 | </li>
|
|---|
| [245] | 443 | <li>KJam semble etre un concurent TRES rapide!</li>
|
|---|
| [118] | 444 | </ul>
|
|---|
| [238] | 445 | </div>
|
|---|
| 446 | <div class="slide">
|
|---|
| 447 |
|
|---|
| 448 | <h1>Quelques références</h1>
|
|---|
| 449 |
|
|---|
| [245] | 450 | <ul class="incremental"><li>Scons :
|
|---|
| [241] | 451 | <ul class="incremental">
|
|---|
| 452 | <li><a href="www.scons.org">Scons</a></li>
|
|---|
| 453 | <li><a href="http://www.scons.org/doc/HTML/scons-user/book1.html"></a>User guide</li>
|
|---|
| 454 | <li><a href="http://www.scons.org/doc/HTML/scons-man.html"></a>Man pages</li>
|
|---|
| 455 | </ul>
|
|---|
| [238] | 456 | </li>
|
|---|
| [241] | 457 | <li>CMT / Scons
|
|---|
| 458 | <ul class="incremental">
|
|---|
| 459 | <li><a href="http://www-glast.slac.stanford.edu/software/core/minutes_04032007.htm">Glast et CMT</a>
|
|---|
| 460 | </li>
|
|---|
| 461 | <li><a href="https://confluence.slac.stanford.edu/display/core/CMT+Problems">Problemes de CMT d'après SLAC</a>
|
|---|
| 462 | </li>
|
|---|
| 463 | <li><a href="https://confluence.slac.stanford.edu/display/core/SCons+alternative+to+CMT">Scons, une alternative à CMT à SLAC</a>
|
|---|
| 464 | </li>
|
|---|
| 465 | <li><a href="http://confluence.slac.stanford.edu/display/SAS/Proposals+for+Fixing+Our+Issues+with+CMT">Mise en place de Scons à SLAC</a>
|
|---|
| 466 | </li>
|
|---|
| 467 | </ul>
|
|---|
| [238] | 468 | </li>
|
|---|
| [118] | 469 | </ul>
|
|---|
| 470 | </div>
|
|---|
| [245] | 471 | <!-- Thank You [Start] -->
|
|---|
| 472 | <div class="slide" id="thanks">
|
|---|
| 473 | <p>Questions ?</p>
|
|---|
| 474 | </div>
|
|---|
| [238] | 475 |
|
|---|
| 476 |
|
|---|
| [240] | 477 |
|
|---|
| 478 |
|
|---|
| 479 | </body>
|
|---|
| [118] | 480 | </html> |
|---|