Results 1 to 15 of 15

Thread: Does qmake support make install option?

  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Does qmake support make install option?

    the usual commands for compiling are
    qmake -project
    qmake name.pro
    qmake
    make


    I need to enable after giving 'make' a 'make install' command so to do some actions.
    Is it possible, and if yes, how do I enable it?
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Does qmake support make install option?

    See the INSTALLS variable of a pro file.

  3. #3
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Does qmake support make install option?

    I opened a pro file and it contained only
    TEMPLATE
    TARGET
    DEPENDPATH
    INCLUDEPATH
    HEADERS
    FORMS
    SOURCES
    RESOURCES
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  4. #4
    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: Does qmake support make install option?

    Quote Originally Posted by hakermania View Post
    I opened a pro file and it contained only
    TEMPLATE
    TARGET
    DEPENDPATH
    INCLUDEPATH
    HEADERS
    FORMS
    SOURCES
    RESOURCES
    That's probably why your Makefile doesn't contain any install rules

    [wiki]Undocumented qmake[/wiki]
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Does qmake support make install option?

    actually, I found this that helped me a bit:
    http://doc.qt.nokia.com/4.3/qmake-en....html#installs
    and i put this into the Makefile(which is real, generated from real program and containing a lot of raws)
    Qt Code:
    1. :
    2. documentation.path = to/
    3. documentation.files = from/*
    4. INSTALLS += documentation
    5. ...
    6. ...
    7. ####### Install
    8.  
    9. install: $(INSTALLS)
    10. uninstall: FORCE
    11. FORCE:
    To copy to clipboard, switch view to plain text mode 
    I've placed a file to from/ and I want it to be copied to to/
    but when I give make install it says make: *** No rule to make target `documentation', needed by `install'. Stop.

    What do I do wrong?
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  6. #6
    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: Does qmake support make install option?

    It doesn't work this way. documentation.files should point to a variable containing a list of files to copy (you can use wildcards). The files in question have to exist (at least by default) when qmake is called.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    hakermania (30th October 2010)

  8. #7
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Does qmake support make install option?

    Can you make me a simple example of moving all files from 'from' to 'to' so to understand better?
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  9. #8
    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: Does qmake support make install option?

    qmake Code:
    1. FILESTOCOPY = from/*
    2. documentation.path = to
    3. documentation.from = FILESTOCOPY
    4. INSTALLS += documentation
    To copy to clipboard, switch view to plain text mode 

    Disclaimer: not tested...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    hakermania (30th October 2010)

  11. #9
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Does qmake support make install option?

    Thank you, but still same error :/
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  12. #10
    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: Does qmake support make install option?

    Here is a working example:
    qmake Code:
    1. FILESTOCOPY = f1 f2 f3
    2. INSTRULE.path = /tmp
    3. INSTRULE.files = $$FILESTOCOPY
    4. INSTALLS += INSTRULE
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    hakermania (31st October 2010)

  14. #11
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Does qmake support make install option?

    That's the created Makefile (using your last answer):
    qmake Code:
    1. #############################################################################
    2. # Makefile for building: some-1
    3. # Generated by qmake (2.01a) (Qt 4.7.0) on: Sat Oct 30 23:31:32 2010
    4. # Project: some-1.0.pro
    5. # Template: app
    6. # Command: /usr/bin/qmake -o Makefile some-1.0.pro
    7. #############################################################################
    8.  
    9. ####### Compiler, tools and options
    10.  
    11. CC = gcc
    12. CXX = g++
    13. DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
    14. CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
    15. CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
    16. INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I.
    17. LINK = g++
    18. LFLAGS = -Wl,-O1
    19. LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread
    20. AR = ar cqs
    21. RANLIB =
    22. QMAKE = /usr/bin/qmake
    23. TAR = tar -cf
    24. COMPRESS = gzip -9f
    25. COPY = cp -f
    26. SED = sed
    27. COPY_FILE = $(COPY)
    28. COPY_DIR = $(COPY) -r
    29. STRIP = strip
    30. INSTALL_FILE = install -m 644 -p
    31. INSTALL_DIR = $(COPY_DIR)
    32. INSTALL_PROGRAM = install -m 755 -p
    33. DEL_FILE = rm -f
    34. SYMLINK = ln -f -s
    35. DEL_DIR = rmdir
    36. MOVE = mv -f
    37. CHK_DIR_EXISTS= test -d
    38. MKDIR = mkdir -p
    39.  
    40. FILESTOCOPY = from/*
    41. INSTRULE.path = to/
    42. INSTRULE.files = $$FILESTOCOPY
    43. INSTALLS += INSTRULE
    44. ...
    45. ...
    46. ...
    47. install: $(INSTALLS)
    48.  
    49. uninstall: FORCE
    50.  
    51. FORCE:
    To copy to clipboard, switch view to plain text mode 
    output of make install:
    Qt Code:
    1. make: *** No rule to make target `INSTRULE', needed by `install'. Stop.
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 31st October 2010 at 08:35.
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  15. #12
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Does qmake support make install option?

    This works for me:

    Qt Code:
    1. installfiles.files += a.a
    2. installfiles.files += b.b
    3. installfiles.files += c.c
    4. installfiles.path = /path/to/install/folder
    5. INSTALLS += installfiles
    To copy to clipboard, switch view to plain text mode 

    Where a.a, b.b, c.c are your files, whatever they are called.

    Clean the build dir
    Rerun qmake
    rerun make
    then do: make install

  16. The following user says thank you to tbscope for this useful post:

    hakermania (31st October 2010)

  17. #13
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Does qmake support make install option?

    Thanks for your answer,
    If I add what you told me without adding install: $(INSTALLS)
    it outputs make: Nothing to be done for `install'.
    If I add what you told me and I add install: $(INSTALLS)
    it outputs make: *** No rule to make target `installfiles', needed by `install'. Stop.
    Am I missing something?
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  18. #14
    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: Does qmake support make install option?

    You have to put those rules in the .pro file, not in the resulting Makefile.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    hakermania (31st October 2010)

  20. #15
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Does qmake support make install option?

    I though it had to do with the makefile. Cool. Now it works You are very helpful
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

Similar Threads

  1. qmake option to create pro file from vs2005 .sln
    By dpatel in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2010, 06:45
  2. Have qmake add the C debugging option (-g)
    By kiss-o-matic in forum Qt Programming
    Replies: 5
    Last Post: 26th January 2010, 05:09
  3. qmake: removing --no-undefined option for libs.
    By davemar in forum Qt Programming
    Replies: 2
    Last Post: 14th October 2009, 09:08
  4. QMake make install problems
    By cookiem in forum Qt Programming
    Replies: 12
    Last Post: 4th December 2008, 15:34
  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.