![]() |
MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
Hi,
if .pro file contains sources in parent directories, e.g. like HEADERS += ../../../whatever/header.h then qmake for Windows (more exactly .madde/0.6.14/targets/fremantle-qt-0951/bin/qmake.exe) will generate a makefile which will have "native" Windows backslashes for header dependencies, e.g. ../build/whatever.o: ../../../whatever/whatever.cpp ..\..\..\whatever\header.h The problem is, that make (also from MADDE) will understand the backslashes as escaped symbols and will refuse to build such a makefile (it won't find header.h). Manually replacing backslashes with slashes fixes the problem but it's an unfeasible solution. It only happens on Windows MADDE setup, on Ubuntu everything is Ok (only slashes are used obviously). Windows native qmake (from QT SDK for PC) also handles such .pro files correctly, placing slashes in a makefile. I know that MADDE is still BETA, but I would like to report a bug against that nevertheless just to let developers know. If there's a better place for bugreports against MADDE, let me know, please. |
Re: MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
Isn't it better to not use relative includes? Add the correct -I flag instead and it will work even if you move your code around.
|
Re: MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
Well, actually you are right and not specifying anything in HEADERS fixes that too :)
But there are downsides of that: 1) you cannot see your headers in project browser in QtCreator 2) I believe, that for Qt builds you have to specify headers in HEADERS sometimes. So to sum up, I think it's still a bug worth fixing. |
Re: MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
Are you sure you really executed "mad qmake"?
Mine just works fine: Code:
o2_germany.o: o2_germany.cpp o2_germany.hpp \ |
Re: MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
Well, I don't execute mad qmake, I'm using QtCreator which executes qmake from freemantle directory itself. Executing qmake from the same location manually (that is, cd'ing to directory where .pro is located and then invoking qmake with absolute path) has the same effect.
Regarding your results, are you listing those headers in HEADERS variable or does qmake find them as dependencies itself? I found that automatically found dependencies are generated correctly (thanks to Joorin for an obvious solution), and only those headers that are also listed in HEADERS are affected. I'm also using more than one level of ../ indirection, which may or may not affect the results. |
Re: MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
I've never added "../" to HEADERS.
In my opinion there is no reason to do this. If you want to use the code of a directory "upper", make a shared/static library of them. On this way you also see the headers and sources. If you don't like that solution, create a "whatever.pri" which contains "HEADERS += $$PWD/header.h" and in your project which is using it add "include(../../../whatever/whatever.pri)" By the way: If you ONLY add headers which don't even contain Q_OBJECT macros, this is just for beauty and doesn't mean anything for the compiler. (I suppose you know that :) ) |
Re: MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
The bug is fixed in upcoming MADDE release.
|
Re: MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
Quote:
I have a set of directories that contain cross-platform code (without .pro files) and a set of directories that hold platform-dependent code (and .pro files - but some projects use different build systems) for various platforms. It's basically like: Code:
/libraries/ If you think that's totally wrong, I'd be glad to hear your propositions, but we probably should not spam this thread :) (perhaps private msg would be better?) Quote:
Anyway, I'm really glad that this issue will be fixed in the next MADDE. Thanks to the dev team! |
Re: MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
|
Re: MADDE's qmake generates incorrect makefiles for Windows - where to file bug?
This is from Qt Creator, first step after adding a new Qt version - rebuilding helpers.
Code:
Building debugging helper library in D:/RCL/local/MADDE/0.6.72/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/usr/share/qt4/qtc-debugging-helper/ |
All times are GMT. The time now is 16:17. |
vBulletin® Version 3.8.8