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

Annotation of /trunk/models/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 628 - (hide annotations) (download)
Wed May 24 01:45:02 2006 UTC (18 years, 6 months ago) by johnpye
File size: 790 byte(s)
Fixed up standard paths stuff to use 'INSTALL_ASCDATA' as the place where tcltk/python/models etc
will live. The confusion here came from the fact that I was taking 'INSTALL_SHARE' to be be assumed
to mean 'the location of /usr/share' -- hence the resulting '$INSTALL_SHARE/ascend' that was bothering
Ben. The 'INSTALL_ASCDATA' fixes this, and behaves as he will like, I hope.

Also note that I have switched the default situation in config.h.in to use relative paths by default,
which is the preferred CMU way. SCons builds will default to absolute paths on non-Windows systems.
1 johnpye 449 Import('env')
2    
3 johnpye 561 import os, os.path
4 johnpye 449
5 johnpye 561 modelfiles = []
6 johnpye 449
7 johnpye 561 excludedirs = ['.svn','CVS']
8 johnpye 568 excludefiles = ['Makefile.in','SConscript','update-Makefile.pl']
9 johnpye 449
10 johnpye 561 modeldir = env.Dir(".").abspath
11 johnpye 449
12 johnpye 561 cwd = os.getcwd()
13     os.chdir(modeldir)
14     for root,dirs,files in os.walk("."):
15     for d in dirs:
16     if d in excludedirs:
17     dirs.remove(d)
18     for f in files:
19     if f in excludefiles:
20     continue
21     modelfiles.append( os.path.normpath(os.path.join(root,f)) )
22     os.chdir(cwd)
23 johnpye 449
24 johnpye 628 modelsroot = env['INSTALL_ROOT']+env['INSTALL_ASCDATA']+"/models/"
25 johnpye 561
26     installeddirs = []
27    
28     for f in modelfiles:
29     head,tail = os.path.split(f)
30     targetdir = os.path.join(modelsroot,head)
31     if not targetdir in installeddirs:
32     installeddirs.append(targetdir)
33     env.Install(targetdir,f)
34    
35     #print "MODEL INSTALLED DIRS =",installeddirs
36     Return('installeddirs')

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