diff --git a/bsc-nat/regen_makefile.sh b/bsc-nat/regen_makefile.sh index 6d0ac1272..a3c624312 100755 --- a/bsc-nat/regen_makefile.sh +++ b/bsc-nat/regen_makefile.sh @@ -4,12 +4,4 @@ MAIN=IPA_Test.ttcn FILES="*.ttcn SCCP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc" -ttcn3_makefilegen -l -f $MAIN $FILES -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 -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh $MAIN $FILES diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index 4e334d5e6..8b8fa435c 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -4,12 +4,4 @@ MAIN=BSC_Tests.ttcn FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc *.c" -ttcn3_makefilegen -l -f $MAIN $FILES -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 -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh $MAIN $FILES diff --git a/ggsn_tests/regen_makefile.sh b/ggsn_tests/regen_makefile.sh index cd2d95ae6..3970187c4 100755 --- a/ggsn_tests/regen_makefile.sh +++ b/ggsn_tests/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc GTPC_EncDec.cc GTPU_EncDec.cc GTP_CodecPort_CtrlFunctDef.cc ICMPv6_EncDec.cc IP_EncDec.cc Native_FunctionDefs.cc UDP_EncDec.cc" -ttcn3_makefilegen -l -f GGSN_Tests.ttcn $FILES -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 -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh GGSN_Tests.ttcn $FILES diff --git a/gprs_gb/regen_makefile.sh b/gprs_gb/regen_makefile.sh index 72fc632ba..b883d1ee0 100755 --- a/gprs_gb/regen_makefile.sh +++ b/gprs_gb/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn BSSGP_Helper.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc UD_PT.cc RLCMAC_EncDec.cc" -ttcn3_makefilegen -f Test.ttcn $FILES -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 -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh Test.ttcn $FILES diff --git a/lapdm/regen_makefile.sh b/lapdm/regen_makefile.sh index c80b0946f..c3601c808 100755 --- a/lapdm/regen_makefile.sh +++ b/lapdm/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn UD_PT.cc UD_PT.hh RLCMAC_EncDec.cc" -ttcn3_makefilegen -f L1CTL_Test.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan `pkg-config --libs libnetfilter_conntrack`/' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh L1CTL_Test.ttcn $FILES diff --git a/mgw/regen_makefile.sh b/mgw/regen_makefile.sh index 30f8c337a..9b94d69c6 100755 --- a/mgw/regen_makefile.sh +++ b/mgw/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc" -ttcn3_makefilegen -l -f MGCP_Test.ttcn $FILES -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 -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh MGCP_Test.ttcn $FILES diff --git a/msc_tests/regen_makefile.sh b/msc_tests/regen_makefile.sh index 7db539d04..132da3bd8 100755 --- a/msc_tests/regen_makefile.sh +++ b/msc_tests/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn SCCP_EncDec.cc SCTPasp_PT.cc TCCConversion.cc TCCInterface.cc" -ttcn3_makefilegen -l -f MSC_Tests.ttcn $FILES -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 -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh MSC_Tests.ttcn $FILES diff --git a/regen-makefile.sh b/regen-makefile.sh new file mode 100755 index 000000000..181469983 --- /dev/null +++ b/regen-makefile.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Wrapper around the TITAN make file generator to work in Debian. +# +# TITAN has a makefile generator, but somehow Debian seems to install +# the binaries to different paths without patching the make file +# generator, leading in inconsistent non-working Makefiles. +# +# The regexes below patch the generated Makefile to work on Debian 9 and +# unstable, so far tested with TITAN 6.1.0, 6.2.0 and 6.3.0 + +ttcn3_makefilegen -l -f $* +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 +sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile + +# for TITAN 6.3.0 +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/selftest/regen_makefile.sh b/selftest/regen_makefile.sh index 086441b7c..eefda4970 100755 --- a/selftest/regen_makefile.sh +++ b/selftest/regen_makefile.sh @@ -4,12 +4,4 @@ MAIN=Selftest.ttcn FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc *.c" -ttcn3_makefilegen -l -f $MAIN $FILES -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 -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh $MAIN $FILES diff --git a/sysinfo/regen_makefile.sh b/sysinfo/regen_makefile.sh index e06b8f500..9dd3b7f24 100755 --- a/sysinfo/regen_makefile.sh +++ b/sysinfo/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc IPL4_GSMTAP_CtrlFunctDef.cc TELNETasp_PT.cc" -ttcn3_makefilegen -l -f Test.ttcn $FILES -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 -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh Test.ttcn $FILES