[network-manager-vpnc/th/vpn-editor-split-bgo766170: 2/23] build: move "nm-vpnc-service-defines.h" to "shared/nm-service-defines.h"



commit 8fc406fea107ef1e7a3682e7b6635523c0647b7b
Author: Thomas Haller <thaller redhat com>
Date:   Sun May 8 21:59:40 2016 +0200

    build: move "nm-vpnc-service-defines.h" to "shared/nm-service-defines.h"
    
    nm-openvpn has a similar file that serves the same purpose.
    
    Instead of naming them different for each VPN plugin, give them all
    the same name (which makes it more obvious how they relate, and it's
    more convenient when looking at a diff between plugins).

 Makefile.am                                        |    2 +-
 auth-dialog/Makefile.am                            |    1 +
 auth-dialog/main.c                                 |    2 +-
 configure.ac                                       |    1 +
 properties/Makefile.am                             |    2 +-
 properties/nm-vpnc.c                               |    2 +-
 properties/tests/Makefile.am                       |    3 ++-
 properties/tests/test-import-export.c              |    2 +-
 shared/Makefile.am                                 |    2 ++
 .../nm-service-defines.h                           |    9 ++++-----
 src/Makefile.am                                    |    5 +++--
 src/nm-vpnc-service.h                              |    2 +-
 12 files changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 783a4db..a60467a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = src
+SUBDIRS = shared src
 
 if WITH_GNOME
 SUBDIRS += auth-dialog properties po
diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am
index 9add74a..1bf484e 100644
--- a/auth-dialog/Makefile.am
+++ b/auth-dialog/Makefile.am
@@ -6,6 +6,7 @@ nm_vpnc_auth_dialog_CPPFLAGS = \
        $(GTK_CFLAGS) \
        $(LIBNMA_CFLAGS) \
        $(LIBSECRET_CFLAGS) \
+       -I"$(top_srcdir)/shared/" \
        -DICONDIR=\""$(datadir)/pixmaps"\" \
        -DBINDIR=\""$(bindir)"\" \
        -DGNOMELOCALEDIR=\"$(datadir)/locale\"
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index d07526c..4ddacaa 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -35,7 +35,7 @@
 #include <nm-vpn-service-plugin.h>
 #include <nma-vpn-password-dialog.h>
 
-#include "../src/nm-vpnc-service-defines.h"
+#include "nm-service-defines.h"
 
 #define KEYRING_UUID_TAG "connection-uuid"
 #define KEYRING_SN_TAG "setting-name"
diff --git a/configure.ac b/configure.ac
index f90712e..ee31814 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,5 +129,6 @@ properties/Makefile
 properties/tests/Makefile
 properties/tests/pcf/Makefile
 po/Makefile.in
+shared/Makefile
 ])
 AC_OUTPUT
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 3a886b9..82ce18b 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -21,7 +21,7 @@ ui_DATA = nm-vpnc-dialog.ui
 common_CFLAGS = \
        $(GLIB_CFLAGS) \
        $(GTK_CFLAGS) \
-       -I$(top_srcdir)/src/ \
+       -I"$(top_srcdir)/shared/" \
        -DICONDIR=\""$(datadir)/pixmaps"\" \
        -DUIDIR=\""$(uidir)"\" \
        -DLOCALEDIR=\"$(datadir)/locale\"
diff --git a/properties/nm-vpnc.c b/properties/nm-vpnc.c
index 0f4f438..db4d66c 100644
--- a/properties/nm-vpnc.c
+++ b/properties/nm-vpnc.c
@@ -71,7 +71,7 @@
 #define VPNC_PLUGIN_UI_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
 #endif
 
-#include "nm-vpnc-service-defines.h"
+#include "nm-service-defines.h"
 #include "nm-vpnc-helper.h"
 #include "nm-vpnc.h"
 
diff --git a/properties/tests/Makefile.am b/properties/tests/Makefile.am
index d3ae761..083ce54 100644
--- a/properties/tests/Makefile.am
+++ b/properties/tests/Makefile.am
@@ -10,7 +10,8 @@ test_import_export_CPPFLAGS = \
        $(GTK_CFLAGS) \
        $(LIBNM_CFLAGS) \
        $(LIBNMA_CFLAGS) \
