[MERGED] osmo-iuh[master]: build: move headers to include/osmocom/*

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Sep 9 06:43:33 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: build: move headers to include/osmocom/*
......................................................................


build: move headers to include/osmocom/*

This came up while fixing 'make distcheck'; this is certainly not the easiest
way but it makes sense to have the headers in include/, like we do in openbsc.

The easy alternative might be to add -I$(top_srcdir)/src to src/Makefile.am.

Remove -I$(top_srcdir)/src from src/tests/Makefile.am, no longer needed.

Change-Id: I5a82e029dcdc4df0a60a31271a4883393fe59234
---
M include/osmocom/iuh/Makefile.am
R include/osmocom/iuh/context_map.h
R include/osmocom/iuh/hnbgw.h
R include/osmocom/iuh/hnbgw_cn.h
R include/osmocom/iuh/hnbgw_hnbap.h
R include/osmocom/iuh/hnbgw_ranap.h
R include/osmocom/iuh/hnbgw_rua.h
R include/osmocom/iuh/iu_common.h
M include/osmocom/rua/Makefile.am
R include/osmocom/rua/rua_msg_factory.h
M src/Makefile.am
M src/context_map.c
M src/hnbap_common.c
M src/hnbgw.c
M src/hnbgw_cn.c
M src/hnbgw_hnbap.c
M src/hnbgw_ranap.c
M src/hnbgw_rua.c
M src/hnbgw_vty.c
M src/ranap_common_cn.c
M src/rua_common.c
M src/rua_msg_factory.c
M src/tests/Makefile.am
M src/tests/dummy_cn_sua.c
M src/tests/hnb-test.c
M src/tests/test-ranap.c
M src/tests/test_common.c
27 files changed, 41 insertions(+), 37 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/iuh/Makefile.am b/include/osmocom/iuh/Makefile.am
index e2f7126..b2a667d 100644
--- a/include/osmocom/iuh/Makefile.am
+++ b/include/osmocom/iuh/Makefile.am
@@ -1,2 +1,4 @@
 noinst_HEADERS = \
-	vty.h
+	vty.h \
+	context_map.h hnbgw.h hnbgw_cn.h \
+	hnbgw_hnbap.h hnbgw_rua.h hnbgw_ranap.h
diff --git a/src/context_map.h b/include/osmocom/iuh/context_map.h
similarity index 100%
rename from src/context_map.h
rename to include/osmocom/iuh/context_map.h
diff --git a/src/hnbgw.h b/include/osmocom/iuh/hnbgw.h
similarity index 100%
rename from src/hnbgw.h
rename to include/osmocom/iuh/hnbgw.h
diff --git a/src/hnbgw_cn.h b/include/osmocom/iuh/hnbgw_cn.h
similarity index 78%
rename from src/hnbgw_cn.h
rename to include/osmocom/iuh/hnbgw_cn.h
index 469b3d4..d5bec04 100644
--- a/src/hnbgw_cn.h
+++ b/include/osmocom/iuh/hnbgw_cn.h
@@ -1,5 +1,5 @@
 #pragma once
 
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 struct hnbgw_cnlink *hnbgw_cnlink_init(struct hnb_gw *gw, const char *host, uint16_t port, int is_ps);
diff --git a/src/hnbgw_hnbap.h b/include/osmocom/iuh/hnbgw_hnbap.h
similarity index 77%
rename from src/hnbgw_hnbap.h
rename to include/osmocom/iuh/hnbgw_hnbap.h
index 955e0aa..cca3550 100644
--- a/src/hnbgw_hnbap.h
+++ b/include/osmocom/iuh/hnbgw_hnbap.h
@@ -1,6 +1,6 @@
 #pragma once
 
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 int hnbgw_hnbap_rx(struct hnb_context *hnb, struct msgb *msg);
 int hnbgw_hnbap_init(void);
diff --git a/src/hnbgw_ranap.h b/include/osmocom/iuh/hnbgw_ranap.h
similarity index 77%
rename from src/hnbgw_ranap.h
rename to include/osmocom/iuh/hnbgw_ranap.h
index 85a2f98..2c55964 100644
--- a/src/hnbgw_ranap.h
+++ b/include/osmocom/iuh/hnbgw_ranap.h
@@ -1,6 +1,6 @@
 #pragma once
 
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 int hnbgw_ranap_rx(struct msgb *msg, uint8_t *data, size_t len);
 int hnbgw_ranap_init(void);
diff --git a/src/hnbgw_rua.h b/include/osmocom/iuh/hnbgw_rua.h
similarity index 93%
rename from src/hnbgw_rua.h
rename to include/osmocom/iuh/hnbgw_rua.h
index d170190..6a890b7 100644
--- a/src/hnbgw_rua.h
+++ b/include/osmocom/iuh/hnbgw_rua.h
@@ -1,6 +1,6 @@
 #pragma once
 
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 #include <osmocom/rua/RUA_Cause.h>
 
 int hnbgw_rua_rx(struct hnb_context *hnb, struct msgb *msg);
diff --git a/src/iu_common.h b/include/osmocom/iuh/iu_common.h
similarity index 100%
rename from src/iu_common.h
rename to include/osmocom/iuh/iu_common.h
diff --git a/include/osmocom/rua/Makefile.am b/include/osmocom/rua/Makefile.am
index 49e2150..307f123 100644
--- a/include/osmocom/rua/Makefile.am
+++ b/include/osmocom/rua/Makefile.am
@@ -1,5 +1,5 @@
 noinst_HEADERS = \
-	rua_common.h rua_ies_defs.h \
+	rua_common.h rua_ies_defs.h rua_msg_factory.h \
 	RUA_Ansi-41-IDNNS.h \
 	RUA_Cause.h \
 	RUA_CauseMisc.h \
diff --git a/src/rua_msg_factory.h b/include/osmocom/rua/rua_msg_factory.h
similarity index 100%
rename from src/rua_msg_factory.h
rename to include/osmocom/rua/rua_msg_factory.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 2779315..bb1ebbd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,9 +60,6 @@
 #
 bin_PROGRAMS = osmo-hnbgw
 
-noinst_HEADERS = context_map.h hnbgw.h hnbgw_cn.h \
-		 hnbgw_hnbap.h hnbgw_rua.h hnbgw_ranap.h
-
 osmo_hnbgw_SOURCES = hnbap_encoder.c hnbap_decoder.c hnbap_common.c \
 		     rua_encoder.c rua_decoder.c rua_common.c \
 		     rua_msg_factory.c \
diff --git a/src/context_map.c b/src/context_map.c
index 22eb605..052133c 100644
--- a/src/context_map.c
+++ b/src/context_map.c
@@ -24,8 +24,8 @@
 
 #include <osmocom/core/timer.h>
 
-#include "hnbgw.h"
-#include "context_map.h"
+#include <osmocom/iuh/hnbgw.h>
+#include <osmocom/iuh/context_map.h>
 
 /* is a given SCCP USER SAP Connection ID in use for a given CN link? */
 static int cn_id_in_use(struct hnbgw_cnlink *cn, uint32_t id)
