PDA

View Full Version : QMAKE run bash command



kemp
9th February 2007, 12:38
HI,

is it possible to execute bash commands within *.pro file?

I have to create some directories and there would be MKDIR usable.

Thanks.

jpn
9th February 2007, 12:45
system(command) (http://doc.trolltech.com/4.2/qmake-function-reference.html#system-command)

kemp
9th February 2007, 13:10
Thank you for the answer.

I want to that my *.pro file creates the makefiles in specific directories:

/myproject/myprofile.pro
/myproject/Linux/MakeFile.debug
/myproject/Linux/MakeFile.release

/myproject/Windows/MakeFile.debug
/myproject/Windows/MakeFile.release

How could i do that?

kemp
9th February 2007, 15:44
Does anybody know how to specify the output dir of MakeFiles?

jpn
9th February 2007, 15:49
May I ask, why?

kemp
9th February 2007, 16:00
I need this for subversion.

currentdir/profile.pro
So i need to run qmake and generate:

currentdir/Linux/MakeFile
currentdir/Linux/MakeFile.Debug
currentdir/Linux/MakeFile.Release

currentdir/Windows/MakeFile
currentdir/Windows/MakeFile.Debug
currentdir/Windows/MakeFile.Release

also i will then copy the current *.pro file in Linux and Windows

The nightlybuilds are then made seperate from currentdir/Linux and currentdir/windows

jacek
9th February 2007, 16:14
Does anybody know how to specify the output dir of MakeFiles?
How about qmake -o <file> or qmake ../profile.pro?

jpn
9th February 2007, 16:21
Personally I would avoid adding platform dependent makefiles into repository. Why not just checkout a fresh copy and let qmake generate the makefiles applicable for the platform in question? Sooner or later you forget to commit changed makefiles anyway.. ;)

kemp
9th February 2007, 16:35
Thanks for your help.