Clone in a terminal:
Commit 4102d3c
Johan Mattsson - 2015-09-15T06:51:10+00:00
4102d3ca39eb1181123023dc02f051e1785fc91cjohan.mattsson.m@gmail.com

New build scripts The new script uses doit3 and only the python3 interpreter. I am sorry, this will break some scripts.

Changed files (13)

Diff

diff --git a/.travis.yml b/.travis.ymlindex 0eb1bfc..767cdac 100644--- a/.travis.yml+++ b/.travis.yml@@ -8,5 +8,5 @@ before_install:          libsqlite3-dev valac libxmlbird-dev libgee-dev           libwebkitgtk-3.0-dev libnotify-dev valac-0.22 script:-  - python2 ./configure-  - python2 ./scripts/linux_build.py+  - python3 ./configure --nonnull+  - python3 ./scripts/linux_build.pydiff --git a/README.md b/README.mdindex 7c3bc72..5de7551 100644--- a/README.md+++ b/README.md@@ -45,7 +45,7 @@ Configure, build and install with python: Configure, build and install with doit:      ./configure-    doit+    doit3     sudo ./install.py  The default prefix is /usr/local on Fedora should BirdFont be compiled with@@ -55,6 +55,9 @@ The default prefix is /usr/local on Fedora should BirdFont be compiled with     ./scripts/linux_build.py --prefix=/usr      sudo ./install.py +All patches must be compiled with support for valas null pointer checks.+Configure the project with ./configure --nonnull + ## Packages  Windows and Mac binaries can be downloaded fromdiff --git a/birdfont-autotrace.sh b/birdfont-autotrace.shindex bf3b799..7d9dd14 100755--- a/birdfont-autotrace.sh+++ b/birdfont-autotrace.sh@@ -1,5 +1,5 @@ #!/bin/sh-export LD_LIBRARY_PATH="./build/:$LD_LIBRARY_PATH"+export LD_LIBRARY_PATH="./build/bin:$LD_LIBRARY_PATH" PKG_PATH=$(dirname "$(readlink -f "$0")") cd "${PKG_PATH}" diff --git a/birdfont-export.sh b/birdfont-export.shindex 38bf830..ab08e8a 100755--- a/birdfont-export.sh+++ b/birdfont-export.sh@@ -1,5 +1,5 @@ #!/bin/sh-export LD_LIBRARY_PATH="./build/:$LD_LIBRARY_PATH"+export LD_LIBRARY_PATH="./build/bin:$LD_LIBRARY_PATH" PKG_PATH=$(dirname "$(readlink -f "$0")") cd "${PKG_PATH}" diff --git a/birdfont-import.sh b/birdfont-import.shindex 72dadff..bb1feb4 100755--- a/birdfont-import.sh+++ b/birdfont-import.sh@@ -1,5 +1,5 @@ #!/bin/sh-export LD_LIBRARY_PATH="./build/:$LD_LIBRARY_PATH"+export LD_LIBRARY_PATH="./build/bin:$LD_LIBRARY_PATH" PKG_PATH=$(dirname "$(readlink -f "$0")") cd "${PKG_PATH}" diff --git a/configure b/configureindex 997ca9d..7298cdc 100755--- a/configure+++ b/configure@@ -1,4 +1,4 @@-#!/usr/bin/python+#!/usr/bin/python3 import subprocess import os import sys@@ -55,7 +55,7 @@ def has_posixvala (): 		print (OKGREEN + "Using posix profile." + ENDC)			 	return "True" -def configure (gtk, libbgee, posixvala):+def configure (gtk, libbgee): 	global gee 	 	if not test_program_version ("valac", 0, 16, 0):@@ -117,7 +117,8 @@ parser.add_option("-d", "--dest", dest="dest", help="Install to this directory", parser.add_option("-c", "--cc", dest="cc", help="C compiler", metavar="CC") parser.add_option("-g", "--gtk", dest="gtk", help="Build Gtk version, default is True", metavar="GTK") parser.add_option("-e", "--gee", dest="gee", help="Version of libgee", metavar="GEE")-parser.add_option("-x", "--posix", dest="posix", help="Use posixvala", metavar="POSIX")+parser.add_option("-v", "--valac", dest="valac", help="Vala compiler", metavar="VALAC")+parser.add_option("-n", "--nonnull", dest="nonnull", help="Enable compiletime checks for null pointers", metavar="NONNULL")  (options, args) = parser.parse_args() @@ -136,10 +137,14 @@ if options.gtk == "False": 	options.gtk = False if not options.gee: 	options.gee = "Any"-if not options.posix:-	options.posix = has_posixvala ()--configure (options.gtk, options.gee, options.posix)+if not options.valac:+	options.valac = "valac"+if not options.nonnull:+	options.nonnull = False+else:+	options.nonnull = True+	+configure (options.gtk, options.gee)  configfile.write_config (options.prefix)-configfile.write_compile_parameters (options.prefix, options.dest, options.cc, gee, options.posix)	+configfile.write_compile_parameters (options.prefix, options.dest, options.cc, gee, options.valac, options.nonnull)diff --git a/dodo.py b/dodo.pyindex 904a57e..1bd0a1c 100644--- a/dodo.py+++ b/dodo.py@@ -20,13 +20,10 @@ import glob import subprocess import sys -from optparse import OptionParser-from doit.tools import run_once-from doit.action import CmdAction-from scripts.bavala import Vala from scripts import version from scripts.translations import compile_translations from scripts import config+from scripts.builder import Builder  DOIT_CONFIG = {     'default_tasks': [@@ -34,65 +31,14 @@ DOIT_CONFIG = {         'libbirdgems', 	         'libbirdfont',         'birdfont',-        'birdfont_autotrace',-        'birdfont_export',-        'birdfont_import',+        'birdfont-autotrace',+        'birdfont-export',+        'birdfont-import',         'compile_translations',         'man'         ],     } -# external Vala libs-LIBS = [-    'sqlite3',-    'glib-2.0',-    'gio-2.0',-    'fontconfig',-    'cairo',-    'gdk-pixbuf-2.0',-    'webkitgtk-3.0',-    config.GEE,-    'libnotify',-    'xmlbird'-    ]--LIBBIRD_LIBS = [-	'glib-2.0'-]--def task_build ():-    if not os.path.exists ("build/configured"):-        print ("Project is not configured")-        exit (1)--    subprocess.check_output ('mkdir -p build', shell=True)-    subprocess.check_output ('touch build/installed', shell=True)--    return  {-        'actions': ['echo "Build"'],-        }--def task_pkg_flags():-    """get compiler flags for libs/pkgs """-    for pkg in LIBS:-        cmd = 'pkg-config --cflags --libs {pkg}'--        yield {-            'name': pkg,-            'actions': [CmdAction(cmd.format(pkg=pkg), save_out='out')],-            'uptodate': [run_once],-            }---valac_options = [-	'--thread',-	'--enable-experimental-non-null',-	'--enable-experimental',-	'--target-glib=2.34', # see bug 0000004-	'--define=LINUX'-	]-- if "kfreebsd" in sys.platform:     LIBBIRDGEMS_SO_VERSION=version.LIBBIRDGEMS_SO_VERSION elif "bsd" in sys.platform:@@ -100,13 +46,6 @@ elif "bsd" in sys.platform: else:     LIBBIRDGEMS_SO_VERSION=version.LIBBIRDGEMS_SO_VERSION -libbirdgems = Vala(src='libbirdgems', build='build', library='birdgems', so_version=LIBBIRDGEMS_SO_VERSION, pkg_libs=LIBBIRD_LIBS, vala_deps=[])-def task_libbirdgems():-    yield libbirdgems.gen_c(valac_options)-    yield libbirdgems.gen_o(['-fPIC'])-    yield libbirdgems.gen_so('-shared -L ./build -l m')-    yield libbirdgems.gen_ln()- if "kfreebsd" in sys.platform:     SO_VERSION=version.SO_VERSION elif "bsd" in sys.platform:@@ -114,48 +53,368 @@ elif "bsd" in sys.platform: else:     SO_VERSION=version.SO_VERSION -libbird = Vala(src='libbirdfont', build='build', library='birdfont', so_version=SO_VERSION, pkg_libs=LIBS, vala_deps=[libbirdgems])-def task_libbirdfont():-    yield libbird.gen_c(valac_options)-    yield libbird.gen_o(['-fPIC -I./build/', """-D 'GETTEXT_PACKAGE="birdfont"'"""])-    yield libbird.gen_so('-L ./build -L ./build -l birdgems')-    yield libbird.gen_ln()-+def make_birdfont(target_binary):+    valac_command = config.VALAC + """\+        -C \+        --vapidir=./ \+        --basedir build/birdfont/ \+        """ + config.NON_NULL + """ \+        --enable-experimental \+        birdfont/*.vala \+		--vapidir=./ \+		--pkg """ + config.GEE + """ \+		--pkg gio-2.0  \+		--pkg cairo \+		--pkg libsoup-2.4 \+		--pkg gdk-pixbuf-2.0 \+		--pkg webkitgtk-3.0 \+		--pkg libnotify \+		--pkg xmlbird \+		--pkg libbirdfont+        """+        +    cflags = ''+    cc_command = config.CC + " " + cflags + """ \+        -c C_SOURCE \+		-D 'GETTEXT_PACKAGE="birdfont"' \+        -I./build/libbirdfont \+		$(pkg-config --cflags sqlite3) \+		$(pkg-config --cflags """ + config.GEE + """) \+		$(pkg-config --cflags gio-2.0) \+		$(pkg-config --cflags cairo) \+		$(pkg-config --cflags glib-2.0) \+		$(pkg-config --cflags gdk-pixbuf-2.0) \+		$(pkg-config --cflags webkitgtk-3.0) \+		$(pkg-config --cflags libnotify) \+        -o OBJECT_FILE"""++    soname_parameters = "-Wl,-soname," + target_binary++    ldflags = ''+    linker_command = config.CC + " " + ldflags + """ \+        build/birdfont/*.o \+		-L./build/bin -lbirdfont \+		$(pkg-config --libs sqlite3) \+		$(pkg-config --libs """ + config.GEE + """) \+		$(pkg-config --libs gio-2.0) \+		$(pkg-config --libs cairo) \+		$(pkg-config --libs glib-2.0) \+		$(pkg-config --libs gdk-pixbuf-2.0) \+		$(pkg-config --libs webkitgtk-3.0) \+		$(pkg-config --libs gtk+-2.0) \+		$(pkg-config --libs xmlbird) \+		$(pkg-config --libs libnotify) \+		-L./build -L./build/bin -l birdgems\+        -o build/bin/""" + target_binary++    birdfont = Builder('birdfont',+                          valac_command, +                          cc_command,+                          linker_command,+                          target_binary,+                          None,+                          ['libbirdgems.so', 'libbirdfont.so'])+			+    yield birdfont.build()  def task_birdfont():-    bird = Vala(src='birdfont', build='build', pkg_libs=LIBS, vala_deps=[libbird, libbirdgems])-    yield bird.gen_c(valac_options)-    yield bird.gen_bin(["""-D 'GETTEXT_PACKAGE="birdfont"' """])---def task_birdfont_autotrace():-     exp = Vala(src='birdfont-autotrace', build='build', pkg_libs=LIBS, vala_deps=[libbird, libbirdgems])-     yield exp.gen_c(valac_options)-     yield exp.gen_bin(["""-D 'GETTEXT_PACKAGE="birdfont"' """])-+    yield make_birdfont('birdfont')++def make_birdfont_export(target_binary):+    valac_command = config.VALAC + """ \+        -C \+		--enable-experimental \+		--define=MAC \+        --basedir build/birdfont-export/ \+        """ + config.NON_NULL + """ \+		birdfont-export/*.vala \+		--vapidir=./ \+		--pkg """ + config.GEE + """ \+		--pkg gio-2.0  \+		--pkg cairo \+		--pkg xmlbird \+		--pkg libbirdfont+        """+        +    cflags = ''+    cc_command = config.CC + " " + cflags + """ \+        -c C_SOURCE \+		-D 'GETTEXT_PACKAGE="birdfont"' \+        -I./build/libbirdfont \+		$(pkg-config --cflags sqlite3) \+		$(pkg-config --cflags """ + config.GEE + """) \+		$(pkg-config --cflags gio-2.0) \+		$(pkg-config --cflags cairo) \+		$(pkg-config --cflags glib-2.0) \+        -o OBJECT_FILE"""++    soname_parameters = "-Wl,-soname," + target_binary++    ldflags = ''+    linker_command = config.CC + " " + ldflags + """ \+		build/birdfont-export/*.o \+		-Lbuild/bin/ -lbirdfont \+		-lm \+		$(pkg-config --libs sqlite3) \+		$(pkg-config --libs """ + config.GEE + """) \+		$(pkg-config --libs gio-2.0) \+		$(pkg-config --libs cairo) \+		$(pkg-config --libs glib-2.0) \+		$(pkg-config --libs xmlbird) \+		-L./build -L./build/bin -l birdgems\+		-o ./build/bin/""" + target_binary++    birdfont_export = Builder('birdfont-export',+                              valac_command, +                              cc_command,+                              linker_command,+                              target_binary,+                              None,+                              ['libbirdgems.so', 'libbirdfont.so'])+			+    yield birdfont_export.build()  def task_birdfont_export():-     exp = Vala(src='birdfont-export', build='build', pkg_libs=LIBS, vala_deps=[libbird, libbirdgems])-     yield exp.gen_c(valac_options)-     yield exp.gen_bin(["""-D 'GETTEXT_PACKAGE="birdfont"' """])-+    yield make_birdfont_export('birdfont-export')++def make_birdfont_import(target_binary):+    valac_command = config.VALAC + """\+        -C  \+		--enable-experimental \+		--define=MAC \+        --basedir build/birdfont-import/ \+        """ + config.NON_NULL + """ \+		birdfont-import/*.vala \+		--vapidir=./ \+		--pkg """ + config.GEE + """ \+		--pkg gio-2.0  \+		--pkg cairo \+		--pkg xmlbird \+		--pkg libbirdfont+        """+        +    cflags = ''+    cc_command = config.CC + " " + cflags + """ \+        -c C_SOURCE \+		-D 'GETTEXT_PACKAGE="birdfont"' \+        -I./build/libbirdfont \+		$(pkg-config --cflags sqlite3) \+		$(pkg-config --cflags """ + config.GEE + """) \+		$(pkg-config --cflags gio-2.0) \+		$(pkg-config --cflags cairo) \+		$(pkg-config --cflags glib-2.0) \+        -o OBJECT_FILE"""++    soname_parameters = "-Wl,-soname," + target_binary++    ldflags = ''+    linker_command = config.CC + " " + ldflags + """ \+		build/birdfont-import/*.o \+		-Lbuild/bin/ -lbirdfont \+		-lm \+		$(pkg-config --libs sqlite3) \+		$(pkg-config --libs """ + config.GEE + """) \+		$(pkg-config --libs gio-2.0) \+		$(pkg-config --libs cairo) \+		$(pkg-config --libs glib-2.0) \+		$(pkg-config --libs xmlbird) \+		-L./build -L./build/bin -l birdgems\+		-o ./build/bin/""" + target_binary++    birdfont_import = Builder('birdfont-import',+                          valac_command, +                          cc_command,+                          linker_command,+                          target_binary,+                          None,+                          ['libbirdgems.so', 'libbirdfont.so'])+			+    yield birdfont_import.build()  def task_birdfont_import():-     exp = Vala(src='birdfont-import', build='build', pkg_libs=LIBS, vala_deps=[libbird, libbirdgems])-     yield exp.gen_c(valac_options)-     yield exp.gen_bin(["""-D 'GETTEXT_PACKAGE="birdfont"' """])+    yield make_birdfont_import('birdfont-import')++def make_birdfont_autotrace(target_binary):+    valac_command = config.VALAC + """\+        -C \+		--enable-experimental \+		--define=MAC \+        --basedir build/birdfont-autotrace/ \+        """ + config.NON_NULL + """ \+		birdfont-autotrace/*.vala \+		--vapidir=./ \+		--pkg """ + config.GEE + """ \+		--pkg gio-2.0  \+		--pkg cairo \+		--pkg xmlbird \+		--pkg libbirdfont \+        """+        +    cflags = ''+    cc_command = config.CC + " " + cflags + """ \+        -c C_SOURCE \+		-D 'GETTEXT_PACKAGE="birdfont"' \+        -I./build/libbirdfont \+		$(pkg-config --cflags sqlite3) \+		$(pkg-config --cflags """ + config.GEE + """) \+		$(pkg-config --cflags gio-2.0) \+		$(pkg-config --cflags cairo) \+		$(pkg-config --cflags glib-2.0) \+        -o OBJECT_FILE"""++    soname_parameters = "-Wl,-soname," + target_binary++    ldflags = ''+    linker_command = config.CC + " " + ldflags + """ \+		build/birdfont-autotrace/*.o \+        -I./build/libbirdfont \+		-Lbuild/bin/ -lbirdfont \+		-lm \+		$(pkg-config --libs sqlite3) \+		$(pkg-config --libs """ + config.GEE + """) \+		$(pkg-config --libs gio-2.0) \+		$(pkg-config --libs cairo) \+		$(pkg-config --libs glib-2.0) \+		$(pkg-config --libs xmlbird) \+		-L./build -L./build/bin -l birdgems\+		-o ./build/bin/""" + target_binary++    birdfont_autotrace = Builder('birdfont-autotrace',+                          valac_command, +                          cc_command,+                          linker_command,+                          target_binary,+                          None,+                          ['libbirdgems.so', 'libbirdfont.so'])+			+    yield birdfont_autotrace.build()++def task_birdfont_autotrace():+    yield make_birdfont_autotrace('birdfont-autotrace')+    +def make_libbirdfont(target_binary):+    valac_command = config.VALAC + """\+        -C \+        --vapidir=./ \+        --basedir build/libbirdfont/ \+        """ + config.NON_NULL + """ \+        --enable-experimental \+        --library libbirdfont \+        -H build/libbirdfont/birdfont.h \+        libbirdfont/*.vala \+        libbirdfont/OpenFontFormat/*.vala \+        libbirdfont/Renderer/*.vala \+        --pkg """ + config.GEE + """ \+        --pkg gio-2.0 \+        --pkg cairo \+        --pkg xmlbird \+        --pkg libbirdgems \+        --pkg sqlite3 \+        """+        +    cflags = ''+    cc_command = config.CC + " " + cflags + """ \+            -c C_SOURCE \+            -fPIC \+            -D 'GETTEXT_PACKAGE="birdfont"' \+            -I ./build/libbirdfont \+            -I ./build/libbirdgems \+            $(pkg-config --cflags sqlite3) \+            $(pkg-config --cflags fontconfig) \+            $(pkg-config --cflags """ + config.GEE + """) \+            $(pkg-config --cflags gio-2.0) \+            $(pkg-config --cflags cairo) \+            $(pkg-config --cflags glib-2.0) \+            $(pkg-config --cflags xmlbird) \+            -o OBJECT_FILE"""++    soname_parameters = "-Wl,-soname," + target_binary++    ldflags = ''+    linker_command = config.CC + " " + ldflags + """ \+            -shared \+            """ + soname_parameters + """ \+            build/libbirdfont/*.o \+            $(pkg-config --libs sqlite3) \+            $(freetype-config --libs) \+            $(pkg-config --libs """ + config.GEE + """) \+            $(pkg-config --libs gio-2.0) \+            $(pkg-config --libs fontconfig) \+            $(pkg-config --libs cairo) \+            $(pkg-config --libs glib-2.0) \+            $(pkg-config --libs xmlbird) \+            -L./build -L./build/bin -l birdgems\+            -o ./build/bin/""" + target_binary++    libbirdfont = Builder('libbirdfont',+                          valac_command, +                          cc_command,+                          linker_command,+                          target_binary,+                          'libbirdfont.so',+                          ['libbirdgems.so'])+			+    yield libbirdfont.build()++def task_libbirdfont():+    yield make_libbirdfont('libbirdfont.so.' + version.SO_VERSION_MAJOR)+    +def make_libbirdgems(target_binary):+    valac_command = config.VALAC + """\+		-C \+		-H build/libbirdgems/birdgems.h \+		--pkg posix \+		--vapidir=./ \+		--basedir build/libbirdgems/ \+		""" + config.NON_NULL + """ \+		--enable-experimental \+		--library libbirdgems \+		libbirdgems/*.vala \+        """++    cc = 'gcc'+    cflags = ''+    cc_command = config.CC + " " + cflags + """ \+			-fPIC \+			$(pkg-config --cflags glib-2.0) \+			-c C_SOURCE \+            -o OBJECT_FILE \+			"""++    soname_parameters = "-Wl,-soname," + target_binary++    ldflags = ''+    linker_command = config.CC + " " + ldflags + """ \+			-shared \+			""" + soname_parameters + """ \+			-fPIC \+			build/libbirdgems/*.o \+			$(pkg-config --libs glib-2.0) \+			$(pkg-config --libs gobject-2.0) \+			-o build/bin/""" + target_binary++    libbirdgems = Builder('libbirdgems',+                          valac_command, +                          cc_command,+                          linker_command,+                          target_binary,+                          'libbirdgems.so')+			+    yield libbirdgems.build() +def task_libbirdgems():+    yield make_libbirdgems('libbirdgems.so.' + version.LIBBIRDGEMS_SO_VERSION_MAJOR)   def task_compile_translations ():     """translate po files"""     return  {         'actions': [compile_translations]         }-+         def task_man():     """gzip linux man pages"""     for name in ("birdfont.1", "birdfont-export.1", -"birdfont-import.1", "birdfont-autotrace.1"):+                 "birdfont-import.1", "birdfont-autotrace.1"):         yield {             'name': name,             'file_dep': ['resources/linux/%s' % name],@@ -163,9 +422,19 @@ def task_man():             'actions': ["gzip -9 -c %(dependencies)s > %(targets)s"],             } - def task_distclean ():     return  {         'actions': ['rm -rf .doit.db build scripts/config.py scripts/*.pyc dodo.pyc libbirdfont/Config.vala'],         } +def task_build ():+    if not os.path.exists ("build/configured"):+        print ("Project is not configured")+        exit (1)++    subprocess.check_output ('mkdir -p build', shell=True)+    subprocess.check_output ('touch build/installed', shell=True)++    return  {+        'actions': ['echo "Build"'],+        }diff --git a/install.py b/install.pyindex 0c0a2d5..4ecbced 100755--- a/install.py+++ b/install.py@@ -1,4 +1,4 @@-#!/usr/bin/python +#!/usr/bin/python3 """ Copyright (C) 2013 2014 2015 Johan Mattsson diff --git a/scripts/builder.py b/scripts/builder.pynew file mode 100644index 0000000..d51ef78--- /dev/null+++ b/scripts/builder.py@@ -0,0 +1,128 @@+import os+import fnmatch+import glob+from os import path+from doit.tools import run_once++def get_sources_path(directory, pattern):+    """obtain path of all source files for a matching pattern"""+    matches = []+    for root, dirnames, filenames in os.walk(directory):+        for filename in filenames:+            full_path = os.path.join(root, filename)+            if fnmatch.filter([full_path], pattern):+                matches.append(os.path.join(root, filename))+    return matches+    +class Builder(object):+    """helper to generate tasks to compile vala code"""++    def __init__(self,+                 source_directory,+                 valac_command,+                 cc_command,+                 linker_command,+                 target_binary,+                 link = None,+                 dependencies = None):+        self.source_directory = source_directory+        self.valac_command = valac_command+        self.cc_command = cc_command+        self.linker_command = linker_command+        self.target_binary = target_binary+        self.link = link+        self.dependencies = dependencies++    def build(self):+        source_directory = self.source_directory+        valac_command = self.valac_command+        cc_command = self.cc_command+        linker_command = self.linker_command+        target_binary = self.target_binary+        +        if not self.dependencies == None:+            bindep = [path.join('build', 'bin', f) for f in self.dependencies]+        else:+            bindep = []+            +        copied_csource_paths = get_sources_path(source_directory, '*.c')+        copied_cheader_paths = get_sources_path(source_directory, '*.h')+        vala_source_paths = get_sources_path(source_directory, '*.vala')+        build_directory = path.join('build', source_directory)++        csource_files = [path.basename(f) for f in copied_csource_paths]+        generated_csource_paths = []+        for vala_path in vala_source_paths:+            vala_file = path.basename(vala_path)+            cfile = vala_file.replace('.vala', '.c')+            cpath = path.join(build_directory, cfile)+            generated_csource_paths.append(cpath)+            csource_files.append(cfile)+       +        build_file = path.join(build_directory, 'placeholder')+        yield {+            'basename': 'mkdir ' + build_directory,+            'actions': ['mkdir -p ' + path.join('build', 'bin'),+                        'mkdir -p ' + build_directory, +                        'touch ' + build_file],+            'targets': [build_file],+            'uptodate': [run_once]+        }+        +        copied_csources = []+        copied_cheader = []+        for csource in copied_cheader_paths + copied_csource_paths:+            dest = path.join(build_directory, path.basename(csource))+            +            if not dest[-2:] == ".h":+                copied_csources.append(dest)+            else:+                copied_cheader.append(dest)+                +            yield {+                'basename': 'copy ' + csource,+                'file_dep': [build_file] + bindep,+                'actions': ['cp ' + csource + ' ' + build_directory],+                'targets': [dest]+            }+        +        yield {+            'basename': 'valac ' + build_directory,+            'file_dep': [build_file] + bindep,+            'actions': [valac_command],+            'targets': generated_csource_paths+        }+        +        csource_paths = generated_csource_paths + copied_csources+        object_files = []+        +        for csource in csource_paths:+            object_file = path.basename (csource.replace('.c', '.o'))+            object_files.append(object_file);+             +            command = cc_command.replace('C_SOURCE', csource)+            object_path = path.join(build_directory, object_file)+            command = command.replace('OBJECT_FILE', object_path)+            yield {+                'basename': 'compile ' + path.basename(csource),+                'file_dep': [build_file, csource] + bindep + copied_cheader,+                'actions': [command],+                'targets': [path.join(build_directory, object_file)],+            }+            +        object_paths = [path.join(build_directory, f) for f in object_files] +        yield {+            'basename': source_directory,+            'file_dep': object_paths + [build_file] + bindep,+            'actions': [linker_command],+            'targets': [path.join(build_directory, 'bin', target_binary)]+        }++        if not self.link == None:+            createlink = 'cd build/bin/ && ln -s -f ' + target_binary + ' ' + self.link+            yield {+                'basename': 'Create link ' + target_binary + ' ' + self.link,+                'file_dep': [path.join('build', 'bin', target_binary)],+                'actions': [createlink],+                'targets': [path.join('build', 'bin', self.link)]+            }diff --git a/scripts/configfile.py b/scripts/configfile.pyindex 6bb87c0..cb9f89d 100755--- a/scripts/configfile.py+++ b/scripts/configfile.py@@ -1,4 +1,4 @@-#!/usr/bin/python+#!/usr/bin/python3 """ Copyright (C) 2012, 2013 Eduardo Naufel Schettino and Johan Mattsson @@ -39,13 +39,17 @@ def write_config (prefix):  	f.write("}") -def write_compile_parameters (prefix, dest, cc, gee, posixvala):+def write_compile_parameters (prefix, dest, cc, gee, valac, non_null): 	f = open('./scripts/config.py', 'w+')-	f.write("#!/usr/bin/python\n")+	f.write("#!/usr/bin/python3\n") 	f.write("PREFIX =  \"" + prefix + "\"\n") 	f.write("DEST = \"" + dest + "\"\n") 	f.write("CC = \"" + cc + "\"\n") 	f.write("GEE = \"" + gee + "\"\n")-	f.write("POSIXVALA = " + posixvala + "\n")+	f.write("VALAC = \"" + valac + "\"\n") +	if non_null:+		f.write("NON_NULL = \"--enable-experimental-non-null\"\n")+	else:+		f.write("NON_NULL = \"\"\n") 	diff --git a/scripts/run.py b/scripts/run.pyindex 68c157c..a022509 100644--- a/scripts/run.py+++ b/scripts/run.py@@ -1,4 +1,4 @@-#!/usr/bin/python+#!/usr/bin/python3 """ Copyright (C) 2013 Johan Mattsson diff --git a/scripts/update_translations.py b/scripts/update_translations.pyindex d8e149a..784a0ed 100755--- a/scripts/update_translations.py+++ b/scripts/update_translations.py@@ -1,4 +1,4 @@-#!/usr/bin/python+#!/usr/bin/python3 import subprocess import os diff --git a/scripts/version.py b/scripts/version.pyindex 18e0833..2f313f3 100644--- a/scripts/version.py+++ b/scripts/version.py@@ -1,4 +1,4 @@-#!/usr/bin/python+#!/usr/bin/python3 """ Copyright (C) 2013, 2014 Johan Mattsson 

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112