Hello! How can i use qmake program, to generate only Makefile without directories that qmake creates analyzing .pro file?
Thank you!
Printable View
Hello! How can i use qmake program, to generate only Makefile without directories that qmake creates analyzing .pro file?
Thank you!
What directories are you talking about?
For example i have .pro file:
Code:
TEMPLATE = lib INCLUDEPATH = ../include \ ../../common/libxml2/include \ ../../common/iconv/include \ ../../common/include OUTPUT = ../../.. TEMP = ../../../temp/dstr/file CONFIG += plugin RCC_DIR = ./res RESOURCES = ./res/resource.qrc Debug { DEFINES += _DEBUG DESTDIR = $${OUTPUT}/debug OBJECTS_DIR = $${TEMP}/debug } else { DESTDIR = $${OUTPUT}/release OBJECTS_DIR = $${TEMP}/release } win32 { LIBS += $${DESTDIR}/libxml2.lib } else { LIBS += -lxml2 } MOC_DIR = $${OBJECTS_DIR} PRECOMPILED_HEADER = std.h HEADERS += header.h SOURCES += main.cpp
I run qmake program:
Code:
C:\temp>qmake project.pro
Program generates files Makefile, Makefile.Release, Makefile.Debug and TEMP, DESTDIR and RCC_DIR directories, as they defined in .pro file.
But i only need Makefiles without generated directories.
don't specify these dirs, but in this case all automatically generated files will be in that directory where pro-file is located.
I'm not sure if this is the right answer (i haven't tried this) but this is what i have found in qmake's doc:
-makefile
qmake output will be a Makefile.
http://doc.trolltech.com/4.5/qmake-running.html#syntax
Maybe this will end up in generating only makefiles.
A question to you. What is the problem with created directories? Why don't you want them to be created?
An option -makefile doesn't help, it still generates directories.
I need to parse .pro file. But instead of analyzing strings in .pro file, i decided to generate makefiles with qmake. And then anaylyze them by keywords. May be there are easier ways to parse .pro file...