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>
(cherry picked from commit eee820646d)
r14.0.x
OBATA Akio 3 years ago
committed by Slávek Banko
parent
commit
ed5c5ff654
Signed by: SlavekB GPG Key ID: 608F5293A04BE668
  1. 5
      qtinterface/interface_qt3/tmoc.cmake
  2. 5
      qtinterface/interface_tqt3/tmoc.cmake

5
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

5
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

Loading…
Cancel
Save