mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:43:09 +0200
branchRCL_3
changeset 6 dee5afe5301f
parent 4 3b1da2848fc7
permissions -rw-r--r--
Revision: 201008 Kit: 201010

# /****************************************************************************
# **
# ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
# ** Contact: Nokia Corporation (qt-info@nokia.com)
# **
# ** This file is part of symbian-sbsv2 mkspec.
# **
# ****************************************************************************/


SINGLETON:=$(call sanitise,TARGET_$(DEPLOY_TARGET))
CLEAN_TARGET:=

# add EPOCROOT if missing (not if drive letters are present)
ifeq ($(findstring :,$(firstword $(DEPLOY_TARGET))), :)
	DEPLOY_TARGET:=$(DEPLOY_TARGET)
else
    ifeq ($(findstring $(EPOCROOT), $(firstword $(DEPLOY_TARGET))), $(EPOCROOT))
        DEPLOY_TARGET:=$(DEPLOY_TARGET)
    else
        DEPLOY_TARGET:=$(EPOCROOT)$(DEPLOY_TARGET)
    endif
endif

define qmake_emulator_deployment
$(ALLTARGET):: $(1)

# Prevent duplicate targets from being created
$(SINGLETON):=1

CLEAN_TARGET:=$(1)

$(1): $(2)
	$(call startrule,qmake_emulator_deployment) \
	$(GNUCP) --no-preserve=mode $(2) "$$@" && \
	$(GNUCHMOD) a+rw "$$@" \
	$(call endrule,qmake_emulator_deployment) 	
endef

ifeq ($($(SINGLETON)),)
$(eval $(call qmake_emulator_deployment, $(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(DEPLOY_TARGET)), $(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(DEPLOY_SOURCE))))
$(call makepath,$(dir $(DEPLOY_TARGET)))
$(eval $(call GenerateStandardCleanTarget,$(CLEAN_TARGET),''))
endif