Index: qt4.jam =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/tools/qt4.jam,v retrieving revision 1.7 diff -u -r1.7 qt4.jam --- qt4.jam 19 Sep 2005 07:48:36 -0000 1.7 +++ qt4.jam 6 Nov 2005 20:33:03 -0000 @@ -1,3 +1,4 @@ + # Copyright 2002 Vladimir Prus # Copyright 2005 Alo Sarv # Distributed under the Boost Software License, Version 1.0. (See @@ -86,7 +87,10 @@ # The OBJ result type is a fake here too. generators.register [ new moc-h-generator - qt.moc.cpp : MOCCABLE_CPP : OBJ ] ; + qt4.moc.inc : MOCCABLE_CPP : OBJ ] ; + + generators.register [ new moc-h-generator + qt4.moc.inc : MOCCABLE_H : OBJ ] ; # Generates .cpp file from qrc file generators.register-standard qt4.rcc : QRC : CPP(qrc_%) ; @@ -233,7 +237,7 @@ name = [ $(sources[0]).name ] ; name = $(name:B) ; - local a = [ new action $(sources[1]) : qt4.moc.cpp : + local a = [ new action $(sources[1]) : qt4.moc.inc : $(property-set) ] ; local target = [ @@ -251,7 +255,6 @@ } } - # Query the installation directory # This is needed in at least two scenarios # First, when re-using sources from the Qt-Tree. @@ -269,17 +272,16 @@ # Qt4-moc has its c++-parser, so pass INCLUDES and DEFINES. actions moc { - $(.prefix)/bin/moc -I$(INCLUDES) -I$(DEFINES) -f $(>) -o $(<) + $(.prefix)/bin/moc -I$(INCLUDES) -D$(DEFINES) -f $(>) -o $(<) } # When moccing .cpp files, we don't need -f, otherwise generated # code will include .cpp and we'll get duplicated symbols. -actions moc.cpp +actions moc.inc { - $(.prefix)/bin/moc -I$(INCLUDES) -I$(DEFINES) $(>) -o $(<) + $(.prefix)/bin/moc -I$(INCLUDES) -D$(DEFINES) $(>) -o $(<) } - # Generates source files from resource files actions rcc { Index: types/qt.jam =================================================================== RCS file: /cvsroot/boost/boost/tools/build/v2/tools/types/qt.jam,v retrieving revision 1.2 diff -u -r1.2 qt.jam --- types/qt.jam 14 Sep 2005 06:26:45 -0000 1.2 +++ types/qt.jam 6 Nov 2005 20:33:03 -0000 @@ -5,5 +5,6 @@ type UI : ui ; type QRC : qrc ; type MOCCABLE_CPP ; +type MOCCABLE_H ; # Result of running moc. type MOC : moc : H ;