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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1616 - (hide annotations) (download)
Mon Sep 3 14:05:44 2007 UTC (17 years, 3 months ago) by jpye
File size: 3189 byte(s)
Added default ASCENDLIBRARY and ASCENDSOLVERS fetched on Windows from the Registry.
Updated installer to set these registry values at install time.
In packages.c, output to say what the default values are found to be.
Remove some redundant output in 'ascend' script.
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 jpye 1616 commands.c copyinst.c createinst.c defaultpaths.c destroyinst.c
8 johnpye 385 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 1031 freestore.c func.c findpath.c
12     importhandler.c initialize.c instance_io.c
13 johnpye 463 instantiate.c instmacro.c instquery.c
14 johnpye 385 library.c linkinst.c logrel_io.c logrel_util.c
15     logrelation.c mathinst.c mergeinst.c module.c name.c
16 johnpye 508 nameio.c notate.c numlist.c parentchild.c
17 johnpye 385 parpend.c pending.c plot.c proc.c procframe.c
18     procio.c prototype.c qlfdid.c refineinst.c rel_common.c relation.c
19 johnpye 908 rel_blackbox.c
20 johnpye 385 relation_io.c relation_util.c rootfind.c safe.c
21     select.c setinst_io.c setinstval.c setio.c
22     sets.c slist.c simlist.c statement.c statio.c switch.c
23     symtab.c syntax.c temp.c tmpnum.c type_desc.c
24 johnpye 928 type_descio.c typedef.c typelint.c
25 johnpye 453 units.c universal.c
26 johnpye 385 value_type.c visitinst.c visitlink.c vlist.c vlistio.c
27     watchpt.c watchptio.c when.c when_io.c when_util.c
28     """)
29    
30 johnpye 721 import platform, glob
31 johnpye 463
32 johnpye 741 scanparse_env = libascend_env.Copy()
33    
34     scanparse_env.Append(CCFLAGS=scanparse_env.get('YACC_CCFLAGS'))
35    
36     if scanparse_env.has_key('HAVE_YACC'):
37 jpye 1520 parsersource = libascend_env.CFile('ascParse.y',YACCFLAGS=['-y','-d','-pzz_'])
38     #libascend_env.SideEffect('ascParse.h',parsersource)
39     # backup the lex output for use by people without lex:
40 jpye 1557 if libascend_env.get('UPDATE_NO_YACC_LEX'):
41     libascend_env.Command('ascParse_no_yacc.c',parsersource[0],Copy('$TARGET','$SOURCE'))
42     libascend_env.Command('ascParse_no_yacc.h',parsersource[1],Copy('$TARGET', '$SOURCE'))
43 johnpye 498 else:
44 johnpye 669 parserheader = libascend_env.Command('ascParse.h', 'ascParse_no_yacc.h',Copy('$TARGET', '$SOURCE'))
45 jpye 1548 parsercode = libascend_env.Command('ascParse.c','ascParse_no_yacc.c',Copy('$TARGET','$SOURCE'))
46     parsersource = [parsercode,parserheader]
47 johnpye 498
48 johnpye 741 if scanparse_env.has_key('HAVE_LEX'):
49 jpye 1520 scannersource = libascend_env.CFile('scanner.l',LEXFLAGS=['-l','-Pzz_'])
50     # backup the lex output for use by people without lex:
51 jpye 1557 if libascend_env.get('UPDATE_NO_YACC_LEX'):
52     libascend_env.Command('scanner_no_lex.c',scannersource,Copy('$TARGET','$SOURCE'))
53 johnpye 498 else:
54 jpye 1548 scannersource = libascend_env.Command('scanner.c','scanner_no_lex.c',Copy('$TARGET', '$SOURCE'))
55 johnpye 490
56 johnpye 669 packages_env = libascend_env.Copy()
57 johnpye 508 packages = packages_env.SharedObject('packages.c')
58 johnpye 490
59 jpye 1520 objs = [parsersource[0],scannersource,packages]
60 johnpye 508
61 johnpye 721 # SLOPPY sources. This is a painful hack that should be fixed using 'config.h' style solution.
62    
63 johnpye 463 sloppy_csrcs = ['rounded.c','interval.c']
64    
65 johnpye 669 sloppy_env = libascend_env.Copy()
66 johnpye 507 sloppy_env.Append(CPPDEFINES=['SLOPPY']);
67 johnpye 463 for s in sloppy_csrcs:
68 johnpye 507 objs += sloppy_env.SharedObject(s)
69 johnpye 385
70 jpye 1520 #libascend_env.Depends(scanner,[parsersource[1]])
71 johnpye 385
72 johnpye 490 for s in [csrcs]:
73 johnpye 669 objs += libascend_env.SharedObject(s)
74 johnpye 385
75 johnpye 721 #--------------------
76     # INSTALL
77    
78     if libascend_env.get('CAN_INSTALL'):
79 jpye 1436 installdir = Dir(libascend_env.subst("$INSTALL_ROOT$INSTALL_INCLUDE/compiler"))
80 johnpye 721
81     headers = glob.glob("*.h")
82     libascend_env.InstallHeader(installdir,headers)
83    
84 johnpye 463 Return('objs')
85 johnpye 811
86     # vim: set syntax=python:
87    

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