github.com/hwaf/hwaf@v0.0.0-20140814122253-5465f73b20f1/py-hwaftools/hwaf-wscript (about)

     1  # -*- python -*-
     2  # @purpose the main entry point for driving the build and installation steps
     3  # @author Sebastien Binet <binet@cern.ch>
     4  
     5  # imports ---------------------------------------------------------------------
     6  import os
     7  import os.path as osp
     8  
     9  # globals ---------------------------------------------------------------------
    10  top = '.'
    11  out = '__build__'
    12  PREFIX = 'install-area'
    13  VERSION = '0.0.1' # FIXME: should take it from somewhere else
    14  APPNAME = 'hwaf-workarea'
    15  
    16  # imports ---------------------------------------------------------------------
    17  
    18  # waf imports --
    19  import waflib.Logs
    20  import waflib.Utils
    21  import waflib.Options
    22  import waflib.Context
    23  import waflib.Logs as msg
    24  
    25  # functions -------------------------------------------------------------------
    26  
    27  def go(ctx):
    28      from waflib.Options import commands, options
    29      options.prefix = osp.join(os.getcwd(), "install-area")
    30      commands += ["configure", "clean", "build", "install"]
    31  
    32  def options(ctx):
    33      ctx.load('hwaf')
    34  
    35      ctx.add_option(
    36          '--prefix',
    37          default=PREFIX,
    38          help="installation prefix [default: %r]"%PREFIX)
    39  
    40      ctx.add_option(
    41          '--local-cfg',
    42          default="local.conf",
    43          help="Path to the local config file listing all type of configuration infos")
    44      return
    45  
    46  def configure(ctx):
    47      ctx.load('hwaf')
    48  
    49      ctx.hwaf_configure()
    50      return
    51  
    52  def build(ctx):
    53      ctx.load('hwaf')
    54  
    55      ctx.hwaf_build()
    56      return
    57  
    58  def check(ctx):
    59      return
    60  
    61  def shell(ctx):
    62      ctx.load('hwaf')
    63      ctx.hwaf_ishell()
    64      return
    65  
    66  def run(ctx):
    67      return