add the install target, it is missing from the shipped source --- a/SConstruct +++ b/SConstruct @@ -664,6 +664,7 @@ result = Options() result.Add('mode', 'compilation mode (debug, release)', 'release') result.Add('sample', 'build sample (shell, process)', '') + result.Add('install', 'install result files', '') result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,...)', '') result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '') for (name, option) in SIMPLE_OPTIONS.iteritems(): @@ -989,12 +990,33 @@ env.Alias('sample', samples) env.Alias('d8', d8s) + install_dirs = [] + destdir = ARGUMENTS.get('DESTDIR', '') + prefix = ARGUMENTS.get('PREFIX', '/usr') + libdir = [ destdir + prefix + '/lib/' ] + incdir = [ destdir + prefix + '/include/' ] + for lib in libraries: + env.Install(libdir, lib[0]) + if dir not in install_dirs: + install_dirs += libdir + for include in [ 'include/v8.h', 'include/v8-debug.h' ]: + env.Install(incdir, include); + install_dirs += incdir + env.Alias('install', install_dirs) + + # Always build at least the library + env.Default('library') + + if env['sample']: env.Default('sample') + elif env['install']: + env.Default('install') else: env.Default('library') + # We disable deprecation warnings because we need to be able to use # env.Copy without getting warnings for compatibility with older # version of scons. Also, there's a bug in some revisions that