Przeglądaj źródła

changed version to string option (fix issue with quotes when using Makefile.win + Cygwin Make)

Nicolas Cannasse 12 lat temu
rodzic
commit
4ff1de893d
3 zmienionych plików z 5 dodań i 5 usunięć
  1. 2 2
      Makefile
  2. 2 2
      Makefile.win
  3. 1 1
      main.ml

+ 2 - 2
Makefile

@@ -40,9 +40,9 @@ ADD_REVISION=0
 export HAXE_STD_PATH=$(CURDIR)/std
 
 ifneq ($(ADD_REVISION),0)
-	VERSION_EXTRA="let version_extra = \" (git build $(shell git rev-parse --abbrev-ref HEAD) @ $(shell git describe --always)) \""
+	VERSION_EXTRA="let version_extra = Some \" (git build $(shell git rev-parse --abbrev-ref HEAD) @ $(shell git describe --always)) \""
 else
-	VERSION_EXTRA="let version_extra = \"\""
+	VERSION_EXTRA="let version_extra = None
 endif
 
 all: libs haxe

+ 2 - 2
Makefile.win

@@ -6,9 +6,9 @@ EXTENSION=.exe
 OCAMLOPT=ocamlopt.opt
 
 ifneq ($(ADD_REVISION),0)
-	VERSION_EXTRA=let version_extra = " (git build $(shell git rev-parse --abbrev-ref HEAD) @ $(shell git describe --always)) "
+	VERSION_EXTRA=let version_extra = Some " (git build $(shell git rev-parse --abbrev-ref HEAD) @ $(shell git describe --always)) "
 else
-	VERSION_EXTRA=let version_extra = ""
+	VERSION_EXTRA=let version_extra = None
 endif
 
 kill:

+ 1 - 1
main.ml

@@ -779,7 +779,7 @@ and do_connect host port args =
 and init ctx =
 	let usage = Printf.sprintf
 		"Haxe Compiler %d.%d.%d %s- (C)2005-2013 Haxe Foundation\n Usage : haxe%s -main <class> [-swf|-js|-neko|-php|-cpp|-as3] <output> [options]\n Options :"
-		(version / 100) ((version mod 100)/10) (version mod 10) (Version.version_extra) (if Sys.os_type = "Win32" then ".exe" else "")
+		(version / 100) ((version mod 100)/10) (version mod 10) (match Version.version_extra with None -> "" | Some v -> v) (if Sys.os_type = "Win32" then ".exe" else "")
 	in
 	let com = ctx.com in
 	let classes = ref [([],"Std")] in