-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSConstruct
More file actions
61 lines (50 loc) · 1.85 KB
/
Copy pathSConstruct
File metadata and controls
61 lines (50 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import os, sys, string
sys.path.append('../../framework')
import bldutil
progs = '''
bargraph box contour contour3 dots graph graph3 grey grey3 grey4 plas
pldb plotrays thplot vplotdiff wiggle
'''
try:
Import('env root bindir libdir pkgdir')
env = env.Clone()
alias = {'grey':['byte','bar'],'grey3':['cubeplot']}
except:
env = bldutil.Debug()
root = None
SConscript('../lib/SConstruct')
libprefix = env.get('DYNLIB','')
env.Prepend(CPPPATH=['../../include'],
LIBPATH=['../../lib'],
LIBS=[libprefix+'rsfplot', libprefix+'rsf'])
mains = Split(progs)
docalias={}
for prog in mains:
main = env.Program(prog + '.c')
if root:
install = env.Install(bindir,main[0])
if libprefix and env['PLATFORM'] == 'darwin':
env.AddPostAction(install,
'%s -change build/api/c/libdrsf.dylib '
'%s/libdrsf.dylib %s' % \
(WhereIs('install_name_tool'),libdir,install[0]))
env.AddPostAction(install,
'%s -change build/plot/lib/libdrsfplot.dylib '
'%s/libdrsfplot.dylib %s' % \
(WhereIs('install_name_tool'),libdir,install[0]))
if prog in alias.keys():
for al in Split(alias[prog]):
copy = string.replace(str(main[0]),prog,al)
env.InstallAs(os.path.join(bindir,copy),main[0])
doc = os.path.splitext(copy)[0]
docalias[doc] = 'sf'+prog
######################################################################
# SELF-DOCUMENTATION
######################################################################
if root:
main = 'sfplot.py'
docs = map(env.Doc,mains)
env.Depends(docs,'#/framework/rsf/doc.py')
doc = env.RSF_Docmerge(main,docs,alias=docalias)
env.Install('../../framework/rsf',doc)
env.Install(pkgdir,doc)