summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPasi Pentikainen <pasi.a.pentikainen@nokia.com>2011-11-22 15:08:48 (GMT)
committerPasi Pentikainen <pasi.a.pentikainen@nokia.com>2011-11-23 13:31:29 (GMT)
commit9cc57e15c72576b7150223d179e6d66d4e06dd28 (patch)
tree0080739fd59bd1ee605a90081d6aea53e43875ab
parent431bb1e39f2df69329607b96f7178aea42962318 (diff)
downloadQt-9cc57e15c72576b7150223d179e6d66d4e06dd28.zip
Qt-9cc57e15c72576b7150223d179e6d66d4e06dd28.tar.gz
Qt-9cc57e15c72576b7150223d179e6d66d4e06dd28.tar.bz2
Fix Linux-Symbian parallel cross-compilation configure step
The qtconfig.flm is mostly rewritten to support parallel Raptor Linux-Symbian cross-compilation. Reviewed-by: Miikka Heikkinen Done-with: Samu Sillanpaa Task-number: QTBUG-14361
-rw-r--r--config.profiles/symbian/qtconfig.flm97
1 files changed, 63 insertions, 34 deletions
diff --git a/config.profiles/symbian/qtconfig.flm b/config.profiles/symbian/qtconfig.flm
index 2689d03..07c2349 100644
--- a/config.profiles/symbian/qtconfig.flm
+++ b/config.profiles/symbian/qtconfig.flm
@@ -10,52 +10,76 @@
QT_ROOT:= ../..
TARGETDIR:=$(EPOCROOT)/$(INSTALLPATH)
MKSPECDIR:=$(EPOCROOT)/$(INSTALLPATH)/qt
-SOURCEDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/bin
+TOOLSBINDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/bin
TOOLSSRCDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/src/tools
LANGUAGETOOLDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/tools/linguist
CONFIGURE_APP:=configure$(DOTEXE)
+BOOTSTRAP_LIB:=$(TOOLSSRCDIR)/bootstrap/libbootstrap.a
$(call makepath,$(TARGETDIR))
+WHATTARGETS:=
+CLEANTARGETS:=
+
ifneq ($(filter linux,$(HOSTPLATFORM)),)
PLATFORM:=$(PLATFORM.LINUX)
else
PLATFORM:=$(PLATFORM.WIN32)
endif
-TARGET_TOOLS:=$(TARGETDIR)/qmake$(DOTEXE) $(TARGETDIR)/moc$(DOTEXE) $(TARGETDIR)/rcc$(DOTEXE) $(TARGETDIR)/uic$(DOTEXE) $(TARGETDIR)/lrelease$(DOTEXE)
-QT_TOOLS:= $(TOOLSSRCDIR)/uic $(TOOLSSRCDIR)/moc $(TOOLSSRCDIR)/rcc $(LANGUAGETOOLDIR)/lrelease
-SOURCE_TOOLS:=$(SOURCEDIR)/qmake$(DOTEXE) $(SOURCEDIR)/moc$(DOTEXE) $(SOURCEDIR)/rcc$(DOTEXE) $(SOURCEDIR)/uic$(DOTEXE) $(SOURCEDIR)/lrelease$(DOTEXE)
+QT_TOOLS:=uic moc rcc
-define QtConfiguration
-ifneq ($(filter linux,$(HOSTPLATFORM)),)
-$(TARGET_TOOLS): $(QT_TOOLS)
-else
-$(TARGET_TOOLS): $(SOURCEDIR)/qmake$(DOTEXE)
-endif
+# Build every tool with it's own target
+define qt_tool
+
+TARGET:: $(TARGETDIR)/$1$(DOTEXE)
+
+WHATTARGETS:=$$(WHATTARGETS) $(TARGETDIR)/$1$(DOTEXE) $(TOOLSBINDIR)/$1$(DOTEXE)
+CLEANTARGETS:=$$(CLEANTARGETS) $(TARGETDIR)/$1$(DOTEXE) $(TOOLSBINDIR)/$1$(DOTEXE)
+
+$(TARGETDIR)/$1$(DOTEXE): $(TOOLSBINDIR)/$1$(DOTEXE)
$(call startrule,qtconf_deploy) \
- $(GNUCP) $(SOURCEDIR)/$$(notdir $$@) $$@ \
+ $(GNUCP) $$^ $$@ \
$(call endrule,qtconf_deploy)
ifneq ($(filter linux,$(HOSTPLATFORM)),)
-$(QT_TOOLS): $(TOOLSSRCDIR)/bootstrap
+# On linux, the tools are built separately
+$(TOOLSBINDIR)/$1$(DOTEXE): $(BOOTSTRAP_LIB)
$(call startrule,qtconf_tools_build) \
- cd $$@; \
- $(GNUMAKE38); \
- cd .. \
+ cd $(TOOLSSRCDIR)/$1 && $(GNUMAKE38) \
$(call endrule,qtconf_tools_build)
+else
+# On windows, the tools are built by configure.exe (building of qmake)
+$(TOOLSBINDIR)/$1$(DOTEXE): $(TARGETDIR)/qmake$(DOTEXE)
+endif
+
+endef
-$(TOOLSSRCDIR)/bootstrap:$(SOURCEDIR)/qmake$(DOTEXE)
+define qt_bootstrap
+$(BOOTSTRAP_LIB): $(TOOLSBINDIR)/qmake$(DOTEXE)
$(call startrule,qtconf_bootstrap_build) \
- cd $(TOOLSSRCDIR)/bootstrap; \
- $(GNUMAKE38); \
- cd .. \
+ cd $(TOOLSSRCDIR)/bootstrap && $(GNUMAKE38) && $(GNUTOUCH) $$@ \
$(call endrule,qtconf_bootstrap_build)
-endif
+CLEANTARGETS:=$$(CLEANTARGETS) $(BOOTSTRAP_LIB)
+endef
+
+
+define qt_qmake
-$(SOURCEDIR)/qmake$(DOTEXE): $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP)
+TARGET:: $(TARGETDIR)/qmake$(DOTEXE)
+
+WHATTARGETS:=$$(WHATTARGETS) $(TARGETDIR)/qmake$(DOTEXE) $(TOOLSBINDIR)/qmake$(DOTEXE)
+CLEANTARGETS:=$$(CLEANTARGETS) $(TARGETDIR)/qmake$(DOTEXE) $(TOOLSBINDIR)/qmake$(DOTEXE)
+
+$(TARGETDIR)/qmake$(DOTEXE): $(TOOLSBINDIR)/qmake$(DOTEXE)
+ $(call startrule,qmake_deploy) \
+ $(GNUCP) $$^ $$@ \
+ $(call endrule,qmake_deploy)
+
+$(TOOLSBINDIR)/qmake$(DOTEXE): $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP)
$(call startrule,qtconf) \
+ $(GNUCHMOD) a+x $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP) $(EXTENSION_ROOT)/$(QT_ROOT)/config.tests/unix/* && \
cd $(EXTENSION_ROOT)/$(QT_ROOT) && unset INCLUDE && unset LIB && $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP) -platform $(PLATFORM) -xplatform $(XPLATFORM) $(OPTIONS) \
$(call endrule,qtconf)
$(call startrule,headerexport) \
@@ -91,25 +115,30 @@ WHAT::
); \
echo "$(call whatLogClose)" \
$(call endrawoutput)
-endef
+
+endef
+
# Here a variable named "done_<sanitised $SISFILE>" gets created
GUARD:=done_$(call sanitise,$(TARGETDIR)/qmake$(DOTEXE))
# If variable "done_..." not set, set it to 1, so that
-# UREL and UDEB do not execute makesis twice on the same target
+# UREL and UDEB do not execute makesis twice on the same target
ifeq ($($(GUARD)),)
$(GUARD):=1
+
+$(eval $(qt_qmake))
+
+# Bootstrap is needed only on Linux
ifneq ($(filter linux,$(HOSTPLATFORM)),)
-EXPORT:: $(QT_TOOLS) $(TARGET_TOOLS)
-else
-EXPORT:: $(TARGET_TOOLS)
-endif
-$(eval $(call QtConfiguration))
-ifeq ($(OSTYPE),unix)
-$(eval $(call whatmacro,$(QT_TOOLS) $(TARGET_TOOLS)))
-$(eval $(call GenerateStandardCleanTarget,$(QT_TOOLS) $(TARGET_TOOLS) $(SOURCE_TOOLS),$(TARGETDIR)))
-else
-$(eval $(call whatmacro,$(TARGET_TOOLS)))
-$(eval $(call GenerateStandardCleanTarget,$(TARGET_TOOLS) $(SOURCE_TOOLS),$(TARGETDIR)))
+$(eval $(qt_bootstrap))
endif
+
+$(eval $(foreach TOOL,$(QT_TOOLS),$(call qt_tool,$(TOOL))))
+
+TOOLSSRCDIR:=$(LANGUAGETOOLDIR)
+$(eval $(call qt_tool,lrelease))
+
+$(eval $(call whatmacro,$(WHATTARGETS)))
+$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(TARGETDIR)))
+
endif