summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2019-01-13 18:09:58 +0900
committerOBATA Akio <obache@wizdas.com>2019-01-14 05:24:47 +0900
commiteee820646dd61ff8c18aba1d97afd798c96b7116 (patch)
tree1da38bccc32bdc8cb43427b5a81a2c840e474422
parent7e133e7dbcef070455964ef0bf38663709f79fbc (diff)
downloadtqtinterface-eee820646dd61ff8c18aba1d97afd798c96b7116.tar.gz
tqtinterface-eee820646dd61ff8c18aba1d97afd798c96b7116.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>
-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 8b55ef5..dda16b4 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 TQT_NO_COMPAT\n#include \"${input_file}\"" \
+ sed "/#include <ntqmetaobject.h>/ i\\
+#undef TQT_NO_COMPAT\\
+#include \"${input_file}\"\\
+" \
> "${out_file}"
fi
else