Project

General

Profile

mrb Reference Guide

mrb User Guide

  • Except where explicitly noted, the calling syntax is "mrb command ..."
  • You MUST define MRB_PROJECT.
  • "setup mrb" defines MRB_DIR, which is used internally.
  • mrb -h lists available commands. mrb --help is a synonym for mrb -h
  • mrb command -h provides more information for each command

Environment

  • Several variables are used to define the mrb working environment:
  • MRB_PROJECT (supplied by the user)
  • MRB_PROJECT_VERSION
  • MRB_QUALS (qualifier set to be used for this build)
  • MRB_SOURCE (path to srcs)
  • MRB_TOP (the directory immediately above localProducts_XXX)
  • MRB_BUILDDIR (the build directory)
  • MRB_INSTALL (localProducts_XXX)
  • These variables are defined for each working directory
  • mrb newDev establishes the working directory tree
  • source .../localProducts_XXX/setup creates the variables

Commands

newDev (n)

  • Start a new development area
    Usage: mrb newDev [-n | -p] [-f] [-b] [-T dir] [-S dir] [-v project_version] [-q qualifiers]
      Make a new development area by creating srcs, build, and products directories.
      Options:
    
         There are two development area configurations:
         1) srcs, build, and products all live within the same directory (the one 
              you are currently in now). This is the default.
         2) srcs, build, and products live in different areas of the filesystem. 
              This configuration is useful if you want to have your sources in your
              backed up home area with build and products in non-backed up scratch
              or some other area. For this configuration, the srcs area will be placed in your
              current directory along with a set up script. You use the -T option (below) 
              to place the products and build areas elsewhere. 
    
         -S <dir>  = Where to put the source code directory (default is srcs in current directory)
    
         -T <dir>  = Where to put the build and localProducts directories (default is current directory next to srcs)
    
         -v <version> = Build for this version instead of the default
    
         -q <qualifiers> = Build for these qualifiers instead of the default
    
         -b = Make a new build area corresponding to your machine flavor (development area already exists)
    
         These options are not typically used:
                -n = do not make the products area
                -p = just make the products area (checks that src, build are already there)
                -f = use a non-empty directory anyway
                -d = print debugging info
    

gitCheckout (g)

  • Clone a git repository
    Usage: mrb gitCheckout [-r] [-d destination_name] [-b branch] [-t tag] <gitRepositoryName>
      Clone a Git Repository to your development area. You should be in the srcs directory.
      By default, you will be on the HEAD.
      Options:
    
         -r                    = clone a read-only copy
    
         -d <destination_name> = use this name instead of the default repository name
    
         -b <branch>           = git clone, and then git checkout this branch
    
         -t <tag>              = git clone, and then git checkout this tag
    

svnCheckout (svn)

  • Checkout from a svn repository
    Usage: mrb svnCheckout [-r] [-d destination_name] [-b branch] [-t tag] <svnRepositoryName>
      Checkout a svn Repository to your development area. You should be in the srcs directory.
      By default, you will be on the HEAD.
      Options:
    
         -r                    = checkout a read-only copy
    
         -d <destination_name> = use this name instead of the default repository name
    
         -b <branch>           = checkout this branch
    
         -t <tag>              = checkout this tag
    

build (b)

  • build
  • calls buildtool -I $MRB_INSTALL -b
  • any buildtool options can be passed

install (i)

  • build and install
  • calls buildtool -I $MRB_INSTALL -i
  • any buildtool options can be passed
  • use the syntax
     mrb i -- <make_options> 
    to pass options to make. Note the spaces on either side of --. For example:
  • To turn on verbose build messages:
     mrb b -l -- VERBOSE=1 
    which will make a logfile with compile and link commands listed in it. Also:
     buildtool -l -- VERBOSE=1 

test (t)

  • build and test
  • calls buildtool -I $MRB_INSTALL -b -t
  • any buildtool options can be passed

zapBuild (z)

  • Delete everything in your build area

newProduct (p)

  • Create a new product from scratch
    Usage: mrb newProduct [-c -n] product_name
    Make a new product from scratch. You have to supply the name of the product.
    
    Options:
       -c Just create files (do not initialize for git)
       -n Create a "no-flavor" product (e.g. nothing to compile)
    

changelog (c)

  • Display a git changelog for a package
  • Note that this command does not currently support -h

updateDepsCM (uc)

  • Update the master CMakeLists.txt file
    Usage: mrb updateDepsCM
      Update the CMakeLists.txt file with the latest versions of dependencies.
    
      Options:
         -b = Copy CMakeLists.txt to CMakeLists.txt.bak first (backup)
    

updateDepsPV (uv)

  • Update a product version in product_deps
    Usage: mrb updateDepsPV <product> <version>
      Update $MRB_SOURCE/*/ups/product_deps.
      Change the version of <product> to <version> 
      This command updates every package you have checked out in $MRB_SOURCE.
    
      Options:
              -d = do a dry run -- print out what would change without actually changing any files
              -R = Restore the old product_deps files from git
    

makeDeps (md)

  • Build or update a header level dependency list

checkDeps (cd)

  • Check for missing build packages

pullDeps (pd)

  • Check for and pull missing build packages into MRB_SOURCE

makePackage (mp)

  • Make distribution tarballs for each product installed by this build
    Options:
         -n <distribution_name> = the name for the manifest (e.g., uboone, lbne, ...)
             If unspecified, this defaults to MRB_PROJECT
         -v <version> = the version for the manifest (vx_y_z format)
             If unspecified, this defaults to MRB_PROJECT_VERSION
         -j <ncores> = pass along the -j flag to make for backwards compatibility
      -- signals the end of the options for makePackage
    
      For instance: mrb mp -m xyz -- -j4 
    

Aliases

mrbsetenv

  • Setup a development enviornment
  • This is an alias for "source $MRB_DIR/bin/mrbSetEnv"
  • Do not precede this alias with mrb

mrbslp

  • Setup all products installed in the working localProducts_XXX directory
  • This is an alias for "source $MRB_DIR/bin/setup_local_products"
  • Do not precede this alias with mrb