From 4e19617fdc41ff4707535f00989ef917af989449 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 9 Jun 2009 02:02:43 +0200 Subject: [PATCH] Use MDATADIR, import os and don't use waf_config_files --- docs/api/wscript_build | 1 + extensions/wscript_build | 2 ++ icons/wscript_build | 1 + tests/wscript_build | 2 ++ wscript | 8 ++++---- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/api/wscript_build b/docs/api/wscript_build index ddbcfc59..70165263 100644 --- a/docs/api/wscript_build +++ b/docs/api/wscript_build @@ -3,6 +3,7 @@ # This file is licensed under the terms of the expat license, see the file EXPAT. import pproc as subprocess +import os for module in ('midori', 'katze'): try: diff --git a/extensions/wscript_build b/extensions/wscript_build index 2efe559d..2196fb2d 100644 --- a/extensions/wscript_build +++ b/extensions/wscript_build @@ -2,6 +2,8 @@ # WAF build script for midori # This file is licensed under the terms of the expat license, see the file EXPAT. +import os + extensions = os.listdir ('extensions') for extension in extensions: # Tab Panel isn't useful at this point diff --git a/icons/wscript_build b/icons/wscript_build index 522fe647..61299246 100644 --- a/icons/wscript_build +++ b/icons/wscript_build @@ -3,6 +3,7 @@ # This file is licensed under the terms of the expat license, see the file EXPAT. import Utils +import os def add_image (bld, category, name): diff --git a/tests/wscript_build b/tests/wscript_build index 2de915cb..6d315f14 100644 --- a/tests/wscript_build +++ b/tests/wscript_build @@ -2,6 +2,8 @@ # WAF build script for midori # This file is licensed under the terms of the expat license, see the file EXPAT. +import os + tests = os.listdir ('tests') for test in tests: folder = 'tests' + os.sep + test diff --git a/wscript b/wscript index f7ccdfa8..3a2f4f43 100644 --- a/wscript +++ b/wscript @@ -339,8 +339,8 @@ def build (bld): bld.install_files ('${DOCDIR}/midori/api/', blddir + '/docs/api/*') if bld.env['HAVE_HILDON']: - appdir = '${DATADIR}/applications/hildon' - bld.install_files ('${DATADIR}/dbus-1/services', + appdir = '${MDATADIR}/applications/hildon' + bld.install_files ('${MDATADIR}/dbus-1/services', 'data/com.nokia.' + APPNAME + '.service') else: appdir = '${MDATADIR}/applications' @@ -351,7 +351,7 @@ def build (bld): obj.flags = '-d' bld.install_files (appdir, 'data/' + APPNAME + '.desktop') else: - folder = os.path.dirname (bld.env['waf_config_files'][0]) + '/data' + folder = os.path.abspath (blddir + '/default/data') Utils.check_dir (folder) desktop = APPNAME + '.desktop' pre = open ('data/' + desktop + '.in') @@ -437,7 +437,7 @@ def shutdown (): Utils.pprint ('RED', "Make sure intltool is installed.") os.chdir ('..') elif Options.options.run: - folder = os.path.dirname (Build.bld.env['waf_config_files'][0]) + folder = os.path.abspath (blddir + '/default') try: relfolder = folder if not is_mingw (Build.bld.env):