diff --git a/src/hnbap_common.c b/src/hnbap_common.c
index 2cd6519..f8cfb13 100644
--- a/src/hnbap_common.c
+++ b/src/hnbap_common.c
@@ -25,7 +25,7 @@
 
 #include <osmocom/hnbap/HNBAP-PDU.h>
 #include <osmocom/hnbap/hnbap_common.h>
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 static const struct value_string hnbap_cause_radio_vals[] = {
 	{ CauseRadioNetwork_overload,		    "overload" },
diff --git a/src/hnbgw.c b/src/hnbgw.c
index 4f23e8d..d50e622 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -51,11 +51,11 @@
 #include <osmocom/sigtran/protocol/sua.h>
 #include <osmocom/sigtran/sccp_sap.h>
 
-#include "hnbgw.h"
-#include "hnbgw_hnbap.h"
-#include "hnbgw_rua.h"
-#include "hnbgw_cn.h"
-#include "context_map.h"
+#include <osmocom/iuh/hnbgw.h>
+#include <osmocom/iuh/hnbgw_hnbap.h>
+#include <osmocom/iuh/hnbgw_rua.h>
+#include <osmocom/iuh/hnbgw_cn.h>
+#include <osmocom/iuh/context_map.h>
 
 static const char * const osmo_hnbgw_copyright =
 	"OsmoHNBGW - Osmocom Home Node B Gateway implementation\r\n"
diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c
index 09b2726..e41788d 100644
--- a/src/hnbgw_cn.c
+++ b/src/hnbgw_cn.c
@@ -29,11 +29,11 @@
 #include <osmocom/sigtran/sccp_sap.h>
 #include <osmocom/sigtran/sccp_helpers.h>
 
-#include "hnbgw.h"
-#include "hnbgw_rua.h"
+#include <osmocom/iuh/hnbgw.h>
+#include <osmocom/iuh/hnbgw_rua.h>
 #include <osmocom/ranap/ranap_ies_defs.h>
 #include <osmocom/ranap/ranap_msg_factory.h>
-#include "context_map.h"
+#include <osmocom/iuh/context_map.h>
 
 /***********************************************************************
  * Outbound RANAP RESET to CN
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index c329fe4..7bf54c8 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -31,7 +31,7 @@
 #include <osmocom/hnbap/hnbap_common.h>
 #include <osmocom/ranap/iu_helpers.h>
 
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 #include <osmocom/hnbap/hnbap_ies_defs.h>
 
 #define IU_MSG_NUM_IES		32
diff --git a/src/hnbgw_ranap.c b/src/hnbgw_ranap.c
index dde1183..7a505a5 100644
--- a/src/hnbgw_ranap.c
+++ b/src/hnbgw_ranap.c
@@ -29,8 +29,8 @@
 
 #include "asn1helpers.h"
 
-#include "hnbgw.h"
-#include "hnbgw_rua.h"
+#include <osmocom/iuh/hnbgw.h>
+#include <osmocom/iuh/hnbgw_rua.h>
 #include <osmocom/ranap/ranap_common.h>
 #include <osmocom/ranap/ranap_ies_defs.h>
 #include <osmocom/ranap/ranap_msg_factory.h>
diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c
index fc22bfc..3f245b5 100644
--- a/src/hnbgw_rua.c
+++ b/src/hnbgw_rua.c
@@ -32,11 +32,11 @@
 
 #include "asn1helpers.h"
 
-#include "hnbgw.h"
-#include "hnbgw_ranap.h"
+#include <osmocom/iuh/hnbgw.h>
+#include <osmocom/iuh/hnbgw_ranap.h>
 #include <osmocom/rua/rua_common.h>
 #include <osmocom/rua/rua_ies_defs.h>
-#include "context_map.h"
+#include <osmocom/iuh/context_map.h>
 
 static int hnbgw_rua_tx(struct hnb_context *ctx, struct msgb *msg)
 {
diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c
index 1673c0c..2e3d1e9 100644
--- a/src/hnbgw_vty.c
+++ b/src/hnbgw_vty.c
@@ -22,8 +22,8 @@
 
 #include <osmocom/iuh/vty.h>
 
-#include "hnbgw.h"
-#include "context_map.h"
+#include <osmocom/iuh/hnbgw.h>
+#include <osmocom/iuh/context_map.h>
 
 static void *tall_hnb_ctx = NULL;
 static struct hnb_gw *g_hnb_gw = NULL;
diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c
index 2c80dd0..3736dce 100644
--- a/src/ranap_common_cn.c
+++ b/src/ranap_common_cn.c
@@ -29,7 +29,7 @@
 #include <osmocom/ranap/ranap_common_cn.h>
 #include <osmocom/ranap/ranap_ies_defs.h>
 
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 static int cn_ranap_rx_initiating_msg_co(void *ctx, RANAP_InitiatingMessage_t *imsg,
 					 ranap_message *message)
diff --git a/src/rua_common.c b/src/rua_common.c
index a5ab044..3c9d773 100644
--- a/src/rua_common.c
+++ b/src/rua_common.c
@@ -24,7 +24,7 @@
 #include <osmocom/core/msgb.h>
 
 #include <osmocom/rua/rua_common.h>
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 extern int asn1_xer_print;
 
diff --git a/src/rua_msg_factory.c b/src/rua_msg_factory.c
index 0bce326..268f6ac 100644
--- a/src/rua_msg_factory.c
+++ b/src/rua_msg_factory.c
@@ -3,9 +3,9 @@
 
 #include <osmocom/rua/rua_common.h>
 #include <osmocom/rua/rua_ies_defs.h>
-#include "rua_msg_factory.h"
+#include <osmocom/rua/rua_msg_factory.h>
 #include "asn1helpers.h"
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 
 struct msgb *rua_new_udt(struct msgb *inmsg)
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 2ba3e89..3a99681 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -1,9 +1,14 @@
-AM_CFLAGS = -g -I$(top_srcdir)/src -I$(top_srcdir)/include $(OSMOVTY_CFLAGS) $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS)
+AM_CFLAGS = -g -I$(top_srcdir)/src/tests \
+	-I$(top_srcdir)/include -I$(top_builddir)/include \
+	$(OSMOVTY_CFLAGS) $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) \
+	$(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS)
 
 COMMON_LIBS = $(OSMOVTY_LIBS) $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) -lsctp
 
 check_PROGRAMS = test-ranap test-helpers test-hnbap hnb-test dummy-cn
 
+noinst_HEADERS = test_common.h hnb-test.h hnb-test-layers.h
+
 HNBAP_FILES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c $(top_srcdir)/src/hnbap_encoder.c
 RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_srcdir)/src/rua_decoder.c $(top_srcdir)/src/rua_encoder.c $(top_srcdir)/src/rua_msg_factory.c
 
diff --git a/src/tests/dummy_cn_sua.c b/src/tests/dummy_cn_sua.c
index c2fc712..f9b4244 100644
--- a/src/tests/dummy_cn_sua.c
+++ b/src/tests/dummy_cn_sua.c
@@ -24,7 +24,7 @@
 #include <osmocom/ranap/ranap_ies_defs.h>
 #include <osmocom/ranap/ranap_common_cn.h>
 #include <osmocom/ranap/ranap_msg_factory.h>
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 int asn1_xer_print = 1;
 const char *cmdline_bind_addr = "127.0.0.1";
diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c
index 2c41199..d338077 100644
--- a/src/tests/hnb-test.c
+++ b/src/tests/hnb-test.c
@@ -54,7 +54,7 @@
 #include "hnb-test-layers.h"
 #include <osmocom/hnbap/hnbap_common.h>
 #include <osmocom/hnbap/hnbap_ies_defs.h>
-#include "rua_msg_factory.h"
+#include <osmocom/rua/rua_msg_factory.h>
 #include "asn1helpers.h"
 #include <osmocom/ranap/iu_helpers.h>
 #include "test_common.h"
diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c
index ce01b96..c70009b 100644
--- a/src/tests/test-ranap.c
+++ b/src/tests/test-ranap.c
@@ -32,7 +32,7 @@
 
 #include "test_common.h"
 
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 int asn1_xer_print = 1;
 
diff --git a/src/tests/test_common.c b/src/tests/test_common.c
index a79d5f5..5a37e7e 100644
--- a/src/tests/test_common.c
+++ b/src/tests/test_common.c
@@ -37,7 +37,7 @@
 #include <osmocom/core/talloc.h>
 #include <osmocom/core/logging.h>
 
-#include "hnbgw.h"
+#include <osmocom/iuh/hnbgw.h>
 
 void *talloc_asn1_ctx;
 

-- 
To view, visit https://gerrit.osmocom.org/787
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a82e029dcdc4df0a60a31271a4883393fe59234
Gerrit-PatchSet: 4
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels_test_account <neels at hofmeyr.de>



More information about the gerrit-log mailing list