Changeset 766


Ignore:
Timestamp:
07/16/06 03:47:03 (6 years ago)
Author:
wd
Message:

More build stuff, installs now work and modules can be built with SConscript
files. Started clearing out old auto* cruft and long-dead tools.

Location:
branches/ithildin-scons
Files:
3 added
6 deleted
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/ithildin-scons/SConstruct

    r765 r766  
    1818EnsureSConsVersion(0,96,92) 
    1919 
    20 import os, sys 
     20import glob, os, sys 
    2121# let's just stick the realpath() for ./build in there at the front.  THis 
    2222# allows us to use our custom test code in the 'tests' module there. 
     
    4646    package_repository_version = int(svnrev.split()[1]) 
    4747 
     48# Find our availabe modules 
     49availabe_modules = [] 
     50for e in os.listdir('modules'): 
     51    if os.path.exists('modules/%s/SConscript' % e): 
     52        availabe_modules.append(e) 
    4853 
    4954############################################################################### 
     
    6469    ('fdsetsize', 'Override value of FD_SETSIZE', 0), 
    6570    BoolOption('ipv6', 'Enable IPv6 support', 1), 
     71    ListOption('modules', 'Modules to build', 'all', availabe_modules), 
    6672    PackageOption('openssl', 'Enable OpenSSL support', 'yes'), 
    6773    ListOption('poller', 'Socket polling method', 'auto', 
     
    217223# IPv6 test: 
    218224# We just look to see if we have getaddrinfo and if they want IPv6 support 
    219 if 'getaddrinfo' in have_funcs and env['ipv6']: 
    220     print 'Enabling IPv6 support' 
     225if conf.CheckIPv6(have_funcs): 
    221226    env.Append(CPPDEFINES = ['INET6']) 
    222227 
     
    272277############################################################################### 
    273278# Build options and subsidiary code 
     279 
     280# Set our final environment parameters. 
    274281env.Append(CPPPATH = '#/include') 
    275282env.Append(LIBPATH = '#/lib') 
    276  
    277 env.AlwaysBuild(env.Alias('update', '#/.svn', '%s update' % subversion)) 
    278  
     283env.AppendUnique(RPATH = [env['libdir'], env['libdir'] + '/modules']) 
     284 
     285# Update target for subversion users. 
     286if subversion: 
     287    env.AlwaysBuild(env.Alias('update', '#/.svn', '%s update' % subversion)) 
     288# Installation targets for documentation, config and include files 
     289tests.AddConfInstall(env, env['sysconfdir'], ['etc/ithildin.conf']) 
     290env.Install(env['datadir'], ['COPYING', 'DEVELOPERS', 'README']) 
     291env.Install(env['datadir'] + '/doc', glob.glob('doc/*.txt')) 
     292env.Install(env['includedir'] + '/ithildin', 
     293    glob.glob('include/ithildin/*.h')) 
     294 
     295# dummy install target with our various prefixes. 
     296env.Alias('install', [env['bindir'], env['sysconfdir'], 
     297        env['libdir'], env['includedir'], env['datadir']]) 
     298 
     299# Now export useful variables 
    279300env.Export(['env', 'package_name', 'package_version', 
    280     'package_repository_version']) 
     301    'package_repository_version', 'tests']) 
     302 
     303# and call our sub-scripts. 
    281304env.SConscript('lib/SConscript') 
    282305env.SConscript('source/SConscript') 
    283306 
     307# Add the requested modules too! 
     308if str(env['modules']) == 'all': 
     309    modules = str.join(',', availabe_modules) 
     310elif str(env['modules']) == 'none': 
     311    modules = '' 
     312else: 
     313    modules = str(env['modules']) 
     314 
     315for m in modules.split(','): 
     316    env.SConscript('modules/%s/SConscript' % m) 
     317 
    284318# vi:set ts=8 sts=4 sw=4 tw=76 et syntax=python: 
  • branches/ithildin-scons/build/options.default

    r765 r766  
     1############################################################################### 
     2# Default options listing.  Most of these are safe to leave uncommented (see 
     3# below for where this isn't okay).  Please note that this is a PYTHON 
     4# SOURCED FILE.  If the quotes are there, leave them there!  If the quotes 
     5# are not there please leave them off.  Python will blow up otherwise. 
     6 
    17# Turn on debugging support in the code.  Uses lots of slow compiler options 
    28# and a bunch of evil on various platforms. 
     
    410# Explicitly set FD_SETSIZE for your application.  You usually do not need 
    511# this. 
    6 fdsetsize = "0" 
     12fdsetsize = 0 
    713# Turn on/off IPv6 support (it is "on" if your system can support it by 
    814# default, you may remove the code if you wish) 
     
    2026warnings = "no" 
    2127# Specify the installation prefix for files 
    22 prefix = /usr/local 
     28prefix = "/usr/local" 
    2329# Specify the installation prefixes for binaries, config files, libraries 
    2430# C headers and miscellaneous data respectively.  These values are generally 
    2531# automatically generated via 'prefix' and so are commented out here with 
    2632# their typical defaults. 
    27 #bindir = /usr/local/bin 
    28 #sysconfdir = /usr/local/etc/ithildin 
    29 #libdir = /usr/local/lib/ithildin 
    30 #includedir = /usr/local/include/ithildin 
    31 #datadir = /usr/local/share/ithildin 
     33#bindir = "/usr/local/bin" 
     34#sysconfdir = "/usr/local/etc/ithildin" 
     35#libdir = "/usr/local/lib/ithildin" 
     36#includedir = "/usr/local/include/ithildin" 
     37#datadir = "/usr/local/share/ithildin" 
Note: See TracChangeset for help on using the changeset viewer.