Unsolved qmake install appears to ignore variables?
-
I have a makefile containing:
build: directories qmake -o build/Makefile project.pro make -C build -j8 builddbg: directories qmake -o build/Makefile project.pro debug=1 make -C build -j8 install: build make -C build install
and in
project.pro
I have the following conditional test:defined(debug, var) { warning ("***** debug build *****") # WITH-SYMBOLS QMAKE_CXXFLAGS += -Wall -ggdb QMAKE_CFLAGS += -Wall -Werror -ggdb QMAKE_LFLAGS += -Wl,-Map=project.map CONFIG+=debug } else { warning (release build) # NO-SYMBOLS QMAKE_CFLAGS += -Wall -Werror }
make build
followed bysudo make install
works as expected.make builddbg
produces the build containing the symbols, however submittingsudo make install
the release build is produced and installed. The makefile in thebuild
directory does indicate the variable in the header:############################################################################# # Makefile for building: ....... # Generated by qmake (3.1) (Qt 5.10.1) # Project: ../project.pro # Template: lib # Command: /usr/lib/qt5/bin/qmake -o Makefile ../project.pro debug=1 #############################################################################
Is there something I am missing, or is there a better way of switching between installing a project with symbols and installing without?
-
Hi,
You install target depends on your build target, hence it's going to build "build" and then install whatever is in the build folder.