[gitg] Use non-recursive make to build libgitg



commit 1db34f5ddb93738fcf07dd0ca5e0a583a5196c86
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Jan 4 14:00:54 2014 +0100

    Use non-recursive make to build libgitg

 Makefile.am         |   16 +++++-
 configure.ac        |    3 +-
 libgitg/Makefile.am |  175 +++++++++++++++++++++++++--------------------------
 3 files changed, 101 insertions(+), 93 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 209cc84..e39dbc0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
 
 ACLOCAL_AMFLAGS = -I m4 -I libgd ${ACLOCAL_FLAGS}
 
-SUBDIRS = libgd libgitg libgitg-ext plugins gitg data po tests
+SUBDIRS = libgd libgitg-ext plugins gitg data po tests
 
 DISTCLEANFILES = \
        intltool-extract \
@@ -74,6 +74,20 @@ generate-changelog:
          mv $(distdir)/c-l $(distdir)/ChangeLog; \
        fi
 
+GRESDEPS = $(srcdir)/$1 $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir 
$(srcdir)/$(dir $1) $(srcdir)/$1)
+
+GRESGEN = $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target="$@" --sourcedir="$(dir $<)" --generate-source "$<"
+
+noinst_HEADERS =
+GITIGNOREFILES =
+CLEANFILES =
+lib_LTLIBRARIES =
+
+include libgitg/Makefile.am
+
+%.typelib: %.gir
+       $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. -o $@ $<
+
 .PHONY: generate-changelog
 
 -include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index e113e9f..a9fb4a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ AC_SUBST(GITG_MINOR_VERSION, gitg_minor_version)
 AC_DEFINE(GITG_MICRO_VERSION, gitg_micro_version, [GitG micro version])
 AC_SUBST(GITG_MICRO_VERSION, gitg_micro_version)
 
-AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability])
+AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability subdir-objects])
 AM_MAINTAINER_MODE([enable])
 
 AM_SILENT_RULES([yes])
