[network-manager-openvpn/danw/cleanup-bgo746693: 1/3] build: remove some unnecessary stuff



commit 279b52c76a277b9a0b53340e5db32601b770cc56
Author: Dan Winship <danw gnome org>
Date:   Tue Nov 11 10:07:37 2014 -0500

    build: remove some unnecessary stuff
    
    PKG_CHECK_MODULES() automatically AC_SUBST()s the variables it
    creates, so we don't need to do it ourselves.
    
    Don't use G_DISABLE_DEPRECATED, since we're using
    GLIB_VERSION_MIN_REQUIRED now.
    
    Remove unnecessary -I flags from Makefiles, and add one that should
    have been there but wasn't.
    
    Remove "#define NM_VPN_API_SUBJECT_TO_CHANGE", since that define has
    had no effect since before NM 0.7.
    
    Remove never-used icon and .desktop file.
    
    Remove alleged example that uses GConf.

 Makefile.am                                   |   18 +---------------
 auth-dialog/Makefile.am                       |    4 ---
 common/Makefile.am                            |    1 -
 configure.ac                                  |   21 ------------------
 doc/example-vpnc-system-wide-connection.sh    |   28 -------------------------
 gnome-mime-application-x-openvpn-settings.png |  Bin 2595 -> 0 bytes
 nm-openvpn.desktop.in                         |   11 ---------
 properties/Makefile.am                        |    5 +---
 properties/nm-openvpn.c                       |    4 +--
 properties/tests/test-import-export.c         |    1 -
 src/Makefile.am                               |    4 +--
 11 files changed, 4 insertions(+), 93 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index dcd4bcf..71e1a6c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,20 +12,6 @@ dbusservice_DATA = nm-openvpn-service.conf
 nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN
 nmvpnservice_DATA = nm-openvpn-service.name
 
-desktopfile = nm-openvpn.desktop.in
-iconfile = gnome-mime-application-x-openvpn-settings.png
-
-if WITH_GNOME
-# FIXME: uncomment when nmce gets --import support
-#desktopdir = $(datadir)/applications
-#desktop_in_files = $(desktopfile)
-#desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-# INTLTOOL_DESKTOP_RULE@
-
-#icondir = $(datadir)/icons/hicolor/48x48/apps
-#icon_DATA = $(iconfile)
-endif
-
 nm-openvpn-service.name: $(srcdir)/nm-openvpn-service.name.in
        sed -e 's|[ ]LIBEXECDIR[@]|$(libexecdir)|g' \
            -e 's|[ ]PLUGINDIR[@]|$(libdir)/NetworkManager|g' \
@@ -37,14 +23,12 @@ DISTCHECK_CONFIGURE_FLAGS = \
 
 EXTRA_DIST = nm-openvpn-service.name.in \
              $(dbusservice_DATA)  \
-             $(desktopfile) \
-             $(iconfile) \
              intltool-extract.in  \
              intltool-merge.in    \
              intltool-update.in \
              nm-test-helpers.h
 
-CLEANFILES = $(nmvpnservice_DATA) $(desktop_DATA) *~
+CLEANFILES = $(nmvpnservice_DATA) *~
 DISTCLEANFILES = intltool-extract intltool-merge intltool-update
 
 ACLOCAL_AMFLAGS = -I m4
diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am
index 38ea97c..938cfd7 100644
--- a/auth-dialog/Makefile.am
+++ b/auth-dialog/Makefile.am
@@ -6,13 +6,9 @@ nm_openvpn_auth_dialog_CPPFLAGS =                      \
        $(NM_CFLAGS)            \
        $(NMGTK_CFLAGS)         \
        $(LIBSECRET_CFLAGS) \
-       -I$(top_srcdir)/
        -DICONDIR=\""$(datadir)/pixmaps"\"      \
        -DUIDIR=\""$(uidir)"\"          \
        -DBINDIR=\""$(bindir)"\"                \
-       -DG_DISABLE_DEPRECATED                  \
-       -DGDK_DISABLE_DEPRECATED                \
-       -DGNOME_DISABLE_DEPRECATED              \
        -DGNOMELOCALEDIR=\"$(datadir)/locale\"  \
        -DVERSION=\"$(VERSION)\"
 
diff --git a/common/Makefile.am b/common/Makefile.am
index 923f642..35aada5 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -2,7 +2,6 @@ noinst_LTLIBRARIES=libnm-openvpn-common.la
 
 libnm_openvpn_common_la_CPPFLAGS = \
        $(NM_CFLAGS) \
