You are not logged in.
I am trying to build an Arch package from a Qt app. The app is split into some libraries that are compiled with the main application. Installation instruction for the whole app are defined in src.pro (see the hierarchy below), which are then written into the Makefiles that are generated on-the-fly during the build process. When I run 'qmake && make && make install' manually, everything goes fine. But when I try to build the package using a PKGBUILD, for some reason the Makefile generated based on the src.pro is missing installation instruction for the libraries (lib1, lib2, etc.).
I don't really have any idea of what is the problem. I tried to study the output of the make process and it seems like that when running makepkg, qmake first runs on each subdirectory to generate the Makefiles and only then begins the actual build process. Manually running make first builds one directory, then the second one and so on and only generates a Makefile when entering a directory. Since the libraries marked for installation do not exist in the beginning of the build process, they are not put into the Makefile at all, I think.
My first idea for a solution was to move the installation instructions into the libraries' own .pro files but that didn't seem to change anything. The build() process in the makepkg only runs qmake, make and make install - what I also do manually.
The directory structure of the project is like this:
project/
project.pro
src/
src.pro
lib1/
lib1.pro
lib2/
lib2.pro
Last edited by Verge (2011-10-07 19:07:33)
Offline
Offline
I tracked the problem to be in MAKEFLAGS and especially with -j. If there are anymore concurrent jobs than one, it will first generate Makefiles and only then begin compilation. I guess I just have to write my own build script to build the libs first and then the main app, or force -j1 somehow.
Last edited by Verge (2011-10-07 18:54:12)
Offline
After many hours I finally came up with a solution that was too easy... I only needed an "install.pri" file in which I added two lines:
target.path = /path/
INSTALLS += target
Next I just included that file into each lib's .pro file and now the makepkg process works. "target" is somewhat a magical variable for qmake.
I consider this solved.
Last edited by Verge (2011-10-07 19:08:22)
Offline