1 |
johnpye |
386 |
Import('env') |
2 |
|
|
|
3 |
|
|
srcs = Split(""" |
4 |
|
|
AscBitmaps.c AscPrintTcl.c BrowLogRel_io.c BrowWhen_io.c |
5 |
|
|
BrowserMethod.c BrowserProc.c BrowserQuery.c BrowserRel_io.c |
6 |
|
|
Commands.c DebugProc.c DisplayProc.c |
7 |
|
|
EnvVarProc.c HelpProc.c Integrators.c |
8 |
|
|
LibraryProc.c Lsode.c MtxProc.c ProbeProc.c Qlfdid.c |
9 |
|
|
ScriptProc.c Sensitivity.c SimsProc.c SlvProc.c |
10 |
|
|
SolverProc.c UnitsProc.c UserData.c |
11 |
johnpye |
521 |
tkConsole.c old_utils.c Driver.c |
12 |
johnpye |
386 |
""") |
13 |
|
|
|
14 |
johnpye |
498 |
if env['HAVE_LEX']: |
15 |
|
|
typelexsource = 'typelex.l' |
16 |
johnpye |
520 |
else: |
17 |
johnpye |
498 |
typelexsource = 'typelex_no_flex.c' |
18 |
johnpye |
386 |
|
19 |
johnpye |
521 |
tcl_env = env.Copy() |
20 |
|
|
|
21 |
|
|
typelex = tcl_env.SharedObject(typelexsource |
22 |
johnpye |
412 |
, LEXFLAGS = '-ll -Ptyp_' |
23 |
johnpye |
386 |
) |
24 |
|
|
|
25 |
johnpye |
552 |
if tcl_env.get('TCL_CPPPATH'): |
26 |
johnpye |
521 |
tcl_env.Append(CPPPATH=tcl_env['TCL_CPPPATH']) |
27 |
johnpye |
464 |
|
28 |
johnpye |
552 |
if tcl_env.get('TK_CPPPATH'): |
29 |
johnpye |
521 |
tcl_env.Append(CPPPATH=tcl_env['TK_CPPPATH']) |
30 |
johnpye |
428 |
|
31 |
johnpye |
521 |
tcl_env.Append(LIBS=['ascend']) |
32 |
|
|
tcl_env.Append(LIBPATH=['#']) |
33 |
johnpye |
428 |
|
34 |
johnpye |
552 |
if tcl_env.get('STATIC_TCLTK'): |
35 |
johnpye |
521 |
print "STATIC TCL/TK PROGRAM LINKAGE" |
36 |
|
|
srcs += ['$TCL_LIB','$TK_LIB','$TKTABLE_LIB'] |
37 |
|
|
tcl_env.Append(LIBS=tcl_env['X11_LIB']) |
38 |
|
|
tcl_env.Append(LIBPATH=tcl_env['X11_LIBPATH']) |
39 |
johnpye |
460 |
|
40 |
johnpye |
561 |
if tcl_env['TKTABLE_LIBPATH']: |
41 |
|
|
tcl_env.Append(LIBPATH=tcl_env['TKTABLE_LIBPATH']) |
42 |
|
|
|
43 |
johnpye |
521 |
tcl_env.Program("ascend4",["main.c"] + srcs) |
44 |
|
|
else: |
45 |
|
|
print "DYNAMIC TCL/TK PROGRAM LINKAGE" |
46 |
johnpye |
540 |
tcl_env.Append(LIBS=tcl_env['TCL_LIB']) |
47 |
|
|
tcl_env.Append(LIBS=tcl_env['TK_LIB']) |
48 |
johnpye |
432 |
|
49 |
johnpye |
521 |
if tcl_env.has_key('TCL_LIBPATH'): |
50 |
|
|
tcl_env.Append(LIBPATH=tcl_env['TCL_LIBPATH']) |
51 |
|
|
if tcl_env.has_key('TK_LIBPATH'): |
52 |
|
|
tcl_env.Append(LIBPATH=tcl_env['TK_LIBPATH']) |
53 |
johnpye |
432 |
|
54 |
johnpye |
552 |
ascendtcllib = tcl_env.SharedLibrary('ascendtcl',srcs+typelex) |
55 |
johnpye |
521 |
|
56 |
|
|
#tcl_so = tcl_env.Command(Copy('$SHLIBPREFIX$TCL_LIB$SHLIBSUFFIX','$TCL_LIBPATH/$SHLIBPREFIX$TCL_LIB$SHLIBSUFFIX')) |
57 |
|
|
#tk_so = tcl_env.Command(Copy('$SHLIBPREFIX$TK_LIB$SHLIBSUFFIX','$TK_LIBPATH/$SHLIBPREFIX$TK_LIB$SHLIBSUFFIX')) |
58 |
|
|
#tktable_so = tcl_env.Command(Copy('$SHLIBPREFIX$TKTABLE_LIB$SHLIBSUFFIX','$TKTABLE_LIBPATH/$SHLIBPREFIX$TKTABLE_LIB$SHLIBSUFFIX')) |
59 |
|
|
|
60 |
|
|
tcl_env.Append(LIBPATH=['.']) |
61 |
|
|
|
62 |
johnpye |
552 |
ascendtclprog = tcl_env.Program("ascend4",["main.c"] |
63 |
johnpye |
561 |
, LIBS = tcl_env['LIBS']+['ascendtcl','ascend'] |
64 |
johnpye |
521 |
) |
65 |
|
|
|
66 |
johnpye |
552 |
if tcl_env.get('CAN_INSTALL'): |
67 |
|
|
env.InstallProgram(env['INSTALL_ROOT']+env['INSTALL_BIN'],ascendtclprog) |
68 |
|
|
env.InstallProgram(env['INSTALL_ROOT']+env['INSTALL_LIB'],ascendtcllib) |
69 |
johnpye |
521 |
|
70 |
johnpye |
552 |
import glob |
71 |
|
|
|
72 |
|
|
sharedata = env['INSTALL_ROOT']+env['INSTALL_DATA']+"/ascend" |
73 |
|
|
tkdir = sharedata + "/tcltk/" |
74 |
|
|
|
75 |
|
|
import os |
76 |
|
|
import os.path |
77 |
|
|
|
78 |
|
|
cd = os.getcwd() |
79 |
|
|
os.chdir(env.Dir("#tcltk98/TK").abspath) |
80 |
|
|
|
81 |
|
|
files = {} |
82 |
|
|
|
83 |
|
|
for root, dirs, files in os.walk("."): |
84 |
|
|
#print root, "..." |
85 |
|
|
dest = os.path.normpath(os.path.join(env.subst(tkdir),root)) |
86 |
|
|
for name in files: |
87 |
|
|
env.Install(env.subst(dest),"#tcltk98/TK/"+os.path.join(root, name)) |
88 |
|
|
#print dest,"<---",os.path.join(root, name) |
89 |
|
|
|
90 |
|
|
if 'CVS' in dirs: |
91 |
|
|
dirs.remove('CVS') # don't visit CVS directories |
92 |
|
|
if '.svn' in dirs: |
93 |
|
|
dirs.remove('.svn') # don't visit .svn directories |
94 |
|
|
|
95 |
|
|
os.chdir(cd) |