/[ascend]/trunk/SConstruct
ViewVC logotype

Contents of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 782 - (show annotations) (download)
Tue Jul 25 02:09:12 2006 UTC (13 years, 4 months ago) by johnpye
File size: 35408 byte(s)
Radu Serban sent me a preview of the new version of IDA which has new header file layout.
This patch updates for the new layout.
Also couple of minor fixes for gcc warnings in numlist and library.cpp.
1 import os, commands, platform, distutils.sysconfig, os.path
2
3 version = "0.9.5.95"
4
5 #------------------------------------------------------
6 # OPTIONS
7 #
8 # Note that if you set the options via the command line, they will be
9 # remembered in the file 'options.cache'. It's a feature ;-)
10
11 opts = Options(['options.cache', 'config.py'])
12 #print "PLATFORM = ",platform.system()
13
14 if platform.system()=="Windows":
15 default_tcl_lib = "tcl84"
16 default_tk_lib = "tk84"
17 default_tktable_lib = "Tktable28"
18 default_install_assets = "glade/"
19 icon_extension = '.png'
20 default_tcl = "c:\\Tcl"
21 if os.environ.get('MSYSTEM')=="MINGW32":
22 default_tcl_libpath="$TCL\\bin"
23 else:
24 default_tcl_libpath="$TCL\\lib"
25 default_rel_distdir = '.'
26 default_absolute_paths = False
27
28 default_ida_prefix = "c:\\MinGW"
29 if not os.path.exists(default_ida_prefix):
30 default_ida_prefix = None
31
32 need_libm = False
33 python_exe = "c:\\Python24\\python.exe"
34 else:
35 default_tcl_lib = "tcl8.4"
36 default_tk_lib = "tk8.4"
37 default_tktable_lib = "Tktable2.8"
38 default_install_assets = "$INSTALL_ASCDATA/glade/"
39 icon_extension = '.svg'
40 default_tcl = '/usr'
41 default_tcl_libpath = "$TCL/lib"
42 default_rel_distdir = '../share/ascend'
43 default_absolute_paths = True
44 default_ida_prefix="/usr/local"
45 need_libm = True
46 if not os.path.isdir(default_tcl):
47 default_tcl = '/usr'
48 python_exe = distutils.sysconfig.EXEC_PREFIX+"/bin/python"
49
50 opts.Add(
51 'CC'
52 ,'C Compiler command'
53 ,None
54 )
55
56 opts.Add(
57 'CXX'
58 ,'C++ Compiler command'
59 ,None
60 )
61
62 opts.Add(BoolOption(
63 'GCOV'
64 , 'Whether to enable coverage testing in object code'
65 , False
66 ))
67
68 # Package linking option
69 opts.Add(EnumOption(
70 'PACKAGE_LINKING'
71 , 'Style of linking for external libraries'
72 , 'DYNAMIC_PACKAGES'
73 , ['DYNAMIC_PACKAGES', 'STATIC_PACKAGES', 'NO_PACKAGES']
74 ))
75
76 opts.Add(BoolOption(
77 'WITH_GCCVISIBILITY'
78 ,"Whether to use GCC Visibility features (only applicable if available)"
79 ,True
80 ))
81
82 # You can turn off building of Tcl/Tk interface
83 opts.Add(BoolOption(
84 'WITH_TCLTK'
85 ,"Set to False if you don't want to build the original Tcl/Tk GUI."
86 , True
87 ))
88
89 # You can turn off the building of the Python interface
90 opts.Add(BoolOption(
91 'WITH_PYTHON'
92 ,"Set to False if you don't want to build Python wrappers."
93 , True
94 ))
95
96 # Which solvers will we allow?
97 opts.Add(ListOption(
98 'WITH_SOLVERS'
99 ,"List of the solvers you want to build. The default is the minimum that"
100 +" works."
101 ,["QRSLV","CMSLV","LSOD","IDA"]
102 ,['QRSLV','MPS','SLV','OPTSQP'
103 ,'NGSLV','CMSLV','LRSLV','MINOS','CONOPT'
104 ,'LSOD','OPTSQP',"IDA"
105 ]
106 ))
107
108 # Where will the local copy of the help files be kept?
109 opts.Add(PackageOption(
110 'WITH_LOCAL_HELP'
111 , "Directory containing the local copy of the help files (optional)"
112 , "no"
113 ))
114
115 # Will bintoken support be enabled?
116 opts.Add(BoolOption(
117 'WITH_BINTOKEN'
118 ,"Enable bintoken support? This means compiling models as C-code before"
119 +" running them, to increase solving speed for large models."
120 ,False
121 ))
122
123 # What should the default ASCENDLIBRARY path be?
124 # Note: users can change it by editing their ~/.ascend.ini
125 opts.Add(
126 'DEFAULT_ASCENDLIBRARY'
127 ,"Set the default value of the ASCENDLIBRARY -- the location where"
128 +" ASCEND will look for models when running ASCEND"
129 ,"$INSTALL_ASCDATA/models"
130 )
131
132 # Where is SWIG?
133 opts.Add(
134 'SWIG'
135 ,"SWIG location, probably only required for MinGW and MSVC users."
136 +" Enter the location as a Windows-style path, for example"
137 +" 'c:\\msys\\1.0\\home\\john\\swigwin-1.3.29\\swig.exe'."
138 )
139
140 # Build the test suite?
141 opts.Add(BoolOption(
142 'WITH_CUNIT'
143 ,"You can disable CUnit tests with this option. This will basically stop"
144 +" SCons from parsing the SConscript files relating to the 'test'"
145 +" target, which just might make things marginally faster. Probably"
146 +" you can just ignore this option though. SCons will sniff for Cunit"
147 +" but build the tests only if you specify the 'test' target."
148 ,True
149 ))
150
151 # Where are the CUnit includes?
152 opts.Add(PackageOption(
153 'CUNIT_CPPPATH'
154 ,"Where are your CUnit include files?"
155 ,'off'
156 ))
157
158 # Where are the CUnit libraries?
159 opts.Add(PackageOption(
160 'CUNIT_LIBPATH'
161 ,"Where are your CUnit libraries?"
162 ,'off'
163 ))
164
165 opts.Add(PackageOption(
166 "IDA_PREFIX"
167 ,"Prefix for your IDA install (IDA ./configure --prefix)"
168 ,default_ida_prefix
169 ))
170
171 opts.Add(
172 "IDA_LIB"
173 ,"Libraries linked to for IDA"
174 ,['sundials_ida','sundials_nvecserial','m']
175 )
176
177 opts.Add(
178 'IDA_CPPPATH'
179 ,"Where is your ida.h?"
180 ,"$IDA_PREFIX/include"
181 )
182
183 opts.Add(
184 'IDA_LIBPATH'
185 ,"Where are your SUNDIALS libraries installed?"
186 ,"$IDA_PREFIX/lib"
187 )
188
189 opts.Add(
190 "F2C_LIB"
191 ,"F2C library (eg. g2c, gfortran, f2c)"
192 ,"g2c"
193 )
194
195 opts.Add(PackageOption(
196 "F2C_LIBPATH"
197 ,"Directory containing F2C library (i.e. g2c, gfortran, f2c, etc.), if not already accessible"
198 ,"off"
199 ))
200
201 opts.Add(
202 'TCL'
203 ,'Base of Tcl distribution'
204 ,default_tcl
205 )
206
207 # Where are the Tcl includes?
208 opts.Add(
209 'TCL_CPPPATH'
210 ,"Where are your Tcl include files?"
211 ,"$TCL/include"
212 )
213
214 # Where are the Tcl libs?
215 opts.Add(
216 'TCL_LIBPATH'
217 ,"Where are your Tcl libraries?"
218 ,default_tcl_libpath
219 )
220
221 # What is the name of the Tcl lib?
222 opts.Add(
223 'TCL_LIB'
224 ,"Name of Tcl lib (eg 'tcl' or 'tcl83'), for full path to static library (if STATIC_TCLTK is set)"
225 ,default_tcl_lib
226 )
227
228 # Where are the Tk includes?
229 opts.Add(
230 'TK_CPPPATH'
231 ,"Where are your Tk include files?"
232 ,'$TCL_CPPPATH'
233 )
234
235 # Where are the Tk libs?
236 opts.Add(
237 'TK_LIBPATH'
238 ,"Where are your Tk libraries?"
239 ,'$TCL_LIBPATH'
240 )
241
242 # What is the name of the Tk lib?
243 opts.Add(
244 'TK_LIB'
245 ,"Name of Tk lib (eg 'tk' or 'tk83'), or full path to static library"
246 ,default_tk_lib
247 )
248
249 # Static linking to TkTable
250
251 opts.Add(BoolOption(
252 'STATIC_TCLTK'
253 ,'Set true for static linking for Tcl/Tk and TkTable. EXPERIMENTAL'
254 ,False
255 ))
256
257 opts.Add(
258 'TKTABLE_LIBPATH'
259 ,'Location of TkTable static library'
260 ,'$TCL_LIBPATH/Tktable2.8'
261 )
262
263 opts.Add(
264 'TKTABLE_LIB'
265 ,'Stem name of TkTable (eg tktable2.8, no ".so" or "lib") shared library, or full path of static tktable (/usr/lib/...)'
266 ,default_tktable_lib
267 )
268
269 opts.Add(
270 'TKTABLE_CPPPATH'
271 ,'Location of TkTable header file'
272 ,'$TCL_CPPPATH'
273 )
274
275 opts.Add(
276 'X11'
277 ,'Base X11 directory. Only used when STATIC_TCLTK is turned on. EXPERIMENTAL'
278 ,'/usr/X11R6'
279 )
280
281 opts.Add(
282 'X11_LIBPATH'
283 ,'Location of X11 lib. EXPERIMENTAL'
284 ,'$X11/lib'
285 )
286
287 opts.Add(
288 'X11_CPPPATH'
289 ,'Location of X11 includes. EXPERIMENTAL'
290 ,'$X11/include'
291 )
292
293 opts.Add(
294 'X11_LIB'
295 ,'Name of X11 lib. EXPERIMENTAL'
296 ,'X11'
297 )
298
299 opts.Add(
300 'INSTALL_PREFIX'
301 ,'Root location for installed files'
302 ,'/usr/local'
303 )
304
305 opts.Add(
306 'INSTALL_BIN'
307 ,'Location to put binaries during installation'
308 ,"$INSTALL_PREFIX/bin"
309 )
310
311 opts.Add(
312 'INSTALL_LIB'
313 ,'Location to put libraries during installation'
314 ,"$INSTALL_PREFIX/lib"
315 )
316
317 opts.Add(
318 'INSTALL_SHARE'
319 ,'Common shared-file location on this system'
320 ,"$INSTALL_PREFIX/share"
321 )
322
323
324 opts.Add(
325 'INSTALL_ASCDATA'
326 ,"Location of ASCEND shared data (TK, python, models etc)"
327 ,"$INSTALL_SHARE/ascend"
328 )
329
330 opts.Add(
331 'INSTALL_INCLUDE'
332 ,'Location to put header files during installation'
333 ,"$INSTALL_PREFIX/include"
334 )
335
336 opts.Add(
337 'PYGTK_ASSETS'
338 ,'Default location for Glade assets (placed in pygtk/config.py)'
339 ,default_install_assets
340 )
341
342 opts.Add(BoolOption(
343 'DEBUG'
344 ,"Compile source with debugger symbols, eg for use with 'gdb'"
345 ,False
346 ))
347
348 opts.Add(BoolOption(
349 'MALLOC_DEBUG'
350 ,"Compile with debugging version of MALLOC. Required for full CUnit testing"
351 ,False
352 ))
353
354 opts.Add(
355 'INSTALL_ROOT'
356 ,'For use by RPM only: location of %{buildroot} during rpmbuild'
357 ,""
358 )
359
360 opts.Add(
361 'DISTTAR_NAME'
362 ,"Stem name of the tarball created by 'scons dist'. So for 'ascend-aaa.tar.bz2', set this to 'ascend-aaa'."
363 ,"ascend-"+version
364 )
365
366 opts.Add(
367 'RELEASE'
368 ,"Release number for use in RPM spec file. This should always start with a zero for releases made by the ASCEND group, in order that third parties can make 'patch' releases of higher version numbers."
369 ,"0"
370 )
371
372 opts.Add(BoolOption(
373 'ABSOLUTE_PATHS'
374 ,"Whether to use absolute or relative paths in the installed Tcl/Tk interface. If you want to build an RPM, set this to false."
375 ,default_absolute_paths
376 ))
377
378 opts.Add(
379 'WIN_INSTALLER_NAME'
380 ,"Name of the installer .exe to create under Windows (minus the '.exe')"
381 ,"ascend-"+version
382 )
383
384 opts.Add(BoolOption(
385 'WITH_XTERM_COLORS'
386 ,"Set to 0 if you don't want xterm colour codes in the console output"
387 ,True
388 ))
389
390 opts.Add(BoolOption(
391 'WITH_EXTFNS'
392 ,"Set to 0 if you don't want to attempt to build external modules bundled"
393 + " with ASCEND."
394 ,True
395 ))
396
397 if platform.system()!="Windows":
398 opts.Add(BoolOption(
399 'WITH_GCCVISIBILITY'
400 , 'Whether to use GCC Visibility extensions when building with GCC 4.0'
401 , True
402 ))
403
404 # TODO: OTHER OPTIONS?
405 # TODO: flags for optimisation
406 # TODO: turning on/off bintoken functionality
407 # TODO: Where will the 'Makefile.bt' file be installed?
408
409 # Import the outside environment
410
411 if os.environ.get('OSTYPE')=='msys':
412 env = Environment(
413 ENV=os.environ
414 , tools=['mingw','lex','yacc','fortran','swig','disttar','nsis','doxygen']
415 , toolpath=['scons']
416 )
417 env['IS_MINGW']=True
418
419 elif platform.system()=="Windows":
420 env = Environment(
421 ENV={
422 'PATH':os.environ['PATH']
423 ,'INCLUDE':os.environ['INCLUDE']
424 ,'LIB':os.environ['LIB']
425 ,'MSVS_IGNORE_IDE_PATHS':1
426 }
427 , tools = ['default','lex','yacc','fortran','swig','disttar','nsis','doxygen']
428 , toolpath = ['scons']
429 )
430 env.Append(CPPDEFINES=['_CRT_SECURE_NO_DEPRECATE'])
431 else:
432 env = Environment(
433 ENV=os.environ
434 , tools=['default','lex','yacc','fortran','swig','disttar','nsis','doxygen']
435 , toolpath=['scons']
436 )
437
438 opts.Update(env)
439 opts.Save('options.cache',env)
440
441 Help(opts.GenerateHelpText(env))
442
443 with_tcltk = env.get('WITH_TCLTK')
444 without_tcltk_reason = "disabled by options/config.py"
445
446 with_python = env.get('WITH_PYTHON')
447 without_python_reason = "disabled by options/config.py"
448
449 with_cunit = env.get('WITH_CUNIT')
450 without_cunit_reason = "not requested"
451
452 with_extfns = env.get('WITH_EXTFNS')
453 without_extfn_reason = "disabled by options/config.py"
454
455 if platform.system()=="Windows":
456 with_installer=1
457 else:
458 with_installer=0
459 without_installer_reason = "only possible under Windows"
460
461 if 'LSOD' in env['WITH_SOLVERS']:
462 with_lsode=True
463 else:
464 with_lsode=False
465 without_lsode_reason = "not requested (WITH_SOLVERS)"
466
467 if 'IDA' in env['WITH_SOLVERS']:
468 with_ida=True
469 else:
470 with_ida=False
471 without_ida_reason = "not requested (WITH_SOLVERS)"
472
473
474 #print "SOLVERS:",env['WITH_SOLVERS']
475 #print "WITH_BINTOKEN:",env['WITH_BINTOKEN']
476 #print "DEFAULT_ASCENDLIBRARY:",env['DEFAULT_ASCENDLIBRARY']
477
478 can_install = True
479 if platform.system()=='Windows':
480 can_install = False
481
482 env['CAN_INSTALL']=can_install
483
484 env['INSTALL_MODELS']=env['INSTALL_ASCDATA']+"/models/"
485
486 print "TCL_CPPPATH =",env['TCL_CPPPATH']
487 print "TCL_LIBPATH =",env['TCL_LIBPATH']
488 print "TCL_LIB =",env['TCL_LIB']
489 print "CC =",env['CC']
490 print "CXX =",env['CXX']
491 print "FORTRAN=",env.get('FORTRAN')
492
493 print "ABSOLUTE PATHS =",env['ABSOLUTE_PATHS']
494 #------------------------------------------------------
495 # SPECIAL CONFIGURATION TESTS
496
497 need_fortran = False
498
499 #----------------
500 # SWIG
501
502 import os,re
503
504 def get_swig_version(env):
505 cmd = env['SWIG']+' -version'
506 (cin,coutcerr) = os.popen4(cmd)
507 output = coutcerr.read()
508
509 restr = "SWIG\\s+Version\\s+(?P<maj>[0-9]+)\\.(?P<min>[0-9]+)\\.(?P<pat>[0-9]+)\\s*$"
510 expr = re.compile(restr,re.M);
511 m = expr.search(output);
512 if not m:
513 return None
514 maj = int(m.group('maj'))
515 min = int(m.group('min'))
516 pat = int(m.group('pat'))
517
518 return (maj,min,pat)
519
520
521 def CheckSwigVersion(context):
522
523 try:
524 context.Message("Checking version of SWIG... ")
525 maj,min,pat = get_swig_version(context.env)
526 except:
527 context.Result("Failed to detect version, or failed to run SWIG")
528 return 0;
529
530 context.env['SWIGVERSION']=tuple([maj,min,pat])
531
532 if maj == 1 and (
533 min > 3
534 or (min == 3 and pat >= 24)
535 ):
536 context.Result("ok, %d.%d.%d" % (maj,min,pat))
537 return 1;
538 else:
539 context.Result("too old, %d.%d.%d" % (maj,min,pat))
540 return 0;
541
542 #----------------
543 # General purpose library-and-header test
544
545 class KeepContext:
546 def __init__(self,context,varprefix,static=False):
547 self.keep = {}
548 for k in ['LIBS','LIBPATH','CPPPATH','LINKFLAGS']:
549 #print "Keeping env %s = %s" % (k,context.env.get(k))
550 self.keep[k]=context.env.get(k)
551
552 if context.env.has_key(varprefix+'_CPPPATH'):
553 context.env.AppendUnique(CPPPATH=[env[varprefix+'_CPPPATH']])
554 #print "Adding '"+str(cpppath_add)+"' to cpp path"
555
556 if static:
557 staticlib=env[varprefix+'_LIB']
558 #print "STATIC LIB = ",staticlib
559 context.env.Append(
560 LINKFLAGS=[staticlib]
561 )
562 else:
563 if context.env.has_key(varprefix+'_LIBPATH'):
564 context.env.Append(LIBPATH=[env[varprefix+'_LIBPATH']])
565 #print "Adding '"+str(libpath_add)+"' to lib path"
566
567 if context.env.has_key(varprefix+'_LIB'):
568 context.env.Append(LIBS=[env[varprefix+'_LIB']])
569 #print "Adding '"+str(env[varprefix+'_LIB'])+"' to libs"
570
571 def restore(self,context):
572 #print "RESTORING CONTEXT"
573 #print self.keep
574 #print "..."
575 for k in self.keep:
576 if self.keep[k]==None:
577 if context.env.has_key(k):
578 #print "Clearing "+str(k)
579 del context.env[k];
580 else:
581 #print "Restoring %s to '%s'" %(k,self.keep.get(k))
582 context.env[k]=self.keep[k];
583
584 def CheckExtLib(context,libname,text,ext='.c',varprefix=None,static=False):
585 """This method will check for variables LIBNAME_LIBPATH
586 and LIBNAME_CPPPATH and try to compile and link the
587 file with the provided text, linking with the
588 library libname."""
589
590 if static:
591 context.Message( 'Checking for static '+libname+'... ' )
592 else:
593 context.Message( 'Checking for '+libname+'... ' )
594
595 if varprefix==None:
596 varprefix = libname.upper()
597
598 #print "LIBS is currently:",context.env.get('LIBS')
599 keep = KeepContext(context,varprefix,static)
600
601 if not context.env.has_key(varprefix+'_LIB'):
602 # if varprefix_LIB were in env, KeepContext would
603 # have appended it already
604 context.env.Append(LIBS=[libname])
605
606 is_ok = context.TryLink(text,ext)
607
608 #print "Link success? ",(is_ok != 0)
609
610 keep.restore(context)
611
612 # print "Restored CPPPATH="+str(context.env['CPPPATH'])
613 # print "Restored LIBS="+str(context.env['LIBS'])
614 # print "Restored LIBPATH="+str(context.env['LIBPATH'])
615
616 context.Result(is_ok)
617 return is_ok
618
619 #----------------
620 # GCC
621
622 gcc_test_text = """
623 #ifndef __GNUC__
624 # error "Not using GCC"
625 #endif
626
627 int main(void){
628 return __GNUC__;
629 }
630 """
631
632 def CheckGcc(context):
633 context.Message("Checking for GCC... ")
634 is_ok = context.TryCompile(gcc_test_text,".c")
635 context.Result(is_ok)
636 return is_ok
637
638 #----------------
639 # GCC VISIBILITY feature
640
641 gccvisibility_test_text = """
642 #if __GNUC__ < 4
643 # error "Require GCC version 4 or newer"
644 #endif
645
646 __attribute__ ((visibility("default"))) int x;
647
648 int main(void){
649 extern int x;
650 x = 4;
651 }
652 """
653
654 def CheckGccVisibility(context):
655 context.Message("Checking for GCC 'visibility' capability... ")
656 if not context.env.has_key('WITH_GCCVISIBILITY') or not env['WITH_GCCVISIBILITY']:
657 context.Result("disabled")
658 return 0
659 is_ok = context.TryCompile(gccvisibility_test_text,".c")
660 context.Result(is_ok)
661 return is_ok
662
663 #----------------
664 # YACC
665
666 yacc_test_text = """
667 %{
668 #include <stdio.h>
669
670 /* MSVC++ needs this before it can swallow Bison output */
671 #ifdef _MSC_VER
672 # define __STDC__
673 #endif
674 %}
675 %token MSG
676 %start ROOT
677 %%
678 ROOT:
679 MSG { printf("HELLO"); }
680 ;
681 %%
682 """
683
684 def CheckYacc(context):
685 context.Message("Checking for Yacc ('%s')... " % context.env.get('YACC'))
686 is_ok = context.TryCompile(yacc_test_text,".y")
687 context.Result(is_ok)
688 return is_ok
689
690 #----------------
691 # CUnit test
692
693 cunit_test_text = """
694 #include <CUnit/CUnit.h>
695 int maxi(int i1, int i2){
696 return (i1 > i2) ? i1 : i2;
697 }
698
699 void test_maxi(void){
700 CU_ASSERT(maxi(0,2) == 2);
701 CU_ASSERT(maxi(0,-2) == 0);
702 CU_ASSERT(maxi(2,2) == 2);
703
704 }
705 int main(void){
706 /* CU_initialize_registry() */
707 return 0;
708 }
709 """
710
711 def CheckCUnit(context):
712 return CheckExtLib(context,'cunit',cunit_test_text)
713
714 #----------------
715 # MATH test
716
717 math_test_text = """
718 #ifndef _ALL_SOURCE
719 # define _ALL_SOURCE
720 #endif
721 #ifndef _XOPEN_SOURCE
722 # define _XOPEN_SOURCE
723 #endif
724 #ifndef _XOPEN_SOURCE_EXTENDED
725 # define _XOPEN_SOURCE_EXTENDED 1
726 #endif
727 #include <math.h>
728 int main(void){
729 double x = 1.0; double y = 1.0; int i = 1;
730 acosh(x); asinh(x); atanh(x); cbrt(x); expm1(x); erf(x); erfc(x); isnan(x);
731 j0(x); j1(x); jn(i,x); ilogb(x); logb(x); log1p(x); rint(x);
732 y0(x); y1(x); yn(i,x);
733 #ifdef _THREAD_SAFE
734 gamma_r(x,&i);
735 lgamma_r(x,&i);
736 #else
737 gamma(x);
738 lgamma(x);
739 #endif
740 hypot(x,y); nextafter(x,y); remainder(x,y); scalb(x,y);
741 return 0;
742 }
743 """
744
745 def CheckMath(context):
746 context.Message('Checking for IEE math library... ')
747 libsave=context.env.get('LIBS');
748 context.env.AppendUnique(LIBS=['m'])
749 is_ok=context.TryLink(math_test_text,".c")
750 context.Result(is_ok)
751 if not is_ok:
752 context.env['LIBS']=libsave
753 return is_ok
754
755 #----------------
756 # IDA test
757
758 ida_test_text = """
759 #include <ida/ida.h>
760 #include <nvector/nvector_serial.h>
761 #include <ida/ida_spgmr.h>
762 int main(){
763 void *ida_mem;
764 ida_mem = IDACreate();
765 return 0;
766 }
767 """
768
769 def CheckIDA(context):
770 context.Message( 'Checking for IDA (SUNDIALS)... ' )
771
772 keep = KeepContext(context,"IDA")
773
774 is_ok = context.TryLink(ida_test_text,".c")
775 context.Result(is_ok)
776
777 keep.restore(context)
778
779 return is_ok
780
781 #----------------
782 # Tcl test
783
784 # TCL and TK required version 8.1, 8.2, 8.3, or 8.4:
785 tcltk_minor_newest_acceptable = 4
786 tcltk_major_required = 8
787
788 tcl_check_text = r"""
789 #include <tcl.h>
790 #include <stdio.h>
791 int main(void){
792 printf("%s",TCL_PATCH_LEVEL);
793 return 0;
794 }
795 """
796
797 def CheckTcl(context):
798 return CheckExtLib(context,'tcl',tcl_check_text,static=env['STATIC_TCLTK'])
799
800 def CheckTclVersion(context):
801 keep = KeepContext(context,'TCL',static=env['STATIC_TCLTK'])
802 context.Message("Checking Tcl version... ")
803 (is_ok,output) = context.TryRun(tcl_check_text,'.c')
804 keep.restore(context)
805 if not is_ok:
806 context.Result("failed to run check")
807 return 0
808
809 major,minor,patch = tuple([int(i) for i in output.split(".")])
810 if major != tcltk_major_required or minor > tcltk_minor_newest_acceptable:
811 context.Result(output+" (bad version)")
812 # bad version
813 return 0
814
815 # good version
816 context.Result(output+", good")
817 return 1
818
819 #----------------
820 # Tk test
821
822 tk_check_text = r"""
823 #include <tk.h>
824 #include <stdio.h>
825 int main(void){
826 printf("%s",TK_PATCH_LEVEL);
827 return 0;
828 }
829 """
830 def CheckTk(context):
831 return CheckExtLib(context,'tk',tk_check_text,static=env['STATIC_TCLTK'])
832
833
834 def CheckTkVersion(context):
835 keep = KeepContext(context,'TK',static=context.env['STATIC_TCLTK'])
836 context.Message("Checking Tk version... ")
837 #print "LINKFLAGS =",context.env['LINKFLAGS']
838 (is_ok,output) = context.TryRun(tk_check_text,'.c')
839 keep.restore(context)
840 if not is_ok:
841 context.Result("failed to run check")
842 return 0
843
844 major,minor,patch = tuple([int(i) for i in output.split(".")])
845 if major != tcltk_major_required or minor > tcltk_minor_newest_acceptable:
846 # bad version
847 context.Result(output+" (bad version)")
848 return 0
849
850 # good version
851 context.Result(output+" (good)")
852 return 1
853
854 #----------------
855 # Tktable test
856
857 tktable_check_text = r"""
858 #include <tkTable.h>
859 #include <stdio.h>
860 int main(void){
861 Table mytable;
862 return 0;
863 }
864 """
865
866 def CheckTkTable(context):
867 return CheckExtLib(context,'tktable',tktable_check_text,static=env['STATIC_TCLTK'])
868
869 #---------------
870 # X11 test
871
872 x11_check_text = r"""
873 #include <X11/Xlib.h>
874 #include <X11/IntrinsicP.h>
875 #include <X11/Intrinsic.h>
876 #include <X11/ObjectP.h>
877 #include <X11/Object.h>
878 int main(void){
879 Object mything;
880 return 0;
881 }
882 """
883
884 def CheckX11(context):
885 return CheckExtLib(context,'X11',x11_check_text)
886
887 #----------------
888 # GCC Version sniffing
889
890 # TODO FIXME
891
892 gcc_version4 = False
893
894 #------------------------------------------------------
895 # CONFIGURATION
896
897 conf = Configure(env
898 , custom_tests = {
899 'CheckMath' : CheckMath
900 , 'CheckSwigVersion' : CheckSwigVersion
901 , 'CheckCUnit' : CheckCUnit
902 , 'CheckTcl' : CheckTcl
903 , 'CheckTclVersion' : CheckTclVersion
904 , 'CheckTk' : CheckTk
905 , 'CheckTkVersion' : CheckTkVersion
906 , 'CheckGcc' : CheckGcc
907 , 'CheckGccVisibility' : CheckGccVisibility
908 , 'CheckYacc' : CheckYacc
909 , 'CheckTkTable' : CheckTkTable
910 , 'CheckX11' : CheckX11
911 , 'CheckIDA' : CheckIDA
912 # , 'CheckIsNan' : CheckIsNan
913 # , 'CheckCppUnitConfig' : CheckCppUnitConfig
914 }
915 # , config_h = "config.h"
916 )
917
918 # stdio -- just to check that compiler is behaving
919
920 if not conf.CheckHeader('stdio.h'):
921 print "Did not find 'stdio.h'! Check your compiler configuration."
922 Exit(1)
923
924 # Math library
925
926 if need_libm:
927 if not conf.CheckMath():
928 print 'Did not find math library, exiting!'
929 Exit(1)
930 #pass
931
932 # Where is 'isnan'?
933
934 if not conf.CheckFunc('isnan') and not conf.CheckFunc('_isnan'):
935 print "Didn't find isnan"
936 # Exit(1)
937
938 # GCC visibility
939
940 if conf.CheckGcc():
941 conf.env['HAVE_GCC']=True;
942 if env['WITH_GCCVISIBILITY'] and conf.CheckGccVisibility():
943 conf.env['HAVE_GCCVISIBILITY']=True;
944 conf.env.Append(CCFLAGS=['-fvisibility=hidden'])
945 conf.env.Append(CPPDEFINES=['HAVE_GCCVISIBILITY'])
946 conf.env.Append(CCFLAGS=['-Wall'])
947
948 # YACC
949
950 if not conf.CheckYacc():
951 print "YACC NOT FOUND OR NOT WORKING"
952 else:
953 conf.env['HAVE_YACC']=True
954
955 conf.env['HAVE_LEX']=True
956
957 # Tcl/Tk
958
959 if with_tcltk:
960 if conf.CheckTcl():
961 if conf.CheckTclVersion():
962 if conf.CheckTk():
963 if with_tcltk and conf.CheckTkVersion():
964 if env['STATIC_TCLTK']:
965 if conf.CheckTkTable():
966 pass
967 else:
968 without_tcltk_reason = "TkTable not found"
969 with_tcltk = False
970 else:
971 without_tcltk_reason = "Require Tk version <= 8.4. See 'scons -h'"
972 with_tcltk = False
973 else:
974 without_tcltk_reason = "Tk not found."
975 with_tcltk = False
976 else:
977 without_tcltk_reason = "Require Tcl <= 8.4 Tcl."
978 with_tcltk = False
979
980 else:
981 without_tcltk_reason = "Tcl not found."
982 with_tcltk = False
983
984 if env['STATIC_TCLTK']:
985 conf.CheckX11()
986
987 # Python... obviously we're already running python, so we just need to
988 # check that we can link to the python library OK:
989
990 if platform.system()=="Windows":
991 python_lib='python24'
992 else:
993 python_lib='python2.4'
994
995 # SWIG version
996
997 if not conf.CheckSwigVersion():
998 without_python_reason = 'SWIG >= 1.3.24 is required'
999 with_python = False
1000
1001 # CUnit
1002
1003 if with_cunit:
1004 if not conf.CheckCUnit():
1005 without_cunit_reason = 'CUnit not found'
1006 with_cunit = False
1007 #print "CUNIT NOT FOUND, LIBS=",conf.env.get('LIBS')
1008
1009 # IDA
1010
1011 if not with_ida:
1012 without_ida_reason = "Not selected (see config option WITH_SOLVERS)"
1013 elif not conf.CheckIDA():
1014 with_ida = False
1015 without_ida_reason = "IDA not found"
1016
1017 # BLAS
1018
1019 need_blas=False
1020
1021 if with_lsode:
1022 need_fortran = True
1023 need_blas=True
1024
1025 if need_blas:
1026 if conf.CheckLib('blas'):
1027 with_local_blas = False
1028 without_local_blas_reason = "Found BLAS installed on system"
1029 else:
1030 with_local_blas = True
1031 need_fortran = True
1032 else:
1033 with_local_blas= False;
1034 without_local_blas_reason = "BLAS not required"
1035
1036 # FORTRAN
1037
1038 if need_fortran:
1039 conf.env.Tool('fortran')
1040 detect_fortran = conf.env.Detect(['g77','f77','gfortran'])
1041 if detect_fortran:
1042 # For some reason, g77 doesn't get detected properly on MinGW
1043 if not env.has_key('F77') and not env.has_key('FORTRAN'):
1044 conf.env.Replace(F77=detect_fortran)
1045 conf.env.Replace(F77COM='$F77 $F77FLAGS -c -o $TARGET $SOURCE')
1046 conf.env.Replace(F77FLAGS='')
1047 #print "F77:",conf.env['F77']
1048 #print "F77COM:",conf.env['F77COM']
1049 #print "F77FLAGS:",conf.env['F77FLAGS']
1050 fortran_builder = Builder(
1051 action='$F77COM'
1052 , suffix='.o'
1053 , src_suffix='.f'
1054 )
1055 conf.env.Append(BUILDERS={'Fortran':fortran_builder})
1056 else:
1057 with_lsode=False;
1058 without_lsode_reason="FORTRAN-77 required but not found"
1059
1060 #else:
1061 # print "FORTRAN not required"
1062
1063 # F2C
1064
1065 if need_fortran:
1066 if platform.system()=="Windows":
1067 conf.env.Append(LIBPATH='c:\mingw\lib')
1068
1069
1070 # TODO: -D_HPUX_SOURCE is needed
1071
1072 # TODO: check size of void*
1073
1074 # TODO: detect if dynamic libraries are possible or not
1075
1076 if platform.system()=="Windows" and env.has_key('MSVS'):
1077 _found_windows_h = conf.CheckHeader('Windows.h')
1078
1079 if not _found_windows_h:
1080 print "Could not locate 'Windows.h' in CPPPATH. Check your configuration."
1081 Exit(1)
1082
1083 if with_python and not conf.CheckHeader(['basetsd.h','BaseTsd.h']):
1084 with_python = 0;
1085 without_python_reason = "Header file 'basetsd.h' not found. Install the MS Platform SDK."
1086
1087 conf.env.Append(CPPDEFINES=env['PACKAGE_LINKING'])
1088
1089 conf.Finish()
1090
1091 env.Append(PYTHON_LIBPATH=[distutils.sysconfig.PREFIX+"/libs"])
1092 env.Append(PYTHON_LIB=[python_lib])
1093 env.Append(PYTHON_CPPPATH=[distutils.sysconfig.get_python_inc()])
1094
1095 #---------------------------------------
1096 # SUBSTITUTION DICTIONARY for .in files
1097
1098 release = env.get('RELEASE')
1099 if release=="0.":
1100 release="0"
1101
1102 subst_dict = {
1103 '@DEFAULT_ASCENDLIBRARY@':env['DEFAULT_ASCENDLIBRARY']
1104 , '@GLADE_FILE@':'ascend.glade'
1105 , '@HELP_ROOT@':''
1106 , '@ICON_EXTENSION@':icon_extension
1107 , '@INSTALL_ASCDATA@':env['INSTALL_ASCDATA']
1108 , '@INSTALL_BIN@':env['INSTALL_BIN']
1109 , '@INSTALL_INCLUDE@':env['INSTALL_INCLUDE']
1110 , '@INSTALL_LIB@':env['INSTALL_LIB']
1111 , '@INSTALL_MODELS@':env['INSTALL_MODELS']
1112 , '@PYGTK_ASSETS@':env['PYGTK_ASSETS']
1113 , '@VERSION@':version
1114 , '@RELEASE@':release
1115 , '@DISTTAR_NAME@':env['DISTTAR_NAME']
1116 , '@WEBHELPROOT@':'http://pye.dyndns.org/ascend/manual/'
1117 , '@ASC_SHLIBSUFFIX@':env['SHLIBSUFFIX']
1118 , '@ASC_SHLIBPREFIX@':env['SHLIBPREFIX']
1119 , '@ASC_ENV_TK_DEFAULT@' : '$$ASCENDDIST/tcltk'
1120 , '@ASC_DISTDIR_REL_BIN@' : default_rel_distdir
1121 , '@PYTHON@' : python_exe
1122 }
1123
1124 if env.get('WITH_LOCAL_HELP'):
1125 print "WITH_LOCAL_HELP:",env['WITH_LOCAL_HELP']
1126 subst_dict['@HELP_ROOT@']=env['WITH_LOCAL_HELP']
1127
1128 # bool options...
1129 for k,v in {
1130 'ABSOLUTE_PATHS' : 'ASC_ABSOLUTE_PATHS'
1131 ,'WITH_XTERM_COLORS' : 'ASC_XTERM_COLORS'
1132 ,'MALLOC_DEBUG' : 'MALLOC_DEBUG'
1133 }.iteritems():
1134 if env.get(k):
1135 # subst_dict['@'+v+'@']='1'
1136 subst_dict["/\\* #define "+v+' @'+v+"@ \\*/"]='# define '+v+' 1 '
1137
1138 if with_ida:
1139 subst_dict["/\\* #define ASC_WITH_IDA @ASC_WITH_IDA@ \\*/"]='#define ASC_WITH_IDA '
1140
1141 if with_lsode:
1142 subst_dict["/\\* #define ASC_WITH_LSODE @ASC_WITH_LSODE@ \\*/"]='#define ASC_WITH_LSODE '
1143
1144 if with_python:
1145 subst_dict['@ASCXX_USE_PYTHON@']="1"
1146 env['WITH_PYTHON']=1;
1147
1148 if env.has_key('HAVE_GCCVISIBILITY'):
1149 subst_dict['@HAVE_GCCVISIBILITY@'] = "1"
1150
1151 env.Append(SUBST_DICT=subst_dict)
1152
1153 #------------------------------------------------------
1154 # RECIPE: SWIG scanner
1155
1156 import SCons.Script
1157
1158 SWIGScanner = SCons.Scanner.ClassicCPP(
1159 "SWIGScan"
1160 , ".i"
1161 , "CPPPATH"
1162 , '^[ \t]*[%,#][ \t]*(?:include|import)[ \t]*(<|")([^>"]+)(>|")'
1163 )
1164
1165 env.Append(SCANNERS=[SWIGScanner])
1166
1167 #------------------------------------------------------
1168 # RECIPE: 'SubstInFile', used in pygtk SConscript
1169
1170 import re
1171 from SCons.Script import * # the usual scons stuff you get in a SConscript
1172
1173 def TOOL_SUBST(env):
1174 """Adds SubstInFile builder, which substitutes the keys->values of SUBST_DICT
1175 from the source to the target.
1176 The values of SUBST_DICT first have any construction variables expanded
1177 (its keys are not expanded).
1178 If a value of SUBST_DICT is a python callable function, it is called and
1179 the result is expanded as the value.
1180 If there's more than one source and more than one target, each target gets
1181 substituted from the corresponding source.
1182 """
1183 env.Append(TOOLS = 'SUBST')
1184 def do_subst_in_file(targetfile, sourcefile, dict):
1185 """Replace all instances of the keys of dict with their values.
1186 For example, if dict is {'%VERSION%': '1.2345', '%BASE%': 'MyProg'},
1187 then all instances of %VERSION% in the file will be replaced with 1.2345 etc.
1188 """
1189 try:
1190 f = open(sourcefile, 'rb')
1191 contents = f.read()
1192 f.close()
1193 except:
1194 raise SCons.Errors.UserError, "Can't read source file %s"%sourcefile
1195 for (k,v) in dict.items():
1196 contents = re.sub(k, v, contents)
1197 try:
1198 f = open(targetfile, 'wb')
1199 f.write(contents)
1200 f.close()
1201 except:
1202 raise SCons.Errors.UserError, "Can't write target file %s"%targetfile
1203 return 0 # success
1204
1205 def subst_in_file(target, source, env):
1206 if not env.has_key('SUBST_DICT'):
1207 raise SCons.Errors.UserError, "SubstInFile requires SUBST_DICT to be set."
1208 d = dict(env['SUBST_DICT']) # copy it
1209 for (k,v) in d.items():
1210 if callable(v):
1211 d[k] = env.subst(v())
1212 elif SCons.Util.is_String(v):
1213 d[k]=env.subst(v)
1214 else:
1215 raise SCons.Errors.UserError, "SubstInFile: key %s: %s must be a string or callable"%(k, repr(v))
1216 for (t,s) in zip(target, source):
1217 return do_subst_in_file(str(t), str(s), d)
1218
1219 def subst_in_file_string(target, source, env):
1220 """This is what gets printed on the console."""
1221 return '\n'.join(['Substituting vars from %s into %s'%(str(s), str(t))
1222 for (t,s) in zip(target, source)])
1223
1224 def subst_emitter(target, source, env):
1225 """Add dependency from substituted SUBST_DICT to target.
1226 Returns original target, source tuple unchanged.
1227 """
1228 d = env['SUBST_DICT'].copy() # copy it
1229 for (k,v) in d.items():
1230 if callable(v):
1231 d[k] = env.subst(v())
1232 elif SCons.Util.is_String(v):
1233 d[k]=env.subst(v)
1234 Depends(target, SCons.Node.Python.Value(d))
1235 return target, source
1236
1237 subst_action=SCons.Action.Action(subst_in_file, subst_in_file_string)
1238 env['BUILDERS']['SubstInFile'] = Builder(action=subst_action, emitter=subst_emitter)
1239
1240 TOOL_SUBST(env)
1241
1242 #------------------------------------------------------
1243 # Recipe for 'CHMOD' ACTION
1244
1245 import SCons
1246 from SCons.Script.SConscript import SConsEnvironment
1247 SConsEnvironment.Chmod = SCons.Action.ActionFactory(os.chmod,
1248 lambda dest, mode: 'Chmod("%s", 0%o)' % (dest, mode))
1249
1250 def InstallPerm(env, dest, files, perm):
1251 obj = env.Install(dest, files)
1252 for i in obj:
1253 env.AddPostAction(i, env.Chmod(str(i), perm))
1254
1255 SConsEnvironment.InstallPerm = InstallPerm
1256
1257 # define wrappers
1258 SConsEnvironment.InstallProgram = lambda env, dest, files: InstallPerm(env, dest, files, 0755)
1259 SConsEnvironment.InstallHeader = lambda env, dest, files: InstallPerm(env, dest, files, 0644)
1260 SConsEnvironment.InstallShared = lambda env, dest, files: InstallPerm(env, dest, files, 0644)
1261
1262 #------------------------------------------------------
1263 # BUILD...
1264
1265 # so that #include <modulename/headername.h> works across all modules...
1266 env.AppendUnique(CPPPATH=['#base/generic'])
1267
1268 if env['DEBUG']:
1269 env.Append(CCFLAGS=['-g'])
1270
1271 if env['GCOV']:
1272 env.Append(
1273 CPPFLAGS=['-g','-fprofile-arcs','-ftest-coverage']
1274 , LIBS=['gcov']
1275 , LINKFLAGS=['-fprofile-arcs','-ftest-coverage']
1276 )
1277
1278 if with_ida:
1279 env.Append(WITH_IDA=1)
1280
1281 #-------------
1282 # TCL/TK GUI
1283
1284 if with_tcltk:
1285 env.SConscript(['tcltk/generic/interface/SConscript'],'env')
1286 else:
1287 print "Skipping... Tcl/Tk GUI isn't being built:",without_tcltk_reason
1288
1289 #-------------
1290 # PYTHON INTERFACE
1291
1292 if with_python:
1293 env.SConscript(['pygtk/SConscript'],'env')
1294 else:
1295 print "Skipping... Python GUI isn't being built:",without_python_reason
1296
1297 #------------
1298 # BASE/GENERIC SUBDIRECTORIES
1299
1300 libascend_env = env.Copy()
1301
1302 dirs = ['general','utilities','compiler','solver','packages']
1303
1304 srcs = []
1305 for d in dirs:
1306 heresrcs = libascend_env.SConscript('base/generic/'+d+'/SConscript','libascend_env')
1307 srcs += heresrcs
1308
1309 #-------------
1310 # IMPORTED CODE: LSODE, BLAS, etc
1311
1312 if with_lsode:
1313 srcs += env.SConscript(['lsod/SConscript'],'env')
1314 srcs += env.SConscript(['linpack/SConscript'],'env')
1315 else:
1316 print "Skipping... LSODE won't be built:", without_lsode_reason
1317
1318 if with_local_blas:
1319 srcs += env.SConscript(['blas/SConscript'],'env')
1320 else:
1321 print "Skipping... BLAS won't be built:", without_local_blas_reason
1322
1323 if not with_ida:
1324 print "Skipping... IDA won't be built:", without_ida_reason
1325
1326 #-------------
1327 # LIBASCEND -- all base/generic functionality
1328
1329 libascend = libascend_env.SharedLibrary('ascend',srcs)
1330
1331 env.Alias('libascend',libascend)
1332
1333 #-------------
1334 # UNIT TESTS (C CODE)
1335
1336 if with_cunit:
1337 testdirs = ['general','solver','utilities']
1338 testsrcs = []
1339 for testdir in testdirs:
1340 path = 'base/generic/'+testdir+'/test/'
1341 env.SConscript([path+'SConscript'],'env')
1342 testsrcs += [i.path for i in env['TESTSRCS_'+testdir.upper()]]
1343
1344 #print "TESTSRCS =",testsrcs
1345
1346 env.SConscript(['test/SConscript'],'env')
1347 env.SConscript(['base/generic/test/SConscript'],'env')
1348
1349 env.Alias('test',[env.Dir('test'),env.Dir('base/generic/test')])
1350
1351 else:
1352 print "Skipping... CUnit tests aren't being built:",without_cunit_reason
1353
1354 #-------------
1355 # EXTERNAL FUNCTIONS
1356
1357 extfns = []
1358 if with_extfns:
1359 testdirs = ['johnpye/extfn']
1360 for testdir in testdirs:
1361 path = 'models/'+testdir+"/SConscript"
1362 extfns += env.SConscript(path,'env')
1363 else:
1364 print "Skipping... External modules aren't being built:",without_extfns_reason
1365
1366 env.Alias('extfns',extfns)
1367
1368 #------------------------------------------------------
1369 # CREATE ASCEND-CONFIG scriptlet
1370
1371 ascendconfig = env.SubstInFile('ascend-config.in')
1372
1373 #------------------------------------------------------
1374 # INSTALLATION
1375
1376 if env.get('CAN_INSTALL'):
1377 # the models directory only needs to be processed for installation, no other processing required.
1378 env.SConscript(['models/SConscript'],'env')
1379
1380 dirs = ['INSTALL_BIN','INSTALL_ASCDATA','INSTALL_LIB', 'INSTALL_INCLUDE']
1381 install_dirs = [env['INSTALL_ROOT']+env[d] for d in dirs]
1382
1383 # TODO: add install options
1384 env.Alias('install',install_dirs)
1385
1386 env.InstallShared(env['INSTALL_ROOT']+env['INSTALL_LIB'],libascend)
1387
1388 env.InstallProgram(env['INSTALL_ROOT']+env['INSTALL_BIN'],ascendconfig)
1389
1390 #------------------------------------------------------
1391 # WINDOWS INSTALLER
1392 # For the windows installer, please see pygtk/SConscript
1393
1394 if with_installer:
1395 pass
1396 else:
1397 print "Skipping... Windows installer isn't being built:",without_installer_reason
1398
1399 #------------------------------------------------------
1400 # PROJECT FILE for MSVC
1401
1402 env.SConscript(['base/msvc/SConscript'],['env','libascend']);
1403
1404 #------------------------------------------------------
1405 # CREATE the SPEC file for generation of RPM packages
1406
1407 if platform.system()=="Linux":
1408 env.SubstInFile('ascend.spec.in')
1409
1410 #------------------------------------------------------
1411 # DISTRIBUTION TAR FILE
1412
1413 env['DISTTAR_FORMAT']='bz2'
1414 env.Append(
1415 DISTTAR_EXCLUDEEXTS=['.o','.os','.so','.a','.dll','.cc','.cache','.pyc','.cvsignore','.dblite','.log','.pl']
1416 , DISTTAR_EXCLUDEDIRS=['CVS','.svn','.sconf_temp', 'dist']
1417 )
1418
1419 tar = env.DistTar("dist/"+env['DISTTAR_NAME']
1420 , [env.Dir('#')]
1421 )
1422
1423 env.Depends(tar,'ascend.spec')
1424
1425 #------------------------------------------------------
1426 # LIBASCEND DOXYGEN DOCUMENTATION
1427
1428 env.SConscript('base/doc/SConscript',['env'])
1429
1430 #------------------------------------------------------
1431 # RPM BUILD
1432
1433 # for RPM builds, 'scons dist' then 'rpmbuild -ta dist/ascend-*.tar.bz2'
1434 # (check * for the version number used to create the tarball)
1435
1436 #------------------------------------------------------
1437 # DEFAULT TARGETS
1438
1439 default_targets =['libascend']
1440 if with_tcltk:
1441 default_targets.append('tcltk')
1442 if with_python:
1443 default_targets.append('pygtk')
1444 if with_installer:
1445 default_targets.append('installer')
1446 if with_extfns:
1447 default_targets.append('extfns')
1448
1449 env.Default(default_targets)
1450
1451 print "Building targets:"," ".join([str(i) for i in BUILD_TARGETS])
1452
1453 # vim: set syntax=python:
1454

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22