Makefile fixes.
authorTom Sutcliffe <thomas.sutcliffe@accenture.com>
Thu, 05 Aug 2010 12:06:56 +0100
changeset 25 482757737e59
parent 24 0653c7ef68b2
child 26 5d370dafea69
Makefile fixes. Fixed export_templates.mk and reenabled it Updated fshell version generation to better work with multiple platforms including winscw Updated other extension makefiles to better work with sbs --what
build/common/bld.inf
build/common/fsh_buildsis.mk
core/group/fshell_version.mk
core/group/genver.pl
core/src/fshell.mmp
documentation/fshell_builddocs.mk
tools/export_templates.mk
--- a/build/common/bld.inf	Sat Jul 31 20:58:45 2010 +0100
+++ b/build/common/bld.inf	Thu Aug 05 12:06:56 2010 +0100
@@ -59,5 +59,4 @@
 
 PRJ_MMPFILES
 
-//TODO figure out why SBS doesn't like this...
-//gnumakefile ..\..\tools\export_templates.mk
+gnumakefile ..\..\tools\export_templates.mk
--- a/build/common/fsh_buildsis.mk	Sat Jul 31 20:58:45 2010 +0100
+++ b/build/common/fsh_buildsis.mk	Thu Aug 05 12:06:56 2010 +0100
@@ -16,7 +16,7 @@
 
 RELEASABLES :
 ifneq ($(PLATFORM), WINSCW)
-	echo $(EPOCROOT)epoc32\fshell\fshell.unsigned.sis
+	@echo $(EPOCROOT)epoc32\fshell\fshell.unsigned.sis
 endif
 
 MAKMAKE BLD FREEZE LIB CLEANLIB RESOURCE CLEAN SAVESPACE : 
--- a/core/group/fshell_version.mk	Sat Jul 31 20:58:45 2010 +0100
+++ b/core/group/fshell_version.mk	Thu Aug 05 12:06:56 2010 +0100
@@ -9,7 +9,7 @@
 # Initial Contributors:
 # Accenture - Initial contribution
 #
-GENERATED_SOURCE_DIR = $(EPOCROOT)epoc32\build\fshell\core\generated
+GENERATED_SOURCE_DIR = $(EPOCROOT)epoc32\build\fshell\core\generated\platform_$(PLATFORM)
 GENERATED_SOURCE = $(GENERATED_SOURCE_DIR)\fshell_version.cpp
 
 MAKMAKE :
--- a/core/group/genver.pl	Sat Jul 31 20:58:45 2010 +0100
+++ b/core/group/genver.pl	Thu Aug 05 12:06:56 2010 +0100
@@ -81,5 +81,16 @@
     }
     close (COMPILER);
   }
+  elsif ($platform =~ /^winscw$/i) {
+    open (COMPILER, "mwccsym2.exe 2>&1 |") or die "Couldn't run \"mwccsym2.exe\": $!\n";
+    while (my $line = <COMPILER>) {
+      if ($line =~ /^Version/) {
+	chomp $line;
+	$version = "mwccsym2 $line";
+	last;
+      }
+    }
+    close (COMPILER);
+  }
   return $version;
 }
--- a/core/src/fshell.mmp	Sat Jul 31 20:58:45 2010 +0100
+++ b/core/src/fshell.mmp	Thu Aug 05 12:06:56 2010 +0100
@@ -77,9 +77,26 @@
 source          ymodem.cpp
 source          version.cpp
 
-sourcepath      \epoc32\build\fshell\core\generated
+// There doesn't seem to be a nice way of turning the platform into a string, like you have $(PLATFORM) in extension makefiles, sigh.
+#if defined(WINSCW)
+#define PLAT platform_WINSCW
+#elif defined(GCCE)
+#define PLAT platform_GCCE
+#elif defined(MARM_ARM4)
+#define PLAT platform_ARM4
+#elif defined(MARM_ARMV5)
+#define PLAT platform_ARMV5
+#endif
+
+#ifdef SBSV2
+sourcepath      /epoc32/build/fshell/core/generated/PLAT
+#else
+sourcepath      \epoc32\build\fshell\core\generated\ ## PLAT
+#endif
 source          fshell_version.cpp
+
 #ifdef FSHELL_CORE_SUPPORT_LICENSE
+sourcepath      \epoc32\build\fshell\core\generated
 source          license.cpp
 #endif
 
@@ -89,7 +106,3 @@
 library         iocli.lib
 library			lineeditor.lib
 library			ltkutils-tcb.lib
-
-START WINS
-win32_library   kernel32.lib
-END
--- a/documentation/fshell_builddocs.mk	Sat Jul 31 20:58:45 2010 +0100
+++ b/documentation/fshell_builddocs.mk	Thu Aug 05 12:06:56 2010 +0100
@@ -13,7 +13,7 @@
 	..\tools\fsh-builddocs -i epoc32/include pod-list.txt
 
 RELEASABLES :
-	..\tools\fsh-builddocs -i epoc32/include pod-list.txt -w
+	@..\tools\fsh-builddocs -i epoc32/include pod-list.txt -w
 
 CLEAN :
 	..\tools\fsh-builddocs -i epoc32/include pod-list.txt -c
--- a/tools/export_templates.mk	Sat Jul 31 20:58:45 2010 +0100
+++ b/tools/export_templates.mk	Thu Aug 05 12:06:56 2010 +0100
@@ -11,17 +11,17 @@
 #
 BLD :
 ifeq ($(PLATFORM), WINSCW)
-	.\exportall .\createsrc-templates %EPOCROOT%epoc32\tools\createsrc-templates
+	.\exportall .\createsrc-templates $(EPOCROOT)epoc32\tools\createsrc-templates
 endif
 
 RELEASABLES :
 ifeq ($(PLATFORM), WINSCW)
-	.\exportall -w .\createsrc-templates %EPOCROOT%epoc32\tools\createsrc-templates
+	@.\exportall -w .\createsrc-templates $(EPOCROOT)epoc32\tools\createsrc-templates
 endif
 
 CLEAN :
 ifeq ($(PLATFORM), WINSCW)
-	.\exportall -c .\createsrc-templates %EPOCROOT%epoc32\tools\createsrc-templates
+	.\exportall -c .\createsrc-templates $(EPOCROOT)epoc32\tools\createsrc-templates
 endif
 
-MAKMAKE  FINAL FREEZE LIB CLEANLIB RESOURCE SAVESPACE : 
\ No newline at end of file
+MAKMAKE FINAL FREEZE LIB CLEANLIB RESOURCE SAVESPACE : 
\ No newline at end of file