comparison src/qt.mk @ 3312:3e66ccaeff02

Qt: use INSTALL_ROOT instead of DESTDIR * src/qt.mk: Use INSTALL_ROOT instead of DESTDIR for destination install. Create LIBDIR/pkgconfig directory before installing .pc files.
author John Donoghue <john.donoghue@ieee.org>
date Mon, 11 Nov 2013 13:23:58 -0500
parents 7b9b5cf1fb92
children 41645c0a134c
comparison
equal deleted inserted replaced
3311:6a38c7bb94ef 3312:3e66ccaeff02
15 $(PKG)_CONFIGURE_ENV := PKG_CONFIG_PATH='$(HOST_PREFIX)/lib/pkgconfig' 15 $(PKG)_CONFIGURE_ENV := PKG_CONFIG_PATH='$(HOST_PREFIX)/lib/pkgconfig'
16 $(PKG)_CONFIGURE_EXTRA_OPTION := 16 $(PKG)_CONFIGURE_EXTRA_OPTION :=
17 $(PKG)_CONFIGURE_INCLUDE_OPTION := 17 $(PKG)_CONFIGURE_INCLUDE_OPTION :=
18 $(PKG)_CONFIGURE_LIBPATH_OPTION := 18 $(PKG)_CONFIGURE_LIBPATH_OPTION :=
19 $(PKG)_CONFIGURE_PLATFORM_OPTION := 19 $(PKG)_CONFIGURE_PLATFORM_OPTION :=
20 $(PKG)_PREFIX := '$(HOST_PREFIX)' 20 $(PKG)_PREFIX := $(HOST_PREFIX)
21 $(PKG)_MKSPECS := '$($(PKG)_PREFIX)' 21 $(PKG)_MKSPECS := $($(PKG)_PREFIX)
22 22
23 ifneq ($(filter mingw msvc,$(MXE_SYSTEM)),) 23 ifneq ($(filter mingw msvc,$(MXE_SYSTEM)),)
24 ifeq ($(MXE_NATIVE_BUILD),yes) 24 ifeq ($(MXE_NATIVE_BUILD),yes)
25 ifeq ($(MXE_SYSTEM),msvc) 25 ifeq ($(MXE_SYSTEM),msvc)
26 # NMAKE is perturbed by the values of MAKE and MAKEFLAGS defined by GNU 26 # NMAKE is perturbed by the values of MAKE and MAKEFLAGS defined by GNU
158 env -u MAKE -u MAKEFLAGS PKG_CONFIG_PATH='$(HOST_PREFIX)/lib/pkgconfig' nmake \ 158 env -u MAKE -u MAKEFLAGS PKG_CONFIG_PATH='$(HOST_PREFIX)/lib/pkgconfig' nmake \
159 INSTALL_ROOT=`cd $(3) && pwd -W | sed -e 's,^[a-zA-Z]:,,' -e 's,/,\\\\,g'` install && \ 159 INSTALL_ROOT=`cd $(3) && pwd -W | sed -e 's,^[a-zA-Z]:,,' -e 's,/,\\\\,g'` install && \
160 rm -f $(3)$(CMAKE_HOST_PREFIX)/lib/$(LIBRARY_PREFIX)Qt*.dll; \ 160 rm -f $(3)$(CMAKE_HOST_PREFIX)/lib/$(LIBRARY_PREFIX)Qt*.dll; \
161 else \ 161 else \
162 make -C '$(1)' -j '$(JOBS)' && \ 162 make -C '$(1)' -j '$(JOBS)' && \
163 make -C '$(1)' -j 1 install DESTDIR='$(3)'; \ 163 make -C '$(1)' -j 1 install INSTALL_ROOT='$(3)'; \
164 fi 164 fi
165 165
166 # native build doesnt seem to succeed with installing pkgconfig files to prefix 166 # native build doesnt seem to succeed with installing pkgconfig files to prefix
167 # in addition, .pc files have the wrong paths, mangled lib names 167 # in addition, .pc files have the wrong paths, mangled lib names
168 if [ "$(MXE_NATIVE_MINGW_BUILD)" = yes -a "$(MXE_SYSTEM)" != msvc ]; then \ 168 if [ "$(MXE_NATIVE_MINGW_BUILD)" = yes -a "$(MXE_SYSTEM)" != msvc ]; then \
169 find $(1)/lib/pkgconfig/*.pc -exec $(SED) -i \ 169 find $(1)/lib/pkgconfig/*.pc -exec $(SED) -i \
170 -e 's,\(.*\)_location=.*,\1_location=$${prefix}/bin/\1,g' \ 170 -e 's,\(.*\)_location=.*,\1_location=$${prefix}/bin/\1,g' \
171 -e 's,\(Libs:.* -l\).*[\\/]\([A-Za-z0-9]*\),\1\2,g' \ 171 -e 's,\(Libs:.* -l\).*[\\/]\([A-Za-z0-9]*\),\1\2,g' \
172 '{}' ';' ; \ 172 '{}' ';' ; \
173 $(INSTALL) -d '$(3)$(HOST_LIBDIR)/pkgconfig'; \
173 cp -f '$(1)/lib/pkgconfig/'*.pc '$(3)$(HOST_LIBDIR)/pkgconfig/'; \ 174 cp -f '$(1)/lib/pkgconfig/'*.pc '$(3)$(HOST_LIBDIR)/pkgconfig/'; \
174 fi 175 fi
175 176
176 $(if $(filter-out msvc, $(MXE_SYSTEM)), 177 $(if $(filter-out msvc, $(MXE_SYSTEM)),
177 $(if $(filter-out yes, $(MXE_NATIVE_BUILD)), 178 $(if $(filter-out yes, $(MXE_NATIVE_BUILD)),
181 $(INSTALL) -m755 '$(3)$($(PKG)_PREFIX)/bin/uic' '$(3)$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)uic' 182 $(INSTALL) -m755 '$(3)$($(PKG)_PREFIX)/bin/uic' '$(3)$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)uic'
182 $(INSTALL) -m755 '$(3)$($(PKG)_PREFIX)/bin/qmake' '$(3)$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)qmake' 183 $(INSTALL) -m755 '$(3)$($(PKG)_PREFIX)/bin/qmake' '$(3)$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)qmake'
183 ) 184 )
184 185
185 # lrelease (from linguist) needed by octave for GUI build 186 # lrelease (from linguist) needed by octave for GUI build
186 $(MAKE) -C '$(1)/tools/linguist/lrelease' -j '$(JOBS)' install DESTDIR='$(3)' 187 $(MAKE) -C '$(1)/tools/linguist/lrelease' -j '$(JOBS)' install INSTALL_ROOT='$(3)'
187 $(if $(filter-out yes, $(MXE_NATIVE_BUILD)), 188 $(if $(filter-out yes, $(MXE_NATIVE_BUILD)),
188 $(INSTALL) -m755 '$(3)$($(PKG)_PREFIX)/bin/lrelease' '$(3)$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)lrelease')) 189 $(INSTALL) -m755 '$(3)$($(PKG)_PREFIX)/bin/lrelease' '$(3)$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)lrelease'))
189 endef 190 endef