[devhelp/wip/devhelp-next: 1/8] Move library to its own directory, to separate it from the app



commit e33823ef40b2bf01f01e54dbc9461fd5fdd14818
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Feb 22 13:43:04 2018 +0100

    Move library to its own directory, to separate it from the app
    
    It's a first step: everything that is part of the library is moved to
    the devhelp/ directory. The app stays in src/. With the devhelp/
    directory name it'll be possible to have better #includes in the public
    headers: #include <devhelp/dh-something.h>, instead of #include
    "dh-something.h" (it'll be done by a later commit).
    
    By better separating the lib from the app, we see that some stuff that
    is currently built in the lib should actually be part of the app. Like
    some *.ui files… It'll be fixed by later commits.
    
    A next step will be to only #include <devhelp/devhelp.h> in the app when
    accessing the lib, instead of #including individual headers.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=784351

 Makefile.am                               |    2 +-
 configure.ac                              |    1 +
 devhelp/Makefile.am                       |  180 +++++++++++++++++++++++++++
 {src => devhelp}/devhelp.h                |    0
 {src => devhelp}/dh-assistant-view.c      |    0
 {src => devhelp}/dh-assistant-view.h      |    0
 {src => devhelp}/dh-assistant.ui          |    0
 {src => devhelp}/dh-book-manager.c        |    0
 {src => devhelp}/dh-book-manager.h        |    0
 {src => devhelp}/dh-book-tree.c           |    0
 {src => devhelp}/dh-book-tree.h           |    0
 {src => devhelp}/dh-book.c                |    0
 {src => devhelp}/dh-book.h                |    0
 {src => devhelp}/dh-completion.c          |    0
 {src => devhelp}/dh-completion.h          |    0
 {src => devhelp}/dh-enum-types.c.template |    0
 {src => devhelp}/dh-enum-types.h.template |    0
 {src => devhelp}/dh-error.c               |    0
 {src => devhelp}/dh-error.h               |    0
 {src => devhelp}/dh-init.c                |    0
 {src => devhelp}/dh-init.h                |    0
 {src => devhelp}/dh-keyword-model.c       |    0
 {src => devhelp}/dh-keyword-model.h       |    0
 {src => devhelp}/dh-link.c                |    0
 {src => devhelp}/dh-link.h                |    0
 {src => devhelp}/dh-parser.c              |    0
 {src => devhelp}/dh-parser.h              |    0
 {src => devhelp}/dh-preferences.c         |    0
 {src => devhelp}/dh-preferences.h         |    0
 {src => devhelp}/dh-preferences.ui        |    0
 {src => devhelp}/dh-search-context.c      |    0
 {src => devhelp}/dh-search-context.h      |    0
 {src => devhelp}/dh-settings.c            |    0
 {src => devhelp}/dh-settings.h            |    0
 {src => devhelp}/dh-sidebar.c             |    0
 {src => devhelp}/dh-sidebar.h             |    0
 {src => devhelp}/dh-util.c                |    0
 {src => devhelp}/dh-util.h                |    0
 {src => devhelp}/dh-window.ui             |    0
 {src => devhelp}/dh.gresource.xml         |    0
 {src => devhelp}/help-overlay.ui          |    0
 {src => devhelp}/menus.ui                 |    0
 docs/reference/Makefile.am                |   21 +--
 po/POTFILES.in                            |   30 +++---
 src/Makefile.am                           |  190 ++---------------------------
 unit-tests/Makefile.am                    |   12 +-
 46 files changed, 221 insertions(+), 215 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 5e2f380..112da9f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = data plugins po help src unit-tests docs
+SUBDIRS = data plugins po help devhelp src unit-tests docs
 
 AM_DISTCHECK_CONFIGURE_FLAGS = \
        --enable-gtk-doc        \
diff --git a/configure.ac b/configure.ac
index d12426c..b121ee8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,6 +97,7 @@ AC_CONFIG_FILES([
        data/Makefile
        data/org.gnome.Devhelp.desktop.in
        data/icons/Makefile
+       devhelp/Makefile
        docs/Makefile
        docs/reference/Makefile
        help/Makefile
diff --git a/devhelp/Makefile.am b/devhelp/Makefile.am
new file mode 100644
index 0000000..f0fe8a3
--- /dev/null
+++ b/devhelp/Makefile.am
@@ -0,0 +1,180 @@
+AM_CPPFLAGS =                                          \
+       -I$(top_srcdir)                                 \
+       -DLOCALEDIR=\""$(localedir)"\"                  \
+       -DDATADIR=\""$(datadir)"\"                      \
+       -DG_LOG_DOMAIN=\"Devhelp\"                      \
+       -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES            \
+       $(WARN_CFLAGS)
+
+AM_LDFLAGS =                                           \
+       $(WARN_LDFLAGS)
+
+libdevhelp_public_headers =            \
+       devhelp.h                       \
+       dh-assistant-view.h             \
+       dh-book.h                       \
+       dh-book-manager.h               \
+       dh-book-tree.h                  \
+       dh-completion.h                 \
+       dh-init.h                       \
+       dh-keyword-model.h              \
+       dh-link.h                       \
+       dh-sidebar.h                    \
+       $(NULL)
+
+libdevhelp_public_c_files =            \
+       dh-assistant-view.c             \
+       dh-book.c                       \
+       dh-book-manager.c               \
+       dh-book-tree.c                  \
+       dh-completion.c                 \
+       dh-init.c                       \
+       dh-keyword-model.c              \
+       dh-link.c                       \
+       dh-sidebar.c                    \
+       $(NULL)
+
+libdevhelp_private_headers =           \
+       dh-error.h                      \
+       dh-parser.h                     \
+       dh-preferences.h                \
+       dh-search-context.h             \
+       dh-settings.h                   \
+       dh-util.h                       \
+       $(NULL)
+
+libdevhelp_private_c_files =           \
+       dh-error.c                      \
+       dh-parser.c                     \
+       dh-preferences.c                \
+       dh-search-context.c             \
+       dh-settings.c                   \
+       dh-util.c                       \
+       $(NULL)
+
+libdevhelp_built_public_headers =      \
+       dh-enum-types.h                 \
+       $(NULL)
+
+libdevhelp_built_public_c_files =      \
+       dh-enum-types.c                 \
+       $(NULL)
+
+libdevhelp_built_sources =                     \
+       $(libdevhelp_built_public_headers)      \
+       $(libdevhelp_built_public_c_files)      \
+       dh-resources.c                          \
+       $(NULL)
+
+BUILT_SOURCES =                        \
+       $(libdevhelp_built_sources)     \
+       $(NULL)
+
+# Helper Libtool library, so that the private functions can be used in unit
+# tests.
+noinst_LTLIBRARIES = libdevhelp-core.la
+
+libdevhelp_core_la_SOURCES =           \
+       $(libdevhelp_public_headers)    \
+       $(libdevhelp_public_c_files)    \
+       $(libdevhelp_private_headers)   \
+       $(libdevhelp_private_c_files)
+
+# Do not distribute generated files.
+nodist_libdevhelp_core_la_SOURCES =    \
+       $(libdevhelp_built_sources)
+
+libdevhelp_core_la_CPPFLAGS =  \
+       $(AM_CPPFLAGS)
+
+libdevhelp_core_la_CFLAGS =    \
+       $(DEVHELP_CFLAGS)
+
+libdevhelp_core_la_LDFLAGS =   \
+       $(AM_LDFLAGS)           \
+       -no-undefined
+
+# The library
+lib_LTLIBRARIES = libdevhelp-3.la
+
+devhelpincludedir = $(includedir)/devhelp-3.0/devhelp
+devhelpinclude_HEADERS = $(libdevhelp_public_headers)
+nodist_devhelpinclude_HEADERS = $(libdevhelp_built_public_headers)
+
+libdevhelp_3_la_SOURCES =
+
+libdevhelp_3_la_LIBADD =       \
+       libdevhelp-core.la      \
+       $(DEVHELP_LIBS)         \
+       $(LIBM)
+
+libdevhelp_3_la_LDFLAGS =                      \
+       $(AM_LDFLAGS)                           \
+       -no-undefined                           \
+       -version-info $(LIBDEVHELP_LT_VERSION)  \
+       -export-symbols-regex ^dh_
+
+resource_files =               \
+       dh-assistant.ui         \
+       dh-preferences.ui       \
+       dh-window.ui            \
+       help-overlay.ui         \
+       menus.ui                \
+       $(NULL)
+
+dh-resources.c: dh.gresource.xml $(resource_files)
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name dh 
$(srcdir)/dh.gresource.xml
+
+dh-enum-types.h: dh-enum-types.h.template $(libdevhelp_public_headers) $(GLIB_MKENUMS)
+       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template dh-enum-types.h.template 
$(libdevhelp_public_headers)) > $@
+
+dh-enum-types.c: dh-enum-types.c.template $(libdevhelp_public_headers) $(GLIB_MKENUMS)
+       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template dh-enum-types.c.template 
$(libdevhelp_public_headers)) > $@
+
+EXTRA_DIST =                           \
+       dh-enum-types.c.template        \
+       dh-enum-types.h.template        \
+       dh.gresource.xml                \
+       $(resource_files)               \
+       $(NULL)
+
+CLEANFILES = $(BUILT_SOURCES)
+
+# GObject Introspection
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS =                   \
+       --add-include-path=$(srcdir)            \
+       --warn-all                              \
+       --identifier-prefix Dh                  \
+       --identifier-prefix dh                  \
+       --pkg-export libdevhelp-3.0             \
+       --c-include="devhelp/devhelp.h"
+
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources =                        \
+       $(libdevhelp_public_c_files)            \
+       $(libdevhelp_public_headers)            \
+       $(libdevhelp_built_public_c_files)      \
+       $(libdevhelp_built_public_headers)
+
+Devhelp-3.0.gir: libdevhelp-3.la
+Devhelp_3_0_gir_INCLUDES = Gtk-3.0 WebKit2-4.0
+Devhelp_3_0_gir_CFLAGS = $(INCLUDES)
+Devhelp_3_0_gir_LIBS = libdevhelp-3.la
+Devhelp_3_0_gir_FILES = $(introspection_sources)
+Devhelp_3_0_gir_SCANNERFLAGS = $(WARN_SCANNERFLAGS)
+INTROSPECTION_GIRS += Devhelp-3.0.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif # HAVE_INTROSPECTION
+
+-include $(top_srcdir)/git.mk
diff --git a/src/devhelp.h b/devhelp/devhelp.h
similarity index 100%
rename from src/devhelp.h
rename to devhelp/devhelp.h
diff --git a/src/dh-assistant-view.c b/devhelp/dh-assistant-view.c
similarity index 100%
rename from src/dh-assistant-view.c
rename to devhelp/dh-assistant-view.c
diff --git a/src/dh-assistant-view.h b/devhelp/dh-assistant-view.h
similarity index 100%
rename from src/dh-assistant-view.h
rename to devhelp/dh-assistant-view.h
diff --git a/src/dh-assistant.ui b/devhelp/dh-assistant.ui
similarity index 100%
rename from src/dh-assistant.ui
rename to devhelp/dh-assistant.ui
diff --git a/src/dh-book-manager.c b/devhelp/dh-book-manager.c
similarity index 100%
rename from src/dh-book-manager.c
rename to devhelp/dh-book-manager.c
diff --git a/src/dh-book-manager.h b/devhelp/dh-book-manager.h
similarity index 100%
rename from src/dh-book-manager.h
rename to devhelp/dh-book-manager.h
diff --git a/src/dh-book-tree.c b/devhelp/dh-book-tree.c
similarity index 100%
rename from src/dh-book-tree.c
rename to devhelp/dh-book-tree.c
diff --git a/src/dh-book-tree.h b/devhelp/dh-book-tree.h
similarity index 100%
rename from src/dh-book-tree.h
rename to devhelp/dh-book-tree.h
diff --git a/src/dh-book.c b/devhelp/dh-book.c
similarity index 100%
rename from src/dh-book.c
rename to devhelp/dh-book.c
diff --git a/src/dh-book.h b/devhelp/dh-book.h
similarity index 100%
rename from src/dh-book.h
rename to devhelp/dh-book.h
diff --git a/src/dh-completion.c b/devhelp/dh-completion.c
similarity index 100%
rename from src/dh-completion.c
rename to devhelp/dh-completion.c
diff --git a/src/dh-completion.h b/devhelp/dh-completion.h
similarity index 100%
rename from src/dh-completion.h
rename to devhelp/dh-completion.h
diff --git a/src/dh-enum-types.c.template b/devhelp/dh-enum-types.c.template
similarity index 100%
rename from src/dh-enum-types.c.template
rename to devhelp/dh-enum-types.c.template
diff --git a/src/dh-enum-types.h.template b/devhelp/dh-enum-types.h.template
similarity index 100%
rename from src/dh-enum-types.h.template
rename to devhelp/dh-enum-types.h.template
diff --git a/src/dh-error.c b/devhelp/dh-error.c
similarity index 100%
rename from src/dh-error.c
rename to devhelp/dh-error.c
diff --git a/src/dh-error.h b/devhelp/dh-error.h
similarity index 100%
rename from src/dh-error.h
rename to devhelp/dh-error.h
diff --git a/src/dh-init.c b/devhelp/dh-init.c
similarity index 100%
rename from src/dh-init.c
rename to devhelp/dh-init.c
diff --git a/src/dh-init.h b/devhelp/dh-init.h
similarity index 100%
rename from src/dh-init.h
rename to devhelp/dh-init.h
diff --git a/src/dh-keyword-model.c b/devhelp/dh-keyword-model.c
similarity index 100%
rename from src/dh-keyword-model.c
rename to devhelp/dh-keyword-model.c
diff --git a/src/dh-keyword-model.h b/devhelp/dh-keyword-model.h
similarity index 100%
rename from src/dh-keyword-model.h
rename to devhelp/dh-keyword-model.h
diff --git a/src/dh-link.c b/devhelp/dh-link.c
similarity index 100%
rename from src/dh-link.c
rename to devhelp/dh-link.c
diff --git a/src/dh-link.h b/devhelp/dh-link.h
similarity index 100%
rename from src/dh-link.h
rename to devhelp/dh-link.h
diff --git a/src/dh-parser.c b/devhelp/dh-parser.c
similarity index 100%
rename from src/dh-parser.c
rename to devhelp/dh-parser.c
diff --git a/src/dh-parser.h b/devhelp/dh-parser.h
similarity index 100%
rename from src/dh-parser.h
rename to devhelp/dh-parser.h
diff --git a/src/dh-preferences.c b/devhelp/dh-preferences.c
similarity index 100%
rename from src/dh-preferences.c
rename to devhelp/dh-preferences.c
diff --git a/src/dh-preferences.h b/devhelp/dh-preferences.h
similarity index 100%
rename from src/dh-preferences.h
rename to devhelp/dh-preferences.h
diff --git a/src/dh-preferences.ui b/devhelp/dh-preferences.ui
similarity index 100%
rename from src/dh-preferences.ui
rename to devhelp/dh-preferences.ui
diff --git a/src/dh-search-context.c b/devhelp/dh-search-context.c
similarity index 100%
rename from src/dh-search-context.c
rename to devhelp/dh-search-context.c
diff --git a/src/dh-search-context.h b/devhelp/dh-search-context.h
similarity index 100%
rename from src/dh-search-context.h
rename to devhelp/dh-search-context.h
diff --git a/src/dh-settings.c b/devhelp/dh-settings.c
similarity index 100%
rename from src/dh-settings.c
rename to devhelp/dh-settings.c
diff --git a/src/dh-settings.h b/devhelp/dh-settings.h
similarity index 100%
rename from src/dh-settings.h
rename to devhelp/dh-settings.h
diff --git a/src/dh-sidebar.c b/devhelp/dh-sidebar.c
similarity index 100%
rename from src/dh-sidebar.c
rename to devhelp/dh-sidebar.c
diff --git a/src/dh-sidebar.h b/devhelp/dh-sidebar.h
similarity index 100%
rename from src/dh-sidebar.h
rename to devhelp/dh-sidebar.h
diff --git a/src/dh-util.c b/devhelp/dh-util.c
similarity index 100%
rename from src/dh-util.c
rename to devhelp/dh-util.c
diff --git a/src/dh-util.h b/devhelp/dh-util.h
similarity index 100%
rename from src/dh-util.h
rename to devhelp/dh-util.h
diff --git a/src/dh-window.ui b/devhelp/dh-window.ui
similarity index 100%
rename from src/dh-window.ui
rename to devhelp/dh-window.ui
diff --git a/src/dh.gresource.xml b/devhelp/dh.gresource.xml
similarity index 100%
rename from src/dh.gresource.xml
rename to devhelp/dh.gresource.xml
diff --git a/src/help-overlay.ui b/devhelp/help-overlay.ui
similarity index 100%
rename from src/help-overlay.ui
rename to devhelp/help-overlay.ui
diff --git a/src/menus.ui b/devhelp/menus.ui
similarity index 100%
rename from src/menus.ui
rename to devhelp/menus.ui
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 4132f04..d9fba28 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -12,7 +12,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)/devhelp
 
 # Extra options to pass to gtkdoc-scangobj. Normally not needed.
 SCANGOBJ_OPTIONS =
