diff options
-rw-r--r-- | VERSION | 6 | ||||
-rwxr-xr-x | boot/ocamlc | bin | 1014251 -> 1014222 bytes | |||
-rwxr-xr-x | boot/ocamllex | bin | 161515 -> 161803 bytes | |||
-rw-r--r-- | byterun/Makefile | 6 | ||||
-rw-r--r-- | byterun/Makefile.nt | 6 | ||||
-rw-r--r-- | camlp4/unmaintained/etc/Makefile | 6 | ||||
-rw-r--r-- | stdlib/Makefile | 8 | ||||
-rw-r--r-- | stdlib/sys.mlp (renamed from stdlib/sys.ml) | 8 | ||||
-rwxr-xr-x | tools/make-package-macosx | 8 | ||||
-rw-r--r-- | utils/config.mlp | 2 | ||||
-rw-r--r-- | yacc/Makefile | 6 | ||||
-rw-r--r-- | yacc/Makefile.nt | 6 |
12 files changed, 34 insertions, 28 deletions
diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..fac86e260 --- /dev/null +++ b/VERSION @@ -0,0 +1,6 @@ +3.10+dev22 (2007-02-07) + +# The version string is the first line of this file. +# It must be in the format described in stdlib/sys.mli + +# $Id$ diff --git a/boot/ocamlc b/boot/ocamlc Binary files differindex 4ab8cf797..73e6c4d61 100755 --- a/boot/ocamlc +++ b/boot/ocamlc diff --git a/boot/ocamllex b/boot/ocamllex Binary files differindex 7b91e2103..bf049efec 100755 --- a/boot/ocamllex +++ b/boot/ocamllex diff --git a/byterun/Makefile b/byterun/Makefile index cedee2052..6d891647e 100644 --- a/byterun/Makefile +++ b/byterun/Makefile @@ -101,10 +101,8 @@ jumptbl.h : instruct.h sed -n -e '/^ /s/ \([A-Z]\)/ \&\&lbl_\1/gp' \ -e '/^}/q' instruct.h > jumptbl.h -version.h : ../stdlib/sys.ml - sed -n -e 's/;;//' \ - -e '/let *ocaml_version *= */s//#define OCAML_VERSION /p' \ - <../stdlib/sys.ml >version.h +version.h : ../VERSION + echo "#define OCAML_VERSION \"`head -1 ../VERSION`\"" >version.h .SUFFIXES: .d.o diff --git a/byterun/Makefile.nt b/byterun/Makefile.nt index 1253ad98f..cdf4e02d5 100644 --- a/byterun/Makefile.nt +++ b/byterun/Makefile.nt @@ -92,10 +92,8 @@ jumptbl.h : instruct.h sed -n -e "/^ /s/ \([A-Z]\)/ \&\&lbl_\1/gp" \ -e "/^}/q" instruct.h > jumptbl.h -version.h : ../stdlib/sys.ml - sed -n -e 's/;;//' \ - -e '/let *ocaml_version *= */s//#define OCAML_VERSION /p' \ - <../stdlib/sys.ml >version.h +version.h : ../VERSION + echo "#define OCAML_VERSION \"`head -1 ../VERSION`\"" >version.h main.$(DO): main.c $(CC) $(DLLCCCOMPOPTS) -c main.c diff --git a/camlp4/unmaintained/etc/Makefile b/camlp4/unmaintained/etc/Makefile index a17d63f13..599470ec6 100644 --- a/camlp4/unmaintained/etc/Makefile +++ b/camlp4/unmaintained/etc/Makefile @@ -41,10 +41,8 @@ mkcamlp4.sh: mkcamlp4.sh.tpl version.sh sed -e "s!LIBDIR!$(LIBDIR)!g" -e "/define VERSION/r version.sh" \ mkcamlp4.sh.tpl > mkcamlp4.sh -version.sh : $(OTOP)/stdlib/sys.ml - sed -n -e 's/;;//' \ - -e '/let *ocaml_version *= */s//VERSION=/p' \ - <$(OTOP)/stdlib/sys.ml >version.sh +version.sh : $(OTOP)/VERSION + echo "VERSION=\"`head -1 ../VERSION`\"" >version.sh install-local: -$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)" diff --git a/stdlib/Makefile b/stdlib/Makefile index d2de5074b..ec938f701 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -90,6 +90,14 @@ camlheader camlheader_ur: header.c ../config/Makefile cp camlheader camlheader_ur; \ fi +sys.ml: sys.mlp ../VERSION + @rm -f sys.ml + sed -e "s|%%VERSION%%|`head -1 ../VERSION`|" sys.mlp >sys.ml + @chmod -w sys.ml + +clean:: + rm -f sys.ml + clean:: rm -f camlheader camlheader_ur diff --git a/stdlib/sys.ml b/stdlib/sys.mlp index 733b9328a..d88aab324 100644 --- a/stdlib/sys.ml +++ b/stdlib/sys.mlp @@ -13,6 +13,10 @@ (* $Id$ *) +(* WARNING: sys.ml is generated from sys.mlp. DO NOT EDIT sys.ml or + your changes will be lost. +*) + (* System interface *) external get_config: unit -> string * int = "caml_sys_get_config" @@ -76,6 +80,6 @@ let catch_break on = set_signal sigint Signal_default -(* OCaml version string, must be in the format described in sys.mli. *) +(* The version string is found in file ../VERSION *) -let ocaml_version = "3.10+dev21 (2006-12-18)";; +let ocaml_version = "%%VERSION%%";; diff --git a/tools/make-package-macosx b/tools/make-package-macosx index 7dd79175a..0aa76f279 100755 --- a/tools/make-package-macosx +++ b/tools/make-package-macosx @@ -17,11 +17,9 @@ cd package-macosx rm -rf ocaml.pkg ocaml-rw.dmg -VERSION=`sed -n -e '/ocaml_version/s/.*"\([^"]*\)".*/\1/p' ../stdlib/sys.ml` -VERSION_MAJOR=`sed -n -e '/ocaml_version/s/.*"\([0-9]*\)\..*/\1/p' \ - ../stdlib/sys.ml` -VERSION_MINOR=`sed -n -e '/ocaml_version/s/.*"[0-9]*\.\([0-9]*\)[.+].*/\1/p' \ - ../stdlib/sys.ml` +VERSION=`head -1 ../VERSION` +VERSION_MAJOR=`sed -n -e '1s/^\([0-9]*\)\..*/\1/p' ../VERSION +VERSION_MINOR=`sed -n -e '1s/^[0-9]*\.\([0-9]*\)[.+].*/\1/p' ../VERSION # Worked in 10.2: diff --git a/utils/config.mlp b/utils/config.mlp index 7106c8f39..fa676cf78 100644 --- a/utils/config.mlp +++ b/utils/config.mlp @@ -12,7 +12,7 @@ (* $Id$ *) -(* The main OCaml version string has moved to stdlib/sys.ml *) +(* The main OCaml version string has moved to ../VERSION *) let version = Sys.ocaml_version let standard_library_default = "%%LIBDIR%%" diff --git a/yacc/Makefile b/yacc/Makefile index e831d5b13..322c540fe 100644 --- a/yacc/Makefile +++ b/yacc/Makefile @@ -27,10 +27,8 @@ all: ocamlyacc$(EXE) ocamlyacc$(EXE): $(OBJS) $(CC) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc $(OBJS) -version.h : ../stdlib/sys.ml - sed -n -e 's/;;//' \ - -e '/let *ocaml_version *= */s//#define OCAML_VERSION /p' \ - <../stdlib/sys.ml >version.h +version.h : ../VERSION + echo "#define OCAML_VERSION \"`head -1 ../VERSION`\"" >version.h clean: rm -f *.o ocamlyacc$(EXE) *~ version.h diff --git a/yacc/Makefile.nt b/yacc/Makefile.nt index 1aaa8fe59..a4b59e6c0 100644 --- a/yacc/Makefile.nt +++ b/yacc/Makefile.nt @@ -25,10 +25,8 @@ all: ocamlyacc.exe ocamlyacc.exe: $(OBJS) $(call MKEXE,ocamlyacc.exe,$(BYTECCLINKOPTS) $(OBJS) $(EXTRALIBS)) -version.h : ../stdlib/sys.ml - sed -n -e 's/;;//' \ - -e '/let *ocaml_version *= */s//#define OCAML_VERSION /p' \ - <../stdlib/sys.ml >version.h +version.h : ../VERSION + echo "#define OCAML_VERSION \"`head -1 ../VERSION`\"" >version.h clean: rm -f *.$(O) ocamlyacc.exe *~ version.h |