Skip to content

Commit

Permalink
Install Julia mains with targets.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
cako committed Dec 19, 2017
1 parent 3d2acb3 commit a1a6a85
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions framework/bldutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,25 @@ def install_py_mains(env, progs_py, bindir):

################################################################################

def install_jl_mains(env, progs_jl, bindir):
'Copy Julia programs to bindir'

mains_jl = Split(progs_jl)

if sys.platform[:6] == 'cygwin':
exe = '.exe'
else:
exe = ''

for prog in mains_jl:
binary = os.path.join(bindir,'sf'+prog+exe)
# Copy the program to the right location
env.InstallAs(binary,'M'+prog+'.jl')
# Fix permissions for executable python files
env.AddPostAction(binary,Chmod(str(binary),0755))

################################################################################

def install_py_modules(env, py_modules, pkgdir):
'Compile Python modules and install to pkgdir/user'

Expand Down Expand Up @@ -482,6 +501,7 @@ def __init__(self):
self.f90 = None # F90 mains
self.py = None # Python mains
self.py_modules = None # Python modules that do not need SWIG and numpy
self.jl = None # Julia mains
def build_all(self, env, glob_build, srcroot, bindir, libdir, pkgdir):
if glob_build:
env = env.Clone()
Expand Down Expand Up @@ -523,6 +543,10 @@ def build_all(self, env, glob_build, srcroot, bindir, libdir, pkgdir):
docs_py = install_py_mains(env, self.py, bindir)
if self.py_modules:
install_py_modules(env, self.py_modules, pkgdir)

if self.jl:
install_jl_mains(env, self.jl, bindir)

install_self_doc(env, pkgdir, docs_c, docs_py, docs_f90, docs_c_mpi)

# Additions by Hui Wang
Expand Down

0 comments on commit a1a6a85

Please sign in to comment.