From kde-devel Sat Jun 01 21:56:21 2002 From: Ravikiran Rajagopal Date: Sat, 01 Jun 2002 21:56:21 +0000 To: kde-devel Subject: Hack fixing --enable-final moc generation X-MARC-Message: https://marc.info/?l=kde-devel&m=102296863221099 Hello, Since quite a few people seem to have problems with the --enable-final flag and moc file generation, here is a simple hack to add to your build script that works around this problem. Note that this is NOT a true solution; this is merely a hack that adds all mocs to the default target. Note that this script is written for bash, and should be executed from the toplevel build directory (e.g., build/kdelibs) after running configure. Here's the relevant part from my build script: ----------------------------------------------------------------------------- if [ "x$ENABLEFINAL" == "xyes" ]; then CONFIGOPTS="$CONFIGOPTS --enable-final" fi echo "$CONFIGOPTS" ( $SRCDIR/$arg/configure $CONFIGOPTS 2>&1 ) | tee -a $LOGFILE # Hack to fix moc file generation when enable-final is used. if [ "x$ENABLEFINAL" == "xyes" ]; then for f in $(find . -name Makefile -print); do for x in $(grep -E "^[a-zA-Z0-9_]*\.moc(.cpp)*" $f -o); do cmd="perl -pi -e 's,^all:,all: $x,' $f"; eval $cmd ; done; done fi ( make && make install ) | tee -a $LOGFILE ----------------------------------------------------------------------------- I have tested this on a RH7.3 machine, with all the standard programming accoutrements. If you find this useful (or if you find this buggy) please drop me a line. Ravi >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<