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?![]()
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.
See the INSTALLS variable of a pro file.
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.
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)I've placed a file to from/ and I want it to be copied to to/Qt Code:
: documentation.path = to/ documentation.files = from/* INSTALLS += documentation ... ... ####### Install install: $(INSTALLS) uninstall: FORCE FORCE:To copy to clipboard, switch view to plain text mode
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.
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.
hakermania (30th October 2010)
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.
qmake Code:
FILESTOCOPY = from/* documentation.path = to documentation.from = FILESTOCOPY INSTALLS += documentationTo copy to clipboard, switch view to plain text mode
Disclaimer: not tested...
hakermania (30th October 2010)
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.
Here is a working example:
qmake Code:
FILESTOCOPY = f1 f2 f3 INSTRULE.path = /tmp INSTRULE.files = $$FILESTOCOPY INSTALLS += INSTRULETo copy to clipboard, switch view to plain text mode
hakermania (31st October 2010)
That's the created Makefile (using your last answer):
output of make install:qmake Code:
############################################################################# # Makefile for building: some-1 # Generated by qmake (2.01a) (Qt 4.7.0) on: Sat Oct 30 23:31:32 2010 # Project: some-1.0.pro # Template: app # Command: /usr/bin/qmake -o Makefile some-1.0.pro ############################################################################# ####### Compiler, tools and options CC = gcc CXX = g++ DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) 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. LINK = g++ LFLAGS = -Wl,-O1 LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread AR = ar cqs RANLIB = QMAKE = /usr/bin/qmake TAR = tar -cf COMPRESS = gzip -9f COPY = cp -f SED = sed COPY_FILE = $(COPY) COPY_DIR = $(COPY) -r STRIP = strip INSTALL_FILE = install -m 644 -p INSTALL_DIR = $(COPY_DIR) INSTALL_PROGRAM = install -m 755 -p DEL_FILE = rm -f SYMLINK = ln -f -s DEL_DIR = rmdir MOVE = mv -f CHK_DIR_EXISTS= test -d MKDIR = mkdir -p FILESTOCOPY = from/* INSTRULE.path = to/ INSTRULE.files = $$FILESTOCOPY INSTALLS += INSTRULE ... ... ... install: $(INSTALLS) uninstall: FORCE FORCE:To copy to clipboard, switch view to plain text mode
Qt Code:
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 09: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.
This works for me:
Qt Code:
installfiles.files += a.a installfiles.files += b.b installfiles.files += c.c installfiles.path = /path/to/install/folder INSTALLS += installfilesTo 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
hakermania (31st October 2010)
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.
You have to put those rules in the .pro file, not in the resulting Makefile.
hakermania (31st October 2010)
I though it had to do with the makefile. Cool. Now it worksYou 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.
Bookmarks