midori/extensions/wscript_build
Christian Dywan 85153f3b49 Rewrite Midori.PanedAction in Vala
Also fix errors in the build.
2012-05-27 15:08:23 +02:00

47 lines
1.6 KiB
Python

#! /usr/bin/env python
# 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:
folder = 'extensions' + os.sep + extension
if os.path.isdir (folder):
files = os.listdir (folder)
target = extension
source = ''
for fila in files:
if fila[-2:] == '.c':
source += ' ' + extension + os.sep + fila
elif 'VALAC' in bld.env and fila[-5:] == '.vala':
source += ' ' + extension + os.sep + fila
if not source:
Utils.pprint ('RED', folder + ': No source files found')
continue
else:
if extension[-2:] == '.c':
target = extension[:-2]
elif 'VALAC' in bld.env and extension[-5:] == '.vala':
target = extension[:-5]
else:
continue
source = extension
if bld.env['platform'] == 'win32' and target in ['external-download-manager']:
continue
obj = bld.new_task_gen ('cc', 'shlib')
obj.target = target
obj.includes = '.. ../katze ../midori'
obj.source = source
obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML HILDON'
obj.vapi_dirs = '../midori ../katze'
obj.packages = 'glib-2.0 gio-2.0 libsoup-2.4 midori midori-core katze'
if bld.env['HAVE_GTK3']:
obj.packages += ' gtk+-3.0 webkitgtk-3.0'
else:
obj.packages += ' gtk+-2.0 webkit-1.0 unique-1.0'
obj.install_path = '${LIBDIR}/midori'
if bld.env['platform'] == 'win32':
obj.uselib_local = 'midori'