[vala/staging: 4/9] build: Make ccode and codegen private API



commit c9aa4716b2645af40080bd6523065e78fceba3b4
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Apr 14 20:41:30 2017 +0200

    build: Make ccode and codegen private API
    
    valac is the only consumer and will statically link these libraries.

 Makefile.am          |    2 +-
 ccode/Makefile.am    |    7 +------
 codegen/Makefile.am  |   28 ++++++++++------------------
 compiler/Makefile.am |    4 +++-
 vala/Makefile.am     |   22 +++++++++++++---------
 vapi/Makefile.am     |    2 +-
 vapigen/Makefile.am  |    4 ++--
 7 files changed, 31 insertions(+), 38 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index eb4f1ad..813b3fc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,8 +4,8 @@ NULL =
 
 SUBDIRS = \
        gee \
-       ccode \
        vala \
+       ccode \
        codegen \
        compiler \
        vapi \
diff --git a/ccode/Makefile.am b/ccode/Makefile.am
index 0402f62..3e384d7 100644
--- a/ccode/Makefile.am
+++ b/ccode/Makefile.am
@@ -75,12 +75,6 @@ libvalaccode_la_SOURCES = \
        $(libvalaccode_la_VALASOURCES:.vala=.c) \
        $(NULL)
 
-ccodeincludedir = $(includedir)/vala@PACKAGE_SUFFIX@
-
-ccodeinclude_HEADERS = \
-       valaccode.h \
-       $(NULL)
-
 ccode.vapi ccode.vala.stamp: $(libvalaccode_la_VALASOURCES)
        $(VALA_V)$(VALAC) \
                $(COVERAGE_VALAFLAGS) \
@@ -97,6 +91,7 @@ ccode.vapi ccode.vala.stamp: $(libvalaccode_la_VALASOURCES)
 libvalaccode_la_LIBADD = \
        $(COVERAGE_LIBS) \
        $(GLIB_LIBS) \
+       $(top_builddir)/vala/libvala@PACKAGE_SUFFIX@.la \
        $(NULL)
 
 EXTRA_DIST = $(libvalaccode_la_VALASOURCES) ccode.vapi ccode.vala.stamp
diff --git a/codegen/Makefile.am b/codegen/Makefile.am
index a20e24f..e0e3ec9 100644
--- a/codegen/Makefile.am
+++ b/codegen/Makefile.am
@@ -12,11 +12,11 @@ AM_CPPFLAGS = \
 
 BUILT_SOURCES = codegen.vala.stamp
 
-lib_LTLIBRARIES = \
-       libvala@PACKAGE_SUFFIX@.la \
+noinst_LTLIBRARIES = \
+       libvalaccodegen.la \
        $(NULL)
 
-libvala_la_VALASOURCES = \
+libvalaccodegen_la_VALASOURCES = \
        valaccodearraymodule.vala \
        valaccodeassignmentmodule.vala \
        valaccodeattribute.vala \
@@ -47,18 +47,12 @@ libvala_la_VALASOURCES = \
        valatyperegisterfunction.vala \
        $(NULL)
 
-libvala@PACKAGE_SUFFIX@_la_SOURCES = \
+libvalaccodegen_la_SOURCES = \
        codegen.vala.stamp \
-       $(libvala_la_VALASOURCES:.vala=.c) \
+       $(libvalaccodegen_la_VALASOURCES:.vala=.c) \
        $(NULL)
 
-codegenincludedir = $(includedir)/vala@PACKAGE_SUFFIX@
-
-codegeninclude_HEADERS = \
-       valacodegen.h \
-       $(NULL)
-
-codegen.vapi codegen.vala.stamp: $(libvala_la_VALASOURCES)
+codegen.vapi codegen.vala.stamp: $(libvalaccodegen_la_VALASOURCES)
        $(VALA_V)$(VALAC) \
                $(COVERAGE_VALAFLAGS) \
                $(VALAFLAGS) \
@@ -72,19 +66,17 @@ codegen.vapi codegen.vala.stamp: $(libvala_la_VALASOURCES)
                $^
        @touch $@
 
-libvala@PACKAGE_SUFFIX@_la_LDFLAGS = -no-undefined
-
-libvala@PACKAGE_SUFFIX@_la_LIBADD = \
+libvalaccodegen_la_LIBADD = \
        $(COVERAGE_LIBS) \
        $(GLIB_LIBS) \
-       $(top_builddir)/vala/libvalacore.la \
+       $(top_builddir)/vala/libvala@PACKAGE_SUFFIX@.la \
        $(top_builddir)/ccode/libvalaccode.la \
        $(NULL)
 
-EXTRA_DIST = $(libvala_la_VALASOURCES) codegen.vapi codegen.vala.stamp
+EXTRA_DIST = $(libvalaccodegen_la_VALASOURCES) codegen.vapi codegen.vala.stamp
 
 MAINTAINERCLEANFILES = \
        codegen.vapi \
        valacodegen.h \
-       $(libvala_la_VALASOURCES:.vala=.c) \
+       $(libvalaccodegen_la_VALASOURCES:.vala=.c) \
        $(NULL)
