Results 1 to 3 of 3

Thread: Pro->Makefile: how to make includes

  1. #1

    Default Pro->Makefile: how to make includes

    I have a really annoying problem - I need some externals files to be included into Makefile generated by my project (*.pro) file. In *.pro file I have a directive include(file.ext). So I can do something like this in my *.pro-file:

    include(file1.mk)
    include(file2.mk)

    But when the Makefile is generated by qmake, these includes are not there. I habe to include those file somehow, cuz they contain very important definitions shared by all subprojects. How can I force qmake to generate a Makefile in wich contains these includes? Is there any way at all? Please, help, it's a real problem now...

    P.S.: the only way I can "solve" the problem is to write this includes into Makefile myself:
    include file1.mk
    include file2.mk
    But after rebuilding Makefile these strings disappear and I have to add it again manually, so that's not a reasonable solution...

  2. #2
    Join Date
    Apr 2008
    Location
    Pavlodar, Kazakhstan
    Posts
    22
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Pro->Makefile: how to make includes

    I think qmake has nothing to do with your includes. Include directives in a *.pro file are used to add another portion of qt-related directives. If you don't want to manually add your includes to the makefile you should automate it with appropriate command line options of make program.

  3. #3

    Default Re: Pro->Makefile: how to make includes

    Maybe you know a way how to write a script in *.pro file which will force qmake to insert my text into the generated Makefile? For example, I want to create a *.pro-file which "tells" qmake to insert a string "include ../../myfile.mk" into Makefile during the generation. Is it possible to do? Does somebody know?
    That could solve the problem of this thread...

Similar Threads

  1. Window OS make distclean && qmake && make one line
    By patrik08 in forum General Programming
    Replies: 4
    Last Post: 22nd March 2007, 10:43
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  3. Qt4.1.4 make errors.
    By impeteperry in forum Installation and Deployment
    Replies: 11
    Last Post: 1st July 2006, 17:27

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.