tools/export_templates.mk
changeset 111 1158876b5622
parent 25 482757737e59
--- a/tools/export_templates.mk	Mon Nov 08 17:25:34 2010 +0000
+++ b/tools/export_templates.mk	Tue Nov 09 16:55:25 2010 +0000
@@ -9,19 +9,31 @@
 # Initial Contributors:
 # Accenture - Initial contribution
 #
-BLD :
+# To ensure that EPOCROOT always ends with a forward slash
+TMPROOT:=$(subst \,/,$(EPOCROOT))
+EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
+
+CREATESRCDIR = $(EPOCROOT)sf/os/fshell/tools/createsrc-templates
+CREATESRCDEST = $(EPOCROOT)epoc32/tools/createsrc-templates
+EXPORT = $(EPOCROOT)sf/os/fshell/tools/exportall
+
+BLD : $(BUILDFILES)
+$(BUILDFILES) : 
 ifeq ($(PLATFORM), WINSCW)
-	.\exportall .\createsrc-templates $(EPOCROOT)epoc32\tools\createsrc-templates
+	$(EXPORT)  $(CREATESRCDIR) $(CREATESRCDEST) 
 endif
 
-RELEASABLES :
+RELEASABLES : $(RELEASABLEFILES)
+$(RELEASABLEFILES) :
 ifeq ($(PLATFORM), WINSCW)
-	@.\exportall -w .\createsrc-templates $(EPOCROOT)epoc32\tools\createsrc-templates
+	@$(EXPORT)  -w $(CREATESRCDIR) $(CREATESRCDEST) 
 endif
 
-CLEAN :
+CLEAN : $(CLEANFILES)
+
+$(CLEANFILES) :
 ifeq ($(PLATFORM), WINSCW)
-	.\exportall -c .\createsrc-templates $(EPOCROOT)epoc32\tools\createsrc-templates
+	$(EXPORT)-c $(CREATESRCDIR) $(CREATESRCDEST) 
 endif
 
 MAKMAKE FINAL FREEZE LIB CLEANLIB RESOURCE SAVESPACE : 
\ No newline at end of file