octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Last commit may break your builds


From: John W. Eaton
Subject: Re: Last commit may break your builds
Date: Sat, 4 Aug 2012 10:33:24 -0400

On  4-Aug-2012, Jacob Dawid wrote:

| The src.pro file is not generated. It is the input file for qmake, of which
| qmake will generate a Makefile.

I had to change it so that it was generated, otherwise the -I options
for the compiler were not correct (look at the patch I attached to my
previous message).

Previously, you had

  # Includepaths and libraries to link against:
  INCLUDEPATH         += . \
                         octave-adapter \
                         m-editor \
                         qtinfo \
                         ../qterminal/libqterminal \
                         /usr/include/qt4 \
                         ../.. \
                         ../../src \
                         ../../liboctave \
                         ../../libcruft/misc

in the src.pro file.  My source tree is in /home/jwe/src/octave-gui
and my build tree is in /home/jwe/build/octave-gui.  So to build the
gui out of the source tree I create /home/jwe/build/octave-gui/gui, cd
to that directory, and run

  qmake /home/jwe/src/octave-gui/gui

Then qmake generates .../gui/src/Makefile in which the relative paths
listed in src.pro are transformed to

  INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++-64
                  -I/export/home/jwe/src/octave-gui/gui/src
                  -I/usr/include/qt4/QtCore
                  -I/usr/include/qt4/QtNetwork
                  -I/usr/include/qt4/QtGui
                  -I/usr/include/qt4/QtWebKit
                  -I/usr/include/qt4
                  -I/home/jwe/src/octave-gui/gui/src
                  -I/home/jwe/src/octave-gui/gui/src/octave-adapter
                  -I/home/jwe/src/octave-gui/gui/src/m-editor
                  -I/home/jwe/src/octave-gui/gui/src/qtinfo
                  -I/home/jwe/src/octave-gui/gui/qterminal/libqterminal
                  -I/usr/include/qt4
                  -I/home/jwe/src/octave-gui
                  -I/home/jwe/src/octave-gui/src
                  -I/home/jwe/src/octave-gui/liboctave
                  -I/home/jwe/src/octave-gui/libcruft/misc
                  -I.
                  -I.
                  -I.

This isn't correct or complete, and the compiler can't find things
like config.h which exist in the build tree, not the source tree.  So
my fix was make a src.pro.in file that contains

  # Includepaths and libraries to link against:
  INCLUDEPATH         += . \
                         octave-adapter \
                         m-editor \
                         qtinfo \
                         ../qterminal/libqterminal \
                         /usr/include/qt4 \
                         @abs_top_builddir@ \
                         @top_srcdir@/libcruft/misc \
                         @top_srcdir@/liboctave \
                         @abs_top_builddir@/liboctave \
                         @top_srcdir@/src \
                         @abs_top_builddir@/src \
                         @top_srcdir@/src/octave-value \
                         @abs_top_builddir@/src/parse-tree \
                         @top_srcdir@/src/parse-tree \
                         @abs_top_builddir@/src/octave-value \
                         @top_srcdir@/src/interp-core \
                         @abs_top_builddir@/src/interp-core \
                         @top_srcdir@/src/interpfcn \
                         @abs_top_builddir@/src/interpfcn \
                         @abs_top_builddir@/src/operators \
                         @top_srcdir@/src/operators

Then the INCLUDEPATH definition in the src.pro file generated by
configure looks like this:

  # Includepaths and libraries to link against:
  INCLUDEPATH         += . \
                         octave-adapter \
                         m-editor \
                         qtinfo \
                         ../qterminal/libqterminal \
                         /usr/include/qt4 \
                         /home/jwe/build/octave-gui \
                         /home/jwe/src/octave-gui/libcruft/misc \
                         /home/jwe/src/octave-gui/liboctave \
                         /home/jwe/build/octave-gui/liboctave \
                         /home/jwe/src/octave-gui/src \
                         /home/jwe/build/octave-gui/src \
                         /home/jwe/src/octave-gui/src/octave-value \
                         /home/jwe/build/octave-gui/src/parse-tree \
                         /home/jwe/src/octave-gui/src/parse-tree \
                         /home/jwe/build/octave-gui/src/octave-value \
                         /home/jwe/src/octave-gui/src/interp-core \
                         /home/jwe/build/octave-gui/src/interp-core \
                         /home/jwe/src/octave-gui/src/interpfcn \
                         /home/jwe/build/octave-gui/src/interpfcn \
                         /home/jwe/build/octave-gui/src/operators \
                         /home/jwe/src/octave-gui/src/operators

Note that we have to include build and source directories here,
because the Octave build process generates header and source files in
the build tree.  So the compiler has to look in both sets of
directories to find header files.

I had to put the src.pro file in the source directory, otherwise
qmake would not generate a Makefile that was correct for an out of
source tree build.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]