Changeset 1757 for branches/alma/SConstruct
- Timestamp:
- 06/09/10 19:03:06 (14 years ago)
- Location:
- branches/alma
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma
-
Property svn:ignore
set to
.sconf_temp
.sconsign.dblite
-
Property svn:mergeinfo
set to
/branches/asap-3.x merged eligible
-
Property svn:ignore
set to
-
branches/alma/SConstruct
r1377 r1757 6 6 7 7 moduledir = distutils.sysconfig.get_python_lib() 8 if platform.architecture()[0] == '64bit': 8 9 if sys.platform.startswith('linux') and platform.architecture()[0] == '64bit': 9 10 # hack to install into /usr/lib64 if scons is in the 32bit /usr/lib/ 10 11 if moduledir.startswith("/usr/lib/"): 11 12 moduledir = moduledir.replace("lib", "lib64") 12 13 13 opts = Options("options.cfg") 14 opts.AddOptions( 14 EnsureSConsVersion(1,1,0) 15 16 opts = Variables("options.cfg") 17 opts.AddVariables( 15 18 ("FORTRAN", "The fortran compiler", None), 16 19 ("f2clib", "The fortran to c library", None), 17 Path Option("prefix",20 PathVariable("prefix", 18 21 "The root installation path", 19 22 distutils.sysconfig.PREFIX), 20 Path Option("moduledir",23 PathVariable("moduledir", 21 24 "The python module path (site-packages))", 22 25 moduledir), 23 Path Option("casacoreroot", "The location of casacore",24 26 PathVariable("casacoreroot", "The location of casacore", 27 "/usr/local"), 25 28 ("boostroot", "The root dir where boost is installed", None), 26 29 ("boostlib", "The name of the boost python library", … … 45 48 ("cfitsiolib", "The cfitsio library name", "cfitsio"), 46 49 ("cfitsioincdir", "The cfitsio include location", None), 50 ("wcslib", "The wcs library name", "wcs"), 47 51 ("wcsroot", 48 52 "The root directory where wcs is installed", None), … … 52 56 "The root directory where rpfits is installed", None), 53 57 ("rpfitslibdir", "The rpfits library location", None), 54 # ("rpfitsincdir", "The rpfits include location", None), 55 EnumOption("mode", "The type of build.", "debug", 58 ("pyraproot", "The root directory where libpyrap is installed", 59 None), 60 ("pyraplib", "The name of the pyrap library", "pyrap"), 61 ("pyraplibdir", "The directory where libpyrap is installed", 62 None), 63 ("pyrapincdir", "The pyrap include location", 64 None), 65 BoolVariable("enable_pyrap", "Use pyrap conversion library", 66 False), 67 68 EnumVariable("mode", "The type of build.", "release", 56 69 ["release","debug"], ignorecase=1), 57 70 ("makedist", 58 71 "Make a binary archive giving a suffix, e.g. sarge or fc5", 59 72 ""), 60 Enum Option("makedoc", "Build the userguide in specified format",73 EnumVariable("makedoc", "Build the userguide in specified format", 61 74 "none", 62 ["none", "pdf", "html"], ignorecase=1) 75 ["none", "pdf", "html"], ignorecase=1), 76 BoolVariable("apps", "Build cpp apps", True), 77 BoolVariable("alma", "Enable alma specific functionality", 78 False), 63 79 ) 64 80 … … 73 89 env.SConsignFile() 74 90 75 if env["PLATFORM"] == "darwin":76 env.EnsureSConsVersion(0,96,95)77 78 91 casacoretooldir = os.path.join(env["casacoreroot"],"share", 79 92 "casacore") … … 83 96 84 97 # load casacore specific build flags 98 env.Tool('casaoptions', [casacoretooldir]) 99 opts.Update(env) 85 100 env.Tool('casa', [casacoretooldir]) 86 101 … … 93 108 "include", "casacore")) 94 109 if not conf.CheckLib("casa_casa", language='c++'): Exit(1) 95 conf.env.PrependUnique(LIBS=["casa_ ms", "casa_components",110 conf.env.PrependUnique(LIBS=["casa_images", "casa_ms", "casa_components", 96 111 "casa_coordinates", "casa_lattices", 97 112 "casa_fits", "casa_measures", "casa_scimath", … … 108 123 109 124 conf.env.AddCustomPackage('boost') 110 if not conf.CheckLibWithHeader( env["boostlib"],125 if not conf.CheckLibWithHeader(conf.env["boostlib"], 111 126 'boost/python.hpp', language='c++'): 112 127 Exit(1) 128 129 conf.env.AddCustomPackage('pyrap') 130 if conf.env.get("enable_pyrap") and conf.CheckLib(conf.env["pyraplib"], 131 language='c++', 132 autoadd=0): 133 conf.env.Append(CPPFLAGS=['-DHAVE_PYRAP']) 134 conf.env.PrependUnique(LIBS=env['pyraplib']) 135 113 136 # test for cfitsio 114 137 if not conf.CheckLib("m"): Exit(1) … … 118 141 Exit(1) 119 142 conf.env.AddCustomPackage('wcs') 120 if not conf.CheckLibWithHeader('wcs', 'wcslib/wcs.h', language='c'): 143 if not conf.CheckLibWithHeader(conf.env["wcslib"], 144 'wcslib/wcs.h', language='c'): 121 145 Exit(1) 122 146 conf.env.AddCustomPackage('rpfits') … … 125 149 126 150 # test for blas/lapack 151 lapackname = conf.env.get("lapacklib", "lapack") 127 152 conf.env.AddCustomPackage("lapack") 128 if not conf.CheckLib( conf.env["lapacklib"]): Exit(1)153 if not conf.CheckLib(lapackname): Exit(1) 129 154 blasname = conf.env.get("blaslib", "blas") 130 155 conf.env.AddCustomPackage("blas") 131 if not conf.CheckLib( conf.env["blaslib"]): Exit(1)156 if not conf.CheckLib(blasname): Exit(1) 132 157 conf.env.CheckFortran(conf) 133 158 if not conf.CheckLib('stdc++', language='c++'): Exit(1) 159 if conf.env["alma"]: 160 conf.env.Append(CPPFLAGS=['-DUSE_ALMA']) 134 161 env = conf.Finish() 135 162 136 env["version"] = " 2.2.x"163 env["version"] = "3.0.0" 137 164 138 165 if env['mode'] == 'release': … … 141 168 env.Append(CCFLAGS=["-O2"]) 142 169 else: 143 env.Append(CCFLAGS=["-g" ])170 env.Append(CCFLAGS=["-g", "-Wall"]) 144 171 145 172 # Export for SConscript files … … 165 192 166 193 # install targets 167 somod = env.Install("$moduledir/asap", so ) 168 pymods = env.Install("$moduledir/asap", env.SGlob("python/*.py")) 169 bins = env.Install("$prefix/bin", ["bin/asap", "bin/asap_update_data"]) 170 shares = env.Install("$moduledir/asap/data", "share/ipythonrc-asap") 171 env.Alias('install', [somod, pymods, bins, shares]) 194 installs = [] 195 installs.append(env.Install("$moduledir/asap", so)) 196 installs.append(env.Install("$moduledir/asap", env.SGlob("python/*.py"))) 197 installs.append(env.Install("$prefix/bin", 198 ["bin/asap", "bin/asap_update_data"])) 199 installs.append(env.Install("$moduledir/asap/data", "share/ipythonrc-asap")) 200 installs.append(env.Install("$moduledir/asap/data", "share/ipy_user_conf.py")) 201 env.Alias('install', installs) 172 202 173 203 # install aips++ data repos 174 rootdir =None204 rootdir = None 175 205 outdir = os.path.join(env["moduledir"],'asap','data') 176 206 sources = ['ephemerides','geodetic'] … … 193 223 env.QInstall("$stagedir", ["bin/install"]) 194 224 env.QInstall("$stagedir/asap/data", "share/ipythonrc-asap") 225 env.QInstall("$stagedir/asap/data", "share/ipy_user_conf.py") 195 226 if rootdir is not None: 196 227 # This creates a directory Using data table... - disabled … … 209 240 env.SConscript("doc/SConscript") 210 241 242 if env["apps"]: 243 env.SConscript("apps/SConscript") 244 211 245 if env.GetOption("clean"): 212 246 Execute(Delete(".sconf_temp"))
Note:
See TracChangeset
for help on using the changeset viewer.