Browse Source

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>
OBATA Akio 3 months ago
parent
commit
eee820646d
2 changed files with 8 additions and 2 deletions
  1. 4
    1
      qtinterface/interface_qt3/tmoc.cmake
  2. 4
    1
      qtinterface/interface_tqt3/tmoc.cmake

+ 4
- 1
qtinterface/interface_qt3/tmoc.cmake View File

@@ -12,7 +12,10 @@ if [ -f @BIN_INSTALL_DIR@/tqt-replace-stream ]; then
12 12
 		out_file="$3"
13 13
 		@BIN_INSTALL_DIR@/tqt-replace-stream "${input_file}" | \
14 14
 	        @MOC_EXECUTABLE@ | \
15
-	        sed "/#include <qmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \
15
+	        sed "/#include <qmetaobject.h>/ i\\
16
+#undef QT_NO_COMPAT\\
17
+#include \"${input_file}\"\\
18
+" \
16 19
 		> "${out_file}"
17 20
 	fi
18 21
 else

+ 4
- 1
qtinterface/interface_tqt3/tmoc.cmake View File

@@ -12,7 +12,10 @@ if [ -f @BIN_INSTALL_DIR@/tqt-replace-stream ]; then
12 12
 		out_file="$3"
13 13
 		@BIN_INSTALL_DIR@/tqt-replace-stream "${input_file}" | \
14 14
 	        @MOC_EXECUTABLE@ | \
15
-	        sed "/#include <ntqmetaobject.h>/ i #undef TQT_NO_COMPAT\n#include \"${input_file}\"" \
15
+	        sed "/#include <ntqmetaobject.h>/ i\\
16
+#undef TQT_NO_COMPAT\\
17
+#include \"${input_file}\"\\
18
+" \
16 19
 		> "${out_file}"
17 20
 	fi
18 21
 else

Loading…
Cancel
Save