How have you defined your extra processing in your PRO file?
This works for me:
fakecompiler.name = Test Compiler
fakecompiler.input = FAKEINPUTS
fakecompiler.commands = fakeit.sh ${QMAKE_FILE_IN}
fakecompiler.output = ${QMAKE_FILE_IN}.cpp
fakecompiler.variable_out = SOURCES
fakecompiler.clean = ${QMAKE_FILE_IN}.cpp ${QMAKE_FILE_IN}.h
QMAKE_EXTRA_COMPILERS += fakecompiler
TEMPLATE = app
SOURCES += main.cpp
FAKEINPUTS += something.fake
fakecompiler.name = Test Compiler
fakecompiler.input = FAKEINPUTS
fakecompiler.commands = fakeit.sh ${QMAKE_FILE_IN}
fakecompiler.output = ${QMAKE_FILE_IN}.cpp
fakecompiler.variable_out = SOURCES
fakecompiler.clean = ${QMAKE_FILE_IN}.cpp ${QMAKE_FILE_IN}.h
QMAKE_EXTRA_COMPILERS += fakecompiler
TEMPLATE = app
SOURCES += main.cpp
FAKEINPUTS += something.fake
To copy to clipboard, switch view to plain text mode
(fakeit.sh generates a do nothing FILE.cpp and FILE.h from the given file name)
First run:
chrisw@newton /tmp/test $ ls
fakeit.sh main.cpp something.fake test.pro
chrisw@newton /tmp/test $ qmake
chrisw@newton /tmp/test $ make
g++ -c -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o main.o main.cpp
make: Circular something.fake <- something.fake.o dependency dropped.
fakeit.sh something.fake
g++ -c -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o something.fake.o something.fake.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/lib64/qt4 -o test main.o something.fake.o -L/usr/lib64/qt4 -lQtGui -L/usr/lib64 -L/usr/lib64/qt4 -L/usr/X11R6/lib -lQtCore -lgthread-2.0 -lrt -lglib-2.0 -lpthread
chrisw@newton /tmp/test $ ls
fakeit.sh main.cpp something.fake test.pro
chrisw@newton /tmp/test $ qmake
chrisw@newton /tmp/test $ make
g++ -c -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o main.o main.cpp
make: Circular something.fake <- something.fake.o dependency dropped.
fakeit.sh something.fake
g++ -c -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o something.fake.o something.fake.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/lib64/qt4 -o test main.o something.fake.o -L/usr/lib64/qt4 -lQtGui -L/usr/lib64 -L/usr/lib64/qt4 -L/usr/X11R6/lib -lQtCore -lgthread-2.0 -lrt -lglib-2.0 -lpthread
To copy to clipboard, switch view to plain text mode
Second run:
chrisw@newton /tmp/test $ make
make: Circular something.fake <- something.fake.o dependency dropped.
make: Nothing to be done for `first'.
chrisw@newton /tmp/test $ make
make: Circular something.fake <- something.fake.o dependency dropped.
make: Nothing to be done for `first'.
To copy to clipboard, switch view to plain text mode
Third run:
chrisw@newton /tmp/test $ touch something.fake
chrisw@newton /tmp/test $ make
make: Circular something.fake <- something.fake.o dependency dropped.
fakeit.sh something.fake
g++ -c -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o something.fake.o something.fake.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/lib64/qt4 -o test main.o something.fake.o -L/usr/lib64/qt4 -lQtGui -L/usr/lib64 -L/usr/lib64/qt4 -L/usr/X11R6/lib -lQtCore -lgthread-2.0 -lrt -lglib-2.0 -lpthread
chrisw@newton /tmp/test $ touch something.fake
chrisw@newton /tmp/test $ make
make: Circular something.fake <- something.fake.o dependency dropped.
fakeit.sh something.fake
g++ -c -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o something.fake.o something.fake.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/lib64/qt4 -o test main.o something.fake.o -L/usr/lib64/qt4 -lQtGui -L/usr/lib64 -L/usr/lib64/qt4 -L/usr/X11R6/lib -lQtCore -lgthread-2.0 -lrt -lglib-2.0 -lpthread
To copy to clipboard, switch view to plain text mode
I haven't tracked down the circular reference, but it doesn't seem harmful.
Bookmarks