-       -DG_DISABLE_DEPRECATED \
         -I$(top_srcdir)/src/
 
 libnm_openvpn_common_la_SOURCES= \
diff --git a/configure.ac b/configure.ac
index 4e9c414..3a56c66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,13 +58,9 @@ IT_PROG_INTLTOOL([0.35])
 AM_GLIB_GNU_GETTEXT
 
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32)
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
 GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
 
 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.74)
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
 
 PKG_CHECK_MODULES(NM,
        NetworkManager >= 0.9.10
@@ -73,30 +69,13 @@ PKG_CHECK_MODULES(NM,
        libnm-glib-vpn >= 0.9.10)
 NM_CFLAGS="$NM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_10"
 NM_CFLAGS="$NM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_0_9_10"
-AC_SUBST(NM_CFLAGS)
-AC_SUBST(NM_LIBS)
 
 if test x"$with_gnome" != xno; then
        PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.4)
-       AC_SUBST(GTK_CFLAGS)
-       AC_SUBST(GTK_LIBS)
        GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_4"
 
        PKG_CHECK_MODULES(NMGTK, libnm-gtk >= 0.9.10)
-       AC_SUBST(NMGTK_CFLAGS)
-       AC_SUBST(NMGTK_LIBS)
-
        PKG_CHECK_MODULES(LIBSECRET, libsecret-unstable)
-       AC_SUBST(LIBSECRET_CFLAGS)
-       AC_SUBST(LIBSECRET_LIBS)
-
-       dnl maintainer mode stuff
-       if test $USE_MAINTAINER_MODE = yes; then
-               DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED"
-       else
-               DISABLE_DEPRECATED=""
-       fi
-       AC_SUBST(DISABLE_DEPRECATED)
 fi
 
 NM_COMPILER_WARNINGS
diff --git a/properties/Makefile.am b/properties/Makefile.am
index d889b03..ab97d37 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -18,12 +18,9 @@ libnm_openvpn_properties_la_CFLAGS =                    \
         $(GLIB_CFLAGS)                                  \
         $(GTK_CFLAGS)                                   \
         $(NM_CFLAGS)                                    \
-        $(DISABLE_DEPRECATED)                           \
-        -I$(top_srcdir)/                                \
+        -I$(top_srcdir)/src                             \
         -DICONDIR=\""$(datadir)/pixmaps"\"              \
         -DUIDIR=\""$(uidir)"\"                          \
-        -DG_DISABLE_DEPRECATED                          \
-        -DGDK_DISABLE_DEPRECATED                        \
         -DLOCALEDIR=\"$(datadir)/locale\"               \
         -DVERSION=\"$(VERSION)\"
 
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index f9b9eb9..04bc7ba 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -37,14 +37,12 @@
 #include <string.h>
 #include <gtk/gtk.h>
 
-#define NM_VPN_API_SUBJECT_TO_CHANGE
-
 #include <nm-vpn-plugin-ui-interface.h>
 #include <nm-setting-vpn.h>
 #include <nm-setting-connection.h>
 #include <nm-setting-ip4-config.h>
 
-#include "src/nm-openvpn-service.h"
+#include "nm-openvpn-service.h"
 #include "nm-openvpn.h"
 #include "auth-helpers.h"
 #include "import-export.h"
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index 4ab8b1e..d0e75a0 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -28,7 +28,6 @@
 #include <nm-setting-ip4-config.h>
 #include <nm-setting-vpn.h>
 
-#define NM_VPN_API_SUBJECT_TO_CHANGE
 #include <nm-vpn-plugin-ui-interface.h>
 
 #include "nm-test-helpers.h"
diff --git a/src/Makefile.am b/src/Makefile.am
index 700f0d9..2dfeb05 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,6 @@ AM_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(NM_CFLAGS) \
-       -DG_DISABLE_DEPRECATED \
        -DBINDIR=\"$(bindir)\" \
        -DPREFIX=\""$(prefix)"\" \
        -DSYSCONFDIR=\""$(sysconfdir)"\" \
@@ -12,8 +11,7 @@ AM_CPPFLAGS = \
        -DLOCALSTATEDIR=\""$(localstatedir)"\" \
        -DDATADIR=\"$(datadir)\" \
        -DNM_OPENVPN_LOCALEDIR=\"$(datadir)/locale\" \
-       -DG_LOG_DOMAIN=\"nm-openvpn\" \
-       -I$(top_srcdir)
+       -DG_LOG_DOMAIN=\"nm-openvpn\"
 
 libexec_PROGRAMS = nm-openvpn-service nm-openvpn-service-openvpn-helper
 


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