Qt-interest Archive, August 2006
qmake - why .o files in same directory?
Message 1 in thread
Hello,
I have some minor problems with the makefile which qmake is creating.
All in all it works all fine, but on compiling all created .o-files are
not left in the same folder as their source but put into the same
directory as the .pro file. What I actually would prefer is to have
the .o files with their headers and sources so how can I change this? I
searched google and examined the resulting makefile without any
results..
Furthermore I have the feeling that on 'make' it starts all over even if
I have only changed one or two files. Can that be or am I wrong here? If
this is really the case, how can I change it?
Thanks once more, any help is highly appreciated ;)
Tim
--
[ signature omitted ]
Message 2 in thread
Tim Kietzmann a écrit :
> Hello,
> I have some minor problems with the makefile which qmake is creating.
> All in all it works all fine, but on compiling all created .o-files are
> not left in the same folder as their source but put into the same
> directory as the .pro file. What I actually would prefer is to have
> the .o files with their headers and sources so how can I change this? I
> searched google and examined the resulting makefile without any
> results..
>
>
I guess your sources are in various subdirs. You can try the
OBJECTS_DIR variable in qmake.pro, but I believe that you can only
select a common dir (see qmake's help).
> Furthermore I have the feeling that on 'make' it starts all over even if
> I have only changed one or two files. Can that be or am I wrong here? If
> this is really the case, how can I change it?
>
This looks more like a time sync problem on your machine. Can you tell
more about your platform?
> Thanks once more, any help is highly appreciated ;)
> Tim
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
>
--
[ signature omitted ]
Message 3 in thread
Hello,
as far as I read is the OBJECTS_DIR only for temporary object-files
(tmp) and not for the final ones. Do you all not bother that you have a
directory full ob objects in the end? Am I the only one who likes it
better if the object is at the same location as the source?
Thanks for the hint Xavier,... Has anyone got another idea?
Thanks once more
Tim
On Thu, 2006-08-17 at 15:40 +0200, Xavier DÃcoret wrote:
> Tim Kietzmann a Ãcrit :
> > Hello,
> > I have some minor problems with the makefile which qmake is creating.
> > All in all it works all fine, but on compiling all created .o-files are
> > not left in the same folder as their source but put into the same
> > directory as the .pro file. What I actually would prefer is to have
> > the .o files with their headers and sources so how can I change this? I
> > searched google and examined the resulting makefile without any
> > results..
> >
> >
> I guess your sources are in various subdirs. You can try the
> OBJECTS_DIR variable in qmake.pro, but I believe that you can only
> select a common dir (see qmake's help).
> > Furthermore I have the feeling that on 'make' it starts all over even if
> > I have only changed one or two files. Can that be or am I wrong here? If
> > this is really the case, how can I change it?
> >
> This looks more like a time sync problem on your machine. Can you tell
> more about your platform?
> > Thanks once more, any help is highly appreciated ;)
> > Tim
> >
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
> >
> >
> >
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]
Message 4 in thread
On Aug 17, 2006, at 10:00 AM, Tim Kietzmann wrote:
> Hello,
> as far as I read is the OBJECTS_DIR only for temporary object-files
> (tmp) and not for the final ones. Do you all not bother that you
> have a
> directory full ob objects in the end? Am I the only one who likes it
> better if the object is at the same location as the source?
>
> Thanks for the hint Xavier,... Has anyone got another idea?
>
> Thanks once more
> Tim
>
As an alternative to qmake we use cmake (www.cmake.org). It provides
support for Qt3 and Qt4 on multiple platforms and compilers and
supports (in fact prefers) out of source builds so that your original
source directory is clean. You will have to figure out the cmake
syntax but once you understand the syntax it is pretty straight forward.
Karl
--
[ signature omitted ]
Message 5 in thread
On 17.08.06 10:21:42, Karl Merkley wrote:
> On Aug 17, 2006, at 10:00 AM, Tim Kietzmann wrote:
> >as far as I read is the OBJECTS_DIR only for temporary object-files
> >(tmp) and not for the final ones. Do you all not bother that you have a
> >directory full ob objects in the end? Am I the only one who likes it
> >better if the object is at the same location as the source?
> >
> >Thanks for the hint Xavier,... Has anyone got another idea?
>
> As an alternative to qmake we use cmake (www.cmake.org). It provides support
> for Qt3
That's what I've always wanted to know. Now I can convert one or two
projects from qmake to cmake :-)
> and Qt4 on multiple platforms and compilers and supports (in fact
> prefers) out of source builds so that your original source directory is clean.
Well, that is what he got now, the object files are in foo, while the
sources are all in bar. He want's it the other way around, though I have
no idea what the benefit might be....
> You will have to figure out the cmake syntax but once you understand the
> syntax it is pretty straight forward.
Actually I find the "language" of cmake quite natural. I recently
changed a few CMakeLists.txt in kdevelop4 for some local stuff and it
was dead-easy. I didn't need to read _any_ tutorial stuff to understand
the logic of the existing files.
Andreas
--
[ signature omitted ]
Message 6 in thread
On 17.08.06 18:00:44, Tim Kietzmann wrote:
> Hello,
> as far as I read is the OBJECTS_DIR only for temporary object-files
> (tmp) and not for the final ones.
Wrong, OBJECTS_DIR contains any .o files that are generated by the
compiler.
> Do you all not bother that you have a
> directory full ob objects in the end?
Actually I think most of us like it if their source dirs stay clean and
all the building stuff ends up in a builddir that can easily be rm'ed.
Also most of us don't care about the intermediate files, i.e. anything
generated from a program out of the source that is not "the final
result" (i.e. executable or library).
> Am I the only one who likes it
> better if the object is at the same location as the source?
Could you enlighten me: What is the benefit of this?
Andreas
--
[ signature omitted ]
Message 7 in thread
On Thu, 2006-08-17 at 19:21 +0200, Andreas Pakulat wrote:
> On 17.08.06 18:00:44, Tim Kietzmann wrote:
> > Hello,
> > as far as I read is the OBJECTS_DIR only for temporary object-files
> > (tmp) and not for the final ones.
>
> Wrong, OBJECTS_DIR contains any .o files that are generated by the
> compiler.
>
> > Do you all not bother that you have a
> > directory full ob objects in the end?
>
> Actually I think most of us like it if their source dirs stay clean and
> all the building stuff ends up in a builddir that can easily be rm'ed.
>
> Also most of us don't care about the intermediate files, i.e. anything
> generated from a program out of the source that is not "the final
> result" (i.e. executable or library).
>
> > Am I the only one who likes it
> > better if the object is at the same location as the source?
>
> Could you enlighten me: What is the benefit of this?
Hm, I never thought of it this way, I just thought found that having all
files of the same type (class) i.e. header, class and object should be
in the same location... But you are right that it might as well be nice
to have all builds in the same location... Might be a question of taste.
However, I can now as well appreciate having a clean source-folder :)
Greetings
Tim
>
> Andreas
>
--
[ signature omitted ]
Message 8 in thread
Tim Kietzmann wrote:
> Hello,
> as far as I read is the OBJECTS_DIR only for temporary object-files
> (tmp) and not for the final ones. Do you all not bother that you have a
> directory full ob objects in the end? Am I the only one who likes it
> better if the object is at the same location as the source?
You are probably not alone but I certainly dislike any build products
in my source tree.
Regard,
Andre'
--
[ signature omitted ]
Message 9 in thread
> -----Original Message-----
> From: André Pönitz [mailto:andre@xxxxxxx]
> Sent: Friday, August 18, 2006 1:21 AM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: RE: qmake - why .o files in same directory?
>
>
> Tim Kietzmann wrote:
> > Hello,
> > as far as I read is the OBJECTS_DIR only for temporary object-files
> > (tmp) and not for the final ones. Do you all not bother that you have a
> > directory full ob objects in the end? Am I the only one who likes it
> > better if the object is at the same location as the source?
>
> You are probably not alone but I certainly dislike any build products
> in my source tree.
>
> Regard,
> Andre'
Heck... I don't even like them in the same directory structure....
I like all output files to be place in a parallel directory tree. Ie I would have a Src, win32, i86_r9, sunos, hpux etc... Each with identical subtree structures..
Scott
--
[ signature omitted ]
Message 10 in thread
Tim Kietzmann wrote:
> I have some minor problems with the makefile which qmake is creating.
> All in all it works all fine, but on compiling all created .o-files are
> not left in the same folder as their source but put into the same
> directory as the .pro file. What I actually would prefer is to have
> the .o files with their headers and sources so how can I change this? I
> searched google and examined the resulting makefile without any
> results..
Have you tried setting the OBJECTS_DIR variable in your .pro file?
http://doc.trolltech.com/4.1/qmake-variable-reference.html#objects-dir
> Furthermore I have the feeling that on 'make' it starts all over even if
> I have only changed one or two files. Can that be or am I wrong here? If
> this is really the case, how can I change it?
This shouldn't be the case unless you've modified the .pro file in the
meantime.
--
[ signature omitted ]