Change in osmo-ttcn3-hacks[master]: Fix compilation on eclipse-titan 6.5.1

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 Feb 15 07:49:54 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12908 )

Change subject: Fix compilation on eclipse-titan 6.5.1
......................................................................

Fix compilation on eclipse-titan 6.5.1

Newer eclipse-titan makefilegen already sets CPPFLAGS like this:

CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include$(TTCN3_SUBDIR)

where TTCN3_SUBDIR expands to '/titan' and TTCN3_DIR to '/usr'

If we add /titan after include we end up with
-I/usr/include/titan/titan/ which will cause the compile to fail due to
a missing TTCN3.hh include.

Check the titan version so we retain backwards compatibility.

Change-Id: If9fef29ce243be112d3735f0236335197f8f140f
Related: OS#3179
Sponsored-by: On-Waves ehf.
---
M regen-makefile.sh
1 file changed, 8 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Max: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/regen-makefile.sh b/regen-makefile.sh
index 5a4dd4c..77fcb6c 100755
--- a/regen-makefile.sh
+++ b/regen-makefile.sh
@@ -25,13 +25,20 @@
 fi
 
 ttcn3_makefilegen -p -l -f $*
+
+TITAN_VERSION=$(ttcn3_makefilegen -v 2>&1 |grep "Product number" |cut --delimiter="/" -f 2-| sed -e "s/[A-Z ]//g")
+
 sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile
 sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile
 #sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile
 
 # The -DMAKEDEPEND_RUN is a workaround for Debian packaging issue,
 # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 for details
-sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -DUSE_SCTP -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile
+if [ $(($TITAN_VERSION >= 65)) = 1 ]; then
+	sed -i -e 's/CPPFLAGS = -D$(PLATFORM)/CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -DUSE_SCTP/' Makefile
+else
+	sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -DUSE_SCTP -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile
+fi
 
 #remove -Wall from CXXFLAGS: we're not interested in generic warnings for autogenerated code cluttering the logs
 sed -i -e 's/-Wall//' Makefile

-- 
To view, visit https://gerrit.osmocom.org/12908
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If9fef29ce243be112d3735f0236335197f8f140f
Gerrit-Change-Number: 12908
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190215/6cd3602c/attachment.htm>


More information about the gerrit-log mailing list