A list was changed during iteration, causing an unnecessary dependency to be
kept, and triggering subsequent rebuilds. This only occured with multiple .moc included.
I'm cross-compiling the qt4 demo with::
export QT4_ROOT=/path/to/win32/qt4
QT4_INCLUDES=$QT4_ROOT/include QT4_XCOMPILE=1 QT4_BIN="$PWD" QT4_LIBDIR=$QT4_ROOT/lib \
CXX=i686-pc-mingw32-g++ CC=i686-pc-mingw32-gcc CFLAGS=-g CXXFLAGS=-g waf configure
I made a simple wrapper for the qt tools::
lrwxrwxrwx 1 cJ cJ 7 May 12 14:08 moc -> wrapper*
lrwxrwxrwx 1 cJ cJ 7 May 12 14:02 qmake -> wrapper*
lrwxrwxrwx 1 cJ cJ 7 May 12 14:09 rcc -> wrapper*
lrwxrwxrwx 1 cJ cJ 7 May 12 14:04 uic -> wrapper*
-rwxrwxr-x 1 cJ cJ 318 May 12 14:04 wrapper*
Wrapper contents::
#!/usr/bin/env python
# Calls win32 Qt tools via wine (too lazy to install the same version)
import sys, os, subprocess
QT4_ROOT = os.environ["QT4_ROOT"]
tool = os.path.basename(sys.argv[0])
args = sys.argv[1:]
cmd = [
"wine",
"%s/bin/%s" % (QT4_ROOT, tool),
] + args
sys.exit(subprocess.call(cmd))
Note: disabled localization in qt4 demo wscript as I don't need it.