Commit 81e458b4 authored by Richard Hughes's avatar Richard Hughes

Split out a private library for internal use only

62 source files in one directory is way too much to understand.
parent 6b197887
SUBDIRS = \
data \
po \
lib \
src \
tests
......
......@@ -449,7 +449,7 @@ AC_SUBST(GS_PLUGIN_DIR, "\$(libdir)/gs-plugins-\${GS_PLUGIN_API_VERSION}")
# common flags used by all plugins
GS_PLUGIN_CFLAGS=""
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS -I\$(top_srcdir)/src"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS -I\$(top_srcdir)/lib"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS -DI_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS $APPSTREAM_CFLAGS"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS $GLIB_CFLAGS"
......@@ -467,6 +467,22 @@ GS_PLUGIN_LIBS="$GS_PLUGIN_LIBS $GTK_LIBS"
GS_PLUGIN_LIBS="$GS_PLUGIN_LIBS $SOUP_LIBS"
AC_SUBST(GS_PLUGIN_LIBS)
# common cflags used by the private library
GS_PRIVATE_CFLAGS="$GS_PLUGIN_CFLAGS"
GS_PRIVATE_CFLAGS="$GS_PRIVATE_CFLAGS $JSON_GLIB_CFLAGS"
GS_PRIVATE_CFLAGS="$GS_PRIVATE_CFLAGS $POLKIT_CFLAGS"
GS_PRIVATE_CFLAGS="$GS_PRIVATE_CFLAGS $LIBSECRET_CFLAGS"
GS_PRIVATE_CFLAGS="$GS_PRIVATE_CFLAGS $VALGRIND_CFLAGS"
AC_SUBST(GS_PRIVATE_CFLAGS)
# common libraries used by the private library
GS_PRIVATE_LIBS="$GS_PLUGIN_LIBS"
GS_PRIVATE_LIBS="$GS_PRIVATE_LIBS \$(top_builddir)/lib/libgnomesoftware.a"
GS_PRIVATE_LIBS="$GS_PRIVATE_LIBS $JSON_GLIB_LIBS"
GS_PRIVATE_LIBS="$GS_PRIVATE_LIBS $POLKIT_LIBS"
GS_PRIVATE_LIBS="$GS_PRIVATE_LIBS $LIBSECRET_LIBS"
AC_SUBST(GS_PRIVATE_LIBS)
dnl ---------------------------------------------------------------------------
dnl - Makefiles, etc.
dnl ---------------------------------------------------------------------------
......@@ -487,7 +503,8 @@ data/icons/hicolor/scalable/Makefile
data/tests/Makefile
doc/Makefile
doc/api/Makefile
src/gnome-software.pc
lib/Makefile
lib/gnome-software.pc
src/Makefile
src/plugins/Makefile
tests/Makefile
......
......@@ -16,7 +16,7 @@ DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
# gtk-doc will search all .c and .h files beneath these paths
# for inline comments documenting functions and macros.
# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk
DOC_SOURCE_DIR=$(top_srcdir)/src
DOC_SOURCE_DIR=$(top_srcdir)/lib
# Extra options to pass to gtkdoc-scangobj. Normally not needed.
SCANGOBJ_OPTIONS=
......@@ -39,8 +39,8 @@ FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=$(top_srcdir)/src/*.h
CFILE_GLOB=$(top_srcdir)/src/*.c
HFILE_GLOB=$(top_srcdir)/lib/*.h
CFILE_GLOB=$(top_srcdir)/lib/*.c
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
......@@ -72,22 +72,18 @@ expand_content_files=
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=
GTKDOC_LIBS= \
$(SOUP_LIBS) \
$(GLIB_LIBS) \
$(GS_PLUGIN_LIBS) \
$(POLKIT_LIBS) \
$(APPSTREAM_LIBS) \
$(LIBM) \
$(LIBSECRET_LIBS) \
$(JSON_GLIB_LIBS) \
$(GTK_LIBS) \
$(top_builddir)/src/gnome_software-gs-app-list.o \
$(top_builddir)/src/gnome_software-gs-app.o \
$(top_builddir)/src/gnome_software-gs-auth.o \
$(top_builddir)/src/gnome_software-gs-category.o \
$(top_builddir)/src/gnome_software-gs-os-release.o \
$(top_builddir)/src/gnome_software-gs-plugin.o \
$(top_builddir)/src/gnome_software-gs-plugin-event.o \
$(top_builddir)/src/gnome_software-gs-utils.o
$(top_builddir)/lib/libgnomesoftware_a-gs-app-list.o \
$(top_builddir)/lib/libgnomesoftware_a-gs-app.o \
$(top_builddir)/lib/libgnomesoftware_a-gs-auth.o \
$(top_builddir)/lib/libgnomesoftware_a-gs-category.o \
$(top_builddir)/lib/libgnomesoftware_a-gs-os-release.o \
$(top_builddir)/lib/libgnomesoftware_a-gs-plugin.o \
$(top_builddir)/lib/libgnomesoftware_a-gs-plugin-event.o \
$(top_builddir)/lib/libgnomesoftware_a-gs-utils.o
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make
......
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gs\" \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\" \
-DLOCALEDIR=\""$(localedir)"\" \
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DTESTDATADIR=\""$(top_srcdir)/data"\" \
-DLOCALPLUGINDIR=\""$(top_builddir)/src/plugins/.libs"\"
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gnome-software.pc
gnomesoftware_includedir = $(includedir)/gnome-software
gnomesoftware_include_HEADERS = \
gnome-software.h \
gs-app.h \
gs-app-list.h \
gs-auth.h \
gs-category.h \
gs-os-release.h \
gs-plugin-event.h \
gs-plugin.h \
gs-plugin-types.h \
gs-plugin-vfuncs.h \
gs-utils.h
noinst_LIBRARIES = libgnomesoftware.a
libgnomesoftware_a_SOURCES = \
gnome-software.h \
gs-app.c \
gs-app.h \
gs-app-list.c \
gs-app-list.h \
gs-app-list-private.h \
gs-app-private.h \
gs-auth.c \
gs-auth.h \
gs-category.c \
gs-category.h \
gs-category-private.h \
gs-debug.c \
gs-debug.h \
gs-os-release.c \
gs-os-release.h \
gs-plugin.c \
gs-plugin-event.c \
gs-plugin-event.h \
gs-plugin.h \
gs-plugin-loader.c \
gs-plugin-loader.h \
gs-plugin-loader-sync.c \
gs-plugin-loader-sync.h \
gs-plugin-private.h \
gs-plugin-types.h \
gs-plugin-vfuncs.h \
gs-utils.c \
gs-utils.h
libgnomesoftware_a_CFLAGS = $(GS_PRIVATE_CFLAGS)
libexec_PROGRAMS = \
gnome-software-cmd
gnome_software_cmd_SOURCES = \
gs-cmd.c
gnome_software_cmd_LDADD = \
$(GS_PRIVATE_LIBS)
gnome_software_cmd_CFLAGS = \
$(GS_PRIVATE_CFLAGS)
gnome_software_cmd_LDFLAGS = \
$(PIE_LDFLAGS) \
$(RELRO_LDFLAGS)
EXTRA_DIST = \
gnome-software.pc.in
TESTS_ENVIRONMENT = \
$(top_builddir)/libtool \
--mode=execute valgrind \
--quiet \
--leak-check=full \
--show-possibly-lost=no
if ENABLE_TESTS
check_PROGRAMS = gs-self-test
gs_self_test_SOURCES = gs-self-test.c
gs_self_test_LDADD = $(GS_PRIVATE_LIBS)
gs_self_test_CFLAGS = $(GS_PRIVATE_CFLAGS)
TESTS = gs-self-test
endif
-include $(top_srcdir)/git.mk
libgnomesoftware
================
This is a static library, and is not all API stable.
Only the plugin headers installed into /usr/include/gnome-software should be
considered API.
......@@ -32,7 +32,6 @@
#include "gs-plugin.h"
#include "gs-plugin-event.h"
#include "gs-plugin-private.h"
#include "gs-common.h"
#include "gs-utils.h"
#define GS_PLUGIN_LOADER_UPDATES_CHANGED_DELAY 3 /* s */
......
......@@ -13,7 +13,7 @@ src/gs-app-tile.c
src/gs-app-tile.ui
src/gs-auth-dialog.c
src/gs-auth-dialog.ui
src/gs-category.c
lib/gs-category.c
src/gs-category-page.ui
src/gs-common.c
src/gs-content-rating.c
......@@ -37,7 +37,7 @@ src/gs-moderate-page.ui
src/gs-overview-page.c
src/gs-overview-page.ui
src/gs-page.c
src/gs-plugin-loader.c
lib/gs-plugin-loader.c
src/gs-popular-tile.c
src/gs-popular-tile.ui
src/gs-removal-dialog.c
......
......@@ -2,46 +2,21 @@ SUBDIRS = \
plugins
AM_CPPFLAGS = \
$(APPSTREAM_CFLAGS) \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(GS_PRIVATE_CFLAGS) \
$(GTKSPELL_CFLAGS) \
$(SOUP_CFLAGS) \
$(PACKAGEKIT_CFLAGS) \
$(GNOME_DESKTOP_CFLAGS) \
$(POLKIT_CFLAGS) \
$(JSON_GLIB_CFLAGS) \
$(LIBSECRET_CFLAGS) \
$(PIE_CFLAGS) \
$(VALGRIND_CFLAGS) \
-I$(top_srcdir)/lib \
-DG_LOG_DOMAIN=\"Gs\" \
-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
-DLIBDIR=\"$(libdir)\" \
-DBINDIR=\"$(bindir)\" \
-DDATADIR=\"$(datadir)\" \
-DVERSION="\"$(VERSION)\"" \
-DLOCALEDIR=\""$(localedir)"\" \
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
-DTESTDATADIR=\""$(top_srcdir)/data"\" \
-DLOCALPLUGINDIR=\""$(top_builddir)/src/plugins/.libs"\"
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gnome-software.pc
gnomesoftware_includedir = $(includedir)/gnome-software
gnomesoftware_include_HEADERS = \
gnome-software.h \
gs-app.h \
gs-app-list.h \
gs-auth.h \
gs-category.h \
gs-os-release.h \
gs-plugin.h \
gs-plugin-event.h \
gs-plugin-types.h \
gs-plugin-vfuncs.h \
gs-utils.h
%.desktop: %.desktop.in
$(AM_V_GEN) msgfmt --desktop -d $(top_srcdir)/po --template $< -o $@
......@@ -111,79 +86,32 @@ gnome-software-service.desktop: gnome-software-service.desktop.in Makefile
$(AM_V_GEN) sed -e "s|\@bindir\@|$(bindir)|" $<> $@
libexec_PROGRAMS = \
gnome-software-restarter \
gnome-software-cmd
gnome_software_cmd_SOURCES = \
gs-app.c \
gs-app-list.c \
gs-auth.c \
gs-cmd.c \
gs-common.c \
gs-debug.c \
gs-utils.c \
gs-os-release.c \
gs-plugin-event.c \
gs-plugin-loader.c \
gs-plugin-loader-sync.c \
gs-category.c \
gs-plugin.c
gnome_software_cmd_LDADD = \
$(APPSTREAM_LIBS) \
$(POLKIT_LIBS) \
$(SOUP_LIBS) \
$(LIBSECRET_LIBS) \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(JSON_GLIB_LIBS) \
$(LIBM)
gnome_software_cmd_CFLAGS = \
$(WARN_CFLAGS)
gnome_software_cmd_LDFLAGS = \
$(PIE_LDFLAGS) \
$(RELRO_LDFLAGS)
gnome-software-restarter
bin_PROGRAMS = \
gnome-software
gnome_software_SOURCES = \
gnome-software.h \
gs-app-addon-row.c \
gs-app-addon-row.h \
gs-app.c \
gs-app-folder-dialog.c \
gs-app-folder-dialog.h \
gs-app.h \
gs-application.c \
gs-application.h \
gs-app-list.c \
gs-app-list.h \
gs-app-list-private.h \
gs-app-private.h \
gs-app-row.c \
gs-app-row.h \
gs-app-tile.c \
gs-app-tile.h \
gs-auth.c \
gs-auth-dialog.c \
gs-auth-dialog.h \
gs-auth.h \
gs-category.c \
gs-category.h \
gs-category-page.c \
gs-category-page.h \
gs-category-private.h \
gs-category-tile.c \
gs-category-tile.h \
gs-common.c \
gs-common.h \
gs-content-rating.c \
gs-content-rating.h \
gs-debug.c \
gs-debug.h \
gs-details-page.c \
gs-details-page.h \
gs-extras-page.c \
......@@ -211,23 +139,10 @@ gnome_software_SOURCES = \
gs-main.c \
gs-moderate-page.c \
gs-moderate-page.h \
gs-os-release.c \
gs-os-release.h \
gs-overview-page.c \
gs-overview-page.h \
gs-page.c \
gs-page.h \
gs-plugin.c \
gs-plugin-event.c \
gs-plugin-event.h \
gs-plugin.h \
gs-plugin-loader.c \
gs-plugin-loader.h \
gs-plugin-loader-sync.c \
gs-plugin-loader-sync.h \
gs-plugin-private.h \
gs-plugin-types.h \
gs-plugin-vfuncs.h \
gs-popular-tile.c \
gs-popular-tile.h \
gs-progress-button.c \
......@@ -268,8 +183,6 @@ gnome_software_SOURCES = \
gs-updates-page.h \
gs-upgrade-banner.c \
gs-upgrade-banner.h \
gs-utils.c \
gs-utils.h \
gs-vendor.c \
gs-vendor.h
......@@ -279,37 +192,33 @@ nodist_gnome_software_SOURCES = \
gs-shell-search-provider-generated.c \
gs-shell-search-provider-generated.h
if HAVE_PACKAGEKIT
gnome_software_SOURCES += \
gs-dbus-helper.c \
gs-dbus-helper.h
nodist_gnome_software_SOURCES += \
$(packagekit_built_sources) \
$(packagekit_modify2_built_sources)
endif
gnome_software_LDADD = \
$(APPSTREAM_LIBS) \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(GS_PRIVATE_LIBS) \
$(GTKSPELL_LIBS) \
$(SOUP_LIBS) \
$(LIBSECRET_LIBS) \
$(PACKAGEKIT_LIBS) \
$(GNOME_DESKTOP_LIBS) \
$(POLKIT_LIBS) \
$(JSON_GLIB_LIBS) \
$(LIBM)
$(GNOME_DESKTOP_LIBS)
gnome_software_CFLAGS = \
-DLIBEXECDIR=\"$(libexecdir)\" \
$(WARN_CFLAGS)
$(GS_PRIVATE_CFLAGS)
gnome_software_LDFLAGS = \
$(PIE_LDFLAGS) \
$(RELRO_LDFLAGS)
if HAVE_PACKAGEKIT
gnome_software_SOURCES += \
gs-dbus-helper.c \
gs-dbus-helper.h
gnome_software_CFLAGS += \
-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
$(PACKAGEKIT_CFLAGS)
nodist_gnome_software_SOURCES += \
$(packagekit_built_sources) \
$(packagekit_modify2_built_sources)
endif
gnome_software_restarter_SOURCES = \
gs-restarter.c
......@@ -361,51 +270,11 @@ BUILT_SOURCES = \
gs-resources.c \
gs-resources.h
TESTS_ENVIRONMENT = \
$(top_builddir)/libtool --mode=execute valgrind \
--quiet \
--leak-check=full \
--show-possibly-lost=no
if ENABLE_TESTS
check_PROGRAMS = \
gs-self-test
gs_self_test_SOURCES = \
gs-app.c \
gs-app-list.c \
gs-auth.c \
gs-category.c \
gs-common.c \
gs-os-release.c \
gs-plugin-event.c \
gs-plugin-loader-sync.c \
gs-plugin-loader.c \
gs-plugin.c \
gs-utils.c \
gs-self-test.c
gs_self_test_LDADD = \
$(APPSTREAM_LIBS) \
$(POLKIT_LIBS) \
$(SOUP_LIBS) \
$(LIBSECRET_LIBS) \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(JSON_GLIB_LIBS) \
$(LIBM)
gs_self_test_CFLAGS = $(WARN_CFLAGS)
TESTS = gs-self-test
endif
EXTRA_DIST = \
shell-search-provider-dbus-interfaces.xml \
org.freedesktop.PackageKit.xml \
org.freedesktop.PackageKit.Modify2.xml \
gnome-software.gresource.xml \
gnome-software.pc.in \
gnome-software.xml \
gtk-style.css \
gtk-style-hc.css \
......
......@@ -410,19 +410,10 @@ EXTRA_DIST = $(appdata_in_files)
CLEANFILES = $(appdata_DATA)
if ENABLE_TESTS
check_PROGRAMS = \
gs-self-test
gs_self_test_SOURCES = \
gs-markdown.c \
gs-self-test.c
gs_self_test_LDADD = \
$(GLIB_LIBS) \
$(GTK_LIBS)
gs_self_test_CFLAGS = $(WARN_CFLAGS)
check_PROGRAMS = gs-self-test
gs_self_test_SOURCES = gs-self-test.c gs-markdown.c
gs_self_test_LDADD = $(GS_PRIVATE_LIBS)
gs_self_test_CFLAGS = $(GS_PRIVATE_CFLAGS)
TESTS = gs-self-test
endif
......
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