[mythtv] qmake weirdness

Jim Paris jim at jtan.com
Sat Apr 19 00:22:59 EDT 2003


This may be a problem with qmake, or a problem with the .pro files in
mythtv, I don't know:

I'm seeing some qmake weirdness that is causing me problems.  The
generated Makefiles are different in places that they shouldn't be,
depending on the directory that the Makefile gets generated in.

$ pwd
/tmp/test
$ cat bad.pro
target.path = /tmp/lib
INSTALLS = target
$ qmake -o Makefile.bad bad.pro
$ grep INSTALL_ROOT Makefile.bad | head -1
	@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)../lib/ || $(MKDIR) $(INSTALL_ROOT)../lib/

$ pwd
/tmp/test
$ cat good.pro
target.path = /usr/lib
INSTALLS = target
$ qmake -o Makefile.good good.pro
$ grep INSTALL_ROOT Makefile.good | head -1
	@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/

$ pwd
/usr/test
$ cat good2.pro
target.path = /tmp/lib
INSTALLS = target
$ qmake -o Makefile.good2 good2.pro
$ grep INSTALL_ROOT Makefile.good2 | head -1
	@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/tmp/lib/ || $(MKDIR) $(INSTALL_ROOT)/tmp/lib/

As you can see, if any prefix of the target path includes any prefix
of the Makefile's output, then the target in the Makefile ends up as a
relative path.  This is clearly wrong, because it breaks the usage of
$(INSTALL_ROOT), which I need in order to build Debian packages.

Again, this may be a qmake problem, or there's something that we're
neglecting to do in the .pro files to correct this.. any ideas?

(For now, my solution will be to move sources to /home/src/mythtv instead
of /usr/local/src/mythtv, but that's pretty silly).

-jim


More information about the mythtv-dev mailing list