Changeset 1740 for trunk/SConstruct


Ignore:
Timestamp:
05/06/10 10:19:43 (15 years ago)
Author:
Malte Marquarding
Message:

Tidy up of install targets and comman-line options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r1738 r1740  
    66
    77moduledir = distutils.sysconfig.get_python_lib()
    8 if  platform.architecture()[0] == '64bit':
     8
     9if sys.platform.startswith('linux') and platform.architecture()[0] == '64bit':
    910    # hack to install into /usr/lib64 if scons is in the 32bit /usr/lib/
    1011    if moduledir.startswith("/usr/lib/"):
    1112        moduledir = moduledir.replace("lib", "lib64")
    12 
    1313
    1414EnsureSConsVersion(1,1,0)
     
    2525                            moduledir),
    2626                PathVariable("casacoreroot", "The location of casacore",
    27                                     "/usr/local"),
     27                             "/usr/local"),
    2828                ("boostroot", "The root dir where boost is installed", None),
    2929                ("boostlib", "The name of the boost python library",
     
    4848                ("cfitsiolib", "The cfitsio library name", "cfitsio"),
    4949                ("cfitsioincdir", "The cfitsio include location", None),
     50                ("wcslib", "The wcs library name", "wcs"),
    5051                ("wcsroot",
    5152                 "The root directory where wcs is installed", None),
     
    5556                 "The root directory where rpfits is installed", None),
    5657                ("rpfitslibdir", "The rpfits library location", None),
    57 #               ("rpfitsincdir", "The rpfits include location", None),
    5858                ("pyraproot", "The root directory where libpyrap is installed",
    5959                 None),
     
    7474                           "none",
    7575                           ["none", "pdf", "html"], ignorecase=1),
    76                 BoolVariable("apps", "Build cpp apps", False),
     76                BoolVariable("apps", "Build cpp apps", True),
    7777                BoolVariable("alma", "Enable alma specific functionality",
    7878                             False),
     
    141141        Exit(1)
    142142    conf.env.AddCustomPackage('wcs')
    143     if not conf.CheckLibWithHeader('wcs', 'wcslib/wcs.h', language='c'):
     143    if not conf.CheckLibWithHeader(conf.env["wcslib"],
     144                                   'wcslib/wcs.h', language='c'):
    144145        Exit(1)
    145146    conf.env.AddCustomPackage('rpfits')
     
    148149
    149150    # test for blas/lapack
     151    lapackname = conf.env.get("lapacklib", "lapack")
    150152    conf.env.AddCustomPackage("lapack")
    151     if not conf.CheckLib(conf.env["lapacklib"]): Exit(1)
     153    if not conf.CheckLib(lapackname): Exit(1)
    152154    blasname = conf.env.get("blaslib", "blas")
    153155    conf.env.AddCustomPackage("blas")
    154     if not conf.CheckLib(conf.env["blaslib"]): Exit(1)
     156    if not conf.CheckLib(blasname): Exit(1)
    155157    conf.env.CheckFortran(conf)
    156158    if not conf.CheckLib('stdc++', language='c++'): Exit(1)
     
    159161    env = conf.Finish()
    160162
    161 env["version"] = "2.x"
     163env["version"] = "3.x"
    162164
    163165if env['mode'] == 'release':
     
    190192
    191193# install targets
    192 somod = env.Install("$moduledir/asap", so )
    193 pymods = env.Install("$moduledir/asap", env.SGlob("python/*.py"))
    194 bins = env.Install("$prefix/bin", ["bin/asap", "bin/asap_update_data"])
    195 shares = [env.Install("$moduledir/asap/data", "share/ipythonrc-asap")]
    196 shares.append(env.Install("$moduledir/asap/data", "share/ipy_user_conf.py"))
    197 env.Alias('install', [somod, pymods, bins]+shares)
     194installs = []
     195installs.append(env.Install("$moduledir/asap", so))
     196installs.append(env.Install("$moduledir/asap", env.SGlob("python/*.py")))
     197installs.append(env.Install("$prefix/bin",
     198                            ["bin/asap", "bin/asap_update_data"]))
     199installs.append(env.Install("$moduledir/asap/data", "share/ipythonrc-asap"))
     200installs.append(env.Install("$moduledir/asap/data", "share/ipy_user_conf.py"))
     201env.Alias('install', installs)
    198202
    199203# install aips++ data repos
    200 rootdir=None
     204rootdir = None
    201205outdir =  os.path.join(env["moduledir"],'asap','data')
    202206sources = ['ephemerides','geodetic']
Note: See TracChangeset for help on using the changeset viewer.