summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2019-01-13 18:09:58 +0900
committerSlávek Banko <slavek.banko@axis.cz>2019-01-13 12:47:27 +0100
commited5c5ff654b6568fc5fc559b55ad8589fd890fe5 (patch)
treeee57dba2ace043422b68cab1495b80911e023d23
parent6a81255a4f7432b433f03aa0e2bd0f75ebd9d54d (diff)
downloadtqtinterface-ed5c5ff654b6568fc5fc559b55ad8589fd890fe5.tar.gz
tqtinterface-ed5c5ff654b6568fc5fc559b55ad8589fd890fe5.zip
Prevent to use GNU sed extension feature
It is GNU sed extension feature to use "\n" in insert string, so it should be replaced with portable way. This resolves bug 2986. Signed-off-by: OBATA Akio <obache@wizdas.com> (cherry picked from commit eee820646dd61ff8c18aba1d97afd798c96b7116)
-rwxr-xr-xqtinterface/interface_qt3/tmoc.cmake5
-rwxr-xr-xqtinterface/interface_tqt3/tmoc.cmake5
2 files changed, 8 insertions, 2 deletions
diff --git a/qtinterface/interface_qt3/tmoc.cmake b/qtinterface/interface_qt3/tmoc.cmake
index 087fbdb..5321484 100755
--- a/qtinterface/interface_qt3/tmoc.cmake
+++ b/qtinterface/interface_qt3/tmoc.cmake
@@ -12,7 +12,10 @@ if [ -f @BIN_INSTALL_DIR@/tqt-replace-stream ]; then
out_file="$3"
@BIN_INSTALL_DIR@/tqt-replace-stream "${input_file}" | \
@MOC_EXECUTABLE@ | \
- sed "/#include <qmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \
+ sed "/#include <qmetaobject.h>/ i\\
+#undef QT_NO_COMPAT\\
+#include \"${input_file}\"\\
+" \
> "${out_file}"
fi
else
diff --git a/qtinterface/interface_tqt3/tmoc.cmake b/qtinterface/interface_tqt3/tmoc.cmake
index 8c7cfcc..c3fe0a2 100755
--- a/qtinterface/interface_tqt3/tmoc.cmake
+++ b/qtinterface/interface_tqt3/tmoc.cmake
@@ -12,7 +12,10 @@ if [ -f @BIN_INSTALL_DIR@/tqt-replace-stream ]; then
out_file="$3"
@BIN_INSTALL_DIR@/tqt-replace-stream "${input_file}" | \
@MOC_EXECUTABLE@ | \
- sed "/#include <ntqmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \
+ sed "/#include <ntqmetaobject.h>/ i\\
+#undef QT_NO_COMPAT\\
+#include \"${input_file}\"\\
+" \
> "${out_file}"
fi
else