Results 1 to 6 of 6

Thread: QMake problem

  1. #1
    Join Date
    Apr 2007
    Location
    Moscow, Russia
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default QMake problem

    Hello! How can i use qmake program, to generate only Makefile without directories that qmake creates analyzing .pro file?
    Thank you!
    Denis Davidov

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMake problem

    What directories are you talking about?
    I'm a rebel in the S.D.G.

  3. #3
    Join Date
    Apr 2007
    Location
    Moscow, Russia
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMake problem

    For example i have .pro file:
    Qt Code:
    1. TEMPLATE = lib
    2. INCLUDEPATH = ../include \
    3. ../../common/libxml2/include \
    4. ../../common/iconv/include \
    5. ../../common/include
    6. OUTPUT = ../../..
    7. TEMP = ../../../temp/dstr/file
    8. CONFIG += plugin
    9. RCC_DIR = ./res
    10. RESOURCES = ./res/resource.qrc
    11.  
    12. Debug {
    13. DEFINES += _DEBUG
    14. DESTDIR = $${OUTPUT}/debug
    15. OBJECTS_DIR = $${TEMP}/debug
    16. } else {
    17. DESTDIR = $${OUTPUT}/release
    18. OBJECTS_DIR = $${TEMP}/release
    19. }
    20.  
    21. win32 {
    22. LIBS += $${DESTDIR}/libxml2.lib
    23. } else {
    24. LIBS += -lxml2
    25. }
    26.  
    27. MOC_DIR = $${OBJECTS_DIR}
    28.  
    29. PRECOMPILED_HEADER = std.h
    30.  
    31. HEADERS += header.h
    32.  
    33. SOURCES += main.cpp
    To copy to clipboard, switch view to plain text mode 

    I run qmake program:
    Qt Code:
    1. C:\temp>qmake project.pro
    To copy to clipboard, switch view to plain text mode 

    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.
    Denis Davidov

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMake problem

    don't specify these dirs, but in this case all automatically generated files will be in that directory where pro-file is located.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. #5
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMake problem

    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?
    I'm a rebel in the S.D.G.

  6. #6
    Join Date
    Apr 2007
    Location
    Moscow, Russia
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMake problem

    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...
    Denis Davidov

Similar Threads

  1. qmake sux a lot
    By singermornings in forum Qt Programming
    Replies: 6
    Last Post: 29th January 2009, 08:33
  2. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  3. A problem about qmake in Qt 4.4
    By alban_gt in forum Qt Programming
    Replies: 3
    Last Post: 24th July 2008, 17:19
  4. qmake foo.pro problem
    By impeteperry in forum Installation and Deployment
    Replies: 3
    Last Post: 11th January 2007, 20:54
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.