From: Juerg Billeter Date: Sat, 26 Apr 2008 16:54:01 +0000 (+0000) Subject: Build executable by default X-Git-Tag: VALA_0_3_2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a99991e4bcc229562376de2c8388c7757e421598;p=platform%2Fupstream%2Fvala.git Build executable by default 2008-04-26 Juerg Billeter * compiler/valacompiler.vala: Build executable by default * ccode/Makefile.am: * compiler/Makefile.am: * gee/Makefile.am: * gen-project/Makefile.am: * gobject/Makefile.am: * tests/testrunner.sh: * vala/Makefile.am: * vapigen/Makefile.am: Update build system to use -C svn path=/trunk/; revision=1324 --- diff --git a/ChangeLog b/ChangeLog index e4bc96a..a6aff41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,22 @@ 2008-04-26 Jürg Billeter + * compiler/valacompiler.vala: + + Build executable by default + + * ccode/Makefile.am: + * compiler/Makefile.am: + * gee/Makefile.am: + * gen-project/Makefile.am: + * gobject/Makefile.am: + * tests/testrunner.sh: + * vala/Makefile.am: + * vapigen/Makefile.am: + + Update build system to use -C + +2008-04-26 Jürg Billeter + * gobject/valaccodegenerator.vala: Always initialize local array length variables, fixes bug 529863 diff --git a/ccode/Makefile.am b/ccode/Makefile.am index f75f6c9..d335e02 100644 --- a/ccode/Makefile.am +++ b/ccode/Makefile.am @@ -76,7 +76,7 @@ ccodeinclude_HEADERS = \ $(NULL) ccode.vapi ccode.vala.stamp: $(libvalaccode_la_VALASOURCES) - $(VALAC) --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --basedir $(top_srcdir) --library ccode $^ + $(VALAC) -C --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --basedir $(top_srcdir) --library ccode $^ touch $@ libvalaccode_la_LIBADD = \ diff --git a/compiler/Makefile.am b/compiler/Makefile.am index 46ddbee..94c8c5f 100644 --- a/compiler/Makefile.am +++ b/compiler/Makefile.am @@ -24,7 +24,7 @@ valac_SOURCES = \ $(NULL) valac.vala.stamp: $(valac_VALASOURCES) - $(VALAC) --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --vapidir ../vala --pkg vala --vapidir ../gobject --pkg gobject --pkg config --basedir $(top_srcdir) $^ + $(VALAC) -C --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --vapidir ../vala --pkg vala --vapidir ../gobject --pkg gobject --pkg config --basedir $(top_srcdir) $^ touch $@ valac_LDADD = \ diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index d792713..3131875 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -138,9 +138,14 @@ class Vala.Compiler : Object { private int run () { context = new CodeContext (); - /* support old command line interface */ + // default to build executable if (!ccode_only && !compile_only && output == null) { - ccode_only = true; + // strip extension if there is one + // else we use the default output file of the C compiler + if (sources[0].rchr (-1, '.') != null) { + long dot = sources[0].pointer_to_offset (sources[0].rchr (-1, '.')); + output = Path.get_basename (sources[0].substring (0, dot)); + } } context.library = library; diff --git a/gee/Makefile.am b/gee/Makefile.am index 10fa5f9..8f5f1be 100644 --- a/gee/Makefile.am +++ b/gee/Makefile.am @@ -40,7 +40,7 @@ geeinclude_HEADERS = \ $(NULL) gee.vapi gee.vala.stamp: $(libgee_la_VALASOURCES) - $(VALAC) --vapidir $(srcdir)/../vapi --basedir $(top_srcdir) --library gee $^ + $(VALAC) -C --vapidir $(srcdir)/../vapi --basedir $(top_srcdir) --library gee $^ touch $@ libgee_la_LIBADD = \ diff --git a/gen-project/Makefile.am b/gen-project/Makefile.am index ed2aff1..46fa2f5 100644 --- a/gen-project/Makefile.am +++ b/gen-project/Makefile.am @@ -29,7 +29,7 @@ vala_gen_project_SOURCES = \ $(NULL) vala-gen-project.vala.stamp: $(vala_gen_project_VALASOURCES) - $(VALAC) --vapidir $(srcdir)/../vapi --pkg config --pkg gtk+-2.0 --basedir $(top_srcdir) $^ + $(VALAC) -C --vapidir $(srcdir)/../vapi --pkg config --pkg gtk+-2.0 --basedir $(top_srcdir) $^ touch $@ vala_gen_project_LDADD = \ diff --git a/gobject/Makefile.am b/gobject/Makefile.am index eee0c59..6a0d9d1 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -50,7 +50,7 @@ gobjectinclude_HEADERS = \ $(NULL) gobject.vapi gobject.vala.stamp: $(libvala_la_VALASOURCES) - $(VALAC) --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --vapidir ../vala --pkg vala --basedir $(top_srcdir) --library gobject $^ + $(VALAC) -C --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --vapidir ../vala --pkg vala --basedir $(top_srcdir) --library gobject $^ touch $@ libvala_la_LDFLAGS = -no-undefined diff --git a/tests/testrunner.sh b/tests/testrunner.sh index b1cb004..7707b0c 100755 --- a/tests/testrunner.sh +++ b/tests/testrunner.sh @@ -1,7 +1,7 @@ #!/bin/bash # testrunner.sh # -# Copyright (C) 2006-2007 Jürg Billeter +# Copyright (C) 2006-2008 Jürg Billeter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -43,7 +43,7 @@ for testcasesource in "$@" do testsrc=${testcasesource/.vala/} testbuild=`basename "$testsrc"` - if ! $VALAC --vapidir "$vapidir" --pkg gee-1.0 --basedir $topsrcdir -d $topbuilddir $testsrc.vala > $testbuild.err 2>&1 + if ! $VALAC -C --vapidir "$vapidir" --pkg gee-1.0 --basedir $topsrcdir -d $topbuilddir $testsrc.vala > $testbuild.err 2>&1 then CODE=1 continue diff --git a/vala/Makefile.am b/vala/Makefile.am index 378df4a..2d3cc33 100644 --- a/vala/Makefile.am +++ b/vala/Makefile.am @@ -159,7 +159,7 @@ valainclude_HEADERS = \ $(NULL) vala.vapi vala.vala.stamp: $(libvalacore_la_VALASOURCES) - $(VALAC) --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --pkg config --basedir $(top_srcdir) --library vala $^ + $(VALAC) -C --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --pkg config --basedir $(top_srcdir) --library vala $^ touch $@ libvalacore_la_LIBADD = \ diff --git a/vapigen/Makefile.am b/vapigen/Makefile.am index 52e8db4..51c27b0 100644 --- a/vapigen/Makefile.am +++ b/vapigen/Makefile.am @@ -41,11 +41,11 @@ vapicheck_SOURCES = \ $(NULL) vapigen.vala.stamp: $(vapigen_VALASOURCES) - $(VALAC) --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --vapidir ../vala --pkg vala --vapidir ../gobject-introspection --pkg gidl --pkg config --basedir $(top_srcdir) $^ + $(VALAC) -C --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --vapidir ../vala --pkg vala --vapidir ../gobject-introspection --pkg gidl --pkg config --basedir $(top_srcdir) $^ touch $@ vapicheck.vala.stamp: $(vapicheck_VALASOURCES) - $(VALAC) --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --vapidir ../vala --pkg vala --vapidir ../gobject-introspection --pkg gidl --pkg config --basedir $(top_srcdir) $^ + $(VALAC) -C --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --vapidir ../ccode --pkg ccode --vapidir ../vala --pkg vala --vapidir ../gobject-introspection --pkg gidl --pkg config --basedir $(top_srcdir) $^ touch $@ vapigen_LDADD = \