@@ -36,30 +36,23 @@ 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)/devhelp/*.h
+CFILE_GLOB = $(top_srcdir)/devhelp/*.c
 
 # Extra header to include when scanning, which are not under DOC_SOURCE_DIR
 # e.g. EXTRA_HFILES=$(top_srcdir)/contrib/extra.h
 EXTRA_HFILES = \
-       $(top_builddir)/src/dh-enum-types.h
+       $(top_builddir)/devhelp/dh-enum-types.h
 
 # Header files or dirs to ignore when scanning. Use base file/dir names
 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
 IGNORE_HFILES = \
-       dh-app.h \
-       dh-assistant.h \
        dh-error.h \
        dh-parser.h \
        dh-preferences.h \
        dh-search-context.h \
        dh-settings.h \
-       dh-tab.h \
-       dh-tab-label.h \
-       dh-util.h \
-       dh-web-view.h \
-       dh-window.h \
-       tepl-info-bar.h
+       dh-util.h
 
 # Images to copy into HTML directory.
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
@@ -83,12 +76,12 @@ expand_content_files =
 GTKDOC_CFLAGS = \
        -I$(top_srcdir) \
        -I$(top_builddir) \
-       -I$(top_builddir)/src \
+       -I$(top_builddir)/devhelp \
        $(DEVHELP_CFLAGS) \
        $(NULL)
 
 GTKDOC_LIBS = \
-       $(top_builddir)/src/libdevhelp-3.la \
+       $(top_builddir)/devhelp/libdevhelp-3.la \
        $(DEVHELP_LIBS) \
        $(NULL)
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 32e406e..1286ab4 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,28 +3,28 @@
 data/org.gnome.Devhelp.appdata.xml.in
 data/org.gnome.Devhelp.desktop.in.in
 data/org.gnome.devhelp.gschema.xml
+devhelp/dh-assistant.ui
+devhelp/dh-assistant-view.c
+devhelp/dh-book.c
+devhelp/dh-book-tree.c
+devhelp/dh-completion.c
+devhelp/dh-keyword-model.c
+devhelp/dh-link.c
+devhelp/dh-parser.c
+devhelp/dh-preferences.ui
+devhelp/dh-search-context.c
+devhelp/dh-sidebar.c
+devhelp/dh-util.c
+devhelp/dh-window.ui
+devhelp/help-overlay.ui
+devhelp/menus.ui
 plugins/gedit-plugin/devhelp.plugin.desktop.in
 plugins/gedit-plugin/devhelp.py
 src/dh-app.c
 src/dh-assistant.c
-src/dh-assistant.ui
-src/dh-assistant-view.c
-src/dh-book.c
-src/dh-book-tree.c
-src/dh-completion.c
-src/dh-keyword-model.c
-src/dh-link.c
 src/dh-main.c
-src/dh-parser.c
-src/dh-preferences.ui
-src/dh-search-context.c
-src/dh-sidebar.c
 src/dh-tab.c
 src/dh-tab-label.c
-src/dh-util.c
 src/dh-web-view.c
 src/dh-window.c
-src/dh-window.ui
-src/help-overlay.ui
-src/menus.ui
 src/tepl-info-bar.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 2296ad3..f1aa97d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,71 +1,14 @@
-AM_CPPFLAGS =                                          \
-       -I$(top_srcdir)                                 \
-       -DLOCALEDIR=\""$(localedir)"\"                  \
-       -DDATADIR=\""$(datadir)"\"                      \
-       -DG_LOG_DOMAIN=\"Devhelp\"                      \
-       -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES            \
+AM_CPPFLAGS =                                  \
+       -I$(top_srcdir)                         \
+       -I$(top_srcdir)/devhelp                 \
+       -I$(top_builddir)/devhelp               \
+       -DG_LOG_DOMAIN=\"Devhelp\"              \
+       -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES    \
        $(WARN_CFLAGS)
 
-AM_LDFLAGS =                                           \
+AM_LDFLAGS =           \
        $(WARN_LDFLAGS)
 
-libdevhelp_public_headers =            \
-       devhelp.h                       \
-       dh-assistant-view.h             \
-       dh-book.h                       \
-       dh-book-manager.h               \
-       dh-book-tree.h                  \
-       dh-completion.h                 \
-       dh-init.h                       \
-       dh-keyword-model.h              \
-       dh-link.h                       \
-       dh-sidebar.h                    \
-       $(NULL)
-
-libdevhelp_public_c_files =            \
-       dh-assistant-view.c             \
-       dh-book.c                       \
-       dh-book-manager.c               \
-       dh-book-tree.c                  \
-       dh-completion.c                 \
-       dh-init.c                       \
-       dh-keyword-model.c              \
-       dh-link.c                       \
-       dh-sidebar.c                    \
-       $(NULL)
-
-libdevhelp_private_headers =           \
-       dh-error.h                      \
-       dh-parser.h                     \
-       dh-preferences.h                \
-       dh-search-context.h             \
-       dh-settings.h                   \
-       dh-util.h                       \
-       $(NULL)
-
-libdevhelp_private_c_files =           \
-       dh-error.c                      \
-       dh-parser.c                     \
-       dh-preferences.c                \
-       dh-search-context.c             \
-       dh-settings.c                   \
-       dh-util.c                       \
-       $(NULL)
-
-libdevhelp_built_public_headers =      \
-       dh-enum-types.h                 \
-       $(NULL)
-
-libdevhelp_built_public_c_files =      \
-       dh-enum-types.c                 \
-       $(NULL)
-
-libdevhelp_built_sources =                     \
-       $(libdevhelp_built_public_headers)      \
-       $(libdevhelp_built_public_c_files)      \
-       dh-resources.c                          \
-       $(NULL)
-
 app_headers =                  \
        dh-app.h                \
        dh-assistant.h          \
@@ -87,54 +30,6 @@ app_c_files =                        \
        tepl-info-bar.c         \
        $(NULL)
 
-BUILT_SOURCES =                        \
-       $(libdevhelp_built_sources)     \
-       $(NULL)
-
-# Helper Libtool library, so that the private functions can be used in unit
-# tests.
-noinst_LTLIBRARIES = libdevhelp-core.la
-
-libdevhelp_core_la_SOURCES =           \
-       $(libdevhelp_public_headers)    \
-       $(libdevhelp_public_c_files)    \
-       $(libdevhelp_private_headers)   \
-       $(libdevhelp_private_c_files)
-
-# Do not distribute generated files.
-nodist_libdevhelp_core_la_SOURCES =    \
-       $(libdevhelp_built_sources)
-
-libdevhelp_core_la_CPPFLAGS =  \
-       $(AM_CPPFLAGS)
-
-libdevhelp_core_la_CFLAGS =    \
-       $(DEVHELP_CFLAGS)
-
-libdevhelp_core_la_LDFLAGS =   \
-       $(AM_LDFLAGS)           \
-       -no-undefined
-
-# The library
-lib_LTLIBRARIES = libdevhelp-3.la
-
-devhelpincludedir = $(includedir)/devhelp-3.0/devhelp
-devhelpinclude_HEADERS = $(libdevhelp_public_headers)
-nodist_devhelpinclude_HEADERS = $(libdevhelp_built_public_headers)
-
-libdevhelp_3_la_SOURCES =
-
-libdevhelp_3_la_LIBADD =       \
-       libdevhelp-core.la      \
-       $(DEVHELP_LIBS)         \
-       $(LIBM)
-
-libdevhelp_3_la_LDFLAGS =                      \
-       $(AM_LDFLAGS)                           \
-       -no-undefined                           \
-       -version-info $(LIBDEVHELP_LT_VERSION)  \
-       -export-symbols-regex ^dh_
-
 # The application
 bin_PROGRAMS = devhelp
 
@@ -149,75 +44,12 @@ devhelp_CPPFLAGS = \
 devhelp_CFLAGS =               \
        $(DEVHELP_CFLAGS)
 
-devhelp_LDADD =                \
-       $(DEVHELP_LIBS)         \
-       $(LIBM)                 \
-        libdevhelp-3.la
+devhelp_LDADD =                                \
+       $(DEVHELP_LIBS)                         \
+       $(LIBM)                                 \
+        $(top_builddir)/devhelp/libdevhelp-3.la
 
 devhelp_LDFLAGS =      \
        $(AM_LDFLAGS)
 
-resource_files =               \
-       dh-assistant.ui         \
-       dh-preferences.ui       \
-       dh-window.ui            \
-       help-overlay.ui         \
-       menus.ui                \
-       $(NULL)
-
-dh-resources.c: dh.gresource.xml $(resource_files)
-       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name dh 
$(srcdir)/dh.gresource.xml
-
-dh-enum-types.h: dh-enum-types.h.template $(libdevhelp_public_headers) $(GLIB_MKENUMS)
-       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template dh-enum-types.h.template 
$(libdevhelp_public_headers)) > $@
-
-dh-enum-types.c: dh-enum-types.c.template $(libdevhelp_public_headers) $(GLIB_MKENUMS)
-       $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template dh-enum-types.c.template 
$(libdevhelp_public_headers)) > $@
-
-EXTRA_DIST =                           \
-       dh-enum-types.c.template        \
-       dh-enum-types.h.template        \
-       dh.gresource.xml                \
-       $(resource_files)               \
-       $(NULL)
-
-CLEANFILES = $(BUILT_SOURCES)
-
-# GObject Introspection
--include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS =                   \
-       --add-include-path=$(srcdir)            \
-       --warn-all                              \
-       --identifier-prefix Dh                  \
-       --identifier-prefix dh                  \
-       --pkg-export libdevhelp-3.0             \
-       --c-include="devhelp/devhelp.h"
-
-INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
-
-if HAVE_INTROSPECTION
-introspection_sources =                        \
-       $(libdevhelp_public_c_files)            \
-       $(libdevhelp_public_headers)            \
-       $(libdevhelp_built_public_c_files)      \
-       $(libdevhelp_built_public_headers)
-
-Devhelp-3.0.gir: libdevhelp-3.la
-Devhelp_3_0_gir_INCLUDES = Gtk-3.0 WebKit2-4.0
-Devhelp_3_0_gir_CFLAGS = $(INCLUDES)
-Devhelp_3_0_gir_LIBS = libdevhelp-3.la
-Devhelp_3_0_gir_FILES = $(introspection_sources)
-Devhelp_3_0_gir_SCANNERFLAGS = $(WARN_SCANNERFLAGS)
-INTROSPECTION_GIRS += Devhelp-3.0.gir
-
-girdir = $(datadir)/gir-1.0
-gir_DATA = $(INTROSPECTION_GIRS)
-
-typelibdir = $(libdir)/girepository-1.0
-typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
-
-CLEANFILES += $(gir_DATA) $(typelib_DATA)
-endif # HAVE_INTROSPECTION
-
 -include $(top_srcdir)/git.mk
diff --git a/unit-tests/Makefile.am b/unit-tests/Makefile.am
index a5e645b..0ed1c20 100644
--- a/unit-tests/Makefile.am
+++ b/unit-tests/Makefile.am
@@ -1,13 +1,13 @@
-AM_CPPFLAGS =                  \
-       -I$(top_srcdir)/src     \
-       -I$(top_builddir)/src   \
-       $(WARN_CFLAGS)          \
+AM_CPPFLAGS =                          \
+       -I$(top_srcdir)/devhelp         \
+       -I$(top_builddir)/devhelp       \
+       $(WARN_CFLAGS)                  \
        $(DEVHELP_CFLAGS)
 
 AM_LDFLAGS = $(WARN_LDFLAGS)
 
-LDADD = $(top_builddir)/src/libdevhelp-core.la \
-       $(DEVHELP_LIBS)                         \
+LDADD = $(top_builddir)/devhelp/libdevhelp-core.la     \
+       $(DEVHELP_LIBS)                                 \
        $(LIBM)
 
 UNIT_TEST_PROGS =


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