/[ascend]/trunk/models/SConscript
ViewVC logotype

Annotation of /trunk/models/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1436 - (hide annotations) (download)
Mon May 21 09:39:28 2007 UTC (17 years, 6 months ago) by jpye
File size: 1161 byte(s)
Fixed build for SCons 0.96.92. Needs testing.
1 johnpye 449 Import('env')
2    
3 johnpye 1032 # Build directories that contain external libraries
4 johnpye 811 env.SConscript(['johnpye/SConscript'],['env'])
5 johnpye 1032 env.SConscript(['test/SConscript'],['env'])
6 johnpye 1162 env.SConscript(['sensitivity/SConscript'],['env'])
7 johnpye 811
8 johnpye 1032 # Hunt for all models in the directory structure
9 johnpye 561 import os, os.path
10 johnpye 449
11 johnpye 561 modelfiles = []
12 johnpye 449
13 johnpye 561 excludedirs = ['.svn','CVS']
14 johnpye 568 excludefiles = ['Makefile.in','SConscript','update-Makefile.pl']
15 johnpye 449
16 johnpye 561 modeldir = env.Dir(".").abspath
17 jpye 1436 #print "MODEL DIR =",modeldir
18 johnpye 449
19 johnpye 561 cwd = os.getcwd()
20     os.chdir(modeldir)
21     for root,dirs,files in os.walk("."):
22     for d in dirs:
23     if d in excludedirs:
24     dirs.remove(d)
25     for f in files:
26     if f in excludefiles:
27     continue
28 jpye 1436
29     #print "ADDING",os.path.normpath(os.path.join(root,f))
30 johnpye 561 modelfiles.append( os.path.normpath(os.path.join(root,f)) )
31     os.chdir(cwd)
32 johnpye 449
33 jpye 1436 #print "CWD =",cwd
34 johnpye 561
35 jpye 1436 modelsroot = '$INSTALL_ROOT$INSTALL_MODELS'
36    
37 johnpye 561 installeddirs = []
38    
39     for f in modelfiles:
40     head,tail = os.path.split(f)
41 jpye 1436 targetdir = Dir(env.subst(modelsroot)+"/"+head)
42    
43 johnpye 561 if not targetdir in installeddirs:
44     installeddirs.append(targetdir)
45 johnpye 629 env.InstallShared(targetdir,f)
46 johnpye 561
47     #print "MODEL INSTALLED DIRS =",installeddirs
48     Return('installeddirs')
49 johnpye 811
50     # vim: set syntax=python:
51    

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