aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-09-26 20:49:48 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-21 12:35:11 +0000
commit6a973bab9c5ae4f139ce30aa02e34e3779b8c5fa (patch)
treeded217a4262656d32b417b8e53f837b3539e03c5
parentbb6e4bb6769eb1fc7840e50d0b33126ba7574b29 (diff)
build: move include/{mtp,sccp} to include/osmocom/
Anywhere else in the Osmocom code base, we arrange headers in include/osmocom/foo/ and pass -I ${root_srcdir}/include/. This way including an osmocom header always has the format #include <osmocom/foo/bar.h> whether we are including from the local source tree or from $prefix. For some reason not clear to me, the mtp and sccp folders, even though they are being installed to $prefix/include/osmocom/, were kept *next* to the osmocom/ dir, instead of inside it. Fix that weird situation. The motivation is that I wanted to use a definition from sccp_types.h in a public-API header. That is impossible if it requires #include <sccp/sccp_types.h> in a local build, but #include <osmocom/sccp/sccp_types.h> for any other source tree using libosmo-sccp. After this patch, both are identical and including works without quirks. (The other patch that needed this has changed in the meantime on and no longer needs this, but this still makes sense for future hacking.) The installed result does not change, since both mtp/*.h and sccp/*.h have always been installed to $prefix/include/osmocom/{mtp,sccp}/. This merely changes their position in the source tree. The most curious situation before this is that any patch #including <osmocom/sccp/sccp_types.h> might not get a notice that the header didn't exist, but might instead include an older system-installed file. Change-Id: I1209a4ecf9f692a8030b5c93cd281fc9dd58d105
-rw-r--r--configure.ac4
-rw-r--r--include/Makefile.am2
-rw-r--r--include/osmocom/Makefile.am2
-rw-r--r--include/osmocom/mtp/Makefile.am (renamed from include/mtp/Makefile.am)0
-rw-r--r--include/osmocom/mtp/mtp_level3.h (renamed from include/mtp/mtp_level3.h)0
-rw-r--r--include/osmocom/mtp/mtp_pcap.h (renamed from include/mtp/mtp_pcap.h)0
-rw-r--r--include/osmocom/sccp/Makefile.am (renamed from include/sccp/Makefile.am)0
-rw-r--r--include/osmocom/sccp/sccp.h (renamed from include/sccp/sccp.h)0
-rw-r--r--include/osmocom/sccp/sccp_types.h (renamed from include/sccp/sccp_types.h)0
-rw-r--r--src/mtp_pcap.c2
-rw-r--r--src/sccp.c2
-rw-r--r--src/sccp2sua.c2
-rw-r--r--src/sccp_sclc.c2
-rw-r--r--src/sccp_scoc.c2
-rw-r--r--src/sccp_scrc.c2
-rw-r--r--tests/mtp/mtp_parse_test.c2
-rw-r--r--tests/sccp/sccp_test.c2
17 files changed, 12 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 7dfb266..acef6f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,9 +136,9 @@ AC_OUTPUT(
libosmo-sccp.pc
libosmo-mtp.pc
libosmo-xua.pc
- include/sccp/Makefile
- include/mtp/Makefile
include/osmocom/Makefile
+ include/osmocom/sccp/Makefile
+ include/osmocom/mtp/Makefile
include/osmocom/sigtran/Makefile
include/Makefile
src/Makefile
diff --git a/include/Makefile.am b/include/Makefile.am
index 7cd4b57..3578a80 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1 +1 @@
-SUBDIRS = sccp mtp osmocom
+SUBDIRS = osmocom
diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am
index 7e86a4b..c4535f3 100644
--- a/include/osmocom/Makefile.am
+++ b/include/osmocom/Makefile.am
@@ -1 +1 @@
-SUBDIRS = sigtran
+SUBDIRS = mtp sccp sigtran
diff --git a/include/mtp/Makefile.am b/include/osmocom/mtp/Makefile.am
index dbd0e79..dbd0e79 100644
--- a/include/mtp/Makefile.am
+++ b/include/osmocom/mtp/Makefile.am
diff --git a/include/mtp/mtp_level3.h b/include/osmocom/mtp/mtp_level3.h
index d0d24a1..d0d24a1 100644
--- a/include/mtp/mtp_level3.h
+++ b/include/osmocom/mtp/mtp_level3.h
diff --git a/include/mtp/mtp_pcap.h b/include/osmocom/mtp/mtp_pcap.h
index 5e8f7d3..5e8f7d3 100644
--- a/include/mtp/mtp_pcap.h
+++ b/include/osmocom/mtp/mtp_pcap.h
diff --git a/include/sccp/Makefile.am b/include/osmocom/sccp/Makefile.am
index c64db26..c64db26 100644
--- a/include/sccp/Makefile.am
+++ b/include/osmocom/sccp/Makefile.am
diff --git a/include/sccp/sccp.h b/include/osmocom/sccp/sccp.h
index 4293792..4293792 100644
--- a/include/sccp/sccp.h
+++ b/include/osmocom/sccp/sccp.h
diff --git a/include/sccp/sccp_types.h b/include/osmocom/sccp/sccp_types.h
index ab7f74f..ab7f74f 100644
--- a/include/sccp/sccp_types.h
+++ b/include/osmocom/sccp/sccp_types.h
diff --git a/src/mtp_pcap.c b/src/mtp_pcap.c
index e83e6f7..a59efc5 100644
--- a/src/mtp_pcap.c
+++ b/src/mtp_pcap.c
@@ -22,7 +22,7 @@
*
*/
-#include <mtp/mtp_pcap.h>
+#include <osmocom/mtp/mtp_pcap.h>
#include <sys/time.h>
diff --git a/src/sccp.c b/src/sccp.c
index a15a84b..8c3641c 100644
--- a/src/sccp.c
+++ b/src/sccp.c
@@ -31,7 +31,7 @@
#include <osmocom/core/logging.h>
#include <osmocom/gsm/tlv.h>
-#include <sccp/sccp.h>
+#include <osmocom/sccp/sccp.h>
// Unassigned debug area
static int DSCCP = 0;
diff --git a/src/sccp2sua.c b/src/sccp2sua.c
index 2f5b687..f68f9a9 100644
--- a/src/sccp2sua.c
+++ b/src/sccp2sua.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <errno.h>
-#include <sccp/sccp.h>
+#include <osmocom/sccp/sccp.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/sccp_sap.h>
diff --git a/src/sccp_sclc.c b/src/sccp_sclc.c
index e4dbae6..db67660 100644
--- a/src/sccp_sclc.c
+++ b/src/sccp_sclc.c
@@ -56,7 +56,7 @@
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/protocol/sua.h>
-#include <sccp/sccp_types.h>
+#include <osmocom/sccp/sccp_types.h>
#include "xua_internal.h"
#include "sccp_internal.h"
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index 8138e43..fbbad49 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -56,7 +56,7 @@
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/protocol/sua.h>
-#include <sccp/sccp_types.h>
+#include <osmocom/sccp/sccp_types.h>
#include "xua_internal.h"
#include "sccp_internal.h"
diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c
index 9005dc7..db49299 100644
--- a/src/sccp_scrc.c
+++ b/src/sccp_scrc.c
@@ -25,7 +25,7 @@
#include <osmocom/core/logging.h>
#include <osmocom/core/msgb.h>
-#include <sccp/sccp_types.h>
+#include <osmocom/sccp/sccp_types.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/sccp_helpers.h>
diff --git a/tests/mtp/mtp_parse_test.c b/tests/mtp/mtp_parse_test.c
index 75650a3..92c34ca 100644
--- a/tests/mtp/mtp_parse_test.c
+++ b/tests/mtp/mtp_parse_test.c
@@ -1,5 +1,5 @@
/* MTP Layer3 parsing tests */
-#include <mtp/mtp_level3.h>
+#include <osmocom/mtp/mtp_level3.h>
#include <arpa/inet.h>
diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c
index ed485bc..ba9ff7a 100644
--- a/tests/sccp/sccp_test.c
+++ b/tests/sccp/sccp_test.c
@@ -31,7 +31,7 @@
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
-#include <sccp/sccp.h>
+#include <osmocom/sccp/sccp.h>
#define MIN(x, y) ((x) < (y) ? (x) : (y))