I am trying to get trift framework samples to build in Qt qmake and I see a problem when I rebuild my project. My question is:
- What am I doing wrong that causes the makefile to concatenate all .out files along with spaces in the rm call? ''
First, I will show the output, and then go into the specification.
Error: - see the first command "rm" rm -fthrifttest .... ( does each file name run together? Why?)
06:09:37: Running steps for project thrifttest...
06:09:37: Starting: "/usr/bin/make" clean
/opt/Qt/5.4/gcc/bin/qmake -spec linux-g++ CONFIG+=debug -o Makefile ../../thrifttest/idl/idl.pro
rm -fthrifttest/idl/tutorial.outthrifttest/idl/shared.out
rm -f Calculator.o shared_constants.o shared_types.o SharedService.o tutorial_constants.o tutorial_types.o
rm -f *~ core *.core
rm: invalid option -- 't'
Try 'rm --help' for more information.
make: [compiler_idl_clean] Error 1 (ignored)
06:09:37: The process "/usr/bin/make" exited normally.
06:09:37: Starting: "/opt/Qt/5.4/gcc/bin/qmake" /home/developer/dev/thrifttest/idl/idl.pro -r -spec linux-g++ CONFIG+=debug
06:09:37: The process "/opt/Qt/5.4/gcc/bin/qmake" exited normally.
06:09:37: Starting: "/usr/bin/make"
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIC -I../../thrifttest/idl -I. -I/opt/Qt/5.4/gcc/mkspecs/linux-g++ -o Calculator.o ../../thrifttest/idl/gen-cpp/Calculator.cpp
....
etc.
.pro file design - Qt version 5.4
QT -= core
QT -= gui
TEMPLATE = lib
THRIFTSOURCES = \
tutorial.thrift \
shared.thrift
idl.output = $${IN_PWD}/${QMAKE_FILE_BASE}.out
idl.input = THRIFTSOURCES
idl.commands = thrift -r -o "$${IN_PWD}" --gen cpp ${QMAKE_FILE_IN}$$escape_expand(\\n\\t) \
touch $${IN_PWD}/${QMAKE_FILE_BASE}.out$$escape_expand(\\n\\t)
idl.name = thrift-compiler
idl.variable_out = JUNK
idl.CONFIG = no_link target_predeps
QMAKE_EXTRA_COMPILERS += idl
TESTS = $$files($${IN_PWD}/gen-cpp/*.cpp)
SKELS = $$files($${IN_PWD}/gen-cpp/*.skeleton.cpp)
TESTS -= $$SKELS
HEADERS = $$files($${IN_PWD}/gen-cpp/*.h)
SOURCES = $$TESTS
Directory structure of source files
βββ idl
β βββ gen-cpp <--- generated files go in here
β β βββ Calculator.cpp
β β βββ Calculator.h
β β βββ Calculator_server.skeleton.cpp
β β βββ shared_constants.cpp
β β βββ shared_constants.h
β β βββ SharedService.cpp
β β βββ SharedService.h
β β βββ SharedService_server.skeleton.cpp
β β βββ shared_types.cpp
β β βββ shared_types.h
β β βββ tutorial_constants.cpp
β β βββ tutorial_constants.h
β β βββ tutorial_types.cpp
β β βββ tutorial_types.h
β βββ idl.pro
β βββ shared.out
β βββ shared.thrift
β βββ tutorial.out
β βββ tutorial.thrift
source
share