Skip to content
Snippets Groups Projects

[internal #0] fix: makefile update patch to add -e -N to COMPILER_FLAGS (if...

Merged József Gyürüsi requested to merge jgyrsi/titan.Libraries.CLL:master into master
1 file
+ 6
6
Compare changes
  • Side-by-side
  • Inline
@@ -12,16 +12,16 @@
TTCN_COMPILER_SUPPORTS_E="$(compiler --help 2>&1 | grep "\-e:")"
TTCN_COMPILER_SUPPORTS_N="$(compiler --help 2>&1 | grep "\-N:")"
SED_CMD=""
if [[ "$TTCN_COMPILER_SUPPORTS_E" != "" ]]
then
TTCN_COMPILER_SUPPORTS_E='-e'
# only add if not already there:
SED_CMD=$(printf "$SED_CMD\n"'/-e/!s/COMPILER_FLAGS =/COMPILER_FLAGS = -e/g')
fi
if [[ "$TTCN_COMPILER_SUPPORTS_N" != "" ]]
then
TTCN_COMPILER_SUPPORTS_N='-N'
# only add if not already there:
SED_CMD=$(printf "$SED_CMD\n"'/-N/!s/COMPILER_FLAGS =/COMPILER_FLAGS = -N/g')
fi
# only add if not already there:
SED_CMD_N="/$TTCN_COMPILER_SUPPORTS_N/!s/COMPILER_FLAGS =/COMPILER_FLAGS = $TTCN_COMPILER_SUPPORTS_N/g"
SED_CMD_E="/$TTCN_COMPILER_SUPPORTS_E/!s/COMPILER_FLAGS =/COMPILER_FLAGS = $TTCN_COMPILER_SUPPORTS_E/g"
sed -e "$SED_CMD_N" | sed -e "$SED_CMD_E"
sed -e "$SED_CMD"
Loading