deplacement du numero de version -> fichier VERSION a la racine

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7833 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2007-02-07 14:49:42 +00:00
parent 5d5094fe30
commit 5b52f30e7d
12 changed files with 34 additions and 28 deletions

6
VERSION Normal file
View File

@ -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$

Binary file not shown.

Binary file not shown.

View File

@ -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

View File

@ -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

View File

@ -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)"

View File

@ -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

View File

@ -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%%";;

View File

@ -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:

View File

@ -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%%"

View File

@ -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

View File

@ -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