summaryrefslogtreecommitdiffstats
path: root/config.profiles/symbian
diff options
context:
space:
mode:
Diffstat (limited to 'config.profiles/symbian')
-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