[network-manager-openvpn/th/include-nm-default-bgo761198: 5/8] all: pass include dirs as CFLAGS instead of including with relative paths



commit 91bdaf6bc33462e717ad01cb063774c92612bc87
Author: Thomas Haller <thaller redhat com>
Date:   Wed Jan 27 17:09:29 2016 +0100

    all: pass include dirs as CFLAGS instead of including with relative paths
    
    Thereby, move "nm-openvpn-service-defines.h" to "shared/" directory.

 auth-dialog/Makefile.am                      |    1 +
 auth-dialog/main.c                           |    4 ++--
 common/Makefile.am                           |    6 ++----
 properties/Makefile.am                       |    2 +-
 properties/auth-helpers.c                    |    4 ++--
 properties/import-export.c                   |    4 ++--
 properties/nm-openvpn.c                      |    2 +-
 properties/tests/Makefile.am                 |    4 +++-
 properties/tests/test-import-export.c        |    4 ++--
 {src => shared}/nm-openvpn-service-defines.h |    0
 src/Makefile.am                              |    3 ++-
 src/nm-openvpn-service.c                     |    4 ++--
 12 files changed, 20 insertions(+), 18 deletions(-)
---
diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am
index eed5841..9885fc0 100644
--- a/auth-dialog/Makefile.am
+++ b/auth-dialog/Makefile.am
@@ -6,6 +6,7 @@ nm_openvpn_auth_dialog_CPPFLAGS =                       \
        $(LIBNM_CFLAGS)                 \
        $(LIBNMA_CFLAGS)                \
        $(LIBSECRET_CFLAGS) \
+       -I$(top_srcdir)/common \
        -I$(top_srcdir)/shared \
        -DICONDIR=\""$(datadir)/pixmaps"\"      \
        -DUIDIR=\""$(uidir)"\"          \
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 7c00493..760467e 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -37,8 +37,8 @@
 #include <nm-vpn-service-plugin.h>
 #include <nma-vpn-password-dialog.h>
 
-#include "../common/utils.h"
-#include "../src/nm-openvpn-service-defines.h"
+#include "utils.h"
+#include "nm-openvpn-service-defines.h"
 
 #define KEYRING_UUID_TAG "connection-uuid"
 #define KEYRING_SN_TAG "setting-name"
diff --git a/common/Makefile.am b/common/Makefile.am
index d89d865..8e37477 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -5,14 +5,12 @@ endif
 
 libnm_vpn_plugin_openvpn_common_la_CPPFLAGS = \
        $(LIBNM_CFLAGS) \
-    -I$(top_srcdir)/shared/ \
-    -I$(top_srcdir)/src/
+    -I$(top_srcdir)/shared
 
 libnm_openvpn_common_la_CPPFLAGS = \
        -DNM_OPENVPN_OLD \
        $(LIBNM_GLIB_CFLAGS) \
-    -I$(top_srcdir)/shared/ \
-    -I$(top_srcdir)/src/
+    -I$(top_srcdir)/shared
 
 libnm_vpn_plugin_openvpn_common_la_SOURCES= \
        utils.c \
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 68e75da..95ac4ea 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -23,8 +23,8 @@ ui_DATA = nm-openvpn-dialog.ui
 common_CFLAGS =                                         \
         $(GLIB_CFLAGS)                                  \
         $(GTK_CFLAGS)                                   \
+        -I$(top_srcdir)/common                          \
         -I$(top_srcdir)/shared                          \
-        -I$(top_srcdir)/src                             \
         -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
         -DICONDIR=\""$(datadir)/pixmaps"\"              \
         -DUIDIR=\""$(uidir)"\"                          \
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 534ebd7..465102c 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -35,8 +35,8 @@
 
 #include "auth-helpers.h"
 #include "nm-openvpn.h"
-#include "../src/nm-openvpn-service-defines.h"
-#include "../common/utils.h"
+#include "nm-openvpn-service-defines.h"
+#include "utils.h"
 
 #define BLOCK_HANDLER_ID "block-handler-id"
 
diff --git a/properties/import-export.c b/properties/import-export.c
index 2b85153..680a045 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -36,8 +36,8 @@
 
 #include "import-export.h"
 #include "nm-openvpn.h"
-#include "../src/nm-openvpn-service-defines.h"
-#include "../common/utils.h"
+#include "nm-openvpn-service-defines.h"
+#include "utils.h"
 
 #define CA_BLOB_START_TAG "<ca>"
 #define CA_BLOB_END_TAG "</ca>"
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index 865c14b..c47fd8b 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -36,7 +36,7 @@
 
 #include "nm-default.h"
 
-#include "../src/nm-openvpn-service-defines.h"
+#include "nm-openvpn-service-defines.h"
 #include "nm-openvpn.h"
 #include "auth-helpers.h"
 #include "import-export.h"
diff --git a/properties/tests/Makefile.am b/properties/tests/Makefile.am
index 9f17753..c22d5f9 100644
--- a/properties/tests/Makefile.am
+++ b/properties/tests/Makefile.am
@@ -2,7 +2,9 @@ SUBDIRS = conf
 
 AM_CFLAGS = \
     -I${top_srcdir}/shared \
-    -I${top_srcdir}
+    -I${top_srcdir} \
+    -I${top_srcdir}/common \
+    -I${top_srcdir}/properties
 
 noinst_PROGRAMS = test-import-export
 
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index f66441e..8be6c46 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -28,8 +28,8 @@
 #include "nm-default.h"
 
 #include "nm-test-helpers.h"
-#include "properties/nm-openvpn.h"
-#include "src/nm-openvpn-service-defines.h"
+#include "nm-openvpn.h"
+#include "nm-openvpn-service-defines.h"
 
 static NMConnection *
 get_basic_connection (const char *detail,
diff --git a/src/nm-openvpn-service-defines.h b/shared/nm-openvpn-service-defines.h
similarity index 100%
rename from src/nm-openvpn-service-defines.h
rename to shared/nm-openvpn-service-defines.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 29a8105..1e9b52f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,7 @@
 AM_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        $(LIBNM_CFLAGS) \
+       -I$(top_srcdir)/common \
        -I$(top_srcdir)/shared \
        -DBINDIR=\"$(bindir)\" \
        -DPREFIX=\""$(prefix)"\" \
@@ -17,7 +18,7 @@ libexec_PROGRAMS = nm-openvpn-service nm-openvpn-service-openvpn-helper
 nm_openvpn_service_SOURCES = \
        nm-openvpn-service.c \
        nm-openvpn-service.h \
-       nm-openvpn-service-defines.h
+       $(top_srcdir)/shared/nm-openvpn-service-defines.h
 
 nm_openvpn_service_LDADD = \
        $(LIBNM_LIBS) \
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index d506e61..fb09933 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -49,8 +49,8 @@
 
 #include "nm-openvpn-service.h"
 #include "nm-utils.h"
-#include "../common/utils.h"
-#include "../common/nm-glib-compat.h"
+#include "utils.h"
+#include "nm-glib-compat.h"
 
 #if !defined(DIST_VERSION)
 # define DIST_VERSION VERSION


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