[Qt-interest] setting makefile variable from .pro file

Pete Black theblackpeter at gmail.com
Wed Feb 4 23:45:39 CET 2009


andrew.m.goth at l-3com.com wrote:
> Pete Black wrote:
>> andrew.m.goth at l-3com.com wrote:
>>> Perhaps you were thinking of INSTALL_DIR?
> 
> I took a second look.  INSTALL_DIR is the command that is used for
> copying directories.  It is not the name of a directory.
> 
>> Basically I'm looking for something similar to "./configure --prefix".
>> Looking at the generated make file INSTALL_ROOT is prefixed to every
>> installation path. For instance, I have:
>>
>> install_target: first FORCE
>> 	@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR)
>> $(INSTALL_ROOT)/usr/local/bin/ -$(INSTALL_PROGRAM)
>> ...
> 
> I don't have that in any of my generated makefiles.  You must be using
> an option I haven't needed yet.

That's very strange. I'm just calling qmake on the .pro files I have and
there isn't that much fancy stuff in. I'm making an effor to try to keep
things simple...

> After scouring the documentation (with grep, hehehe) and checking the
> qmake sources, I have concluded that INSTALL_ROOT is intended to only be
> set by the user of the makefile.  There is no mechanism for it to be set
> from qmake.  Here is the only mention I can find in the documentation:
> 
> http://doc.trolltech.com/4.4/qt-embedded-install.html#step-3-building-th
> e-library

> INSTALL_ROOT is indeed like configure --prefix, but you can't provide a
> default from your PRO file.  If your package has a configure script, you
> can make your configure script modify the makefile after qmake generates
> it.

Thanks for taking the time. Looks like I might have to create a custom
make target that sets INSTALL_ROOT or script it.

> Are you sure INSTALL_DIR is what you want?  Why not DESTDIR?

Judging by the makefile I get INSTALL_ROOT would be the best. But if you
say that you don't see that then I think I have to double check. I'll
play around with the other variables and see if that changes anything.
Perhaps this is OS or Qt version related? I'm on Gentoo and have:

  $ qmake -v
  QMake version 2.01a
  Using Qt version 4.4.2 in /usr/lib64/qt4

Anyway, thanks again.
Pete



More information about the Qt-interest-old mailing list