@@ -285,7 +285,6 @@ LIBGD_INIT([
 AC_CONFIG_FILES([
 Makefile
 libgd/Makefile
-libgitg/Makefile
 libgitg/libgitg-1.0.pc
 libgitg-ext/Makefile
 libgitg-ext/libgitg-ext-1.0.pc
diff --git a/libgitg/Makefile.am b/libgitg/Makefile.am
index 24dc75c..f48984e 100644
--- a/libgitg/Makefile.am
+++ b/libgitg/Makefile.am
@@ -1,25 +1,25 @@
-lib_LTLIBRARIES = libgitg-1.0.la
+lib_LTLIBRARIES += libgitg/libgitg-1.0.la
 
-libgitg_1_0_la_CPPFLAGS =                              \
+libgitg_libgitg_1_0_la_CPPFLAGS =                      \
        -I$(top_srcdir)                                 \
        -I$(srcdir)                                     \
        -DDATADIR=\""$(datadir)"\"                      \
        -DLIBDIR=\""$(libdir)"\"                        \
        -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
 
-libgitg_1_0_la_CFLAGS =                \
-       $(LIBGITG_CFLAGS)       \
-       $(WARN_CFLAGS)          \
+libgitg_libgitg_1_0_la_CFLAGS =                \
+       $(LIBGITG_CFLAGS)               \
+       $(WARN_CFLAGS)                  \
        -w
 
-libgitg_1_0_la_LDFLAGS =               \
+libgitg_libgitg_1_0_la_LDFLAGS =       \
        -export-dynamic                 \
        -no-undefined                   \
        -export-symbols-regex "^[^_].*"
 
-libgitg_1_0_la_LIBADD = $(LIBGITG_LIBS)
+libgitg_libgitg_1_0_la_LIBADD = $(LIBGITG_LIBS)
 
-libgitg_1_0_la_VALAFLAGS =             \
+libgitg_libgitg_1_0_la_VALAFLAGS =     \
        --pkg Ggit-1.0                  \
        --pkg gtk+-3.0                  \
        --pkg gio-2.0                   \
@@ -31,92 +31,87 @@ libgitg_1_0_la_VALAFLAGS =          \
        --pkg gitg-js-utils             \
        $(GITG_VALAFLAGS)               \
        --vapidir $(top_srcdir)/vapi    \
-       --header libgitg.h              \
+       --header libgitg/libgitg.h      \
        --includedir libgitg            \
        --basedir $(top_srcdir)         \
        --gir Gitg-1.0.gir              \
-       --vapi libgitg-1.0.vapi         \
-       --library libgitg-1.0           \
+       --vapi libgitg/libgitg-1.0.vapi \
+       --library libgitg/libgitg-1.0   \
        --gresources "$(top_srcdir)/libgitg/resources/resources.xml"
 
-libgitg_1_0_la_VALASOURCES =                   \
-       gitg-assembly-info.vala                 \
-       gitg-async.vala                         \
-       gitg-branch.vala                        \
-       gitg-branch-base.vala                   \
-       gitg-repository.vala                    \
-       gitg-ref.vala                           \
-       gitg-ref-base.vala                      \
-       gitg-lane.vala                          \
-       gitg-lanes.vala                         \
-       gitg-color.vala                         \
-       gitg-init.vala                          \
-       gitg-commit.vala                        \
-       gitg-commit-model.vala                  \
-       gitg-label-renderer.vala                \
-       gitg-cell-renderer-lanes.vala           \
-       gitg-commit-list-view.vala              \
-       gitg-diff-view.vala                     \
-       gitg-diff-view-request.vala             \
-       gitg-diff-view-request-resource.vala    \
-       gitg-diff-view-request-patch.vala       \
-       gitg-diff-view-request-diff.vala        \
-       gitg-repository-list-box.vala           \
-       gitg-when-mapped.vala                   \
-       gitg-progress-bin.vala                  \
-       gitg-stage.vala                         \
-       gitg-stage-status-enumerator.vala       \
-       gitg-sidebar.vala                       \
-       gitg-hook.vala                          \
-       gitg-date.vala                          \
-       gitg-avatar-cache.vala                  \
-       gitg-diff-stat.vala
-
-libgitg_1_0_la_SOURCES =               \
-       $(libgitg_1_0_la_VALASOURCES)   \
-       gitg-resources.c                \
-       gitg-js-utils.c
-
-libgitg_1_0_la_headerdir = $(prefix)/include/libgitg-1.0/libgitg
-libgitg_1_0_la_header_HEADERS = libgitg.h
-
-noinst_HEADERS = gitg-js-utils.h
-
-libgitg_1_0_la_vapidir = $(prefix)/share/vala/vapi
-libgitg_1_0_la_vapi_DATA = libgitg-1.0.vapi
-
-libgitg_1_0_la_girdir = $(INTROSPECTION_GIRDIR)
-libgitg_1_0_la_gir_DATA = Gitg-1.0.gir
-
-libgitg_1_0_la_typelibdir = $(INTROSPECTION_TYPELIBDIR)
-libgitg_1_0_la_typelib_DATA = Gitg-1.0.typelib
-
-%.typelib: %.gir
-       $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. -o $@ $<
-
-libgitg_1_0_la_pkgconfigdir = $(libdir)/pkgconfig
-libgitg_1_0_la_pkgconfig_DATA = libgitg-1.0.pc
-
-gitg-resources.c: resources/resources.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies 
--sourcedir $(srcdir)/resources $(srcdir)/resources/resources.xml)
-       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target="$@" --sourcedir=$(srcdir)/resources --generate-source 
$(srcdir)/resources/resources.xml
-
-GITIGNOREFILES =                                       \
-       $(libgitg_1_0_la_VALASOURCES:%.vala=%.c)        \
-       $(libgitg_1_0_la_gir_DATA)                      \
-       libgitg-1.0.vapi                                \
-       libgitg.h                                       \
-       libgitg_1_0_la_vala.stamp
-
-CLEANFILES =                                   \
-       $(libgitg_1_0_la_typelib_DATA)          \
-       gitg-resources.c
-
-EXTRA_DIST =                                   \
-       $(libgitg_1_0_la_pkgconfig_DATA)        \
-       $(libgitg_1_0_la_gir_DATA)              \
-       resources/resources.xml                 \
-       $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir)/resources 
$(srcdir)/resources/resources.xml)
-
--include $(top_srcdir)/git.mk
+libgitg_libgitg_1_0_la_VALASOURCES =                   \
+       libgitg/gitg-assembly-info.vala                 \
+       libgitg/gitg-async.vala                         \
+       libgitg/gitg-branch.vala                        \
+       libgitg/gitg-branch-base.vala                   \
+       libgitg/gitg-repository.vala                    \
+       libgitg/gitg-ref.vala                           \
+       libgitg/gitg-ref-base.vala                      \
+       libgitg/gitg-lane.vala                          \
+       libgitg/gitg-lanes.vala                         \
+       libgitg/gitg-color.vala                         \
+       libgitg/gitg-init.vala                          \
+       libgitg/gitg-commit.vala                        \
+       libgitg/gitg-commit-model.vala                  \
+       libgitg/gitg-label-renderer.vala                \
+       libgitg/gitg-cell-renderer-lanes.vala           \
+       libgitg/gitg-commit-list-view.vala              \
+       libgitg/gitg-diff-view.vala                     \
+       libgitg/gitg-diff-view-request.vala             \
+       libgitg/gitg-diff-view-request-resource.vala    \
+       libgitg/gitg-diff-view-request-patch.vala       \
+       libgitg/gitg-diff-view-request-diff.vala        \
+       libgitg/gitg-repository-list-box.vala           \
+       libgitg/gitg-when-mapped.vala                   \
+       libgitg/gitg-progress-bin.vala                  \
+       libgitg/gitg-stage.vala                         \
+       libgitg/gitg-stage-status-enumerator.vala       \
+       libgitg/gitg-sidebar.vala                       \
+       libgitg/gitg-hook.vala                          \
+       libgitg/gitg-date.vala                          \
+       libgitg/gitg-avatar-cache.vala                  \
+       libgitg/gitg-diff-stat.vala
+
+libgitg_libgitg_1_0_la_SOURCES =               \
+       $(libgitg_libgitg_1_0_la_VALASOURCES)   \
+       libgitg/gitg-resources.c                \
+       libgitg/gitg-js-utils.c
+
+libgitg_libgitg_1_0_la_headerdir = $(prefix)/include/libgitg-1.0/libgitg
+libgitg_libgitg_1_0_la_header_HEADERS = libgitg/libgitg.h
+
+noinst_HEADERS += libgitg/gitg-js-utils.h
+
+libgitg_libgitg_1_0_la_vapidir = $(prefix)/share/vala/vapi
+libgitg_libgitg_1_0_la_vapi_DATA = libgitg/libgitg-1.0.vapi
+
+libgitg_libgitg_1_0_la_girdir = $(INTROSPECTION_GIRDIR)
+libgitg_libgitg_1_0_la_gir_DATA = Gitg-1.0.gir
+
+libgitg_libgitg_1_0_la_typelibdir = $(INTROSPECTION_TYPELIBDIR)
+libgitg_libgitg_1_0_la_typelib_DATA = Gitg-1.0.typelib
+
+libgitg_libgitg_1_0_la_pkgconfigdir = $(libdir)/pkgconfig
+libgitg_libgitg_1_0_la_pkgconfig_DATA = libgitg/libgitg-1.0.pc
+
+libgitg_resources_deps = $(call GRESDEPS,libgitg/resources/resources.xml)
+libgitg/gitg-resources.c: $(libgitg_resources_deps)
+       $(GRESGEN)
+
+GITIGNOREFILES +=                                              \
+       $(libgitg_libgitg_1_0_la_VALASOURCES:%.vala=%.c)        \
+       $(libgitg_libgitg_1_0_la_gir_DATA)                      \
+       libgitg/libgitg-1.0.vapi                                \
+       libgitg/libgitg.h                                       \
+       libgitg_libgitg_1_0_la_vala.stamp
+
+CLEANFILES +=                                          \
+       $(libgitg_libgitg_1_0_la_typelib_DATA)          \
+       libgitg/gitg-resources.c
+
+EXTRA_DIST +=                                          \
+       $(libgitg_libgitg_1_0_la_pkgconfig_DATA)        \
+       $(libgitg_libgitg_1_0_la_gir_DATA)              \
+       $(libgitg_resources_deps)
 
 # vi:ts=8:noet


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