def installlapack(ctx):
  filen = version+".tgz"
  atl.installsmthg_pre(ctx,"http://www.netlib.org/lapack/"+filen,filen)
  from waflib import Utils,Errors
  dii = {"FCC":ctx.env.FC,"FCFLAGS":" ".join(ctx.env.FCFLAGS+ctx.env.FCFLAGS_fcshlib),"FLINKFLAGS":" ".join(ctx.env.FCFLAGS+ctx.env.LINKFLAGS_fcshlib),"SO":ctx.env.shsuffix,"MFLAG":" ".join(ctx.env.FCFLAGS) }
  Logs.pprint("PINK","build blas")
  f=open("build/%s/make.inc"%version,"w")
  print >>f,make_inc_blas%dii
  f.close()
  cmdline = "cd build/%s; make blaslib"%version
  if ctx.exec_command(cmdline)!=0:
    raise Errors.WafError("Cannot build %s"%version)
  Logs.pprint("PINK","build lapack")
  f=open("build/%s/make.inc"%version,"w")
  print >>f,make_inc_lapack%dii
  f.close()
  cmdline = "cd build/%s; make lapacklib"%version
  if ctx.exec_command(cmdline)!=0:
    raise Errors.WafError("Cannot build %s"%version)
  
  import shutil
  shutil.copyfile("build/%s/liblapack_clik.%s"%(version,ctx.env.shsuffix), osp.join(ctx.env.LIBDIR,"liblapack_clik.%s"%ctx.env.shsuffix))
  shutil.copyfile("build/%s/libblas_clik.%s"%(version,ctx.env.shsuffix), osp.join(ctx.env.LIBDIR,"libblas_clik.%s"%ctx.env.shsuffix))

  do_include(ctx)
dataset/ETHPy150Open baudren/montepython_public/wrapper_wmap/waf_tools/any_lapack.py/installlapack/original