[network-manager-pptp] build: build shared files individually without creating a library



commit 8808efe083e63d924bb2b3c6143417fe6538144b
Author: Thomas Haller <thaller redhat com>
Date:   Thu Jun 16 12:48:53 2016 +0200

    build: build shared files individually without creating a library
    
    Previously, we would build static libraries out of the shared
    files. But the users (in properties/, src/, auth-dialog/) themself
    want to build those files differently.
    
    For example, the core part under src/ wants to include
    <glib/gi18n.h>
    for translation, while the properties/ shall use <glib/gi18n-lib.h>.
    We get this right via "nm-default.h" and NETWORKMANAGER_COMPILATION,
    but for that we have to rebuild the files each time.
    
    Instead, let each user of those files explicitly pick the shared
    files as source.
    
    To workaround a bug in autotools, we have to disable subdir-objects
    (see https://lists.gnu.org/archive/html/automake/2015-08/msg00003.html).
    
    Thereby, delete currently unsued "nm-utils/nm-shared-utils.h" header.
    We can re-add it when needed.

 configure.ac                      |    2 +-
 po/POTFILES.in                    |    1 -
 properties/Makefile.am            |    5 +-
 shared/Makefile.am                |   61 +---------
 shared/nm-utils/nm-shared-utils.c |  239 -------------------------------------
 shared/nm-utils/nm-shared-utils.h |   66 ----------
 6 files changed, 7 insertions(+), 367 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 54d07e4..c8c7c83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_INIT(NetworkManager-pptp,
         1.3.0,
         https://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager,
         NetworkManager-pptp)
-AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz subdir-objects])
+AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz])
 AM_MAINTAINER_MODE
 
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1a8e283..388fc33 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,7 +5,6 @@ auth-dialog/main.c
 properties/advanced-dialog.c
 properties/nm-pptp-editor-plugin.c
 properties/nm-pptp-editor.c
-shared/nm-utils/nm-shared-utils.c
 shared/nm-utils/nm-vpn-plugin-utils.c
 src/nm-pptp-service.c
 [type: gettext/glade]properties/nm-pptp-dialog.ui
diff --git a/properties/Makefile.am b/properties/Makefile.am
index c4c5322..625cf06 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -34,6 +34,8 @@ common_CFLAGS = \
 ###############################################################################
 
 libnm_vpn_plugin_pptp_la_SOURCES = \
+    $(top_srcdir)/shared/nm-utils/nm-vpn-plugin-utils.c \
+    $(top_srcdir)/shared/nm-utils/nm-vpn-plugin-utils.h \
     $(plugin_sources)
 
 libnm_vpn_plugin_pptp_la_CFLAGS = \
@@ -43,8 +45,7 @@ libnm_vpn_plugin_pptp_la_CFLAGS = \
     $(LIBNM_CFLAGS)
 
 libnm_vpn_plugin_pptp_la_LIBADD = \
-    $(LIBNM_LIBS) \
-    $(top_builddir)/shared/libnm-vpn-editor-utils-shared.la
+    $(LIBNM_LIBS)
 
 libnm_vpn_plugin_pptp_la_LDFLAGS = \
     -avoid-version \
diff --git a/shared/Makefile.am b/shared/Makefile.am
index 8539d23..a72f8ce 100644
--- a/shared/Makefile.am
+++ b/shared/Makefile.am
@@ -1,64 +1,9 @@
-noinst_LTLIBRARIES = \
-    libnm-vpn-plugin-pptp-shared.la \
-    libnm-vpn-editor-utils-shared.la
-if WITH_LIBNM_GLIB
-noinst_LTLIBRARIES += libnm-pptp-shared.la
-endif
-
-shared_sources = \
-    nm-utils/nm-shared-utils.c \
-    nm-utils/nm-shared-utils.h \
-    nm-service-defines.h
-
-shared_CPPFLAGS = \
-    -DLIBEXECDIR=\""$(libexecdir)"\" \
-    -I"$(top_srcdir)/shared/"
-
-###############################################################################
-
-libnm_vpn_plugin_pptp_shared_la_CPPFLAGS = \
-    $(LIBNM_CFLAGS) \
-    $(shared_CPPFLAGS)
-
-libnm_vpn_plugin_pptp_shared_la_SOURCES= \
-    $(shared_sources)
-
-libnm_vpn_plugin_pptp_shared_la_LIBADD = \
-    $(LIBNM_LIBS)
-
-###############################################################################
-
-libnm_pptp_shared_la_SOURCES = \
-    $(shared_sources)
-
-libnm_pptp_shared_la_CPPFLAGS = \
-    -DNM_VPN_OLD \
-    $(LIBNM_GLIB_CFLAGS) \
-    $(shared_CPPFLAGS)
-
-libnm_pptp_shared_la_LIBADD = \
-    $(LIBNM_GLIB_LIBS)
-
-###############################################################################
-
-libnm_vpn_editor_utils_shared_la_CPPFLAGS = \
-    $(LIBNM_CFLAGS) \
-    -I$(top_srcdir)/shared
-
-libnm_vpn_editor_utils_shared_la_SOURCES = \
-    nm-utils/nm-vpn-plugin-utils.c \
-    nm-utils/nm-vpn-plugin-utils.h
-
-libnm_vpn_editor_utils_shared_la_LIBADD = \
-    $(LIBNM_LIBS) \
-    -ldl
-
-###############################################################################
-
 EXTRA_DIST = \
     README \
     nm-utils/gsystem-local-alloc.h \
     nm-utils/nm-glib.h \
     nm-utils/nm-macros-internal.h \
+    nm-utils/nm-vpn-plugin-utils.c \
+    nm-utils/nm-vpn-plugin-utils.h \
+    nm-service-defines.h \
     nm-default.h
-


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