[vala] build: Avoid using ".." for referencing paths and reorganize valac-calls
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] build: Avoid using ".." for referencing paths and reorganize valac-calls
- Date: Sun, 24 Aug 2014 09:13:34 +0000 (UTC)
commit 797a15747b7c0cb43ea7e13687f1af34f6e14ddf
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu May 29 16:24:17 2014 +0200
build: Avoid using ".." for referencing paths and reorganize valac-calls
Makefile.common | 3 +++
ccode/Makefile.am | 17 ++++++++++++-----
codegen/Makefile.am | 23 +++++++++++++++--------
compiler/Makefile.am | 20 ++++++++++++++------
gee/Makefile.am | 15 ++++++++++-----
vala/Makefile.am | 19 +++++++++++++------
vapi/Makefile.am | 2 +-
vapigen/Makefile.am | 36 ++++++++++++++++++++++++++----------
8 files changed, 94 insertions(+), 41 deletions(-)
---
diff --git a/Makefile.common b/Makefile.common
new file mode 100644
index 0000000..5e9692f
--- /dev/null
+++ b/Makefile.common
@@ -0,0 +1,3 @@
+VALA_V = $(VALA_V_$(V))
+VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
+VALA_V_0 = @echo " VALAC " $^;
diff --git a/ccode/Makefile.am b/ccode/Makefile.am
index eb25f9d..fd3186a 100644
--- a/ccode/Makefile.am
+++ b/ccode/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/Makefile.common
+
NULL =
AM_CPPFLAGS = \
@@ -79,7 +81,16 @@ ccodeinclude_HEADERS = \
$(NULL)
ccode.vapi ccode.vala.stamp: $(libvalaccode_la_VALASOURCES)
- $(VALA_V)$(VALAC) $(COVERAGE_VALAFLAGS) $(VALAFLAGS) -C --vapidir $(srcdir)/../vapi --pkg gobject-2.0
--vapidir $(srcdir)/../gee --pkg gee --pkg config -H valaccode.h --library ccode $^
+ $(VALA_V)$(VALAC) \
+ $(COVERAGE_VALAFLAGS) \
+ $(VALAFLAGS) \
+ -C \
+ --vapidir $(top_srcdir)/vapi --pkg gobject-2.0 \
+ --vapidir $(top_srcdir)/gee --pkg gee \
+ --pkg config \
+ -H valaccode.h \
+ --library ccode \
+ $^
touch $@
libvalaccode_la_LIBADD = \
@@ -94,7 +105,3 @@ MAINTAINERCLEANFILES = \
valaccode.h \
$(libvalaccode_la_VALASOURCES:.vala=.c) \
$(NULL)
-
-VALA_V = $(VALA_V_$(V))
-VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
-VALA_V_0 = @echo " VALAC " $^;
diff --git a/codegen/Makefile.am b/codegen/Makefile.am
index 33e0c1a..a20e24f 100644
--- a/codegen/Makefile.am
+++ b/codegen/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/Makefile.common
+
NULL =
AM_CPPFLAGS = \
@@ -57,7 +59,17 @@ codegeninclude_HEADERS = \
$(NULL)
codegen.vapi codegen.vala.stamp: $(libvala_la_VALASOURCES)
- $(VALA_V)$(VALAC) $(COVERAGE_VALAFLAGS) $(VALAFLAGS) -C --vapidir $(srcdir)/../vapi --pkg gobject-2.0
--vapidir $(srcdir)/../gee --pkg gee --vapidir $(srcdir)/../ccode --pkg ccode --vapidir $(srcdir)/../vala
--pkg vala -H valacodegen.h --library codegen $^
+ $(VALA_V)$(VALAC) \
+ $(COVERAGE_VALAFLAGS) \
+ $(VALAFLAGS) \
+ -C \
+ --vapidir $(top_srcdir)/vapi --pkg gobject-2.0 \
+ --vapidir $(top_srcdir)/gee --pkg gee \
+ --vapidir $(top_srcdir)/ccode --pkg ccode \
+ --vapidir $(top_srcdir)/vala --pkg vala \
+ -H valacodegen.h \
+ --library codegen \
+ $^
@touch $@
libvala PACKAGE_SUFFIX@_la_LDFLAGS = -no-undefined
@@ -65,8 +77,8 @@ libvala PACKAGE_SUFFIX@_la_LDFLAGS = -no-undefined
libvala PACKAGE_SUFFIX@_la_LIBADD = \
$(COVERAGE_LIBS) \
$(GLIB_LIBS) \
- ../vala/libvalacore.la \
- ../ccode/libvalaccode.la \
+ $(top_builddir)/vala/libvalacore.la \
+ $(top_builddir)/ccode/libvalaccode.la \
$(NULL)
EXTRA_DIST = $(libvala_la_VALASOURCES) codegen.vapi codegen.vala.stamp
@@ -76,8 +88,3 @@ MAINTAINERCLEANFILES = \
valacodegen.h \
$(libvala_la_VALASOURCES:.vala=.c) \
$(NULL)
-
-VALA_V = $(VALA_V_$(V))
-VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
-VALA_V_0 = @echo " VALAC " $^;
-
diff --git a/compiler/Makefile.am b/compiler/Makefile.am
index d6e7f81..1a513fa 100644
--- a/compiler/Makefile.am
+++ b/compiler/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/Makefile.common
+
NULL =
AM_CPPFLAGS = \
@@ -26,13 +28,23 @@ valac_SOURCES = \
$(NULL)
valac.vala.stamp: $(valac_VALASOURCES)
- $(VALA_V)$(VALAC) $(COVERAGE_VALAFLAGS) $(VALAFLAGS) -C --vapidir $(srcdir)/../vapi --pkg gobject-2.0
--vapidir $(srcdir)/../gee --pkg gee --vapidir $(srcdir)/../ccode --pkg ccode --vapidir $(srcdir)/../vala
--pkg vala --vapidir $(srcdir)/../codegen --pkg codegen --pkg config $^
+ $(VALA_V)$(VALAC) \
+ $(COVERAGE_VALAFLAGS) \
+ $(VALAFLAGS) \
+ -C \
+ --vapidir $(top_srcdir)/vapi --pkg gobject-2.0 \
+ --vapidir $(top_srcdir)/gee --pkg gee \
+ --vapidir $(top_srcdir)/ccode --pkg ccode \
+ --vapidir $(top_srcdir)/vala --pkg vala \
+ --vapidir $(top_srcdir)/codegen --pkg codegen \
+ --pkg config \
+ $^
@touch $@
valac_LDADD = \
$(COVERAGE_LIBS) \
$(GLIB_LIBS) \
- ../codegen/libvala PACKAGE_SUFFIX@.la \
+ $(top_builddir)/codegen/libvala PACKAGE_SUFFIX@.la \
$(NULL)
EXTRA_DIST = $(valac_VALASOURCES) valac.vala.stamp
@@ -47,7 +59,3 @@ endif
MAINTAINERCLEANFILES = \
$(valac_VALASOURCES:.vala=.c) \
$(NULL)
-
-VALA_V = $(VALA_V_$(V))
-VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
-VALA_V_0 = @echo " VALAC " $^;
diff --git a/gee/Makefile.am b/gee/Makefile.am
index f9ac2fc..db4e75b 100644
--- a/gee/Makefile.am
+++ b/gee/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/Makefile.common
+
NULL =
AM_CPPFLAGS = \
@@ -36,7 +38,14 @@ geeinclude_HEADERS = \
$(NULL)
gee.vapi gee.vala.stamp: $(libgee_la_VALASOURCES)
- $(VALA_V)$(VALAC) $(COVERAGE_VALAFLAGS) $(VALAFLAGS) -C --vapidir $(srcdir)/../vapi --pkg gobject-2.0
-H valagee.h --library gee $^
+ $(VALA_V)$(VALAC) \
+ $(COVERAGE_VALAFLAGS) \
+ $(VALAFLAGS) \
+ -C \
+ --vapidir $(top_srcdir)/vapi --pkg gobject-2.0 \
+ -H valagee.h \
+ --library gee \
+ $^
@touch $@
libgee_la_LIBADD = \
@@ -51,7 +60,3 @@ MAINTAINERCLEANFILES = \
valagee.h \
$(libgee_la_VALASOURCES:.vala=.c) \
$(NULL)
-
-VALA_V = $(VALA_V_$(V))
-VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
-VALA_V_0 = @echo " VALAC " $^;
diff --git a/vala/Makefile.am b/vala/Makefile.am
index ee8d410..54d01bd 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/Makefile.common
+
NULL =
AM_CPPFLAGS = \
@@ -173,13 +175,22 @@ valainclude_HEADERS = \
$(NULL)
vala.vapi vala.vala.stamp: $(libvalacore_la_VALASOURCES)
- $(VALA_V)$(VALAC) $(COVERAGE_VALAFLAGS) $(VALAFLAGS) -C --vapidir $(srcdir)/../vapi --pkg gobject-2.0
--vapidir $(srcdir)/../gee --pkg gee --pkg config -H vala.h --library vala $^
+ $(VALA_V)$(VALAC) \
+ $(COVERAGE_VALAFLAGS) \
+ $(VALAFLAGS) \
+ -C \
+ --vapidir $(top_srcdir)/vapi --pkg gobject-2.0 \
+ --vapidir $(top_srcdir)/gee --pkg gee \
+ --pkg config \
+ -H vala.h \
+ --library vala \
+ $^
@touch $@
libvalacore_la_LIBADD = \
$(COVERAGE_LIBS) \
$(GLIB_LIBS) \
- ../gee/libgee.la \
+ $(top_builddir)/gee/libgee.la \
$(NULL)
EXTRA_DIST = $(libvalacore_la_VALASOURCES) vala.vapi vala.vala.stamp
@@ -189,7 +200,3 @@ MAINTAINERCLEANFILES = \
vala.h \
$(libvalacore_la_VALASOURCES:.vala=.c) \
$(NULL)
-
-VALA_V = $(VALA_V_$(V))
-VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
-VALA_V_0 = @echo " VALAC " $^;
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
index 638cbfa..f9cb467 100644
--- a/vapi/Makefile.am
+++ b/vapi/Makefile.am
@@ -2,7 +2,7 @@ NULL =
vapidir = $(pkgdatadir)/vapi
-libvala PACKAGE_SUFFIX@.vapi: ../gee/gee.vapi ../ccode/ccode.vapi ../vala/vala.vapi ../codegen/codegen.vapi
+libvala PACKAGE_SUFFIX@.vapi: $(top_srcdir)/gee/gee.vapi $(top_srcdir)/ccode/ccode.vapi
$(top_srcdir)/vala/vala.vapi $(top_srcdir)/codegen/codegen.vapi
cat $^ > $@
dist_vapi_DATA = \
diff --git a/vapigen/Makefile.am b/vapigen/Makefile.am
index bc8539a..39fc870 100644
--- a/vapigen/Makefile.am
+++ b/vapigen/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/Makefile.common
+
NULL =
VALAC = $(top_builddir)/compiler/valac$(EXEEXT)
@@ -41,23 +43,41 @@ vapicheck_SOURCES = \
$(NULL)
vapigen.vala.stamp: $(vapigen_VALASOURCES)
- $(VALA_V)$(VALAC) $(VALAFLAGS) -C --vapidir $(srcdir)/../vapi --vapidir $(srcdir)/../gee --pkg gee
--vapidir $(srcdir)/../ccode --pkg ccode --vapidir $(srcdir)/../vala --pkg vala --vapidir
$(srcdir)/../gobject-introspection --pkg gidl --pkg config $^
+ $(VALA_V)$(VALAC) \
+ $(VALAFLAGS) \
+ -C \
+ --vapidir $(top_srcdir)/vapi \
+ --vapidir $(top_srcdir)/gee --pkg gee \
+ --vapidir $(top_srcdir)/ccode --pkg ccode \
+ --vapidir $(top_srcdir)/vala --pkg vala \
+ --vapidir $(top_srcdir)/gobject-introspection --pkg gidl \
+ --pkg config \
+ $^
@touch $@
vapicheck.vala.stamp: $(vapicheck_VALASOURCES)
- $(VALA_V)$(VALAC) $(VALAFLAGS) -C --vapidir $(srcdir)/../vapi --vapidir $(srcdir)/../gee --pkg gee
--vapidir $(srcdir)/../ccode --pkg ccode --vapidir $(srcdir)/../vala --pkg vala --vapidir
$(srcdir)/../gobject-introspection --pkg gidl --pkg config $^
+ $(VALA_V)$(VALAC) \
+ $(VALAFLAGS) \
+ -C \
+ --vapidir $(top_srcdir)/vapi \
+ --vapidir $(top_srcdir)/gee --pkg gee \
+ --vapidir $(top_srcdir)/ccode --pkg ccode \
+ --vapidir $(top_srcdir)/vala --pkg vala \
+ --vapidir $(top_srcdir)/gobject-introspection --pkg gidl \
+ --pkg config \
+ $^
@touch $@
vapigen_LDADD = \
$(GLIB_LIBS) \
- ../codegen/libvala PACKAGE_SUFFIX@.la \
- ../gobject-introspection/libgidl.la \
+ $(top_builddir)/codegen/libvala PACKAGE_SUFFIX@.la \
+ $(top_builddir)/gobject-introspection/libgidl.la \
$(NULL)
vapicheck_LDADD = \
$(GLIB_LIBS) \
- ../codegen/libvala PACKAGE_SUFFIX@.la \
- ../gobject-introspection/libgidl.la \
+ $(top_builddir)/codegen/libvala PACKAGE_SUFFIX@.la \
+ $(top_builddir)/gobject-introspection/libgidl.la \
$(NULL)
if ENABLE_UNVERSIONED
@@ -100,7 +120,3 @@ MAINTAINERCLEANFILES = \
$(vapigen_VALASOURCES:.vala=.c) \
$(vapicheck_VALASOURCES:.vala=.c) \
$(NULL)
-
-VALA_V = $(VALA_V_$(V))
-VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
-VALA_V_0 = @echo " VALAC " $^;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]