From 128b1ef5ddcecdc1b2d52c50d1559e2520fb6683 Mon Sep 17 00:00:00 2001 From: James Duley Date: Thu, 19 May 2016 21:20:16 +0100 Subject: [PATCH] Make qt56-env.sh be sourced automatically --- .travis.yml | 1 - make/tools.mk | 12 +++++++++--- package/linux/deb.mk | 3 --- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c19c1cba..97fee1190 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ before_install: - make arm_sdk_install script: - - . /opt/qt56/bin/qt56-env.sh - make config_new CCACHE=ccache GCS_EXTRA_CONF='osg osgearth' - make all_flight - make opfw_resource diff --git a/make/tools.mk b/make/tools.mk index ec89e5012..1322d20b2 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -552,9 +552,15 @@ ifeq ($(shell [ -d "$(QT_SDK_DIR)" ] && $(ECHO) "exists"), exists) export LD_LIBRARY_PATH := $(QT_SDK_DIR)/lib:$(LD_LIBRARY_PATH) endif else - # not installed, hope it's in the path... - # $(info $(EMPTY) WARNING $(call toprel, $(QT_SDK_DIR)) not found (make qt_sdk_install), using system PATH) - QMAKE ?= qmake + OPT_QT := qt56 + OPT_QT_ENV_SH := /opt/$(OPT_QT)/bin/$(OPT_QT)-env.sh + ifneq ($(wildcard $(OPT_QT_ENV_SH)),) + SHELL := /bin/bash + QMAKE := . $(OPT_QT_ENV_SH) && qmake + else + # not installed, hope it's in the path... + QMAKE := qmake + endif endif .PHONY: qt_sdk_version diff --git a/package/linux/deb.mk b/package/linux/deb.mk index 79668b0ca..60edea9fa 100644 --- a/package/linux/deb.mk +++ b/package/linux/deb.mk @@ -24,7 +24,6 @@ SED_SCRIPT := $(SED_SCRIPT)' \ ' # Ubuntu 14.04 (Trusty Tahr) use qt in /opt PPA -OPT_QT := qt56 TRUSTY_DEPS_SED := s/qml-module-.*/$(OPT_QT)quickcontrols/g; \ s/qt5-default.*/$(OPT_QT)-meta-minimal, $(OPT_QT)svg, $(OPT_QT)script, $(OPT_QT)serialport, $(OPT_QT)multimedia, $(OPT_QT)translations, $(OPT_QT)tools/g; @@ -51,8 +50,6 @@ debian: $(DEB_DIR) $(V1) $(SED_SCRIPT) debian/changelog debian/control ifeq ($(DEB_DIST), trusty) $(V1) sed -i -e '$(TRUSTY_DEPS_SED)' debian/control - $(V1) sed -i -e 's,dh ,source /opt/$(OPT_QT)/bin/$(OPT_QT)-env.sh || true; dh ,' debian/rules - $(V1) echo "SHELL := /bin/bash" >> debian/rules endif .PHONY: package_src