-       $(DBUS_CFLAGS)
+       $(DBUS_CFLAGS) \
+       -I"$(top_srcdir)/shared/"
 
 test_import_export_LDADD = \
        $(GTHREAD_LIBS) \
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index 243bbae..70db07f 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -32,7 +32,7 @@
 
 #include "../../nm-test-helpers.h"
 #include "../../properties/nm-vpnc.h"
-#include "../../src/nm-vpnc-service-defines.h"
+#include "nm-service-defines.h"
 #include "../../properties/nm-vpnc-helper.h"
 
 typedef struct {
diff --git a/shared/Makefile.am b/shared/Makefile.am
new file mode 100644
index 0000000..d639bd8
--- /dev/null
+++ b/shared/Makefile.am
@@ -0,0 +1,2 @@
+EXTRA_DIST = \
+    nm-service-defines.h
diff --git a/src/nm-vpnc-service-defines.h b/shared/nm-service-defines.h
similarity index 94%
rename from src/nm-vpnc-service-defines.h
rename to shared/nm-service-defines.h
index dc807df..b4fedcf 100644
--- a/src/nm-vpnc-service-defines.h
+++ b/shared/nm-service-defines.h
@@ -1,6 +1,5 @@
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
+/*
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -19,8 +18,8 @@
  * Copyright 2007 - 2008 Novell, Inc.
  */
 
-#ifndef NM_VPNC_SERVICE_DEFINES_H
-#define NM_VPNC_SERVICE_DEFINES_H
+#ifndef __NM_SERVICE_DEFINES_H__
+#define __NM_SERVICE_DEFINES_H__
 
 #define NM_DBUS_SERVICE_VPNC    "org.freedesktop.NetworkManager.vpnc"
 #define NM_DBUS_INTERFACE_VPNC  "org.freedesktop.NetworkManager.vpnc"
@@ -69,4 +68,4 @@
 #define NM_VPNC_VENDOR_CISCO     "cisco"
 #define NM_VPNC_VENDOR_NETSCREEN "netscreen"
 
-#endif /* NM_VPNC_SERVICE_DEFINES_H */
+#endif /* __NM_SERVICE_DEFINES_H__ */
diff --git a/src/Makefile.am b/src/Makefile.am
index f71c269..1de7a68 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,7 @@
 AM_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        $(LIBNM_CFLAGS) \
+       -I"$(top_srcdir)/shared/" \
        -DBINDIR=\"$(bindir)\" \
        -DPREFIX=\""$(prefix)"\" \
        -DSYSCONFDIR=\""$(sysconfdir)"\" \
@@ -13,9 +14,9 @@ AM_CPPFLAGS = \
 libexec_PROGRAMS = nm-vpnc-service nm-vpnc-service-vpnc-helper
 
 nm_vpnc_service_SOURCES = \
+       $(top_srcdir)/shared/nm-service-defines.h \
        nm-vpnc-service.c \
        nm-vpnc-service.h \
-       nm-vpnc-service-defines.h \
        utils.c \
        utils.h
 
@@ -25,7 +26,7 @@ nm_vpnc_service_LDADD = \
 
 
 nm_vpnc_service_vpnc_helper_SOURCES = \
-                               nm-vpnc-service-vpnc-helper.c
+       nm-vpnc-service-vpnc-helper.c
 
 nm_vpnc_service_vpnc_helper_LDADD = \
        $(GTHREAD_LIBS) \
diff --git a/src/nm-vpnc-service.h b/src/nm-vpnc-service.h
index f570e09..3bea2ff 100644
--- a/src/nm-vpnc-service.h
+++ b/src/nm-vpnc-service.h
@@ -26,7 +26,7 @@
 #include <glib-object.h>
 #include <nm-vpn-service-plugin.h>
 
-#include "nm-vpnc-service-defines.h"
+#include "nm-service-defines.h"
 
 #define NM_TYPE_VPNC_PLUGIN            (nm_vpnc_plugin_get_type ())
 #define NM_VPNC_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPNC_PLUGIN, 
NMVPNCPlugin))


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