| 1 | # -*- Mode:Python -*- |
|---|
| 2 | |
|---|
| 3 | ########################################################################## |
|---|
| 4 | # # |
|---|
| 5 | # This file is part of AVANGO. # |
|---|
| 6 | # # |
|---|
| 7 | # Copyright 1997 - 2009 Fraunhofer-Gesellschaft zur Foerderung der # |
|---|
| 8 | # angewandten Forschung (FhG), Munich, Germany. # |
|---|
| 9 | # # |
|---|
| 10 | # AVANGO is free software: you can redistribute it and/or modify # |
|---|
| 11 | # it under the terms of the GNU Lesser General Public License as # |
|---|
| 12 | # published by the Free Software Foundation, version 3. # |
|---|
| 13 | # # |
|---|
| 14 | # AVANGO is distributed in the hope that it will be useful, # |
|---|
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # |
|---|
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
|---|
| 17 | # GNU General Public License for more details. # |
|---|
| 18 | # # |
|---|
| 19 | # You should have received a copy of the GNU Lesser General Public # |
|---|
| 20 | # License along with AVANGO. If not, see <http://www.gnu.org/licenses/>. # |
|---|
| 21 | # # |
|---|
| 22 | ########################################################################## |
|---|
| 23 | |
|---|
| 24 | import avango.build |
|---|
| 25 | import os |
|---|
| 26 | |
|---|
| 27 | Alias('install', Alias('install-build')) |
|---|
| 28 | Alias('install-build', avango.build.get_python_path('avango/build')) |
|---|
| 29 | |
|---|
| 30 | build_module = Split(""" |
|---|
| 31 | src/avango/build/__init__.py |
|---|
| 32 | src/avango/build/config.py |
|---|
| 33 | src/avango/build/configstore.py |
|---|
| 34 | src/avango/build/recipes.py |
|---|
| 35 | src/avango/build/oshelper.py |
|---|
| 36 | src/avango/build/environment.py |
|---|
| 37 | src/avango/build/utility.py |
|---|
| 38 | """) |
|---|
| 39 | |
|---|
| 40 | build_tools_module = Split(""" |
|---|
| 41 | src/avango/build/tools/subst.py |
|---|
| 42 | """) |
|---|
| 43 | |
|---|
| 44 | Install(avango.build.get_python_path('avango/build'), build_module) |
|---|
| 45 | Install(avango.build.get_python_path('avango/build/tools'), build_tools_module) |
|---|
| 46 | |
|---|
| 47 | def build_path(*args): |
|---|
| 48 | return repr(os.pathsep.join([ x for x in args if x ])) |
|---|
| 49 | |
|---|
| 50 | local_env = avango.build.Environment() |
|---|
| 51 | local_env['SUBST'] = { |
|---|
| 52 | 'CXX': repr(local_env['CXX']), |
|---|
| 53 | 'DEBUG': repr(local_env['DEBUG']), |
|---|
| 54 | 'TRACE_LOGGING': repr(local_env['TRACE_LOGGING']), |
|---|
| 55 | 'LOG_LEVEL': repr(local_env['LOG_LEVEL']), |
|---|
| 56 | 'BINARY_PATH': build_path(local_env['BINARY_PATH'], avango.build.get_binary_path().abspath), |
|---|
| 57 | 'INCLUDE_PATH': build_path(local_env['INCLUDE_PATH'], avango.build.get_include_path().abspath), |
|---|
| 58 | 'LIBRARY_PATH': build_path(local_env['LIBRARY_PATH'], avango.build.get_library_path().abspath), |
|---|
| 59 | 'PKG_CONFIG_PATH': build_path(local_env['PKG_CONFIG_PATH'], avango.build.get_pkgconfig_path().abspath), |
|---|
| 60 | 'PYTHON_PATH': build_path(local_env['PYTHON_PATH'], avango.build.get_python_path().abspath), |
|---|
| 61 | 'BUILD_32': repr(local_env['BUILD_32']), |
|---|
| 62 | 'BOOST_DEBUG': repr(local_env['BOOST_DEBUG']), |
|---|
| 63 | 'BOOST_LAYOUT': repr(local_env['BOOST_LAYOUT']), |
|---|
| 64 | } |
|---|
| 65 | defaults = local_env.Subst('src/avango/build/defaults.py.in') |
|---|
| 66 | Install(avango.build.get_python_path('avango/build'), defaults) |
|---|