[PATCH] osmo-bts[master]: Move -I inside *INCDIR variable

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/.

Max gerrit-no-reply at lists.osmocom.org
Sun Jan 21 22:16:32 UTC 2018


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/5962

to look at the new patch set (#3).

Move -I inside *INCDIR variable

Previouslywe could end-up passing empty '-I' to compilerif corresponding
_INCDIR variable was not defined during the ./configure step. This is
apparently tolerated by gcc but still seems like a wrong thingto
do. Let's fix this by moving -I inside of *_INCDIR.

Change-Id: I80915e5756d1bf64d789cfd5341fdd417ca8eed9
---
M configure.ac
M src/osmo-bts-litecell15/Makefile.am
M src/osmo-bts-octphy/Makefile.am
M src/osmo-bts-sysmo/Makefile.am
M tests/sysmobts/Makefile.am
5 files changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/5962/3

diff --git a/configure.ac b/configure.ac
index fc9ace6..a695023 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,12 +77,12 @@
 	# --enable-sysmocom-bts was passed but no --with-sysmobts. Use default.
 	sysmobts_incdir="."
 fi
-AC_SUBST([SYSMOBTS_INCDIR], $sysmobts_incdir)
+AC_SUBST([SYSMOBTS_INCDIR], -I$sysmobts_incdir)
 AC_MSG_RESULT([$enable_sysmocom_bts])
 AM_CONDITIONAL(ENABLE_SYSMOBTS, test "x$enable_sysmocom_bts" = "xyes")
 if test "$enable_sysmocom_bts" = "yes"; then
 	oldCPPFLAGS=$CPPFLAGS
-	CPPFLAGS="$CPPFLAGS -I$SYSMOBTS_INCDIR -I$srcdir/include"
+	CPPFLAGS="$CPPFLAGS $SYSMOBTS_INCDIR -I$srcdir/include"
 	AC_CHECK_HEADER([sysmocom/femtobts/superfemto.h],[],
 			[AC_MSG_ERROR([sysmocom/femtobts/superfemto.h can not be found in $sysmobts_incdir])],
 			[#include <sysmocom/femtobts/superfemto.h>])
@@ -105,12 +105,12 @@
 		[enable_octphy="yes"],[enable_octphy="no"])
 AC_ARG_WITH([octsdr-2g], [AS_HELP_STRING([--with-octsdr-2g], [Location of the OCTSDR-2G API header files])],
 			 [octsdr2g_incdir="$withval"],[octsdr2g_incdir="`cd $srcdir; pwd`/src/osmo-bts-octphy/"])
-AC_SUBST([OCTSDR2G_INCDIR], $octsdr2g_incdir)
+AC_SUBST([OCTSDR2G_INCDIR], -I$octsdr2g_incdir)
 AC_MSG_RESULT([$enable_octphy])
 AM_CONDITIONAL(ENABLE_OCTPHY, test "x$enable_octphy" = "xyes")
 if test "$enable_octphy" = "yes" ; then
 	oldCPPFLAGS=$CPPFLAGS
-	CPPFLAGS="$CPPFLAGS -I$OCTSDR2G_INCDIR -I$srcdir/include"
+	CPPFLAGS="$CPPFLAGS $OCTSDR2G_INCDIR -I$srcdir/include"
 
 	AC_CHECK_HEADER([octphy/octvc1/gsm/octvc1_gsm_default.h],[],
 			[AC_MSG_ERROR([octphy/octvc1/gsm/octvc1_gsm_default.h can not be found in $octsdr2g_incdir])],
@@ -168,12 +168,12 @@
 		[enable_litecell15="yes"],[enable_litecell15="no"])
 AC_ARG_WITH([litecell15], [AS_HELP_STRING([--with-litecell15=INCLUDE_DIR], [Location of the litecell 1.5 API header files])],
 			 [litecell15_incdir="$withval"],[litecell15_incdir="$incdir"])
-AC_SUBST([LITECELL15_INCDIR], $litecell15_incdir)
+AC_SUBST([LITECELL15_INCDIR], -I$litecell15_incdir)
 AC_MSG_RESULT([$enable_litecell15])
 AM_CONDITIONAL(ENABLE_LC15BTS, test "x$enable_litecell15" = "xyes")
 if test "$enable_litecell15" = "yes"; then
 	oldCPPFLAGS=$CPPFLAGS
-	CPPFLAGS="$CPPFLAGS -I$LITECELL15_INCDIR -I$srcdir/include"
+	CPPFLAGS="$CPPFLAGS $LITECELL15_INCDIR -I$srcdir/include"
 	AC_CHECK_HEADER([nrw/litecell15/litecell15.h],[],
 			[AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found in $litecell15_incdir])],
 			[#include <nrw/litecell15/litecell15.h>])
@@ -183,7 +183,7 @@
 
 # Check for the sbts2050_header.h that was added after the 3.6 release
 oldCPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS -I$SYSMOBTS_INCDIR"
+CPPFLAGS="$CPPFLAGS $SYSMOBTS_INCDIR"
 AC_CHECK_HEADER([sysmocom/femtobts/sbts2050_header.h],
 		[sysmo_uc_header="yes"],[])
 CPPFLAGS=$oldCPPFLAGS
diff --git a/src/osmo-bts-litecell15/Makefile.am b/src/osmo-bts-litecell15/Makefile.am
index fdb794d..f30320f 100644
--- a/src/osmo-bts-litecell15/Makefile.am
+++ b/src/osmo-bts-litecell15/Makefile.am
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = subdir-objects 
 
-AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(LITECELL15_INCDIR)
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include $(LITECELL15_INCDIR)
 AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCODEC_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBGPS_CFLAGS) $(ORTP_CFLAGS) $(LIBSYSTEMD_CFLAGS)
 COMMON_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS) $(LIBOSMOCTRL_LIBS) $(ORTP_LIBS)
 
diff --git a/src/osmo-bts-octphy/Makefile.am b/src/osmo-bts-octphy/Makefile.am
index 9ca9e44..ccdafaa 100644
--- a/src/osmo-bts-octphy/Makefile.am
+++ b/src/osmo-bts-octphy/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(OCTSDR2G_INCDIR)
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include $(OCTSDR2G_INCDIR)
 AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCODEC_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(ORTP_CFLAGS)
 COMMON_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS) $(LIBOSMOCTRL_LIBS) $(ORTP_LIBS)
 
diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am
index b837d3a..8e03b77 100644
--- a/src/osmo-bts-sysmo/Makefile.am
+++ b/src/osmo-bts-sysmo/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(SYSMOBTS_INCDIR)
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include $(SYSMOBTS_INCDIR)
 AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCODEC_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBGPS_CFLAGS) $(ORTP_CFLAGS)
 COMMON_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS) $(LIBOSMOCTRL_LIBS) $(ORTP_LIBS)
 
diff --git a/tests/sysmobts/Makefile.am b/tests/sysmobts/Makefile.am
index 2a57b2b..5f27116 100644
--- a/tests/sysmobts/Makefile.am
+++ b/tests/sysmobts/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_srcdir)/src/osmo-bts-sysmo -I$(SYSMOBTS_INCDIR)
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_srcdir)/src/osmo-bts-sysmo $(SYSMOBTS_INCDIR)
 AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCODEC_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(ORTP_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_LIBS) $(ORTP_LIBS)
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I80915e5756d1bf64d789cfd5341fdd417ca8eed9
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list