diff --git a/compiler/Makefile.am b/compiler/Makefile.am
index 1a513fa..ff8759e 100644
--- a/compiler/Makefile.am
+++ b/compiler/Makefile.am
@@ -44,7 +44,9 @@ valac.vala.stamp: $(valac_VALASOURCES)
 valac_LDADD = \
        $(COVERAGE_LIBS) \
        $(GLIB_LIBS) \
-       $(top_builddir)/codegen/libvala@PACKAGE_SUFFIX@.la \
+       $(top_builddir)/vala/libvala@PACKAGE_SUFFIX@.la \
+       $(top_builddir)/ccode/libvalaccode.la \
+       $(top_builddir)/codegen/libvalaccodegen.la \
        $(NULL)
 
 EXTRA_DIST = $(valac_VALASOURCES) valac.vala.stamp
diff --git a/vala/Makefile.am b/vala/Makefile.am
index 397594c..5048a07 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -12,11 +12,11 @@ AM_CPPFLAGS = \
 
 BUILT_SOURCES = vala.vala.stamp
 
-noinst_LTLIBRARIES = \
-       libvalacore.la \
+lib_LTLIBRARIES = \
+       libvala@PACKAGE_SUFFIX@.la \
        $(NULL)
 
-libvalacore_la_VALASOURCES = \
+libvala_la_VALASOURCES = \
        valaaddressofexpression.vala \
        valaarraycopymethod.vala \
        valaarraycreationexpression.vala \
@@ -168,9 +168,9 @@ libvalacore_la_VALASOURCES = \
        valayieldstatement.vala \
        $(NULL)
 
-libvalacore_la_SOURCES = \
+libvala@PACKAGE_SUFFIX@_la_SOURCES = \
        vala.vala.stamp \
-       $(libvalacore_la_VALASOURCES:.vala=.c) \
+       $(libvala_la_VALASOURCES:.vala=.c) \
        $(NULL)
 
 valaincludedir = $(includedir)/vala@PACKAGE_SUFFIX@
@@ -179,7 +179,7 @@ valainclude_HEADERS = \
        vala.h \
        $(NULL)
 
-vala.vapi vala.vala.stamp: $(libvalacore_la_VALASOURCES)
+vala.vapi vala.vala.stamp: $(libvala_la_VALASOURCES)
        $(VALA_V)$(VALAC) \
                $(COVERAGE_VALAFLAGS) \
                $(VALAFLAGS) \
@@ -192,17 +192,21 @@ vala.vapi vala.vala.stamp: $(libvalacore_la_VALASOURCES)
                $^
        @touch $@
 
-libvalacore_la_LIBADD = \
+libvala@PACKAGE_SUFFIX@_la_LDFLAGS = \
+       -no-undefined \
+       $(NULL)
+
+libvala@PACKAGE_SUFFIX@_la_LIBADD = \
        $(COVERAGE_LIBS) \
        $(GLIB_LIBS) \
        $(GMODULE_LIBS) \
        $(top_builddir)/gee/libgee.la \
        $(NULL)
 
-EXTRA_DIST = $(libvalacore_la_VALASOURCES) vala.vapi vala.vala.stamp
+EXTRA_DIST = $(libvala_la_VALASOURCES) vala.vapi vala.vala.stamp
 
 MAINTAINERCLEANFILES = \
        vala.vapi \
        vala.h \
-       $(libvalacore_la_VALASOURCES:.vala=.c) \
+       $(libvala_la_VALASOURCES:.vala=.c) \
        $(NULL)
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
index 6e5a043..4974954 100644
--- a/vapi/Makefile.am
+++ b/vapi/Makefile.am
@@ -2,7 +2,7 @@ NULL =
 
 vapidir = $(pkgdatadir)/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
+libvala@PACKAGE_SUFFIX@.vapi: $(top_srcdir)/gee/gee.vapi $(top_srcdir)/vala/vala.vapi
        cat $^ > $@
 
 dist_vapi_DATA = \
diff --git a/vapigen/Makefile.am b/vapigen/Makefile.am
index 0e681c5..ece0c6c 100644
--- a/vapigen/Makefile.am
+++ b/vapigen/Makefile.am
@@ -66,13 +66,13 @@ vapicheck.vala.stamp: $(vapicheck_VALASOURCES)
 
 vapigen_LDADD = \
        $(GLIB_LIBS) \
-       $(top_builddir)/codegen/libvala@PACKAGE_SUFFIX@.la \
+       $(top_builddir)/vala/libvala@PACKAGE_SUFFIX@.la \
        $(top_builddir)/gobject-introspection/libgidl.la \
        $(NULL)
 
 vapicheck_LDADD = \
        $(GLIB_LIBS) \
-       $(top_builddir)/codegen/libvala@PACKAGE_SUFFIX@.la \
+       $(top_builddir)/vala/libvala@PACKAGE_SUFFIX@.la \
        $(top_builddir)/gobject-introspection/libgidl.la \
        $(NULL)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]