/[ascend]/trunk/base/generic/compiler/SConscript
ViewVC logotype

Annotation of /trunk/base/generic/compiler/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 818 - (hide annotations) (download)
Wed Aug 16 12:54:08 2006 UTC (17 years, 11 months ago) by johnpye
File size: 2763 byte(s)
Renamed the installer from 'ASCEND PyGTK' to 'ASCEND'
Added the '-y' to YACCFLAGS and '-l' TO LEXFLAGS.
Other changes are trivial.
1 johnpye 669 Import('libascend_env')
2 johnpye 385
3 johnpye 463 csrcs = Split("""
4 johnpye 385 anoncopy.c anonmerg.c anontype.c arrayinst.c ascCompiler.c
5     atomsize.c atomvalue.c bintoken.c bit.c braced.c
6     case.c check.c child.c childdef.c childio.c childinfo.c cmpfunc.c
7     commands.c copyinst.c createinst.c destroyinst.c
8     dimen.c dimen_io.c dump.c
9     evaluate.c exprio.c exprs.c exprsym.c extcall.c
10     extfunc.c extinst.c find.c forvars.c fractions.c
11 johnpye 700 freestore.c func.c initialize.c instance_io.c
12 johnpye 463 instantiate.c instmacro.c instquery.c
13 johnpye 385 library.c linkinst.c logrel_io.c logrel_util.c
14     logrelation.c mathinst.c mergeinst.c module.c name.c
15 johnpye 508 nameio.c notate.c numlist.c parentchild.c
16 johnpye 385 parpend.c pending.c plot.c proc.c procframe.c
17     procio.c prototype.c qlfdid.c refineinst.c rel_common.c relation.c
18     relation_io.c relation_util.c rootfind.c safe.c
19     select.c setinst_io.c setinstval.c setio.c
20     sets.c slist.c simlist.c statement.c statio.c switch.c
21     symtab.c syntax.c temp.c tmpnum.c type_desc.c
22     type_descio.c typedef.c typelint.c redirectFile.c
23 johnpye 453 units.c universal.c
24 johnpye 385 value_type.c visitinst.c visitlink.c vlist.c vlistio.c
25     watchpt.c watchptio.c when.c when_io.c when_util.c
26     """)
27    
28 johnpye 721 import platform, glob
29 johnpye 463
30 johnpye 741 scanparse_env = libascend_env.Copy()
31    
32     scanparse_env.Append(CCFLAGS=scanparse_env.get('YACC_CCFLAGS'))
33    
34     if scanparse_env.has_key('HAVE_YACC'):
35 johnpye 498 parsersource = 'ascParse.y'
36     parserheader = 'ascParse.h'
37     else:
38 johnpye 490 parsersource = 'ascParse_no_yacc.c'
39 johnpye 669 parserheader = libascend_env.Command('ascParse.h', 'ascParse_no_yacc.h',Copy('$TARGET', '$SOURCE'))
40 johnpye 498
41 johnpye 741 if scanparse_env.has_key('HAVE_LEX'):
42 johnpye 498 scannersource = 'scanner.l'
43     else:
44 johnpye 490 scannersource = 'scanner_no_flex.c'
45    
46 johnpye 741 parser = scanparse_env.SharedObject(target=['ascParse'], source=parsersource
47 johnpye 818 , YACCFLAGS=['-y','-d','-pzz_']
48 johnpye 490 )
49    
50 johnpye 669 scanner = libascend_env.SharedObject(target=['scanner'],source=scannersource
51 johnpye 818 , LEXFLAGS=['-l','-Pzz_']
52 johnpye 490 )
53    
54 johnpye 669 packages_env = libascend_env.Copy()
55     packages_env.Append(CPPDEFINES=[('ASC_SHLIBSUFFIX','\\"'+libascend_env['SHLIBSUFFIX']+'\\"'),('ASC_SHLIBPREFIX','\\"'+libascend_env['SHLIBPREFIX']+'\\"')])
56 johnpye 508 packages = packages_env.SharedObject('packages.c')
57 johnpye 490
58 johnpye 508 objs = [parser,scanner,packages]
59    
60 johnpye 721 # SLOPPY sources. This is a painful hack that should be fixed using 'config.h' style solution.
61    
62 johnpye 463 sloppy_csrcs = ['rounded.c','interval.c']
63    
64 johnpye 669 sloppy_env = libascend_env.Copy()
65 johnpye 507 sloppy_env.Append(CPPDEFINES=['SLOPPY']);
66 johnpye 463 for s in sloppy_csrcs:
67 johnpye 507 objs += sloppy_env.SharedObject(s)
68 johnpye 385
69 johnpye 669 libascend_env.Depends(scanner,[parserheader])
70 johnpye 385
71 johnpye 490 for s in [csrcs]:
72 johnpye 669 objs += libascend_env.SharedObject(s)
73 johnpye 385
74 johnpye 721 #--------------------
75     # INSTALL
76    
77     if libascend_env.get('CAN_INSTALL'):
78     installdir = libascend_env['INSTALL_ROOT']+libascend_env['INSTALL_INCLUDE']+'/compiler'
79    
80     headers = glob.glob("*.h")
81     libascend_env.InstallHeader(installdir,headers)
82    
83 johnpye 463 Return('objs')
84 johnpye 811
85     # vim: set syntax=python:
86    

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