Results 1 to 3 of 3

Thread: Custom action added to make by qmake

  1. #1
    Join Date
    Feb 2006
    Posts
    8
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Custom action added to make by qmake

    Hi all,

    I am adding automatic versioning to my application. I already have the shell scripts to change the v.w.x.y format version number in my sourcecode and change the compile timestamp. I can include this in my makefile, to handle this in my build. Unfortunately qmake will nuke my changes if run again (I touch my .pro file). How can I add custom shell commands to certain make rules?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Custom action added to make by qmake

    http://wiki.qtcentre.org/index.php?t...e#Custom_tools

    You are aware that qmake supports versioning, right? There is a VERSION variable and you can add a DEFINES += VER="${VERSION}" (or something like that) to the project file so that the VER macro expands to the version number in your application.

  3. The following user says thank you to wysota for this useful post:

    No-Nonsense (20th February 2007)

  4. #3
    Join Date
    Feb 2006
    Posts
    8
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Custom action added to make by qmake

    Oh, I fixed my problem by simply using 2 makefiles. One called makefile and the qmake is generated as Makefile. gnu make executes makefile and that subsequently executes Makefile.

    A bit of a hack, but it woks

Similar Threads

  1. QMake make install problems
    By cookiem in forum Qt Programming
    Replies: 12
    Last Post: 4th December 2008, 15:34
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  3. Replies: 3
    Last Post: 1st October 2006, 15:03
  4. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11
  5. make install equivalent in qmake ...
    By momesana in forum Newbie
    Replies: 3
    Last Post: 20th February 2006, 21:46

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.