Commit a99991e4 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Build executable by default

2008-04-26  Juerg Billeter  <j@bitron.ch>

	* 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
parent 5477b711
2008-04-26 Jürg Billeter <j@bitron.ch>
* 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 <j@bitron.ch>
* gobject/valaccodegenerator.vala:
......
......@@ -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 = \
......
......@@ -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 = \
......
......@@ -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;
......
......@@ -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 = \
......
......@@ -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 = \
......
......@@ -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
......
#!/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
......
......@@ -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 = \
......
......@@ -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 = \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment