Changeset 3546 for SConstruct


Ignore:
Timestamp:
Sep 7, 2006, 3:21:16 PM (18 years ago)
Author:
jack
Message:

The install target should now be complete.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SConstruct

    r3545 r3546  
    5252else:
    5353    opts.Add(PathOption('PREFIX',
    54                         'Location to install compiled sources'.
     54                        'Location to install compiled sources',
    5555                        os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3], 'site-packages')))
    5656
     
    106106files = []
    107107#dirs = filter(os.path.isdir, os.listdir('.'))
    108 #Only build the anuga_core directory for now
    109 dirs = ['anuga_core']
     108#Only build the anuga_core/source/anuga directory for now
     109dirs = [os.path.join('anuga_core', 'source', 'anuga')]
    110110while(dirs != []):
    111111    dirs += filter(os.path.isdir, map(lambda x : os.path.join(dirs[0], x), os.listdir(dirs[0])))
     
    115115    env.Pyc(x + 'c', x)
    116116    env.Pyo(x + 'o', x)
    117     instdir = os.path.join(env['PREFIX'], os.path.split(x)[0])
     117    # We have to cut the first character off the result of os.path.dirname(x).replace(os.path.join('anuga_core, 'source'), '')
     118    # or else we will start taking paths relative to the root directory.
     119    instdir = os.path.join(env['PREFIX'], os.path.dirname(x).replace(os.path.join('anuga_core', 'source'), '')[1:])
    118120    env.Install(instdir, x + 'c')
    119121    env.Install(instdir, x + 'o')
Note: See TracChangeset for help on using the changeset viewer.